diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 000000000..f3ecdb83a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,23 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: 'bug'
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Do this '...'
+2. Do that '....'
+3. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/chore.md b/.github/ISSUE_TEMPLATE/chore.md
new file mode 100644
index 000000000..24fc1b72f
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/chore.md
@@ -0,0 +1,8 @@
+---
+name: Chore issue template
+about: General purpose issues related to chores, project management, etc.
+title: ''
+labels: 'chore'
+assignees: ''
+
+---
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 000000000..de666baee
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: 'feature'
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000..93d113cb0
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,23 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+ - package-ecosystem: "gomod"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ - package-ecosystem: "pip"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ - package-ecosystem: "docker"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000..07da810bc
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,17 @@
+
+
+## Description
+
+
+## How Has This Been Tested?
+
+
+
+
+## Merge criteria:
+
+
+
+- [ ] The commits and have meaningful messages; the author will squash them [after approval](https://github.com/opendatahub-io/opendatahub-community/blob/main/contributor-cheatsheet.md#:~:text=Usually%20this%20is%20done%20in%20last%20phase%20of%20a%20PR%20revision) or will ask to merge with squash.
+- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
+- [ ] The developer has manually tested the changes and verified that the changes work
diff --git a/.github/workflows/build-and-push-image.yml b/.github/workflows/build-and-push-image.yml
new file mode 100644
index 000000000..216943aa1
--- /dev/null
+++ b/.github/workflows/build-and-push-image.yml
@@ -0,0 +1,68 @@
+name: Container image build and tag
+on:
+ push:
+ branches:
+ - 'main'
+ tags:
+ - 'v*'
+ paths-ignore:
+ - 'LICENSE*'
+ - '**.gitignore'
+ - '**.md'
+ - '**.txt'
+ - '.github/ISSUE_TEMPLATE/**'
+ - '.github/dependabot.yml'
+ - 'docs/**'
+env:
+ QUAY_ORG: opendatahub
+ QUAY_IMG_REPO: model-registry
+ QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
+ QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
+ PUSH_IMAGE: true
+jobs:
+ build-image:
+ runs-on: ubuntu-latest
+ steps:
+ # Assign context variable for various action contexts (tag, main, CI)
+ - name: Assigning tag context
+ if: github.head_ref == '' && startsWith(github.ref, 'refs/tags/v')
+ run: echo "BUILD_CONTEXT=tag" >> $GITHUB_ENV
+ - name: Assigning main context
+ if: github.head_ref == '' && github.ref == 'refs/heads/main'
+ run: echo "BUILD_CONTEXT=main" >> $GITHUB_ENV
+ # checkout branch
+ - uses: actions/checkout@v4
+ # set image version
+ - name: Set main-branch environment
+ if: env.BUILD_CONTEXT == 'main'
+ run: |
+ commit_sha=${{ github.event.after }}
+ tag=main-${commit_sha:0:7}
+ echo "VERSION=${tag}" >> $GITHUB_ENV
+ - name: Set tag environment
+ if: env.BUILD_CONTEXT == 'tag'
+ run: |
+ echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
+ - name: Build and Push Image
+ shell: bash
+ run: ./scripts/build_deploy.sh
+ - name: Tag Latest
+ if: env.BUILD_CONTEXT == 'main'
+ shell: bash
+ env:
+ IMG: quay.io/${{ env.QUAY_ORG }}/${{ env.QUAY_IMG_REPO }}
+ BUILD_IMAGE: false
+ run: |
+ docker tag ${{ env.IMG }}:$VERSION ${{ env.IMG }}:latest
+ # BUILD_IMAGE=false skip the build
+ ./scripts/build_deploy.sh
+ - name: Tag Main
+ if: env.BUILD_CONTEXT == 'main'
+ shell: bash
+ env:
+ IMG: quay.io/${{ env.QUAY_ORG }}/${{ env.QUAY_IMG_REPO }}
+ BUILD_IMAGE: false
+ run: |
+ docker tag ${{ env.IMG }}:$VERSION ${{ env.IMG }}:main
+ # BUILD_IMAGE=false skip the build
+ ./scripts/build_deploy.sh
diff --git a/.github/workflows/build-image-pr.yml b/.github/workflows/build-image-pr.yml
new file mode 100644
index 000000000..98f5de1f5
--- /dev/null
+++ b/.github/workflows/build-image-pr.yml
@@ -0,0 +1,61 @@
+name: Test container image build and deployment
+on:
+ pull_request:
+ paths-ignore:
+ - 'LICENSE*'
+ - '**.gitignore'
+ - '**.md'
+ - '**.txt'
+ - '.github/ISSUE_TEMPLATE/**'
+ - '.github/dependabot.yml'
+ - 'docs/**'
+ - 'clients/python/**'
+env:
+ QUAY_IMG_REPO: model-registry
+ PUSH_IMAGE: false
+ BRANCH: ${{ github.base_ref }}
+jobs:
+ build-and-test-image:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Generate Tag
+ shell: bash
+ id: tags
+ run: |
+ commit_sha=${{ github.event.after }}
+ tag=main-${commit_sha:0:7}
+ echo "tag=${tag}" >> $GITHUB_OUTPUT
+ - name: Build Image
+ shell: bash
+ env:
+ VERSION: ${{ steps.tags.outputs.tag }}
+ run: ./scripts/build_deploy.sh
+ - name: Start Kind Cluster
+ uses: helm/kind-action@v1.8.0
+ - name: Load Local Registry Test Image
+ env:
+ IMG: "quay.io/opendatahub/model-registry:${{ steps.tags.outputs.tag }}"
+ run: |
+ kind load docker-image -n chart-testing ${IMG}
+ - name: Deploy Operator With Test Image
+ env:
+ IMG: "quay.io/opendatahub/model-registry:${{ steps.tags.outputs.tag }}"
+ run: |
+ echo "Deploying operator from model-registry-operator branch ${BRANCH}"
+ kubectl apply -k "https://github.com/opendatahub-io/model-registry-operator.git/config/default?ref=${BRANCH}"
+ kubectl set env -n model-registry-operator-system deployment/model-registry-operator-controller-manager REST_IMAGE="${IMG}"
+ - name: Create Test Registry
+ run: |
+ kubectl apply -k "https://github.com/opendatahub-io/model-registry-operator.git/config/samples?ref=${BRANCH}"
+ kubectl get mr
+ - name: Wait for Test Registry Deployment
+ timeout-minutes: 5
+ run: |
+ CONDITION="false"
+ while [ "${CONDITION}" != "True" ]
+ do
+ sleep 5
+ CONDITION="`kubectl get mr modelregistry-sample --output=jsonpath='{.status.conditions[?(@.type=="Available")].status}'`"
+ echo "Registry Available=${CONDITION}"
+ done
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 000000000..901d34890
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,59 @@
+name: Build
+on:
+ push:
+ branches:
+ - 'main'
+ pull_request:
+ paths-ignore:
+ - 'LICENSE*'
+ - 'DOCKERFILE*'
+ - '**.gitignore'
+ - '**.md'
+ - '**.txt'
+ - '.github/ISSUE_TEMPLATE/**'
+ - '.github/dependabot.yml'
+ - 'docs/**'
+ - 'scripts/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: '1.19'
+ - name: Install Protoc
+ uses: arduino/setup-protoc@v3
+ with:
+ version: "24.3"
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3.9
+ - name: Install makefile dependencies
+ run: make deps
+ - name: Clean
+ run: make clean
+ - name: Build
+ run: make build
+ - name: Check if there are uncommitted file changes
+ run: |
+ clean=$(git status --porcelain)
+ if [[ -z "$clean" ]]; then
+ echo "Empty git status --porcelain: $clean"
+ else
+ echo "Uncommitted file changes detected: $clean"
+ git diff
+ exit 1
+ fi
+ - name: Unit tests
+ run: make test-cover
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v4.0.1
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ with:
+ files: coverage.txt
+ fail_ci_if_error: true
diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt
new file mode 100644
index 000000000..25d0a41b5
--- /dev/null
+++ b/.github/workflows/constraints.txt
@@ -0,0 +1,5 @@
+pip==23.3.1
+nox==2023.04.22
+nox-poetry==1.0.2
+poetry==1.6.1
+virtualenv==20.24.6
diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml
new file mode 100644
index 000000000..6f4da8d7b
--- /dev/null
+++ b/.github/workflows/python-release.yml
@@ -0,0 +1,50 @@
+name: Release Python client
+on:
+ push:
+ tags:
+ - py-v*
+ workflow_dispatch:
+jobs:
+ release:
+ name: Release
+ runs-on: ubuntu-latest
+ permissions:
+ id-token: write
+ env:
+ FORCE_COLOR: "1"
+ steps:
+ - name: Check out the repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+ - name: Upgrade pip
+ run: |
+ pip install --constraint=.github/workflows/constraints.txt pip
+ pip --version
+ - name: Install Poetry
+ run: |
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
+ poetry --version
+ - name: Check version
+ working-directory: clients/python
+ run: |
+ set -o pipefail
+ LATEST_TAG=$(git describe --tags --match="py-v*")
+ if [[ "$LATEST_TAG" =~ $(poetry version | cut -d' ' -f1) ]]; then
+ echo "::error title='$LATEST_TAG tag does not match project version'::"
+ exit 1
+ fi
+ - name: Build package
+ working-directory: clients/python
+ run: |
+ poetry build --ansi
+ - name: Publish package on PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ verbose: true
+ print-hash: true
+ packages-dir: clients/python/dist/
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml
new file mode 100644
index 000000000..323575a7c
--- /dev/null
+++ b/.github/workflows/python-tests.yml
@@ -0,0 +1,75 @@
+name: Python workflows
+on:
+ push:
+ branches:
+ - "main"
+ pull_request:
+jobs:
+ tests:
+ name: ${{ matrix.session }} ${{ matrix.python }}
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python: ["3.10"]
+ session: [lint, tests, mypy, docs-build]
+ include:
+ - python: "3.9"
+ session: tests
+ env:
+ NOXSESSION: ${{ matrix.session }}
+ FORCE_COLOR: "1"
+ PRE_COMMIT_COLOR: "always"
+ steps:
+ - name: Check out the repository
+ uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python }}
+ - name: Upgrade pip
+ run: |
+ pip install --constraint=.github/workflows/constraints.txt pip
+ pip --version
+ - name: Upgrade pip in virtual environments
+ shell: python
+ run: |
+ import os
+ import pip
+
+ with open(os.environ["GITHUB_ENV"], mode="a") as io:
+ print(f"VIRTUALENV_PIP={pip.__version__}", file=io)
+ - name: Install Poetry
+ run: |
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
+ poetry --version
+ - name: Install Nox
+ run: |
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
+ pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
+ nox --version
+ - name: Run Nox
+ working-directory: clients/python
+ run: |
+ if [[ ${{ matrix.session }} == "tests" ]]; then
+ nox --python=${{ matrix.python }} -- --cov-report=xml
+ elif [[ ${{ matrix.session }} == "mypy" ]]; then
+ nox --python=${{ matrix.python }} ||\
+ echo "::error title='mypy failure'::Check the logs for more details"
+ else
+ nox --python=${{ matrix.python }}
+ fi
+ - name: Upload coverage report
+ uses: codecov/codecov-action@v4.0.1
+ if: always() && matrix.session == 'tests'
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ with:
+ files: coverage.xml
+ fail_ci_if_error: true
+ - name: Upload documentation
+ if: matrix.session == 'docs-build'
+ uses: actions/upload-artifact@v4
+ with:
+ name: docs
+ path: clients/python/docs/_build
diff --git a/.github/workflows/run-robot-tests.yaml b/.github/workflows/run-robot-tests.yaml
new file mode 100644
index 000000000..029b40408
--- /dev/null
+++ b/.github/workflows/run-robot-tests.yaml
@@ -0,0 +1,65 @@
+name: run-robot-tests
+run-name: Run Robot Framework tests
+# Run workflow
+on:
+ # For every push to repository
+ push:
+ # To any branch
+ branches:
+ - '*'
+ # For every pull request
+ pull_request:
+ # But ignore this paths
+ paths-ignore:
+ - 'LICENSE*'
+ - 'DOCKERFILE*'
+ - '**.gitignore'
+ - '**.md'
+ - '**.txt'
+ - '.github/ISSUE_TEMPLATE/**'
+ - '.github/dependabot.yml'
+ - 'docs/**'
+ - 'scripts/**'
+# Define workflow jobs
+jobs:
+ # Job runs Robot Framework tests against locally build image from current code
+ run-robot-tests:
+ # Ubuntu latest is sufficient system for run
+ runs-on: ubuntu-latest
+ # Define steps of job
+ steps:
+ # Get checkout action to get this repository
+ - uses: actions/checkout@v4
+ # Install defined Python version to run Robot Framework tests
+ - name: Install Python 3.9.x
+ # Get setup-python action to install Python
+ uses: actions/setup-python@v5
+ with:
+ # Set Python version to install
+ python-version: '3.9'
+ # Set architecture of Python to install
+ architecture: 'x64'
+ # Install required Python packages for running Robot Framework tests
+ - name: Install required Python packages
+ # Install required Python packages using pip
+ run: pip install -r test/robot/requirements.txt
+ # Install model_registry Python package from current code
+ - name: Install model_registry Python package
+ # Install model_registry package as editable using pip
+ run: pip install -e clients/python
+ # Start docker compose with locally build image from current code
+ - name: Start docker compose with local image
+ # Start docker compose in the background
+ run: docker compose -f docker-compose-local.yaml up --detach
+ # Run Robot Framework tests in REST mode against running docker compose
+ - name: Run Robot Framework tests (REST mode)
+ # Run Robot Framework tests in REST mode from test/robot directory
+ run: robot test/robot
+ # Run Robot Framework tests in Python mode against running docker compose
+ - name: Run Robot Framework tests (Python mode)
+ # Run Robot Framework tests in Python mode from test/robot directory
+ run: TEST_MODE=Python robot test/robot/MRandLogicalModel.robot
+ # Shutdown docker compose with locally build image from current code
+ - name: Shutdown docker compose with local image
+ # Shutdown docker compose running in the background
+ run: docker compose -f docker-compose-local.yaml down
diff --git a/.gitignore b/.gitignore
index 3b735ec4a..ef1719027 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,8 +14,23 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
-# Dependency directories (remove the comment below to include it)
-# vendor/
-
# Go workspace file
go.work
+
+# Idea files
+.idea
+
+# Model registry config and DB files to ignore
+.model-registry.yaml
+model-registry
+metadata.sqlite.db
+
+# Ignore go vendor and code coverage files
+vendor
+coverage.txt
+
+# Robot Framework files
+log.html
+output.xml
+report.html
+__pycache__
diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore
new file mode 100644
index 000000000..18a46d80e
--- /dev/null
+++ b/.openapi-generator-ignore
@@ -0,0 +1,47 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
+
+# model and client files
+pkg/openapi/api
+pkg/openapi/api/**
+pkg/openapi/git_push.sh
+pkg/openapi/.gitignore
+pkg/openapi/.travis.yml
+pkg/openapi/.openapi-generator-ignore
+
+pkg/openapi/README.md
+pkg/openapi/docs/**.md
+pkg/openapi/test
+pkg/openapi/test/**
+pkg/openapi/**all_of.go
+pkg/openapi/go.mod
+pkg/openapi/go.sum
+
+# server files to ignore
+internal/server/openapi/api
+internal/server/openapi/api/**
+internal/server/openapi/.openapi-generator-ignore
+internal/server/openapi/api_model_registry_service_service.go
+internal/server/openapi/README.md
+internal/server/openapi/main.go
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 000000000..b40ec0727
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,28 @@
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.4.0
+ hooks:
+ - id: check-added-large-files
+ - id: check-ast
+ - id: check-case-conflict
+ - id: check-docstring-first
+ - id: check-executables-have-shebangs
+ - id: check-json
+ - id: check-merge-conflict
+ # TODO: (goverter 1.3.2) generated files are marked 777 (see: https://github.com/jmattheis/goverter/issues/128)
+ # - id: check-shebang-scripts-are-executable
+ - id: check-symlinks
+ - id: debug-statements
+ - id: detect-private-key
+ - id: end-of-file-fixer
+ - id: trailing-whitespace
+ - repo: https://github.com/astral-sh/ruff-pre-commit
+ rev: v0.1.13
+ hooks:
+ - id: ruff
+ args: [--fix]
+ - id: ruff-format
+ - repo: https://github.com/google/yamlfmt
+ rev: v0.10.0
+ hooks:
+ - id: yamlfmt
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d7b6310f1..5817bbbee 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -11,3 +11,194 @@ The contributor's guide
* helps you get started with your first contribution to Kubeflow,
* and describes the pull request and review workflow in detail, including the
OWNERS files and automated workflow tool.
+
+
+
+This document focus on technical aspects while contributing to the Model Registry project
+
+# Contributing to Model Registry using Apple-silicon/ARM-based computers
+
+Some limitations apply when developing on this project, specifically using Apple-silicon and Mac OSX.
+The content from this guide might also be applicable in part for general ARM-based developers/users, beyond Mac OSX.
+
+## Makefile
+
+The make command shipped with Mac OSX (at the time of writing) is a bit old:
+
+```
+% make --version
+GNU Make 3.81
+Copyright (C) 2006 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.
+There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.
+
+This program built for i386-apple-darwin11.3.0
+```
+
+ and known to cause problems when using this project's Makefile:
+
+```
+% make build
+openapi-generator-cli validate -i api/openapi/model-registry.yaml
+make: openapi-generator-cli: No such file or directory
+make: *** [openapi/validate] Error 1
+```
+
+i.e. failing to locate the `bin/` executables managed in the Makefile.
+
+The solution is to use and updated version of `make`.
+
+You can install it with Homebrew:
+
+```
+% brew install make
+...
+==> Pouring make--4.4.1.arm64_ventura.bottle.tar.gz
+==> Caveats
+GNU "make" has been installed as "gmake".
+If you need to use it as "make", you can add a "gnubin" directory
+to your PATH from your bashrc like:
+
+ PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
+...
+```
+
+and now you can substitute `gmake` every time the make command is mentioned in guides (or perform the path management per the caveat).
+
+## Docker engine
+
+Several options of docker engines are available for Mac.
+Having Docker installed is also helpful for Testcontainers.
+
+### Colima
+
+Colima offers Rosetta (Apple specific) emulation which is handy since the Google MLMD project dependency is x86 specific.
+You can install Colima (and Docker) with Homebrew.
+
+You can create a Colima "docker context" focusing on x86 emulation with:
+
+```
+colima start --vz-rosetta --vm-type vz --arch x86_64 --cpu 4 --memory 8
+```
+
+To use with *Testcontainers for Go* you can use these commands:
+
+```
+export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock"
+export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE="/var/run/docker.sock"
+```
+
+as instructed in [this guide](https://golang.testcontainers.org/system_requirements/using_colima/#:~:text=Set%20the%20DOCKER_HOST%20environment).
+
+This colima setups allows to:
+- launch Integration tests in Go (used in Core go layer) with Testcontainers for Go
+- launch DevContainer to be able to install MLMD python wheel dependency (which is x86 specific)
+
+## Remote-only MLMD Python library
+
+The Model Registry Python client wraps `ml-metadata` python dependency (which is [x86 specific](https://pypi.org/project/ml-metadata/#files)).
+
+When developing and contributing to the Model Registry Python client using Apple-silicon/ARM-based computers,
+it can be helpful to evaluate using locally this soft-fork of the upstream MLMD library supporting only remote gRPC connections:
+https://github.com/opendatahub-io/ml-metadata/releases/tag/v1.14.0%2Bremote.1
+
+This dependency can be substituted in the [clients/python/pyproject.toml](clients/python/pyproject.toml) and installed locally with `poetry lock`.
+It is recommended not to check-in this substitution, only helpful for local development while using Apple-silicon/ARM-based computers.
+
+## DevContainer
+
+Using a [DevContainer](https://containers.dev) is helpful to develop with the Model Registry Python client, since it needs to wrap MLMD python dependency (which is [x86 specific](https://pypi.org/project/ml-metadata/#files)).
+
+This allows for instance with [VSCode DevContainer extension](https://code.visualstudio.com/docs/devcontainers/containers) to re-open VSCode window "inside" an x86 emulated docker container.
+The experience is very similar to when on GitHub.com you press dot `.` and you get a VSCode "inside something", except it is local to your machine.
+It's not super fast because x86 is emulated via Rosetta, but works "good enough" to complete most tasks without requiring remote connection to a real x86 server.
+
+To use DevContainer as a framework directly, a command-line tool and an SDK is available as well on the upstream project: https://containers.dev.
+
+Don't forget you will need a Docker context for x86 emulation, for instance with colima (see previous step) this can be achieved with:
+
+```
+colima start --vz-rosetta --vm-type vz --arch x86_64 --cpu 4 --memory 8
+```
+
+Define this `.devcontainer/devcontainer.json` file :
+```jsonc
+{
+ "name": "Python 3",
+ // "image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye"
+ "build": {
+ "dockerfile": "Dockerfile"
+ },
+ "runArgs": [
+ "--network=host"
+ ],
+ "customizations": {
+ "vscode": {
+ "extensions": [
+ // does not work well in DevContainer: "robocorp.robotframework-lsp",
+ "d-biehl.robotcode"
+ ]
+ }
+ },
+//...
+}
+```
+
+The `network=host` allow from _inside_ the devcontainer to reach any "service" exposed on your computer (host).
+This is helpful if other containers are started on your computer (eg: a PostgreSQL or DB in another container).
+
+The `customizations.vscode.extensions` pre-loads additional extensions needed in VSCode to be executing from *inside* the DevContainer.
+
+Define this `.devcontainer/Dockerfile` file:
+
+```docker
+FROM mcr.microsoft.com/devcontainers/python:1-3.10-bullseye
+
+# Here I use the USER from the FROM image
+ARG USERNAME=vscode
+ARG GROUPNAME=vscode
+
+# Here I use the UID/GID from _my_ computer, as I'm _not_ using Docker Desktop
+ARG USER_UID=501
+ARG USER_GID=20
+
+RUN groupmod --gid $USER_GID -o $GROUPNAME \
+ && usermod --uid $USER_UID --gid $USER_GID $USERNAME \
+ && chown -R $USER_UID:$USER_GID /home/$USERNAME
+
+# General setup which is "cached" for convenience
+RUN pip install -U pip setuptools
+RUN pip install -U poetry
+RUN pip install -U "ml-metadata==1.14.0"
+RUN pip install -U robotframework
+RUN pip install -U robotframework-requests
+RUN pip install -U PyYAML
+```
+
+The group/user is needed as on Mac anything _but_ Docker Desktop will need to set correct FS permissions. (more details here: `https://github.com/devcontainers/spec/issues/325`).
+
+The RUN pip install "caches" the local installation (inside the DevContainer) of some wheels which are almost always needed, for convenience.
+
+Please notice the line `RUN pip install -U "ml-metadata==1.14.0"`: that pip install would otherwise fail on Apple-silicon/ARM-based machines.
+
+E.g. when issued on bare-metal-Apple-silicon fails with:
+```
+% pip install -U "ml-metadata==1.14.0"
+ERROR: Could not find a version that satisfies the requirement ml-metadata==1.14.0 (from versions: 0.12.0.dev0, 0.13.0.dev0, 0.13.1.dev0)
+ERROR: No matching distribution found for ml-metadata==1.14.0
+```
+
+As all the wheels are x86 specific: https://pypi.org/project/ml-metadata/1.14.0/#files
+
+So it's not even possible to receive code assists. However, after clicking to re-open the project inside an (emulated) DevContainer:
+
+![](docs/Screenshot%202023-11-29%20at%2014.08.12.png)
+
+Then with the given setup MLMD is already installed inside the DevContainer:
+
+![](docs/Screenshot%202023-11-29%20at%2014.10.14.png)
+
+At this point Poetry is already installed as well and can be used to build and run test of the Model Registry Python client.
+
+
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..93f0143ba
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,50 @@
+# Build the model-registry binary
+FROM registry.access.redhat.com/ubi8/go-toolset:1.19 as builder
+
+WORKDIR /workspace
+# Copy the Go Modules manifests
+COPY ["go.mod", "go.sum", "./"]
+# cache deps before building and copying source so that we don't need to re-download as much
+# and so that source changes don't invalidate our downloaded layer
+RUN go mod download
+
+USER root
+# default NodeJS 14 is not enough for openapi-generator-cli, switch to Node JS currently supported
+RUN yum remove -y nodejs npm
+RUN yum module -y reset nodejs
+RUN yum module -y enable nodejs:18
+# install npm and java for openapi-generator-cli
+RUN yum install -y nodejs npm java-11
+
+# Copy the go source
+COPY ["Makefile", "main.go", ".openapi-generator-ignore", "openapitools.json", "./"]
+
+# Download protoc compiler v24.3
+RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip -O protoc.zip && \
+ unzip -q protoc.zip && \
+ bin/protoc --version && \
+ rm protoc.zip
+
+# Download tools
+RUN make deps
+
+# Copy rest of the source
+COPY bin/ bin/
+COPY cmd/ cmd/
+COPY api/ api/
+COPY internal/ internal/
+COPY pkg/ pkg/
+
+# Build
+USER root
+RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 make clean model-registry
+
+# Use distroless as minimal base image to package the model-registry binary
+# Refer to https://github.com/GoogleContainerTools/distroless for more details
+FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
+WORKDIR /
+# copy the registry binary
+COPY --from=builder /workspace/model-registry .
+USER 65532:65532
+
+ENTRYPOINT ["/model-registry"]
diff --git a/Dockerfile.odh b/Dockerfile.odh
new file mode 100644
index 000000000..86e2114bc
--- /dev/null
+++ b/Dockerfile.odh
@@ -0,0 +1,34 @@
+# Build the model-registry binary
+FROM registry.access.redhat.com/ubi8/go-toolset:1.19 as builder
+
+WORKDIR /workspace
+# Copy the Go Modules manifests
+COPY ["go.mod", "go.sum", "./"]
+# cache deps before building and copying source so that we don't need to re-download as much
+# and so that source changes don't invalidate our downloaded layer
+RUN go mod download
+
+USER root
+
+# Copy the go source
+COPY ["Makefile", "main.go", ".openapi-generator-ignore", "openapitools.json", "./"]
+
+# Copy rest of the source
+COPY bin/ bin/
+COPY cmd/ cmd/
+COPY api/ api/
+COPY internal/ internal/
+COPY pkg/ pkg/
+
+# Build
+RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 make clean/odh build/odh
+
+# Use distroless as minimal base image to package the model-registry binary
+# Refer to https://github.com/GoogleContainerTools/distroless for more details
+FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
+WORKDIR /
+# copy the registry binary
+COPY --from=builder /workspace/model-registry .
+USER 65532:65532
+
+ENTRYPOINT ["/model-registry"]
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..be4789037
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,202 @@
+# useful paths
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
+PROJECT_BIN := $(PROJECT_PATH)/bin
+
+# add tools bin directory
+PATH := $(PROJECT_BIN):$(PATH)
+
+MLMD_VERSION ?= 1.14.0
+
+# docker executable
+DOCKER ?= docker
+# default Dockerfile
+DOCKERFILE ?= Dockerfile
+# container registry
+IMG_REGISTRY ?= quay.io
+# container image organization
+IMG_ORG ?= opendatahub
+# container image version
+IMG_VERSION ?= main
+# container image repository
+IMG_REPO ?= model-registry
+# container image
+IMG := ${IMG_REGISTRY}/$(IMG_ORG)/$(IMG_REPO)
+
+model-registry: build
+
+# clean the ml-metadata protos and trigger a fresh new build which downloads
+# ml-metadata protos based on specified MLMD_VERSION
+.PHONY: update/ml_metadata
+update/ml_metadata: clean/ml_metadata clean build
+
+clean/ml_metadata:
+ rm -rf api/grpc/ml_metadata/proto/*.proto
+
+api/grpc/ml_metadata/proto/metadata_source.proto:
+ mkdir -p api/grpc/ml_metadata/proto/
+ cd api/grpc/ml_metadata/proto/ && \
+ curl -LO "https://raw.githubusercontent.com/google/ml-metadata/v${MLMD_VERSION}/ml_metadata/proto/metadata_source.proto" && \
+ sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";#' metadata_source.proto
+
+api/grpc/ml_metadata/proto/metadata_store.proto:
+ mkdir -p api/grpc/ml_metadata/proto/
+ cd api/grpc/ml_metadata/proto/ && \
+ curl -LO "https://raw.githubusercontent.com/google/ml-metadata/v${MLMD_VERSION}/ml_metadata/proto/metadata_store.proto" && \
+ sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";#' metadata_store.proto
+
+api/grpc/ml_metadata/proto/metadata_store_service.proto:
+ mkdir -p api/grpc/ml_metadata/proto/
+ cd api/grpc/ml_metadata/proto/ && \
+ curl -LO "https://raw.githubusercontent.com/google/ml-metadata/v${MLMD_VERSION}/ml_metadata/proto/metadata_store_service.proto" && \
+ sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";#' metadata_store_service.proto
+
+internal/ml_metadata/proto/%.pb.go: api/grpc/ml_metadata/proto/%.proto
+ protoc -I./api/grpc --go_out=./internal --go_opt=paths=source_relative \
+ --go-grpc_out=./internal --go-grpc_opt=paths=source_relative $<
+
+.PHONY: gen/grpc
+gen/grpc: internal/ml_metadata/proto/metadata_store.pb.go internal/ml_metadata/proto/metadata_store_service.pb.go
+
+internal/converter/generated/converter.go: internal/converter/*.go
+ goverter gen github.com/opendatahub-io/model-registry/internal/converter/
+
+.PHONY: gen/converter
+gen/converter: gen/grpc internal/converter/generated/converter.go
+
+# validate the openapi schema
+.PHONY: openapi/validate
+openapi/validate: bin/openapi-generator-cli
+ openapi-generator-cli validate -i api/openapi/model-registry.yaml
+
+# generate the openapi server implementation
+# note: run manually only when model-registry.yaml api changes, for model changes gen/openapi is run automatically
+.PHONY: gen/openapi-server
+gen/openapi-server: bin/openapi-generator-cli openapi/validate
+ openapi-generator-cli generate \
+ -i api/openapi/model-registry.yaml -g go-server -o internal/server/openapi --package-name openapi --global-property models \
+ --ignore-file-override ./.openapi-generator-ignore --additional-properties=outputAsLibrary=true,enumClassPrefix=true,router=chi,sourceFolder=,onlyInterfaces=true,isGoSubmodule=true,enumClassPrefix=true,useOneOfDiscriminatorLookup=true \
+ --template-dir ./templates/go-server
+ ./scripts/gen_type_asserts.sh
+ gofmt -w internal/server/openapi
+
+# generate the openapi schema model and client
+.PHONY: gen/openapi
+gen/openapi: bin/openapi-generator-cli openapi/validate pkg/openapi/client.go
+
+pkg/openapi/client.go: bin/openapi-generator-cli api/openapi/model-registry.yaml
+ rm -rf pkg/openapi
+ openapi-generator-cli generate \
+ -i api/openapi/model-registry.yaml -g go -o pkg/openapi --package-name openapi \
+ --ignore-file-override ./.openapi-generator-ignore --additional-properties=isGoSubmodule=true,enumClassPrefix=true,useOneOfDiscriminatorLookup=true
+ gofmt -w pkg/openapi
+
+.PHONY: vet
+vet:
+ go vet ./...
+
+.PHONY: clean
+clean:
+ rm -Rf ./model-registry internal/ml_metadata/proto/*.go internal/converter/generated/*.go pkg/openapi
+
+.PHONY: clean/odh
+clean/odh:
+ rm -Rf ./model-registry
+
+bin/go-enum:
+ GOBIN=$(PROJECT_BIN) go install github.com/searKing/golang/tools/go-enum@v1.2.97
+
+bin/protoc-gen-go:
+ GOBIN=$(PROJECT_BIN) go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0
+
+bin/protoc-gen-go-grpc:
+ GOBIN=$(PROJECT_BIN) go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
+
+bin/golangci-lint:
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(PROJECT_BIN) v1.54.2
+
+bin/goverter:
+ GOBIN=$(PROJECT_PATH)/bin go install github.com/jmattheis/goverter/cmd/goverter@v1.1.1
+
+OPENAPI_GENERATOR ?= ${PROJECT_BIN}/openapi-generator-cli
+NPM ?= "$(shell which npm)"
+bin/openapi-generator-cli:
+ifeq (, $(shell which ${NPM} 2> /dev/null))
+ @echo "npm is not available please install it to be able to install openapi-generator"
+ exit 1
+endif
+ifeq (, $(shell which ${PROJECT_BIN}/openapi-generator-cli 2> /dev/null))
+ @{ \
+ set -e ;\
+ mkdir -p ${PROJECT_BIN} ;\
+ mkdir -p ${PROJECT_BIN}/openapi-generator-installation ;\
+ cd ${PROJECT_BIN} ;\
+ ${NPM} install -g --prefix ${PROJECT_BIN}/openapi-generator-installation @openapitools/openapi-generator-cli ;\
+ ln -s openapi-generator-installation/bin/openapi-generator-cli openapi-generator-cli ;\
+ }
+endif
+
+.PHONY: clean/deps
+clean/deps:
+ rm -Rf bin/*
+
+.PHONY: deps
+deps: bin/go-enum bin/protoc-gen-go bin/protoc-gen-go-grpc bin/golangci-lint bin/goverter bin/openapi-generator-cli
+
+.PHONY: vendor
+vendor:
+ go mod vendor
+
+.PHONY: build
+build: gen vet lint
+ go build
+
+.PHONY: build/odh
+build/odh: vet
+ go build
+
+.PHONY: gen
+gen: deps gen/grpc gen/openapi gen/converter
+ go generate ./...
+
+.PHONY: lint
+lint:
+ golangci-lint run main.go
+ golangci-lint run cmd/... internal/... ./pkg/...
+
+.PHONY: test
+test: gen
+ go test ./internal/... ./pkg/...
+
+.PHONY: test-nocache
+test-nocache: gen
+ go test ./internal/... ./pkg/... -count=1
+
+.PHONY: test-cover
+test-cover: gen
+ go test ./internal/... ./pkg/... -cover -count=1 -race -coverprofile=coverage.txt -covermode=atomic
+
+.PHONY: run/proxy
+run/proxy: gen
+ go run main.go proxy --logtostderr=true
+
+.PHONY: proxy
+proxy: build
+ ./model-registry proxy --logtostderr=true
+
+# login to docker
+.PHONY: docker/login
+docker/login:
+ $(DOCKER) login -u "${DOCKER_USER}" -p "${DOCKER_PWD}" "${IMG_REGISTRY}"
+
+# build docker image
+.PHONY: image/build
+image/build:
+ ${DOCKER} build . -f ${DOCKERFILE} -t ${IMG}:$(IMG_VERSION)
+
+# push docker image
+.PHONY: image/push
+image/push:
+ ${DOCKER} push ${IMG}:$(IMG_VERSION)
+
+all: model-registry
diff --git a/README.md b/README.md
index 07c4cc058..8106540f2 100644
--- a/README.md
+++ b/README.md
@@ -4,3 +4,127 @@ Model registry provides a central repository for model developers to store and m
## Red Hat's Pledge
- Red Hat drives the project's development through Open Source principles, ensuring transparency, sustainability, and community ownership.
- Red Hat values the Kubeflow community and commits to providing a minimum of 12 months' notice before ending project maintenance after the initial release.
+
+![build checks status](https://github.com/opendatahub-io/model-registry/actions/workflows/build.yml/badge.svg?branch=main)
+[![codecov](https://codecov.io/github/opendatahub-io/model-registry/graph/badge.svg?token=61URLQA3VS)](https://codecov.io/github/opendatahub-io/model-registry)
+
+## Pre-requisites:
+- go >= 1.19
+- protoc v24.3 - [Protocol Buffers v24.3 Release](https://github.com/protocolbuffers/protobuf/releases/tag/v24.3)
+- npm >= 10.2.0 - [Installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
+- Java >= 11.0
+- python 3.9
+
+## OpenAPI Proxy Server
+
+The model registry proxy server implementation follows a contract-first approach, where the contract is identified by [model-registry.yaml](api/openapi/model-registry.yaml) OpenAPI specification.
+
+You can also easily display the latest OpenAPI contract for model-registry in a Swagger-like editor directly from this repository; for example, [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/opendatahub-io/model-registry/main/api/openapi/model-registry.yaml).
+### Starting the OpenAPI Proxy Server
+Run the following command to start the OpenAPI proxy server from source:
+
+```shell
+make run/proxy
+```
+The proxy service implements the OpenAPI defined in [model-registry.yaml](api/openapi/model-registry.yaml) to create an Open Data Hub specific REST API on top of the existing ml-metadata server.
+
+> **NOTE** The ml-metadata server must be running and accessible from the environment where model-registry starts up.
+
+## Model Registry Core
+
+The model registry core is the layer which implements the core/business logic by interacting with the underlying ml-metadata server.
+It provides a model registry domain-specific [api](internal/core/api.go) that is in charge to proxy all, appropriately transformed, requests to ml-metadata using gRPC calls.
+
+### Model registry library
+
+For more background on Model Registry Go core library and instructions on using it, please check [getting started guide](./docs/mr_go_library.md).
+
+## Development
+
+### Building
+Run the following command to build the server binary:
+
+```shell
+make build
+```
+
+The generated binary uses `spf13` cmdline args. More information on using the server can be obtained by running the command:
+
+```shell
+./model-registry --help
+```
+
+Run the following command to clean the server binary, generated models and etc.:
+
+```shell
+make clean
+```
+
+### Testing
+
+Run the following command to trigger all tests:
+
+```shell
+make test
+```
+
+or, to see the statement coverage:
+
+```shell
+make test-cover
+```
+
+### Docker Image
+#### Building the docker image
+The following command builds a docker image for the server with the tag `model-registry`:
+
+```shell
+docker build -t model-registry .
+```
+
+Note that the first build will be longer as it downloads the build tool dependencies.
+Subsequent builds will re-use the cached tools layer.
+
+#### Running the proxy server
+
+> **NOTE:** ml-metadata server must be running and accessible, see more info on how to start the gRPC server in the official ml-metadata [documentation](https://github.com/google/ml-metadata).
+
+The following command starts the proxy server:
+
+```shell
+docker run -d -p ::8080 --user : --name server model-registry proxy -n 0.0.0.0
+```
+
+Where, ``, ``, and `` are the same as in the migrate command above.
+And `` and `` are the local ip and port to use to expose the container's default `8080` listening port.
+The server listens on `localhost` by default, hence the `-n 0.0.0.0` option allows the server port to be exposed.
+
+#### Running model registry & ml-metadata
+
+> **NOTE:** Docker compose must be installed in your environment.
+
+There are two `docker-compose` files that make the startup of both model registry and ml-metadara easier, by simply running:
+
+```shell
+docker compose -f docker-compose[-local].yaml up
+```
+
+The main difference between the two docker compose files is that `-local` one build the model registry from source, the other one, instead, download the `latest` pushed [quay.io](https://quay.io/repository/opendatahub/model-registry?tab=tags) image.
+
+When shutting down the docker compose, you might want to clean-up the SQLite db file generated by ML Metadata, for example `./test/config/ml-metadata/metadata.sqlite.db`
+
+### Testing architecture
+
+The following diagram illustrate testing strategy for the several components in Model Registry project:
+
+![](/docs/Model%20Registry%20Testing%20areas.png)
+
+Go layers components are tested with Unit Tests written in Go, as well as Integration Tests leveraging Testcontainers.
+This allows to verify the expected "Core layer" of logical data mapping developed implemented in Go, matches technical expectations.
+
+Python client is also tested with Unit Tests and Integration Tests written in Python.
+
+End-to-end testing is developed with Robot Framework; this higher-lever layer of testing is used to:
+- demonstrate *User Stories* from high level perspective
+- demonstrate coherent logical data mapping by performing the same high level capabilities, using REST API flow Vs Python client flow,
+directly checking the end results in the backend gRPC MLMD server.
diff --git a/api/grpc/ml_metadata/proto/metadata_store.proto b/api/grpc/ml_metadata/proto/metadata_store.proto
new file mode 100644
index 000000000..8e59ff6c2
--- /dev/null
+++ b/api/grpc/ml_metadata/proto/metadata_store.proto
@@ -0,0 +1,1234 @@
+/* Copyright 2019 Google LLC
+
+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
+
+ https://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.
+==============================================================================*/
+syntax = "proto2";
+option go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";
+
+package ml_metadata;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/descriptor.proto";
+
+extend google.protobuf.EnumValueOptions {
+ // The system type information of each simple type enum refers to.
+ optional SystemTypeExtension system_type_extension = 384560917;
+}
+
+message SystemTypeExtension {
+ // The name of a system defined type.
+ optional string type_name = 1;
+}
+
+// A value in properties.
+message Value {
+ oneof value {
+ int64 int_value = 1;
+ double double_value = 2;
+ string string_value = 3;
+ google.protobuf.Struct struct_value = 4;
+ google.protobuf.Any proto_value = 5;
+ bool bool_value = 6;
+ }
+}
+
+message Artifact {
+ // Output only. The unique server generated id of the artifact.
+ optional int64 id = 1;
+ // The client provided name of the artifact. This field is optional. If set,
+ // it must be unique among all the artifacts of the same artifact type within
+ // a database instance and cannot be changed once set.
+ optional string name = 7;
+ // The id of an ArtifactType. This needs to be specified when an artifact is
+ // created, and it cannot be changed.
+ optional int64 type_id = 2;
+ // Output only. The name of an ArtifactType.
+ optional string type = 8;
+ // The uniform resource identifier of the physical artifact.
+ // May be empty if there is no physical artifact.
+ optional string uri = 3;
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all artifacts within a database instance.
+ optional string external_id = 11;
+ // Properties of the artifact.
+ // Properties must be specified in the ArtifactType.
+ map properties = 4;
+ // User provided custom properties which are not defined by its type.
+ map custom_properties = 5;
+
+ enum State {
+ UNKNOWN = 0;
+ // A state indicating that the artifact may exist.
+ PENDING = 1;
+ // A state indicating that the artifact should exist, unless something
+ // external to the system deletes it.
+ LIVE = 2;
+ // A state indicating that the artifact should be deleted.
+ MARKED_FOR_DELETION = 3;
+ // A state indicating that the artifact has been deleted.
+ DELETED = 4;
+ // A state indicating that the artifact has been abandoned, which may be
+ // due to a failed or cancelled execution.
+ ABANDONED = 5;
+ // A state indicating that the artifact is a reference artifact. At
+ // execution start time, the orchestrator produces an output artifact for
+ // each output key with state PENDING. However, for an intermediate
+ // artifact, this first artifact's state will be REFERENCE. Intermediate
+ // artifacts emitted during a component's execution will copy the REFERENCE
+ // artifact's attributes. At the end of an execution, the artifact state
+ // should remain REFERENCE instead of being changed to LIVE.
+ REFERENCE = 6;
+ }
+
+ // The state of the artifact known to the system.
+ optional State state = 6;
+ // Output only. Create time of the artifact in millisecond since epoch.
+ optional int64 create_time_since_epoch = 9;
+ // Output only. Last update time of the artifact since epoch in millisecond
+ // since epoch.
+ optional int64 last_update_time_since_epoch = 10;
+
+ // Output only.
+ optional google.protobuf.Any system_metadata = 12;
+}
+
+// The list of supported property value types.
+enum PropertyType {
+ UNKNOWN = 0;
+ INT = 1;
+ DOUBLE = 2;
+ STRING = 3;
+ // Prefer to use `PROTO` to store structed data since this option has
+ // inefficient database storage usage.
+ STRUCT = 4;
+ PROTO = 5;
+ BOOLEAN = 6;
+}
+
+message ArtifactType {
+ // The id of the type. 1-1 relationship between type names and IDs.
+ optional int64 id = 1;
+ // The name of the type. It must be unique among ArtifactTypes within a
+ // database instance.
+ optional string name = 2;
+ // An optional version of the type. An empty string is treated as unset.
+ optional string version = 4;
+ // An optional description about the type.
+ optional string description = 5;
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all artifact types within a database
+ // instance.
+ optional string external_id = 7;
+ // The schema of the type.
+ // Properties are always optional in the artifact.
+ // Properties of an artifact type can be expanded but not contracted (i.e.,
+ // you can add columns but not remove them).
+ map properties = 3;
+
+ // An enum of system-defined artifact types.
+ enum SystemDefinedBaseType {
+ UNSET = 0 [(system_type_extension).type_name = 'unset_artifact_type'];
+ DATASET = 1 [(system_type_extension).type_name = 'mlmd.Dataset'];
+ MODEL = 2 [(system_type_extension).type_name = 'mlmd.Model'];
+ METRICS = 3 [(system_type_extension).type_name = 'mlmd.Metrics'];
+ STATISTICS = 4 [(system_type_extension).type_name = 'mlmd.Statistics'];
+ }
+
+ // An optional system defined base_type expressing the intent of the current
+ // type. This field is useful for the tool builders to utilize the stored MLMD
+ // information, e.g., `MyModel` ArtifactType could set base_type = MODEL.
+ optional SystemDefinedBaseType base_type = 6;
+}
+
+// An event represents a relationship between an artifact and an execution.
+// There are different kinds of events, relating to both input and output, as
+// well as how they are used by the mlmd powered system.
+// For example, the DECLARED_INPUT and DECLARED_OUTPUT events are part of the
+// signature of an execution. For example, consider:
+//
+// my_result = my_execution({"data":[3,7],"schema":8})
+//
+// Where 3, 7, and 8 are artifact_ids, Assuming execution_id of my_execution is
+// 12 and artifact_id of my_result is 15, the events are:
+// {
+// artifact_id:3,
+// execution_id: 12,
+// type:DECLARED_INPUT,
+// path:{step:[{"key":"data"},{"index":0}]}
+// }
+// {
+// artifact_id:7,
+// execution_id: 12,
+// type:DECLARED_INPUT,
+// path:{step:[{"key":"data"},{"index":1}]}
+// }
+// {
+// artifact_id:8,
+// execution_id: 12,
+// type:DECLARED_INPUT,
+// path:{step:[{"key":"schema"}]}
+// }
+// {
+// artifact_id:15,
+// execution_id: 12,
+// type:DECLARED_OUTPUT,
+// path:{step:[{"key":"my_result"}]}
+// }
+//
+// Other event types include INPUT/OUTPUT, INTERNAL_INPUT/_OUTPUT and
+// PENDING_OUTPUT:
+//
+// * The INPUT/OUTPUT is an event that actually reads/writes an artifact by an
+// execution. The input/output artifacts may not declared in the signature,
+// For example, the trainer may output multiple caches of the parameters
+// (as an OUTPUT), then finally write the SavedModel as a DECLARED_OUTPUT.
+//
+// * The INTERNAL_INPUT/_OUTPUT are event types which are only meaningful to
+// an orchestration system to keep track of the details for later debugging.
+// For example, a fork happened conditioning on an artifact, then an execution
+// is triggered, such fork implementing may need to log the read and write
+// of artifacts and may not be worth displaying to the users.
+//
+// For instance, in the above example,
+//
+// my_result = my_execution({"data":[3,7],"schema":8})
+//
+// there is another execution (id: 15), which represents a
+// `garbage_collection` step in an orchestration system
+//
+// gc_result = garbage_collection(my_result)
+//
+// that cleans `my_result` if needed. The details should be invisible to the
+// end users and lineage tracking. The orchestrator can emit following events:
+//
+// {
+// artifact_id: 15,
+// execution_id: 15,
+// type:INTERNAL_INPUT,
+// }
+// {
+// artifact_id:16, // New artifact containing the GC job result.
+// execution_id: 15,
+// type:INTERNAL_OUTPUT,
+// path:{step:[{"key":"gc_result"}]}
+// }
+//
+// * The PENDING_OUTPUT event is used to indicate that an artifact is
+// tentatively associated with an active execution which has not yet been
+// finalized. For example, an orchestration system can register output
+// artifacts of a running execution with PENDING_OUTPUT events to indicate
+// the output artifacts the execution is expected to produce. When the
+// execution is finished, the final set of output artifacts can be associated
+// with the exeution using OUTPUT events, and any unused artifacts which were
+// previously registered with PENDING_OUTPUT events can be updated to set
+// their Artifact.State to ABANDONED.
+//
+// Events are unique of the same
+// (artifact_id, execution_id, type) combination within a metadata store.
+message Event {
+ // A simple path (e.g. {step{key:"foo"}}) can name an artifact in the context
+ // of an execution.
+ message Path {
+ message Step {
+ oneof value {
+ int64 index = 1;
+ string key = 2;
+ }
+ }
+ // A simple path (e.g. {step{key:"foo"}}) can name an artifact in the
+ // context of an execution.
+ repeated Step steps = 1;
+ }
+ // Events distinguish between an artifact that is written by the execution
+ // (possibly as a cache), versus artifacts that are part of the declared
+ // output of the Execution. For more information on what DECLARED_ means,
+ // see the comment on the message.
+ enum Type {
+ UNKNOWN = 0;
+ DECLARED_OUTPUT = 1; // A declared output of the execution.
+ DECLARED_INPUT = 2; // A declared input of the execution.
+ INPUT = 3; // An input of the execution.
+ OUTPUT = 4; // An output of the execution.
+ INTERNAL_INPUT = 5; // An internal input of the execution.
+ INTERNAL_OUTPUT = 6; // An internal output of the execution.
+ PENDING_OUTPUT = 7; // A pending output of the execution.
+ }
+ // The artifact id is required for an event, and should refer to an
+ // existing artifact.
+ optional int64 artifact_id = 1;
+ // The execution_id is required for an event, and should refer to an
+ // existing execution.
+ optional int64 execution_id = 2;
+ // The path in an artifact struct, or the name of an artifact.
+ optional Path path = 3;
+ // The type of an event.
+ optional Type type = 4;
+ // Time the event occurred
+ // Epoch is Jan 1, 1970, UTC
+ optional int64 milliseconds_since_epoch = 5;
+
+ // Output only.
+ optional google.protobuf.Any system_metadata = 6;
+}
+
+message Execution {
+ // Output only. The unique server generated id of the execution.
+ optional int64 id = 1;
+ // The client provided name of the execution. This field is optional. If set,
+ // it must be unique among all the executions of the same execution type
+ // within a database instance and cannot be changed once set.
+ optional string name = 6;
+ // The id of an ExecutionType. This needs to be specified when an execution is
+ // created, and it cannot be changed.
+ // The id of an ExecutionType.
+ optional int64 type_id = 2;
+ // Output only. The name of an ExecutionType.
+ optional string type = 7;
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all executions within a database instance.
+ optional string external_id = 10;
+ // The state of the Execution. The state transitions are
+ // NEW -> RUNNING -> COMPLETE | CACHED | FAILED | CANCELED
+ // CACHED means the execution is skipped due to cached results.
+ // CANCELED means the execution is skipped due to precondition not met. It is
+ // different from CACHED in that a CANCELED execution will not have any event
+ // associated with it. It is different from FAILED in that there is no
+ // unexpected error happened and it is regarded as a normal state.
+ enum State {
+ UNKNOWN = 0;
+ NEW = 1;
+ RUNNING = 2;
+ COMPLETE = 3;
+ FAILED = 4;
+ CACHED = 5;
+ CANCELED = 6;
+ }
+ // The last known state of an execution in the system.
+ optional State last_known_state = 3;
+ // Properties of the Execution.
+ // Properties must be specified in the ExecutionType.
+ map properties = 4;
+ // User provided custom properties which are not defined by its type.
+ map custom_properties = 5;
+ // Output only. Create time of the execution in millisecond since epoch.
+ optional int64 create_time_since_epoch = 8;
+ // Output only. Last update time of the execution in millisecond since epoch.
+ optional int64 last_update_time_since_epoch = 9;
+
+ // Output only.
+ optional google.protobuf.Any system_metadata = 11;
+}
+
+message ExecutionType {
+ // The id of the type. 1-1 relationship between type names and IDs.
+ optional int64 id = 1;
+ // The name of the type. It must be unique among ExecutionTypes within a
+ // database instance.
+ optional string name = 2;
+ // An optional version of the type. An empty string is treated as unset.
+ optional string version = 6;
+ // An optional description about the type.
+ optional string description = 7;
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all execution types within a database
+ // instance.
+ optional string external_id = 9;
+ // The schema of the type.
+ // Properties are always optional in the execution.
+ map properties = 3;
+ // The ArtifactStructType of the input.
+ // For example: {
+ // "dict":{
+ // "properties":{
+ // "schema":{
+ // "union_type":{
+ // "none":{},
+ // "simple":{...schema type...}
+ // },
+ // },
+ // "data":{
+ // "simple":{...data_type...}
+ // }
+ // }
+ // }
+ // }
+ // That would be an optional schema field with a required data field.
+ optional ArtifactStructType input_type = 4;
+ // The ArtifactStructType of the output.
+ // For example {"simple":{...stats gen output type...}}
+ optional ArtifactStructType output_type = 5;
+
+ // An enum of system-defined execution types.
+ enum SystemDefinedBaseType {
+ UNSET = 0 [(system_type_extension).type_name = 'unset_execution_type'];
+ TRAIN = 1 [(system_type_extension).type_name = 'mlmd.Train'];
+ TRANSFORM = 2 [(system_type_extension).type_name = 'mlmd.Transform'];
+ PROCESS = 3 [(system_type_extension).type_name = 'mlmd.Process'];
+ EVALUATE = 4 [(system_type_extension).type_name = 'mlmd.Evaluate'];
+ DEPLOY = 5 [(system_type_extension).type_name = 'mlmd.Deploy'];
+ }
+
+ // An optional system defined base_type expressing the intent of the current
+ // type. This field is useful for the tool builders to utilize the stored MLMD
+ // information, e.g., `MyTrainer` ExecutionType could set base_type = TRAIN.
+ optional SystemDefinedBaseType base_type = 8;
+}
+
+message ContextType {
+ // The id of the type. 1-1 relationship between type names and IDs.
+ optional int64 id = 1;
+ // The name of the type, e.g., Pipeline, Task, Session, User, etc. It must be
+ // unique among ContextTypes within a database instance.
+ optional string name = 2;
+ // An optional version of the type. An empty string is treated as unset.
+ optional string version = 4;
+ // An optional description about the type.
+ optional string description = 5;
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all context types within a database
+ // instance.
+ optional string external_id = 7;
+ // The schema of the type, e.g., name: string, owner: string
+ // Properties are always optional in the context.
+ // Properties of an context type can be expanded but not contracted (i.e.,
+ // you can add columns but not remove them).
+ map properties = 3;
+
+ // An enum of system-defined context types.
+ enum SystemDefinedBaseType {
+ UNSET = 0 [(system_type_extension).type_name = 'unset_context_type'];
+ }
+
+ // An optional system defined base_type expressing the intent of the current
+ // context type.
+ // *NOTE: currently there are no system Context types defined, and the field
+ // is not used for ContextType.
+ optional SystemDefinedBaseType base_type = 6;
+}
+
+message Context {
+ // Output Only. The unique server generated id of the context.
+ optional int64 id = 1;
+ // The client provided name of the context. It must be unique within a
+ // database instance.
+ optional string name = 3;
+ // The id of a ContextType. This needs to be specified when a context is
+ // created, and it cannot be changed.
+ optional int64 type_id = 2;
+ // Output only. The name of a ContextType.
+ optional string type = 6;
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all contexts within a virtual database.
+ optional string external_id = 9;
+ // Values of the properties, which must be specified in the ContextType.
+ map properties = 4;
+ // User provided custom properties which are not defined by its type.
+ map custom_properties = 5;
+ // Output only. Create time of the context in millisecond since epoch.
+ optional int64 create_time_since_epoch = 7;
+ // Output only. Last update time of the context in millisecond since epoch.
+ optional int64 last_update_time_since_epoch = 8;
+
+ // Output only system metadata.
+ optional google.protobuf.Any system_metadata = 10;
+}
+
+// the Attribution edges between Context and Artifact instances.
+message Attribution {
+ optional int64 artifact_id = 1;
+ optional int64 context_id = 2;
+}
+
+// the Association edges between Context and Execution instances.
+message Association {
+ optional int64 execution_id = 1;
+ optional int64 context_id = 2;
+}
+
+// the Parental Context edges between Context and Context instances.
+message ParentContext {
+ optional int64 child_id = 1;
+ optional int64 parent_id = 2;
+}
+
+// A self-contained provenance (sub)graph representation consists of MLMD nodes
+// and their relationships. It is used to represent the query results from the
+// persistent backend (e.g., lineage about a node, reachability of two nodes).
+message LineageGraph {
+ // extracted types
+ repeated ArtifactType artifact_types = 1;
+ repeated ExecutionType execution_types = 2;
+ repeated ContextType context_types = 3;
+ // extracted nodes
+ repeated Artifact artifacts = 4;
+ repeated Execution executions = 5;
+ repeated Context contexts = 6;
+ // extracted edges
+ repeated Event events = 7;
+ repeated Attribution attributions = 8;
+ repeated Association associations = 9;
+}
+
+// The list of ArtifactStruct is EXPERIMENTAL and not in use yet.
+// The type of an ArtifactStruct.
+// An artifact struct type represents an infinite set of artifact structs.
+// It can specify the input or output type of an ExecutionType.
+// See the more specific types referenced in the message for more details.
+message ArtifactStructType {
+ oneof kind {
+ ArtifactType simple = 1; // Matches exactly this type.
+ UnionArtifactStructType union_type = 2;
+ IntersectionArtifactStructType intersection = 3;
+ ListArtifactStructType list = 4;
+ NoneArtifactStructType none = 5;
+ AnyArtifactStructType any = 6;
+ TupleArtifactStructType tuple = 7;
+ DictArtifactStructType dict = 8;
+ }
+}
+
+// Represents a union of types.
+message UnionArtifactStructType {
+ // An artifact struct matches this type if it matches any of the candidates.
+ // If candidates is empty, this is a bottom type (matches no artifacts).
+ repeated ArtifactStructType candidates = 1;
+}
+
+// A member of this type must satisfy all constraints.
+// This primarily useful not as an end-user type, but something calculated
+// as an intermediate type in the system.
+//
+// For example, suppose you have a method:
+// def infer_my_input_type(a): # try to infer the input type of this method.
+// use_in_method_x(a) # with input type x_input
+// use_in_method_y(a) # with input type y_input
+//
+// Given this information, you know that infer_my_input_type has
+// type {"intersection":{"constraints":[x_input, y_input]}}.
+//
+// IntersectionArtifactStructType intersection_type = {"constraints":[
+// {"dict":{"properties":{"schema":{"any":{}}},
+// "extra_properties":{"any":{}}}},
+// {"dict":{"properties":{"data":{"any":{}}},
+// "extra_properties":{"any":{}}}}]}
+// Since the first constraint requires the dictionary to have a schema
+// property, and the second constraint requires it to have a data property, this
+// is equivalent to:
+// ArtifactStructType other_type =
+// {"dict":{"properties":{"schema":{"any":{}},"data":{"any":{}}}},
+// "extra_properties":{"any":{}}}
+//
+message IntersectionArtifactStructType {
+ repeated ArtifactStructType constraints = 1;
+}
+
+// Represents an ArtifactStruct list type with homogeneous elements.
+message ListArtifactStructType {
+ // Every entry in the list must be of this type.
+ // Note: if this type is Any, then the list can have arbitrary elements.
+ optional ArtifactStructType element = 1;
+}
+
+// The only member of this type is a None artifact.
+// Note: ArtifactStruct{} is a None artifact.
+// This can represent an execution that has no outputs (or inputs),
+// or can be part of a UnionArtifactStructType to represent an optional
+// input.
+// For example, StatsGen has an "optional" schema input.
+// A practical example of this is:
+// stats_gen_type = {
+// "dict":{
+// "properties":{
+// "schema":{
+// "union_type":{
+// "none":{},
+// "simple":{...schema type...}
+// },
+// },
+// "data":{
+// "simple":{...data_type...}
+// }
+// }
+// }
+// };
+message NoneArtifactStructType {}
+
+// Every ArtifactStruct is a member of this type.
+message AnyArtifactStructType {}
+
+// An ordered list of heterogeneous artifact structs.
+// The length of the list is fixed.
+// Each position in the list can have a different type.
+message TupleArtifactStructType {
+ repeated ArtifactStructType elements = 1;
+}
+
+// A artifact struct type that represents a record or struct-like dictionary.
+// ArtifactStruct would be map (i.e. ArtifactStructMap)
+message DictArtifactStructType {
+ // Underlying properties for the type.
+ map properties = 1;
+
+ // If true, then if properties["foo"] can be None, then that key is not
+ // required.
+ optional bool none_type_not_required = 2;
+
+ // Extra keys are allowed that are not specified in properties. These
+ // keys must have the type specified below.
+ // If this is not specified, then extra properties are not allowed.
+ optional ArtifactStructType extra_properties_type = 3;
+}
+
+// Configuration for a "fake" database.
+// This database is an in-memory SQLite database that lives only as
+// long as the associated object lives.
+message FakeDatabaseConfig {}
+
+message MySQLDatabaseConfig {
+ // The hostname or IP address of the MYSQL server:
+ // * If unspecified, a connection to the local host is assumed.
+ // The client connects using a Unix socket specified by `socket`.
+ // * Otherwise, TCP/IP is used.
+ // Currently a replicated MYSQL backend is not supported.
+ optional string host = 1;
+ // The TCP Port number that the MYSQL server accepts connections on.
+ // If unspecified, the default MYSQL port (3306) is used.
+ optional int64 port = 2;
+ // The database to connect to. Must be specified.
+ // After connecting to the MYSQL server, this database is created if not
+ // already present unless skip_db_creation is set.
+ // All queries after Connect() are assumed to be for this database.
+ optional string database = 3;
+ // The MYSQL login id. If empty, the current user is assumed.
+ optional string user = 4;
+ // The password to use for `user`. If empty, only MYSQL user ids that don't
+ // have a password set are allowed to connect.
+ optional string password = 5;
+ // The Unix socket to use to connect to the server. If unspecified, a
+ // `host` must be provided.
+ optional string socket = 6;
+
+ // The options to establish encrypted connections to MySQL using SSL.
+ message SSLOptions {
+ // The path name of the client private key file.
+ optional string key = 1;
+ // The path name of the client public key certificate file.
+ optional string cert = 2;
+ // The path name of the CA certificate file.
+ optional string ca = 3;
+ // The path name of the directory that contains trusted SSL CA certificates.
+ optional string capath = 4;
+ // The list of permissible ciphers for SSL encryption.
+ optional string cipher = 5;
+ // If set, enable verification of the server certificate against the host
+ // name used when connecting to the server.
+ optional bool verify_server_cert = 6;
+ }
+ // If the field is set, the ssl options are set in mysql_options before
+ // establishing a connection. It is ignored if the mysql server does not
+ // enable SSL.
+ optional SSLOptions ssl_options = 7;
+
+ // A config to skip the database creation if not exist when connecting the
+ // db instance. It is useful when the db creation is handled by an admin
+ // process, while the lib user should not issue db creation clauses.
+ optional bool skip_db_creation = 8;
+}
+
+// A config contains the parameters when using with SqliteMetadatSource.
+message SqliteMetadataSourceConfig {
+ // A uri specifying Sqlite3 database filename, for example:
+ //
+ // file:some_sqlite3_file_in_local_dir.db
+ // file:///home/username/some_sqlite3_file.db
+ //
+ // see https://www.sqlite.org/c3ref/open.html for model details
+ //
+ // If not given, a in-memory sqlite3 database is used, and destroyed when
+ // disconnecting the metadata source.
+ optional string filename_uri = 1;
+
+ // Connection parameters for SQLite3 based metadata source.
+ enum ConnectionMode {
+ UNKNOWN = 0;
+ // Connect a metadata source in read-only mode. Connection fail if the
+ // sqlite3 database at the `filename` does not exist. Any queries modifying
+ // the database fail.
+ READONLY = 1;
+ // Connect a metadata source in read/write mode. Connection fail if the
+ // sqlite3 database at the `filename` does not exist.
+ READWRITE = 2;
+ // Similar to READWRITE. In addition, it creates the database if it does not
+ // exist.
+ READWRITE_OPENCREATE = 3;
+ }
+
+ // A flag specifying the connection mode. If not given, default connection
+ // mode is set to READWRITE_OPENCREATE.
+ optional ConnectionMode connection_mode = 2;
+}
+
+// A config contains the parameters when using with PostgreSQLMetadatSource.
+// Next index: 10
+message PostgreSQLDatabaseConfig {
+ // Name of host to connect to. If the host name starts with /, it is taken as
+ // a Unix-domain socket in the abstract namespace.
+ optional string host = 1;
+
+ // Numeric IP address of host to connect to. If this field is provided, `host`
+ // field is ignored.
+ optional string hostaddr = 2;
+
+ // Port number to connect to at the server host, or socket file name extension
+ // for Unix-domain connections.
+ optional string port = 3;
+
+ // PostgreSQL user name to connect as. Defaults to be the same as the
+ // operating system name of the user running the application.
+ optional string user = 4;
+
+ // Password to be used if the server demands password authentication.
+ optional string password = 5;
+
+ // Specifies the name of the file used to store passwords.
+ optional string passfile = 6;
+
+ // The database name. Defaults to be the same as the user name.
+ optional string dbname = 7;
+
+ // A config to skip the database creation if not exist when connecting the
+ // db instance. It is useful when the db creation is handled by an admin
+ // process, while the lib user should not issue db creation clauses.
+ optional bool skip_db_creation = 8;
+
+ message SSLOptions {
+ // disable, allow, verify-ca, verify-full, etc. Reference:
+ // https://www.postgresql.org/docs/current/libpq-connect.html
+ optional string sslmode = 1;
+
+ // This parameter specifies the file name of the client SSL certificate,
+ // replacing the default ~/.postgresql/postgresql.crt. This parameter is
+ // ignored if an SSL connection is not made.
+ optional string sslcert = 2;
+
+ // This parameter specifies the location for the secret key used for the
+ // client certificate. It can either specify a file name that will be used
+ // instead of the default ~/.postgresql/postgresql.key, this parameter is
+ // ignored if an SSL connection is not made.
+ optional string sslkey = 3;
+
+ // This parameter specifies the password for the secret key specified in
+ // sslkey, allowing client certificate private keys to be stored in
+ // encrypted form on disk even when interactive passphrase input is not
+ // practical.
+ optional string sslpassword = 4;
+
+ // This parameter specifies the name of a file containing SSL certificate
+ // authority (CA) certificate(s). If the file exists, the server's
+ // certificate will be verified to be signed by one of these authorities.
+ // The default is ~/.postgresql/root.crt.
+ optional string sslrootcert = 5;
+ }
+
+ optional SSLOptions ssloption = 9;
+}
+
+
+message MigrationOptions {
+ // If not set, by default the upgrade migration is disabled. MLMD only
+ // compares db_v with the lib_v, and raise error if the two do not align.
+ // If the field is set to true, MLMD performs upgrade migration. It upgrades
+ // the database schema version (db_v) to align with the library schema
+ // version (lib_v) when connecting to the database.
+ // Schema migration should not be run concurrently with multiple clients to
+ // prevent data races.
+ optional bool enable_upgrade_migration = 3;
+
+ // Downgrade the given database to the specified schema version.
+ // For v0.13.2 release, the schema_version is 0.
+ // For 0.14.0 and 0.15.0 release, the schema_version is 4.
+ // More details are described in g3doc/get_start.md#upgrade-mlmd-library
+ // Set this field only when a database is accidentally upgraded by a newer
+ // version library. Each library version only knows how to downgrade to
+ // previous schema versions. As downgrade migrations inevitably introduce
+ // data loss, please consider taking a backup of the database before
+ // downgrading schema.
+ // After downgrade migration, the database connection is canceled. The user
+ // needs to downgrade the library to use the database.
+ optional int64 downgrade_to_schema_version = 2 [default = -1];
+
+ reserved 1;
+}
+
+message RetryOptions {
+ // The max number of retries when transaction returns Aborted error.
+ optional int64 max_num_retries = 1;
+}
+
+message ConnectionConfig {
+ // Configuration for a new connection.
+ oneof config {
+ FakeDatabaseConfig fake_database = 1;
+ MySQLDatabaseConfig mysql = 2;
+ SqliteMetadataSourceConfig sqlite = 3;
+
+ // PostgreSQL database connection config.
+ PostgreSQLDatabaseConfig postgresql = 5;
+
+ }
+
+ // Options for overwriting the default retry setting when MLMD transactions
+ // returning Aborted error.
+ // The setting is currently available for python client library only.
+ // TODO(b/154862807) set the setting in transaction executor.
+ optional RetryOptions retry_options = 4;
+}
+
+// A list of supported GRPC arguments defined in:
+// https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
+message GrpcChannelArguments {
+ // Maximum message length in bytes per response that the channel can receive.
+ optional int64 max_receive_message_length = 1;
+ // Maximum misbehaving pings the server can bear before sending goaway and
+ // closing the transport? (0 indicates infinite number of misbehaving pings)
+ optional int64 http2_max_ping_strikes = 2;
+}
+
+// Configuration for the gRPC metadata store client.
+message MetadataStoreClientConfig {
+ // The hostname or IP address of the gRPC server. Must be specified.
+ optional string host = 1;
+ // The TCP Port number that the gRPC server accepts connections on.
+ // Must be specified.
+ optional int64 port = 2;
+
+ message SSLConfig {
+ // The PEM-encoded private key as a byte string, or Empty if no private key
+ // should be used.
+ optional string client_key = 1;
+ // The PEM-encoded certificate chain as a byte string to use or or Empty if
+ // no certificate chain should be used.
+ optional string server_cert = 2;
+ // The PEM-encoded root certificates as a byte string, or Empty to retrieve
+ // them from a default location chosen by gRPC runtime.
+ optional string custom_ca = 3;
+ }
+
+ // Configuration for a secure gRPC channel.
+ // If not given, insecure connection is used.
+ optional SSLConfig ssl_config = 3;
+
+ // GRPC channel creation arguments.
+ optional GrpcChannelArguments channel_arguments = 4;
+
+ // Time duration that a client is willing to wait for a reply from the server.
+ // If unset, the timeout is considered infinite. When the field is specified,
+ // Grpc APIs would return DeadlineExceededError when server does not respond
+ // within `client_timeout_sec`. Floating point valued, in seconds.
+ optional double client_timeout_sec = 5;
+
+}
+
+// Configuration for the gRPC metadata store server.
+message MetadataStoreServerConfig {
+ // Configuration to connect the metadata source backend.
+ optional ConnectionConfig connection_config = 1;
+
+ // Configuration for upgrade and downgrade migrations the metadata source.
+ optional MigrationOptions migration_options = 3;
+
+ message SSLConfig {
+ // Private server key for SSL
+ optional string server_key = 1;
+ // Public server certificate
+ optional string server_cert = 2;
+ // Custom certificate authority
+ optional string custom_ca = 3;
+ // Valid client certificate required?
+ optional bool client_verify = 4;
+ }
+
+ // Configuration for a secure gRPC channel.
+ // If not given, insecure connection is used.
+ optional SSLConfig ssl_config = 2;
+}
+
+// ListOperationOptions represents the set of options and predicates to be
+// used for List operations on Artifacts, Executions and Contexts.
+message ListOperationOptions {
+ // Max number of resources to return in the result. A value of zero or less
+ // results in a InvalidArgumentError.
+ // The API implementation also enforces an upper-bound of 100, and picks the
+ // minimum between this value and the one specified here.
+ optional int32 max_result_size = 1 [default = 20];
+
+ message OrderByField {
+ // Supported fields for Ordering.
+ enum Field {
+ FIELD_UNSPECIFIED = 0;
+ CREATE_TIME = 1;
+ LAST_UPDATE_TIME = 2;
+ ID = 3;
+ }
+
+ // Field to order.
+ optional Field field = 1 [default = ID];
+
+ // Direction of ordering.
+ optional bool is_asc = 2 [default = true];
+ }
+
+ // Ordering field.
+ optional OrderByField order_by_field = 2;
+
+ // Identifies the next page of results.
+ optional string next_page_token = 3;
+
+ // A boolean expression in SQL syntax that is used to specify the conditions
+ // on node attributes and directly connected assets.
+ //
+ // In the current implementation, filtering Artifact/Execution/Context with
+ // the following attributes and neighborhood is supported:
+ //
+ // Attributes:
+ // id:int64, type_id:int64, type:string,
+ // uri:string, name: string, external_id: string,
+ // create_time_since_epoch:int64, last_update_time_since_epoch:int64
+ // state:ENUM (Artifact only) last_known_state:ENUM (Execution only)
+ //
+ // Neighborhood
+ // - Properties and Custom Properties (for all node types):
+ // syntax: properties.$name ($name is the property name)
+ // custom_properties.$name ($name is the custom property name)
+ // attributes: the following attributes can be used
+ // int_value: int64, double_value: double, string_value: string
+ // bool_value: bool
+ //
+ // - Context (for Artifact and Execution):
+ // syntax: contexts_$alias ($alias can be [0-9A-Za-z_])
+ // attributes: the following attributes can be used
+ // id:int64, name:string, type:string, create_time_since_epoch:int64,
+ // last_update_time_since_epoch: int64
+ //
+ // - Parent and Child Contexts (for Contexts):
+ // syntax: parent_contexts_$alias( $alias can be [0-9A-Za-z_]
+ // child_contexts_$alias( $alias can be [0-9A-Za-z_]
+ // attributes: the following attributes can be used
+ // id:int64, name: string, type:string
+ //
+ // - Event (for Artifact and Execution)
+ // syntax: events_$alias ($alias can be [0-9A-Za-z_])
+ // attributes: the following attributes can be used
+ // artifact_id: int64(Execution only), execution_id: int64(Artifact only),
+ // type: ENUM, milliseconds_since_epoch: int64
+ //
+ // Examples:
+ // a) to filter nodes attributes:
+ // - id != 1
+ // - id IN (1, 3)
+ // - type_id = 5
+ // - type = 'my_type_name'
+ // - name = 'foo'
+ // - type = 'bar' AND name LIKE 'foo%'
+ // - external_id = 'my_external_id'
+ // - NOT(create_time_since_epoch < 1 OR last_update_time_since_epoch < 1)
+ //
+ // b) to filter artifacts' uri
+ // - uri = 'exact_path_string'
+ // - uri LIKE 'path_like_this%'
+ // - uri IS NOT NULL
+ //
+ // c) to filter artifact's state or execution's last_known_state
+ // - state = LIVE
+ // - state IS NULL
+ // - state IN (PENDING, LIVE)
+ // - last_known_state = RUNNING
+ // - last_known_state != RUNNING
+ // - last_known_state NOT IN (FAILED, CANCELED)
+ //
+ // d) to filter nodes having a specific context, artifact, or execution
+ // - contexts_a.id = 5
+ // - contexts_a.type = 'RunContext'
+ // - contexts_a.name = 'my_run'
+ // - contexts_a.create_time_since_epoch = 1626761453
+ // - contexts_a.last_update_time_since_epoch = 1626761453
+ // To filter nodes with conditions on multiple contexts:
+ // - contexts_a.name = 'my_run' AND contexts_b.name = 'my_pipeline'
+ // To filter context with artifacts:
+ // - artifacts_a.id = 5
+ // - artifacts_a.type = 'Dataset'
+ // - artifacts_a.name = 'my_dataset'
+ // - artifacts_a.uri = 'exact_path_string'
+ // - artifacts_a.state = LIVE
+ // - artifacts_a.state IN (PENDING, LIVE)
+ // - artifacts_a.external_id = "my_external_id"
+ // - artifacts_a.create_time_since_epoch = 1626761453
+ // - artifacts_a.last_update_time_since_epoch = 1626761453
+ // To filter contexts with conditions on multiple artifacts:
+ // - artifacts_a.name = 'my_run' AND artifacts_b.name = 'my_pipeline'
+ // To filter context with executions:
+ // - executions_a.id = 5
+ // - executions_a.type = 'Dataset'
+ // - executions_a.name = 'my_dataset'
+ // - executions_a.last_known_state = RUNNING
+ //. - executions_a.last_known_state IN (NEW, RUNNING)
+ // - executions_a.external_id = "my_external_id"
+ // - executions_a.create_time_since_epoch = 1626761453
+ // - executions_a.last_update_time_since_epoch = 1626761453
+ // To filter contexts with conditions on multiple executions:
+ // - executions_a.name = 'my_run' AND executions_b.name = 'my_pipeline'
+ //
+ // e) to filter nodes condition on their properties
+ // - properties.accuracy.double_value > 0.95
+ // - custom_properties.my_param.string_value = "foo"
+ // If the name of the property or custom property includes characters
+ // other than [0-9A-Za-z_], then the name need to be backquoted,
+ // e.g.,
+ // - properties.`my property`.int_value > 0
+ // - custom_properties.`my:custom.property`.bool_value = true
+ //
+ // f) complex query to filter both node attributes and neighborhood
+ // - type = 'DataSet' AND
+ // (contexts_a.type = 'RunContext' AND contexts_a.name = 'my_run') AND
+ // (properties.span = 1 OR custom_properties.span = 1)
+ //
+ // g) to filter parent/child context
+ // - parent_contexts_a.id = 5
+ // - child_contexts_a.type = 'RunContext'
+ // - parent_contexts_a.name = 'parent_context_1'
+ //
+ // h) to filter Artifacts on Events
+ // - events_0.execution_id = 1
+ // - events_0.type = INPUT
+ // - events_0.milliseconds_since_epoch = 1
+ // to filter Executions on Events
+ // - events_0.artifact_id = 1
+ // - events_0.type IN (INPUT, INTERNAL_INPUT)
+ // - events_0.milliseconds_since_epoch = 1
+ // TODO(b/145945460) Support filtering on event step fields.
+ optional string filter_query = 4;
+}
+
+// Encapsulates information to identify the next page of resources in
+// ListOperation.
+message ListOperationNextPageToken {
+ // Id offset within the resultset to start next page.
+ // Id offset is returned as Id is the unique field used to break ties for
+ // fields that might have duplicate entries, e.g. there could be two
+ // resources with same create_time. In such cases to break the tie in
+ // ordering, id offset is used.
+ // This field is currently only set whe order_by field is CREATE_TIME.
+ optional int64 id_offset = 1;
+
+ // Offset value of the order by field. If ID is used this value is same as
+ // id_offset.
+ optional int64 field_offset = 2;
+
+ // Options set in the first call to ListOperation. This ensures that if
+ // next_page_token is set by the caller then ListPipelineJobs API will always
+ // use options set in the first call.
+ optional ListOperationOptions set_options = 3;
+
+ // List of ids that have the same order_by field values. This is used to
+ // ensure List Operation does not return duplicate entries for nodes that have
+ // the same order_by field value.
+ // This field is currently only set whe order_by field is LAST_UPDATE_TIME.
+ repeated int64 listed_ids = 4;
+
+}
+
+// Options for transactions.
+// Note: This is under development. Clients should not use it.
+message TransactionOptions {
+ extensions 1000 to max;
+
+ // Transaction tag for debug use only.
+ optional string tag = 1;
+}
+
+
+// TODO(b/283852485): Deprecate GetLineageGraph API after migration to
+// GetLineageSubgraph API.
+// The query options for `get_lineage_graph` operation.
+// `query_nodes` is a list of nodes of interest.
+// Currently only artifacts are supported as `query_nodes`.
+// `stop_conditions` defines the filtering rules when querying a lineage graph.
+// `max_node_size` defines the total number of artifacts and executions returned
+// in the subgraph.
+message LineageGraphQueryOptions {
+ // A query to specify the nodes of interest.
+ // `ListOperationOptions.max_result_size` sets the maximum number of nodes to
+ // begin with the graph search.
+ // TODO(b/178491112) Support query_nodes for Executions.
+ oneof query_nodes {
+ ListOperationOptions artifacts_options = 1;
+ }
+
+ // Filtering conditions for retrieving the lineage graph.
+ message BoundaryConstraint {
+ // The maximum number of hops from the `query_nodes` to traverse.
+ // A hop is defined as a jump to the next node following the path of
+ // node -> event -> next_node.
+ // For example, in the lineage graph a_1 -> e_1 -> a_2:
+ // a_2 is 2 hops away from a_1, and e_1 is 1 hop away from a_1.
+ // `max_num_hops` should be non-negative.
+ // When its value is set to 0, only the `query_nodes` are returned.
+ optional int64 max_num_hops = 1;
+
+ // Filtering conditions for retrieving the lineage graph.
+ // Please refer to `ListOperationOptions.filter_query` for the syntax.
+ //
+ // If set, the `boundary_artifacts` defines which artifacts to keep in the
+ // returned lineage graph during the graph search.
+ // Artifacts that do not satisfy the `boundary_artifacts` are filtered out,
+ // and the subgraphs starting at them will be pruned.
+ // If not set, no artifacts will be filtered out.
+ // Taking the following lineage graph as example:
+ // (`a` represents an Artifact, `e` represents an Execution, each arrow
+ // represents a hop.)
+ // a_0 a_1 a_3
+ // | \ / \
+ // \/ \/ \/ \/
+ // e_0 e_1 e_3
+ // / \
+ // \/ \/
+ // a_2 a_4 a_5
+ // \ /
+ // \/ \/
+ // e_2
+ // To query all the upstream and downstream nodes 3 hops away from a_4,
+ // while excluding the upstream subgraph starting at a_3, then
+ // `stop_conditions` can be set as:
+ // {
+ // max_num_hops: 3
+ // boundary_artifacts: 'id != 3'
+ // }
+ // With the `stop_conditions`, {a_3, e_1, a_1, a_0, e_0} will be filtered
+ // out.
+ // The returned lineage graph looks like:
+ // e_3
+ // / \
+ // \/ \/
+ // a_2 a_4 a_5
+ // \ /
+ // \/ \/
+ // e_2
+ optional string boundary_artifacts = 2;
+ // If set, the `boundary_executions` defines which executions to keep in the
+ // returned lineage graph during the graph search.
+ // Executions that do not satisfy the `boundary_executions` are filtered out
+ // and the subgraphs starting at them will be pruned.
+ // If not set, no executions will be filtered out.
+ // In the example above, to query for all the upstream and downstream nodes
+ // 3 hops away from a_4, while excluding the upstream subgraph and the
+ // downstream subgraph starting at e_3, then `stop_conditions` can be set as
+ // {
+ // max_num_hops: 3
+ // boundary_executions: 'id != 3'
+ // }
+ // With the `stop_conditions`, {e_3, a_5, a_3, e_1, a_1, a_0, e_0} will be
+ // filtered out.
+ // The returned lineage graph looks like:
+ // a_2 a_4
+ // \ /
+ // \/ \/
+ // e_2
+ // However, for the following graph:
+ // a_0 a_1 a_3
+ // | \ / \
+ // \/ \/ \/ \/
+ // e_0 e_1 e_3
+ // \ / \
+ // \/ \/ \/
+ // a_2 a_4 a_5
+ // \ /
+ // \/ \/
+ // e_2
+ // With the same `stop_conditions`, only {e_3, a_5, a_0, e_0} will be
+ // filtered out.
+ // The returned lineage graph looks like:
+ // a_1 a_3
+ // \ /
+ // \/ \/
+ // e_1
+ // \
+ // \/
+ // a_2 a_4
+ // \ /
+ // \/ \/
+ // e_2
+ optional string boundary_executions = 3;
+ }
+
+ // A constraint option to define the filtering rules when querying a lineage
+ // graph.
+ optional BoundaryConstraint stop_conditions = 2;
+
+ // Maximum total number of artifacts and executions in the whole returned
+ // lineage graph.
+ // If set to 0 or below, all related nodes will be returned without any
+ // number limitation.
+ // The number counts toward Artifacts and Executions. Nothing else considered.
+ //
+ // NOTE: There is no pagination supported.
+ optional int64 max_node_size = 3 [default = 20];
+}
+
+// The query options for lineage graph tracing from a list of interested nodes.
+message LineageSubgraphQueryOptions {
+ // `starting_nodes` is a list of nodes of interest to start graph tracing.
+ // NOTE: The maximum number of starting nodes is 100 at most.
+ message StartingNodes {
+ // `filter_query` is a boolean expression in SQL syntax that is used to
+ // specify the conditions on starting nodes.
+ // Please refer to ListOperationOptions.filter_query for more details.
+ optional string filter_query = 1;
+ }
+
+ oneof starting_nodes {
+ StartingNodes starting_artifacts = 1;
+ StartingNodes starting_executions = 2;
+ }
+
+ // The maximum number of hops from the `starting_nodes` to traverse.
+ // A hop is defined as a jump to the next node following the path of
+ // node -> event -> next_node.
+ // For example, in the lineage graph a_1 -> e_1 -> a_2:
+ // a_2 is 2 hops away from a_1, and e_1 is 1 hop away from a_1.
+ // `max_num_hops` should be non-negative.
+ // When its value is set to 0, only the `starting_nodes` are returned.
+ optional int64 max_num_hops = 3;
+
+ enum Direction {
+ // Direction is by defult DIRECTION_UNSPECIFIED, which is equivalent to
+ // BIDIRECTIONAL.
+ DIRECTION_UNSPECIFIED = 0;
+ // Indicates tracing the lineage graph by hops in upstream direction.
+ UPSTREAM = 1;
+ // Indicates tracing the lineage graph by hops in downstream direction.
+ DOWNSTREAM = 2;
+ // Indicates tracing the lineage graph in both directions.
+ BIDIRECTIONAL = 3;
+ }
+ // The direction of lineage graph tracing, which means the direction of all
+ // hops in the tracing.
+ // An UPSTREAM hop means an expansion following the path of
+ // execution -> output_event -> artifact or
+ // artifact -> input_event -> execution
+ // A DOWNSTREAM hop means an expansion following the path of
+ // execution -> input_event -> artifact or
+ // artifact -> output_event -> execution
+ // Please refer to `Direction` for more details.
+ optional Direction direction = 4;
+}
diff --git a/api/grpc/ml_metadata/proto/metadata_store_service.proto b/api/grpc/ml_metadata/proto/metadata_store_service.proto
new file mode 100644
index 000000000..f4a169199
--- /dev/null
+++ b/api/grpc/ml_metadata/proto/metadata_store_service.proto
@@ -0,0 +1,1525 @@
+/* Copyright 2019 Google LLC
+
+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
+
+ https://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.
+==============================================================================*/
+
+syntax = "proto2";
+option go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";
+
+package ml_metadata;
+
+import "google/protobuf/field_mask.proto";
+import "ml_metadata/proto/metadata_store.proto";
+
+// An artifact and type pair. Part of an artifact struct.
+message ArtifactAndType {
+ optional Artifact artifact = 1;
+ optional ArtifactType type = 2;
+}
+
+// A dictionary of artifact structs. Can represent a dictionary.
+message ArtifactStructMap {
+ // An artifact struct that is a dictionary.
+ // Can be represented as a JSON dictionary of artifact structs.
+ map properties = 1;
+}
+
+// An artifact struct that is a list.
+message ArtifactStructList {
+ // Can be represented as a JSON list of artifact structs.
+ repeated ArtifactStruct elements = 1;
+}
+
+// An artifact struct represents the input or output of an Execution.
+// See the more specific types referenced in the message for more details.
+message ArtifactStruct {
+ // Note: an artifact struct may be empty to indicate "None" or null.
+ oneof value {
+ ArtifactAndType artifact = 1;
+ ArtifactStructMap map = 2;
+ ArtifactStructList list = 3;
+ }
+}
+
+message PutArtifactsRequest {
+ repeated Artifact artifacts = 1;
+
+ message Options {
+ // When there are multiple writers to update an existing node to
+ // different states, there may be a race and the end result of the
+ // concurrent update is nondeterministic. If the field is set, then an
+ // optimistic concurrency control (OCC) scheme is used during update:
+ // it compares the `artifact`.`last_update_time_since_epoch` in the request
+ // with the stored `last_update_time_since_epoch` having the same
+ // `artifact`.`id`. If they are different, the request fails, and the user
+ // can read the stored node and retry node update.
+ // When the option is set, the timestamp after update is guaranteed to be
+ // increased and different from the input artifact.
+ // When set the option, the caller should set it for all concurrent writers.
+ optional bool abort_if_latest_updated_time_changed = 1;
+ }
+
+ // Additional options to change the behavior of the method.
+ optional Options options = 2;
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+
+ // FieldMask for artifacts in the PUT update
+ // If `artifact.id` is not specified, it means a new artifact will be created
+ // and `update_mask` will not be applied to the creation.
+ // If `update_mask` is empty, update the artifacts as a whole.
+ // If `update_mask` is not empty, only update fields or properties specified
+ // in `update_mask`.
+ // Example request protos:
+ // 1. Examples that update `properties` / `custom_properties`:
+ // 1.1 Add a <'key', 'val'> pair into `custom_properties`:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {
+ // key: "key"
+ // value: {
+ // string_value: "val"
+ // }
+ // }
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 1.2 Set `custom_properties['key'].bool_value` to true:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {
+ // key: "key"
+ // value: {
+ // bool_value: true
+ // }
+ // }
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 1.3 Delete the complete <'key', 'val'> pair from `custom_properties`:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {}
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 2. Examples that update fields such as `uri`, `external_id`, etc:
+ // 2.1 Update `external_id` field:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // external_id: "new_value"
+ // }
+ // update_mask {
+ // paths: "external_id"
+ // }
+ // }
+ // 2.2 Set `uri` field:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // uri: "set_value"
+ // }
+ // update_mask {
+ // paths: "uri"
+ // }
+ // }
+ // If `paths: "properties"` or `paths: "custom_properties"` are added to
+ // `update_mask`, the key-level updates will be ignored and we only perform
+ // field-level updates on the all `properties`/`custom_properties`.
+ // For example:
+ // If the mask is: {"properties", "properties.key1"}, the field path
+ // "properties.key1" will be ignored and all `properties` will be updated.
+ // (Do not suggest)
+ // If the mask is {"properties", "external_id"}, all
+ // `properties` and field `external_id` will be updated. (Do not suggest)
+ optional google.protobuf.FieldMask update_mask = 4;
+}
+
+message PutArtifactsResponse {
+ // A list of artifact ids index-aligned with PutArtifactsRequest.
+ repeated int64 artifact_ids = 1;
+}
+
+message PutArtifactTypeRequest {
+ // The field is required in any request. Stored types in MLMD can be updated
+ // by introducing new properties and remain backward compatible. If a type
+ // with the same name exists in the database, it updates the existing type,
+ // otherwise it creates a new type.
+ optional ArtifactType artifact_type = 1;
+
+ // If true then allows adding properties to an existing stored type.
+ // If false, then type update is not allowed and it raises AlreadyExists
+ // error if the given type has any new property that is not defined in the
+ // stored type.
+ optional bool can_add_fields = 2;
+
+ // If true then allows omitting properties of an existing stored type.
+ // If false, then no properties of the stored type can be omitted in the
+ // given type, otherwise it raises AlreadyExists error.
+ optional bool can_omit_fields = 5;
+
+ // Deprecated fields.
+ optional bool can_delete_fields = 3 [deprecated = true];
+ optional bool all_fields_match = 4 [default = true, deprecated = true];
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 6;
+}
+
+message PutArtifactTypeResponse {
+ // The type ID of the artifact type.
+ optional int64 type_id = 1;
+}
+
+message PutExecutionsRequest {
+ repeated Execution executions = 1;
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+
+ // FieldMask for executions in the PUT update
+ // If `execution.id` is not specified, it means a new execution will be
+ // created and `update_mask` will not be applied to the creation.
+ // If `update_mask` is empty, update the executions as a whole.
+ // If `update_mask` is not empty, only update fields or properties specified
+ // in `update_mask`.
+ // Example request protos:
+ // 1. Add a <'key', 'val'> pair into `custom_properties`:
+ // {
+ // executions {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {
+ // key: "key"
+ // value: {
+ // string_value: "val"
+ // }
+ // }
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 2. Set `last_known_state` field:
+ // {
+ // executions {
+ // id: 1234
+ // type_id: 5678
+ // last_known_state: CACHED
+ // }
+ // update_mask {
+ // paths: "last_known_state"
+ // }
+ // }
+ // Please refer to `PutArtifactsRequest` for more details.
+ optional google.protobuf.FieldMask update_mask = 3;
+}
+
+message PutExecutionsResponse {
+ // A list of execution ids index-aligned with PutExecutionsRequest.
+ repeated int64 execution_ids = 1;
+}
+
+message PutExecutionTypeRequest {
+ // The field is required in any request. Stored types in MLMD can be updated
+ // by introducing new properties and remain backward compatible. If a type
+ // with the same name exists in the database, it updates the existing type,
+ // otherwise it creates a new type.
+ optional ExecutionType execution_type = 1;
+
+ // If true then allows adding properties to an existing stored type.
+ // If false, then type update is not allowed and it raises AlreadyExists
+ // error if the given type has any new property that is not defined in the
+ // stored type.
+ optional bool can_add_fields = 2;
+
+ // If true then allows omitting properties of an existing stored type.
+ // If false, then no properties of the stored type can be omitted in the
+ // given type, otherwise it raises AlreadyExists error.
+ optional bool can_omit_fields = 5;
+
+ // Deprecated fields.
+ optional bool can_delete_fields = 3 [deprecated = true];
+ optional bool all_fields_match = 4 [default = true, deprecated = true];
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 6;
+}
+
+message PutExecutionTypeResponse {
+ // The type ID of the execution type.
+ optional int64 type_id = 1;
+}
+
+message PutEventsRequest {
+ repeated Event events = 1;
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message PutEventsResponse {}
+
+message PutExecutionRequest {
+ // A pair of an artifact and an event used or generated by an execution, e.g.,
+ // during the execution run, it uses none or many artifacts as input, and
+ // generate none or many artifacts as output.
+ message ArtifactAndEvent {
+ // The pair may have an artifact. If present and no artifact.id is given,
+ // then it inserts the artifact, otherwise it updates the artifact.
+ optional Artifact artifact = 1;
+ // The pair may have an event. Providing event.artifact_id or
+ // event.execution_id is optional. If the ids are given, it must align with
+ // the `artifact`.id / `execution`.id respectively. If artifact is not
+ // given and event.artifact_id is set, it must exist in the backend.
+ optional Event event = 2;
+ }
+
+ message Options {
+ // When there's a race to publish executions with a new context with the
+ // same context.name, by default there'll be one writer succeeds and
+ // the rest of the writers returning AlreadyExists errors. If set to true,
+ // the API will reuse the stored context in the transaction and perform
+ // an update.
+ optional bool reuse_context_if_already_exist = 1;
+
+ // When there's a race to publish executions with a new artifact with the
+ // same artifact.external_id, by default there'll be one writer succeeds and
+ // the rest of the writers returning AlreadyExists errors.
+ // If set to true and an Artifact has non-empty external_id,
+ // the API will reuse the stored artifact in the transaction and
+ // perform an update. Otherwise, it will fall back to relying on `id` field
+ // to decide if it's update (if `id` exists) or insert (if `id` is empty).
+ optional bool reuse_artifact_if_already_exist_by_external_id = 2;
+ }
+ // The execution that produces many artifact and event pairs.
+ optional Execution execution = 1;
+ // The list of artifact and event pairs.
+ repeated ArtifactAndEvent artifact_event_pairs = 2;
+ // A list of contexts associated with the execution and artifacts. For each
+ // given context without a context.id, it inserts the context, otherwise it
+ // updates the stored context with the same id.
+ // Associations between each pair of contexts and the execution, and
+ // attributions between each pair of contexts and artifacts are created if
+ // they do not already exist.
+ repeated Context contexts = 3;
+ // Additional options to change the behavior of the method.
+ optional Options options = 4;
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 5;
+}
+
+message PutExecutionResponse {
+ // An execution id of the `execution` in PutExecutionRequest.
+ optional int64 execution_id = 1;
+ // A list of artifact ids index-aligned with `artifact_event_pairs` in the
+ // PutExecutionRequest.
+ repeated int64 artifact_ids = 2;
+ // A list of context ids index-aligned with `contexts` in the
+ // PutExecutionRequest.
+ repeated int64 context_ids = 3;
+}
+
+message PutLineageSubgraphRequest {
+ repeated Execution executions = 1;
+ repeated Artifact artifacts = 2;
+ repeated Context contexts = 3;
+
+ message EventEdge {
+ // Index in the array of executions.
+ optional int32 execution_index = 1;
+ // Index in the array of artifacts.
+ optional int32 artifact_index = 2;
+ optional Event event = 3;
+ }
+ repeated EventEdge event_edges = 4;
+
+ message Options {
+ // When there's a race to publish executions with a new context with the
+ // same context.name, by default there'll be one writer succeeds and
+ // the rest of the writers returning AlreadyExists errors. If set to true,
+ // the API will reuse the stored context in the transaction and perform
+ // an update.
+ optional bool reuse_context_if_already_exist = 1;
+
+ // When there's a race to publish executions with a new artifact with the
+ // same artifact.external_id, by default there'll be one writer succeeds and
+ // the rest of the writers returning AlreadyExists errors.
+ // If set to true and an Artifact has non-empty external_id,
+ // the API will reuse the stored artifact in the transaction and
+ // perform an update. Otherwise, it will fall back to relying on `id` field
+ // to decide if it's update (if `id` exists) or insert (if `id` is empty).
+ optional bool reuse_artifact_if_already_exist_by_external_id = 2;
+ }
+ optional Options options = 5;
+
+ optional TransactionOptions transaction_options = 6;
+}
+
+message PutLineageSubgraphResponse {
+ // A list of execution ids index-aligned with `executions` in the request
+ repeated int64 execution_ids = 1 [packed = true];
+ // A list of artifact ids index-aligned with `artifacts` in the request
+ repeated int64 artifact_ids = 2 [packed = true];
+ // A list of context ids index-aligned with `contexts` in the request
+ repeated int64 context_ids = 3 [packed = true];
+}
+
+message PutTypesRequest {
+ repeated ArtifactType artifact_types = 1;
+ repeated ExecutionType execution_types = 2;
+ repeated ContextType context_types = 3;
+
+ // If true then allows adding properties to an existing stored type.
+ // If false, then type update is not allowed and it raises AlreadyExists
+ // error if the given type has any new property that is not defined in the
+ // stored type.
+ optional bool can_add_fields = 4;
+
+ // If true then allows omitting properties of an existing stored type.
+ // If false, then no properties of the stored type can be omitted in the
+ // given type, otherwise it raises AlreadyExists error.
+ optional bool can_omit_fields = 7;
+
+ // Deprecated fields.
+ optional bool can_delete_fields = 5 [deprecated = true];
+ optional bool all_fields_match = 6 [default = true, deprecated = true];
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 8;
+}
+
+message PutTypesResponse {
+ // The type ids of the artifact type.
+ repeated int64 artifact_type_ids = 1;
+ // The type ids of the execution type.
+ repeated int64 execution_type_ids = 2;
+ // The type ids of the context type.
+ repeated int64 context_type_ids = 3;
+}
+
+message PutContextTypeRequest {
+ // The field is required in any request. Stored types in MLMD can be updated
+ // by introducing new properties and remain backward compatible. If a type
+ // with the same name exists in the database, it updates the existing type,
+ // otherwise it creates a new type.
+ optional ContextType context_type = 1;
+
+ // If true then allows adding properties to an existing stored type.
+ // If false, then type update is not allowed and it raises AlreadyExists
+ // error if the given type has any new property that is not defined in the
+ // stored type.
+ optional bool can_add_fields = 2;
+
+ // If true then allows omitting properties of an existing stored type.
+ // If false, then no properties of the stored type can be omitted in the
+ // given type, otherwise it raises AlreadyExists error.
+ optional bool can_omit_fields = 5;
+
+ // Deprecated fields.
+ optional bool can_delete_fields = 3 [deprecated = true];
+ optional bool all_fields_match = 4 [default = true, deprecated = true];
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 6;
+}
+
+message PutContextTypeResponse {
+ // The type ID of the context type.
+ optional int64 type_id = 1;
+}
+
+message PutContextsRequest {
+ repeated Context contexts = 1;
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+
+ // FieldMask for contexts in the PUT update
+ // If `context.id` is not specified, it means a new context will be
+ // created and `update_mask` will not be applied to the creation.
+ // If `update_mask` is empty, update the contexts as a whole.
+ // If `update_mask` is not empty, only update fields or properties specified
+ // in `update_mask`.
+ // Example request protos:
+ // 1. Add a <'key', 'val'> pair into `custom_properties`:
+ // {
+ // contexts {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {
+ // key: "key"
+ // value: {
+ // string_value: "val"
+ // }
+ // }
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 2. Set `name` field:
+ // {
+ // contexts {
+ // id: 1234
+ // type_id: 5678
+ // name: "set_name"
+ // }
+ // update_mask {
+ // paths: "name"
+ // }
+ // }
+ // Please refer to `PutArtifactsRequest` for more details.
+ optional google.protobuf.FieldMask update_mask = 3;
+}
+
+message PutContextsResponse {
+ // A list of context ids index-aligned with PutContextsRequest.
+ repeated int64 context_ids = 1;
+}
+
+message PutAttributionsAndAssociationsRequest {
+ repeated Attribution attributions = 1;
+ repeated Association associations = 2;
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+}
+
+message PutAttributionsAndAssociationsResponse {}
+
+message PutParentContextsRequest {
+ repeated ParentContext parent_contexts = 1;
+
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message PutParentContextsResponse {}
+
+message GetArtifactsByTypeRequest {
+ optional string type_name = 1;
+ // If not set, it looks for the type with type_name with default type_version.
+ optional string type_version = 2;
+ // Specify List options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ // If set, the request will
+ // first fetch all artifacts with specified `type_name` and `type_version`,
+ // then order by a specifield field
+ // finally find the correct page and return #Artifacts of the page size.
+ // Higher-level APIs may only use the functionalies partially.
+ // Please reference the API documentation for the API behaviors.
+ optional ListOperationOptions options = 3;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 4;
+}
+
+message GetArtifactsByTypeResponse {
+ repeated Artifact artifacts = 1;
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ optional string next_page_token = 2;
+}
+
+message GetArtifactByTypeAndNameRequest {
+ optional string type_name = 1;
+ // If not set, it looks for the type with type_name and artifact_name with
+ // default type_version.
+ optional string type_version = 3;
+ optional string artifact_name = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 4;
+}
+
+message GetArtifactByTypeAndNameResponse {
+ optional Artifact artifact = 1;
+}
+
+message GetArtifactsByIDRequest {
+ // A list of artifact ids to retrieve.
+ repeated int64 artifact_ids = 1;
+ // An option to populate all the ArtifactTypes in the response.
+ // If true, returns retrieved Artifacts and their artifact types, which can be
+ // matched by type_ids.
+ // If false, returns only the retrieved Artifacts.
+ // Example request proto:
+ // {
+ // artifact_ids: 101,
+ // populate_artifact_types: true,
+ // }
+ // The response will contain an artifact with id = 101 and an artifact type
+ // with id = artifact.type_id().
+ optional bool populate_artifact_types = 3 [default = false];
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetArtifactsByIDResponse {
+ // Artifacts with matching ids.
+ // This is not index-aligned: if an id is not found, it is not returned.
+ repeated Artifact artifacts = 1;
+ // ArtifactTypes populated with matching type_ids owned by `artifacts`.
+ // This is not index-aligned: if a type_id is not found, it is not returned.
+ repeated ArtifactType artifact_types = 2;
+}
+
+// Request to retrieve Artifacts using List options.
+// If option is not specified then all Artifacts are returned.
+message GetArtifactsRequest {
+ // Specify options.
+ // Please refer to the documentation of ListOperationOptions for the supported
+ // functionalities.
+ optional ListOperationOptions options = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetArtifactsResponse {
+ // Returned artifacts.
+ repeated Artifact artifacts = 1;
+
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ optional string next_page_token = 2;
+}
+
+message GetArtifactsByURIRequest {
+ // A list of artifact uris to retrieve.
+ repeated string uris = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+
+ reserved 1;
+}
+
+message GetArtifactsByURIResponse {
+ repeated Artifact artifacts = 1;
+}
+
+// Request to retrieve Executions using List options.
+// If option is not specified then all Executions are returned.
+message GetExecutionsRequest {
+ // Specify options.
+ // Please refer to the documentation of ListOperationOptions for the supported
+ // functionalities.
+ optional ListOperationOptions options = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetExecutionsResponse {
+ // Returned executions.
+ repeated Execution executions = 1;
+
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ optional string next_page_token = 2;
+}
+
+message GetArtifactTypeRequest {
+ optional string type_name = 1;
+ // If not set, it looks for the type with type_name with default type_version.
+ optional string type_version = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+}
+
+message GetArtifactTypeResponse {
+ // Gets an artifact type, or clear if it does not exist.
+ optional ArtifactType artifact_type = 1;
+}
+
+message GetArtifactTypesRequest {
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 1;
+}
+
+message GetArtifactTypesResponse {
+ repeated ArtifactType artifact_types = 1;
+}
+
+message GetExecutionTypesRequest {
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 1;
+}
+
+message GetExecutionTypesResponse {
+ repeated ExecutionType execution_types = 1;
+}
+
+message GetContextTypesRequest {
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 1;
+}
+
+message GetContextTypesResponse {
+ repeated ContextType context_types = 1;
+}
+
+message GetArtifactsByExternalIdsRequest {
+ repeated string external_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetArtifactsByExternalIdsResponse {
+ repeated Artifact artifacts = 1;
+}
+
+message GetExecutionsByExternalIdsRequest {
+ repeated string external_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetExecutionsByExternalIdsResponse {
+ repeated Execution executions = 1;
+}
+
+message GetContextsByExternalIdsRequest {
+ repeated string external_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetContextsByExternalIdsResponse {
+ repeated Context contexts = 1;
+}
+
+message GetArtifactTypesByExternalIdsRequest {
+ repeated string external_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetArtifactTypesByExternalIdsResponse {
+ repeated ArtifactType artifact_types = 1;
+}
+
+message GetExecutionTypesByExternalIdsRequest {
+ repeated string external_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetExecutionTypesByExternalIdsResponse {
+ repeated ExecutionType execution_types = 1;
+}
+
+message GetContextTypesByExternalIdsRequest {
+ repeated string external_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetContextTypesByExternalIdsResponse {
+ repeated ContextType context_types = 1;
+}
+
+message GetExecutionsByTypeRequest {
+ optional string type_name = 1;
+ // If not set, it looks for the type with type_name with default type_version.
+ optional string type_version = 2;
+ // Specify List options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ // If set, the request will
+ // first fetch all executions with specified `type_name` and `type_version`,
+ // then order by a specifield field
+ // finally find the correct page and return #Executions of the page size.
+ // Higher-level APIs may only use the functionalies partially.
+ // Please reference the API documentation for the API behaviors.
+ optional ListOperationOptions options = 3;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 4;
+}
+
+message GetExecutionsByTypeResponse {
+ repeated Execution executions = 1;
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ optional string next_page_token = 2;
+}
+
+message GetExecutionByTypeAndNameRequest {
+ optional string type_name = 1;
+ // If not set, it looks for the type with type_name and execution_name with
+ // default type_version.
+ optional string type_version = 3;
+ optional string execution_name = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 4;
+}
+
+message GetExecutionByTypeAndNameResponse {
+ optional Execution execution = 1;
+}
+
+message GetExecutionsByIDRequest {
+ // A list of execution ids to retrieve.
+ repeated int64 execution_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetExecutionsByIDResponse {
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ repeated Execution executions = 1;
+}
+
+message GetExecutionTypeRequest {
+ optional string type_name = 1;
+ // If not set, it looks for the type with type_name with default type_version.
+ optional string type_version = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+}
+
+message GetExecutionTypeResponse {
+ // Gets an execution type, or clear if it does not exist.
+ optional ExecutionType execution_type = 1;
+}
+
+
+// Gets all events with matching execution ids.
+message GetEventsByExecutionIDsRequest {
+ repeated int64 execution_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetEventsByExecutionIDsResponse {
+ repeated Event events = 1;
+}
+
+message GetEventsByArtifactIDsRequest {
+ repeated int64 artifact_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetEventsByArtifactIDsResponse {
+ repeated Event events = 1;
+}
+
+message GetArtifactTypesByIDRequest {
+ repeated int64 type_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetArtifactTypesByIDResponse {
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ repeated ArtifactType artifact_types = 1;
+}
+
+message GetExecutionTypesByIDRequest {
+ repeated int64 type_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetExecutionTypesByIDResponse {
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ repeated ExecutionType execution_types = 1;
+}
+
+message GetContextTypeRequest {
+ optional string type_name = 1;
+ // If not set, it looks for the type with type_name with default type_version.
+ optional string type_version = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+}
+
+message GetContextTypeResponse {
+ // Gets a context type, or clear if it does not exist.
+ optional ContextType context_type = 1;
+}
+
+message GetContextTypesByIDRequest {
+ repeated int64 type_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetContextTypesByIDResponse {
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ repeated ContextType context_types = 1;
+}
+
+// Request to retrieve Contexts using List options.
+// If option is not specified then all Contexts are returned.
+message GetContextsRequest {
+ // Specify options.
+ // Please refer to the documentation of ListOperationOptions for the supported
+ // functionalities.
+ optional ListOperationOptions options = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetContextsResponse {
+ // Returned contexts.
+ repeated Context contexts = 1;
+
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ optional string next_page_token = 2;
+}
+
+message GetContextsByTypeRequest {
+ optional string type_name = 1;
+ // Specify options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ // If set, the request will
+ // first fetch all contexts with specified `type_name` and `type_version`,
+ // then order by a specifield field
+ // finally find the correct page and return #Contexts of the page size.
+ // Higher-level APIs may only use the functionalies partially.
+ // Please reference the API documentation for the API behaviors.
+ optional ListOperationOptions options = 2;
+ // If not set, it looks for the type with type_name and options with default
+ // type_version.
+ optional string type_version = 3;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 4;
+}
+
+message GetContextsByTypeResponse {
+ repeated Context contexts = 1;
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ optional string next_page_token = 2;
+}
+
+message GetContextByTypeAndNameRequest {
+ optional string type_name = 1;
+ // If not set, it looks for the type with type_name and context_name with
+ // default type_version.
+ optional string type_version = 3;
+ optional string context_name = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 4;
+}
+
+message GetContextByTypeAndNameResponse {
+ optional Context context = 1;
+}
+
+message GetContextsByIDRequest {
+ // A list of context ids to retrieve.
+ repeated int64 context_ids = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetContextsByIDResponse {
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ repeated Context contexts = 1;
+}
+
+message GetContextsByArtifactRequest {
+ optional int64 artifact_id = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetContextsByArtifactResponse {
+ repeated Context contexts = 1;
+}
+
+message GetContextsByExecutionRequest {
+ optional int64 execution_id = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetContextsByExecutionResponse {
+ repeated Context contexts = 1;
+}
+
+message GetParentContextsByContextRequest {
+ optional int64 context_id = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetParentContextsByContextResponse {
+ repeated Context contexts = 1;
+}
+
+message GetChildrenContextsByContextRequest {
+ optional int64 context_id = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetChildrenContextsByContextResponse {
+ repeated Context contexts = 1;
+}
+
+message GetParentContextsByContextsRequest {
+ repeated int64 context_ids = 1 [packed = true];
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetParentContextsByContextsResponse {
+ message ParentContextsPerChild {
+ repeated Context parent_contexts = 1;
+ }
+ map contexts = 2;
+}
+
+message GetChildrenContextsByContextsRequest {
+ repeated int64 context_ids = 1 [packed = true];
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetChildrenContextsByContextsResponse {
+ message ChildrenContextsPerParent {
+ repeated Context children_contexts = 1;
+ }
+ map contexts = 2;
+}
+
+message GetArtifactsByContextRequest {
+ optional int64 context_id = 1;
+
+ // Specify List options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ optional ListOperationOptions options = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+}
+
+message GetArtifactsByContextResponse {
+ repeated Artifact artifacts = 1;
+
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ optional string next_page_token = 2;
+}
+
+message GetExecutionsByContextRequest {
+ optional int64 context_id = 1;
+
+ // Specify List options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ optional ListOperationOptions options = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+}
+
+message GetExecutionsByContextResponse {
+ repeated Execution executions = 1;
+
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ optional string next_page_token = 2;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 3;
+}
+
+
+// TODO(b/283852485): Deprecate GetLineageGraph API after migration to
+// GetLineageSubgraph API.
+// A lineage query request to specify the query nodes of interest and the
+// boundary conditions for pruning the returned graph.
+message GetLineageGraphRequest {
+ optional LineageGraphQueryOptions options = 1;
+ // Options regarding transactions.
+ optional TransactionOptions transaction_options = 2;
+}
+
+// A connected lineage `subgraph` about the MLMD nodes derived from
+// LineageGraphRequest.query_conditions.
+message GetLineageGraphResponse {
+ optional LineageGraph subgraph = 1;
+}
+
+message GetLineageSubgraphRequest {
+ // Query options for lineage graph tracing from a list of interested
+ // nodes.
+ // A lineage subgraph without node details (e.g., external_id, properties)
+ // will be returned. Please refer to `LineageSubgraphQueryOptions` for more
+ // details.
+ optional LineageSubgraphQueryOptions lineage_subgraph_query_options = 1;
+ // `read_mask` contains user specified paths of fields that should be included
+ // in the returned lineage subgraph.
+ // Supported field paths are: 'artifacts', 'executions', 'contexts',
+ // 'artifact_types', 'execution_types', 'context_types', and 'events'.
+ // TODO(b/283852485): Include 'associations' or 'attributions' in the
+ // returned graph.
+ // If 'artifacts', 'executions', or 'contexts' is specified in `read_mask`,
+ // the dehydrated nodes will be included.
+ // Note: A dehydrated node means a node containing only its id and no
+ // other information. User should call GetNodesByID or other APIs to get
+ // node details later on.
+ // If 'artifact_types', 'execution_types', or 'context_types' is specified
+ // in `read_mask`, all the node types will be included.
+ // If 'events' is specified in `read_mask`, the events will be included.
+ // If `read_mask` is not set, the API will return all the fields in
+ // the returned graph.
+ // Note: Only paths of fields in LineageGraph message are supported. Paths
+ // of fields in the submessage, such as "artifacts.id", "contexts.name" are
+ // not acknowledged.
+ optional google.protobuf.FieldMask read_mask = 3;
+ optional TransactionOptions transaction_options = 2;
+}
+
+message GetLineageSubgraphResponse {
+ // A lineage subgraph of MLMD nodes and relations retrieved from lineage
+ // graph tracing.
+ optional LineageGraph lineage_subgraph = 1;
+}
+
+
+
+// LINT.IfChange
+service MetadataStoreService {
+ // Inserts or updates an ArtifactType.
+ //
+ // A type has a set of strong typed properties describing the schema of any
+ // stored instance associated with that type. A type is identified by a name
+ // and an optional version.
+ //
+ // Type Creation:
+ // If no type exists in the database with the given identifier
+ // (name, version), it creates a new type and returns the type_id.
+ //
+ // Type Evolution:
+ // If the request type with the same (name, version) already exists
+ // (let's call it stored_type), the method enforces the stored_type can be
+ // updated only when the request type is backward compatible for the already
+ // stored instances.
+ //
+ // Backwards compatibility is violated iff:
+ //
+ // a) there is a property where the request type and stored_type have
+ // different value type (e.g., int vs. string)
+ // b) `can_add_fields = false` and the request type has a new property that
+ // is not stored.
+ // c) `can_omit_fields = false` and stored_type has an existing property
+ // that is not provided in the request type.
+ //
+ // If non-backward type change is required in the application, e.g.,
+ // deprecate properties, re-purpose property name, change value types,
+ // a new type can be created with a different (name, version) identifier.
+ // Note the type version is optional, and a version value with empty string
+ // is treated as unset.
+ //
+ // Args:
+ // artifact_type: the type to be inserted or updated.
+ // can_add_fields:
+ // when set to true, new properties can be added;
+ // when set to false, returns ALREADY_EXISTS if the request type has
+ // properties that are not in stored_type.
+ // can_omit_fields:
+ // when set to true, stored properties can be omitted in the request type;
+ // when set to false, returns ALREADY_EXISTS if the stored_type has
+ // properties not in the request type.
+ //
+ // Returns:
+ // The type_id of the stored type.
+ //
+ // Raises:
+ // ALREADY_EXISTS error in the case listed above.
+ // INVALID_ARGUMENT error, if the given type has no name, or any
+ // property value type is unknown.
+ rpc PutArtifactType(PutArtifactTypeRequest)
+ returns (PutArtifactTypeResponse) {}
+
+ // Inserts or updates an ExecutionType. Please refer to PutArtifactType for
+ // type upsert API description.
+ rpc PutExecutionType(PutExecutionTypeRequest)
+ returns (PutExecutionTypeResponse) {}
+
+ // Inserts or updates an ContextType. Please refer to PutArtifactType for
+ // type upsert API description.
+ rpc PutContextType(PutContextTypeRequest) returns (PutContextTypeResponse) {}
+
+ // Bulk inserts types atomically.
+ rpc PutTypes(PutTypesRequest) returns (PutTypesResponse) {}
+
+ // Inserts or updates artifacts in the database.
+ //
+ // If an artifact_id is specified for an artifact, it is an update.
+ // If an artifact_id is unspecified, it will insert a new artifact.
+ // For new artifacts, type must be specified.
+ // For old artifacts, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated artifacts will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ // artifacts: A list of artifacts to insert or update.
+ //
+ // Returns:
+ // A list of artifact ids index-aligned with the input.
+ rpc PutArtifacts(PutArtifactsRequest) returns (PutArtifactsResponse) {}
+
+ // Inserts or updates executions in the database.
+ //
+ // If an execution_id is specified for an execution, it is an update.
+ // If an execution_id is unspecified, it will insert a new execution.
+ // For new executions, type must be specified.
+ // For old executions, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated executions will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ // executions: A list of executions to insert or update.
+ //
+ // Returns:
+ // A list of execution ids index-aligned with the input.
+ //
+ rpc PutExecutions(PutExecutionsRequest) returns (PutExecutionsResponse) {}
+
+ // Inserts events in the database.
+ //
+ // The execution_id and artifact_id must already exist.
+ // Once created, events cannot be modified.
+ // AlreadyExists error will be raised if duplicated events are found.
+ //
+ // It is not guaranteed that the created or updated events will share the
+ // same `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ // events: A list of events to insert or update.
+ rpc PutEvents(PutEventsRequest) returns (PutEventsResponse) {}
+
+ // Inserts or updates an Execution and its input and output artifacts and
+ // related contexts atomically. The `artifact_event_pairs` include the state
+ // changes of the Artifacts used or generated by the Execution, as well as the
+ // input/output Event. The `contexts` describe the associations of the
+ // execution and the attributions of the artifacts.
+ //
+ // If an execution_id is specified, it is an update on the corresponding
+ // execution, otherwise it does an insertion.
+ // For insertion, type must be specified. Same rule applies to artifacts
+ // and contexts in the request. Corresponding errors may raised. For example:
+ // AlreadyExists error will be raised if duplicated executions, artifacts
+ // or events are found.
+ //
+ // It is not guaranteed that the created or updated executions, artifacts,
+ // contexts and events will share the same `create_time_since_epoch`,
+ // `last_update_time_since_epoch`, or `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ // execution: An execution to insert or update.
+ // artifact_event_pairs: Artifacts to insert or update and events to insert.
+ // contexts: The contexts that the execution and the artifacts belong to.
+ //
+ // Returns:
+ // An execution id and a list of artifacts and contexts ids index-aligned
+ // with the input.
+ rpc PutExecution(PutExecutionRequest) returns (PutExecutionResponse) {}
+
+ // Inserts or updates a lineage subgraph (i.e. a collection of event edges
+ // and its executions, artifacts, and related contexts) atomically. The
+ // `event_edges` include an Event and the indices of the corresponding
+ // execution and artifact from the input list of executions and artifacts. The
+ // `contexts` describe the associations of the Execution and the attributions
+ // of the Artifact.
+ //
+ // If an execution_id is specified, it is an update on the corresponding
+ // Execution, otherwise it does an insertion. For insertion, type must be
+ // specified. These rules apply to Artifacts and Contexts as well.
+ // Corresponding errors may be raised. For example: AlreadyExists error will
+ // be raised if duplicated executions, artifacts, or events are found.
+ //
+ // It is not guaranteed that the created or updated executions, artifacts,
+ // contexts and events will share the same `create_time_since_epoch`,
+ // `last_update_time_since_epoch`, or `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ // executions: A list of executions to insert or update.
+ // artifacts: A list of artifacts to insert or update.
+ // contexts: A list of contexts to insert and/or create associations and
+ // attributions with.
+ // event_edges: A list of events to insert with the indices of the
+ // corresponding execution and artifact from the input lists of
+ // executions and artifacts.
+ //
+ // Returns:
+ // Lists of execution, artifact, and context ids index-aligned with the
+ // inputs.
+ rpc PutLineageSubgraph(PutLineageSubgraphRequest)
+ returns (PutLineageSubgraphResponse) {}
+
+ // Inserts or updates contexts in database and returns a list of context ids.
+ //
+ // If an context_id is specified for a context, it is an update.
+ // If an context_id is unspecified, it will insert a new context.
+ // For new contexts, type must be specified.
+ // For old contexts, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated contexts will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ // contexts: A list of contexts to insert or update.
+ //
+ // Returns:
+ // A list of context ids index-aligned with the input.
+ rpc PutContexts(PutContextsRequest) returns (PutContextsResponse) {}
+
+ // Inserts attribution and association relationships in the database.
+ // The context_id, artifact_id, and execution_id must already exist.
+ // If the relationship exists, this call does nothing. Once added, the
+ // relationships cannot be modified.
+ //
+ // Args:
+ // attributions: A list of attributions to insert.
+ // associations: A list of associations to insert.
+ rpc PutAttributionsAndAssociations(PutAttributionsAndAssociationsRequest)
+ returns (PutAttributionsAndAssociationsResponse) {}
+
+ // Inserts parental context relationships in the database.
+ // The ParentContext relationship has direction. The call fails if cycles are
+ // detected.
+ //
+ // Args:
+ // parent_contexts: A list of parent contexts to insert.
+ rpc PutParentContexts(PutParentContextsRequest)
+ returns (PutParentContextsResponse) {}
+
+ // Gets an artifact type. Returns a NOT_FOUND error if the type does not
+ // exist.
+ rpc GetArtifactType(GetArtifactTypeRequest)
+ returns (GetArtifactTypeResponse) {}
+
+ // Gets a list of artifact types by ID.
+ // If no artifact types with an ID exists, the artifact type is skipped.
+ rpc GetArtifactTypesByID(GetArtifactTypesByIDRequest)
+ returns (GetArtifactTypesByIDResponse) {}
+
+ // Gets a list of all artifact types.
+ rpc GetArtifactTypes(GetArtifactTypesRequest)
+ returns (GetArtifactTypesResponse) {}
+
+ // Gets an execution type, or None if it does not exist.
+ rpc GetExecutionType(GetExecutionTypeRequest)
+ returns (GetExecutionTypeResponse) {}
+
+ // Gets a list of execution types by ID.
+ // If no execution types with an ID exists, the execution type is skipped.
+ rpc GetExecutionTypesByID(GetExecutionTypesByIDRequest)
+ returns (GetExecutionTypesByIDResponse) {}
+
+ // Gets a list of all execution types.
+ rpc GetExecutionTypes(GetExecutionTypesRequest)
+ returns (GetExecutionTypesResponse) {}
+
+ // Gets a context type. Returns a NOT_FOUND error if the type does not exist.
+ rpc GetContextType(GetContextTypeRequest) returns (GetContextTypeResponse) {}
+
+ // Gets a list of context types by ID.
+ // If no context types with an ID exists, the context type is skipped.
+ rpc GetContextTypesByID(GetContextTypesByIDRequest)
+ returns (GetContextTypesByIDResponse) {}
+
+ // Gets a list of all context types.
+ rpc GetContextTypes(GetContextTypesRequest)
+ returns (GetContextTypesResponse) {}
+
+ // Gets all the artifacts.
+ rpc GetArtifacts(GetArtifactsRequest) returns (GetArtifactsResponse) {}
+
+ // Gets all the executions.
+ rpc GetExecutions(GetExecutionsRequest) returns (GetExecutionsResponse) {}
+
+ // Gets all the contexts.
+ rpc GetContexts(GetContextsRequest) returns (GetContextsResponse) {}
+
+ // Gets all artifacts with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ // artifact_ids: A list of artifact ids to retrieve.
+ //
+ // Returns:
+ // Artifacts with matching ids.
+ rpc GetArtifactsByID(GetArtifactsByIDRequest)
+ returns (GetArtifactsByIDResponse) {}
+
+ // Gets all executions with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ // execution_ids: A list of execution ids to retrieve.
+ rpc GetExecutionsByID(GetExecutionsByIDRequest)
+ returns (GetExecutionsByIDResponse) {}
+
+ // Gets all contexts with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ // context_ids: A list of context ids to retrieve.
+ rpc GetContextsByID(GetContextsByIDRequest)
+ returns (GetContextsByIDResponse) {}
+
+ // Gets all the artifacts of a given type.
+ rpc GetArtifactsByType(GetArtifactsByTypeRequest)
+ returns (GetArtifactsByTypeResponse) {}
+
+ // Gets all the executions of a given type.
+ rpc GetExecutionsByType(GetExecutionsByTypeRequest)
+ returns (GetExecutionsByTypeResponse) {}
+
+ // Gets all the contexts of a given type.
+ rpc GetContextsByType(GetContextsByTypeRequest)
+ returns (GetContextsByTypeResponse) {}
+
+ // Gets the artifact of the given type and artifact name.
+ rpc GetArtifactByTypeAndName(GetArtifactByTypeAndNameRequest)
+ returns (GetArtifactByTypeAndNameResponse) {}
+
+ // Gets the execution of the given type and execution name.
+ rpc GetExecutionByTypeAndName(GetExecutionByTypeAndNameRequest)
+ returns (GetExecutionByTypeAndNameResponse) {}
+
+ // Gets the context of the given type and context name.
+ rpc GetContextByTypeAndName(GetContextByTypeAndNameRequest)
+ returns (GetContextByTypeAndNameResponse) {}
+
+ // Gets all the artifacts with matching uris.
+ rpc GetArtifactsByURI(GetArtifactsByURIRequest)
+ returns (GetArtifactsByURIResponse) {}
+
+ // Gets all events with matching execution ids.
+ rpc GetEventsByExecutionIDs(GetEventsByExecutionIDsRequest)
+ returns (GetEventsByExecutionIDsResponse) {}
+
+ // Gets all events with matching artifact ids.
+ rpc GetEventsByArtifactIDs(GetEventsByArtifactIDsRequest)
+ returns (GetEventsByArtifactIDsResponse) {}
+
+ // Gets all the artifacts with matching external ids.
+ rpc GetArtifactsByExternalIds(GetArtifactsByExternalIdsRequest)
+ returns (GetArtifactsByExternalIdsResponse) {}
+
+ // Gets all the artifacts with matching external ids.
+ rpc GetExecutionsByExternalIds(GetExecutionsByExternalIdsRequest)
+ returns (GetExecutionsByExternalIdsResponse) {}
+
+ // Gets all the artifacts with matching external ids.
+ rpc GetContextsByExternalIds(GetContextsByExternalIdsRequest)
+ returns (GetContextsByExternalIdsResponse) {}
+
+ // Gets all the artifacts with matching external ids.
+ rpc GetArtifactTypesByExternalIds(GetArtifactTypesByExternalIdsRequest)
+ returns (GetArtifactTypesByExternalIdsResponse) {}
+
+ // Gets all the artifacts with matching external ids.
+ rpc GetExecutionTypesByExternalIds(GetExecutionTypesByExternalIdsRequest)
+ returns (GetExecutionTypesByExternalIdsResponse) {}
+
+ // Gets all the artifacts with matching external ids.
+ rpc GetContextTypesByExternalIds(GetContextTypesByExternalIdsRequest)
+ returns (GetContextTypesByExternalIdsResponse) {}
+
+
+ // Gets all context that an artifact is attributed to.
+ rpc GetContextsByArtifact(GetContextsByArtifactRequest)
+ returns (GetContextsByArtifactResponse) {}
+
+ // Gets all context that an execution is associated with.
+ rpc GetContextsByExecution(GetContextsByExecutionRequest)
+ returns (GetContextsByExecutionResponse) {}
+
+ // Gets all parent contexts that a context is related.
+ rpc GetParentContextsByContext(GetParentContextsByContextRequest)
+ returns (GetParentContextsByContextResponse) {}
+
+ // Gets all children contexts that a context is related.
+ rpc GetChildrenContextsByContext(GetChildrenContextsByContextRequest)
+ returns (GetChildrenContextsByContextResponse) {}
+
+ // Batch getting all the parent contexts that a list of contexts are related.
+ rpc GetParentContextsByContexts(GetParentContextsByContextsRequest)
+ returns (GetParentContextsByContextsResponse) {}
+
+ // Batch getting all the children contexts that a list of contexts are
+ // related.
+ rpc GetChildrenContextsByContexts(GetChildrenContextsByContextsRequest)
+ returns (GetChildrenContextsByContextsResponse) {}
+
+ // Gets all direct artifacts that a context attributes to.
+ rpc GetArtifactsByContext(GetArtifactsByContextRequest)
+ returns (GetArtifactsByContextResponse) {}
+
+ // Gets all direct executions that a context associates with.
+ rpc GetExecutionsByContext(GetExecutionsByContextRequest)
+ returns (GetExecutionsByContextResponse) {}
+
+
+ // TODO(b/283852485): Deprecate GetLineageGraph API after migration to
+ // GetLineageSubgraph API.
+ // The transaction performs a constrained transitive closure and returns a
+ // lineage subgraph satisfying the conditions and constraints specified in
+ // the GetLineageGraphRequest.
+ rpc GetLineageGraph(GetLineageGraphRequest)
+ returns (GetLineageGraphResponse) {}
+
+ // Gets a lineage subgraph by performing graph traversal from a list of
+ // interested nodes.
+ // A lineage subgraph without node details (e.g., external_id, properties)
+ // will be returned.
+ rpc GetLineageSubgraph(GetLineageSubgraphRequest)
+ returns (GetLineageSubgraphResponse) {}
+
+
+}
+// LINT.ThenChange(../metadata_store/metadata_store_service_interface.h)
diff --git a/api/openapi/model-registry.yaml b/api/openapi/model-registry.yaml
new file mode 100644
index 000000000..72c0c6ad1
--- /dev/null
+++ b/api/openapi/model-registry.yaml
@@ -0,0 +1,1619 @@
+openapi: 3.0.3
+info:
+ title: Model Registry REST API
+ version: 1.0.0
+ description: REST API for Model Registry to create and manage ML model metadata
+ license:
+ name: Apache 2.0
+ url: "https://www.apache.org/licenses/LICENSE-2.0"
+servers:
+ - url: "https://localhost:8080"
+ - url: "http://localhost:8080"
+paths:
+ /api/model_registry/v1alpha1/model_artifact:
+ summary: Path used to search for a modelartifact.
+ description: >-
+ The REST endpoint/path used to search for a `ModelArtifact` entity. This path contains a `GET` operation to perform the find task.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelArtifactResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: findModelArtifact
+ summary: Get a ModelArtifact that matches search parameters.
+ description: Gets the details of a single instance of a `ModelArtifact` that matches search parameters.
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ - $ref: "#/components/parameters/parentResourceID"
+ /api/model_registry/v1alpha1/model_artifacts:
+ summary: Path used to manage the list of modelartifacts.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `ModelArtifact` entities. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelArtifactListResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getModelArtifacts
+ summary: List All ModelArtifacts
+ description: Gets a list of all `ModelArtifact` entities.
+ post:
+ requestBody:
+ description: A new `ModelArtifact` to be created.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelArtifactCreate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "201":
+ $ref: "#/components/responses/ModelArtifactResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createModelArtifact
+ summary: Create a ModelArtifact
+ description: Creates a new instance of a `ModelArtifact`.
+ "/api/model_registry/v1alpha1/model_artifacts/{modelartifactId}":
+ summary: Path used to manage a single ModelArtifact.
+ description: >-
+ The REST endpoint/path used to get, update, and delete single instances of an `ModelArtifact`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelArtifactResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getModelArtifact
+ summary: Get a ModelArtifact
+ description: Gets the details of a single instance of a `ModelArtifact`.
+ patch:
+ requestBody:
+ description: Updated `ModelArtifact` information.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelArtifactUpdate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelArtifactResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: updateModelArtifact
+ summary: Update a ModelArtifact
+ description: Updates an existing `ModelArtifact`.
+ parameters:
+ - name: modelartifactId
+ description: A unique identifier for a `ModelArtifact`.
+ schema:
+ type: string
+ in: path
+ required: true
+ /api/model_registry/v1alpha1/model_versions:
+ summary: Path used to manage the list of modelversions.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `ModelVersion` entities. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelVersionListResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getModelVersions
+ summary: List All ModelVersions
+ description: Gets a list of all `ModelVersion` entities.
+ post:
+ requestBody:
+ description: A new `ModelVersion` to be created.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelVersionCreate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "201":
+ $ref: "#/components/responses/ModelVersionResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createModelVersion
+ summary: Create a ModelVersion
+ description: Creates a new instance of a `ModelVersion`.
+ "/api/model_registry/v1alpha1/model_versions/{modelversionId}":
+ summary: Path used to manage a single ModelVersion.
+ description: >-
+ The REST endpoint/path used to get, update, and delete single instances of an `ModelVersion`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelVersionResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getModelVersion
+ summary: Get a ModelVersion
+ description: Gets the details of a single instance of a `ModelVersion`.
+ patch:
+ requestBody:
+ description: Updated `ModelVersion` information.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelVersion"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelVersionResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: updateModelVersion
+ summary: Update a ModelVersion
+ description: Updates an existing `ModelVersion`.
+ parameters:
+ - name: modelversionId
+ description: A unique identifier for a `ModelVersion`.
+ schema:
+ type: string
+ in: path
+ required: true
+ /api/model_registry/v1alpha1/registered_model:
+ summary: Path used to search for a registeredmodel.
+ description: >-
+ The REST endpoint/path used to search for a `RegisteredModel` entity. This path contains a `GET` operation to perform the find task.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/RegisteredModelResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: findRegisteredModel
+ summary: Get a RegisteredModel that matches search parameters.
+ description: Gets the details of a single instance of a `RegisteredModel` that matches search parameters.
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ /api/model_registry/v1alpha1/registered_models:
+ summary: Path used to manage the list of registeredmodels.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `RegisteredModel` entities. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/RegisteredModelListResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getRegisteredModels
+ summary: List All RegisteredModels
+ description: Gets a list of all `RegisteredModel` entities.
+ post:
+ requestBody:
+ description: A new `RegisteredModel` to be created.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RegisteredModelCreate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "201":
+ $ref: "#/components/responses/RegisteredModelResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createRegisteredModel
+ summary: Create a RegisteredModel
+ description: Creates a new instance of a `RegisteredModel`.
+ "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}":
+ summary: Path used to manage a single RegisteredModel.
+ description: >-
+ The REST endpoint/path used to get, update, and delete single instances of an `RegisteredModel`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/RegisteredModelResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getRegisteredModel
+ summary: Get a RegisteredModel
+ description: Gets the details of a single instance of a `RegisteredModel`.
+ patch:
+ requestBody:
+ description: Updated `RegisteredModel` information.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RegisteredModelUpdate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/RegisteredModelResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: updateRegisteredModel
+ summary: Update a RegisteredModel
+ description: Updates an existing `RegisteredModel`.
+ parameters:
+ - name: registeredmodelId
+ description: A unique identifier for a `RegisteredModel`.
+ schema:
+ type: string
+ in: path
+ required: true
+ "/api/model_registry/v1alpha1/model_versions/{modelversionId}/artifacts":
+ summary: Path used to manage the list of artifacts for a modelversion.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `Artifact` entities for a `ModelVersion`. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/ArtifactListResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getModelVersionArtifacts
+ summary: List All ModelVersion's artifacts
+ description: Gets a list of all `Artifact` entities for the `ModelVersion`.
+ post:
+ requestBody:
+ description: A new or existing `Artifact` to be associated with the `ModelVersion`.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Artifact"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ArtifactResponse"
+ "201":
+ $ref: "#/components/responses/ArtifactResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createModelVersionArtifact
+ summary: Create an Artifact in a ModelVersion
+ description: Creates a new instance of an Artifact if needed and associates it with `ModelVersion`.
+ parameters:
+ - name: modelversionId
+ description: A unique identifier for a `ModelVersion`.
+ schema:
+ type: string
+ in: path
+ required: true
+ "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}/versions":
+ summary: Path used to manage the list of modelversions for a registeredmodel.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `ModelVersion` entities for a `RegisteredModel`. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelVersionListResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getRegisteredModelVersions
+ summary: List All RegisteredModel's ModelVersions
+ description: Gets a list of all `ModelVersion` entities for the `RegisteredModel`.
+ post:
+ requestBody:
+ description: A new `ModelVersion` to be created.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelVersion"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "201":
+ $ref: "#/components/responses/ModelVersionResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createRegisteredModelVersion
+ summary: Create a ModelVersion in RegisteredModel
+ description: Creates a new instance of a `ModelVersion`.
+ parameters:
+ - name: registeredmodelId
+ description: A unique identifier for a `RegisteredModel`.
+ schema:
+ type: string
+ in: path
+ required: true
+ /api/model_registry/v1alpha1/inference_service:
+ summary: Path used to manage an instance of inferenceservice.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `InferenceService` entities. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/InferenceServiceResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: findInferenceService
+ summary: Get an InferenceServices that matches search parameters.
+ description: Gets the details of a single instance of `InferenceService` that matches search parameters.
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}":
+ summary: Path used to manage a single InferenceService.
+ description: >-
+ The REST endpoint/path used to get, update, and delete single instances of an `InferenceService`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/InferenceServiceResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getInferenceService
+ summary: Get a InferenceService
+ description: Gets the details of a single instance of a `InferenceService`.
+ patch:
+ requestBody:
+ description: Updated `InferenceService` information.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/InferenceServiceUpdate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/InferenceServiceResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: updateInferenceService
+ summary: Update a InferenceService
+ description: Updates an existing `InferenceService`.
+ parameters:
+ - name: inferenceserviceId
+ description: A unique identifier for a `InferenceService`.
+ schema:
+ type: string
+ in: path
+ required: true
+ /api/model_registry/v1alpha1/inference_services:
+ summary: Path used to manage the list of inferenceservices.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `InferenceService` entities. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/InferenceServiceListResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getInferenceServices
+ summary: List All InferenceServices
+ description: Gets a list of all `InferenceService` entities.
+ post:
+ requestBody:
+ description: A new `InferenceService` to be created.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/InferenceServiceCreate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/InferenceServiceResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createInferenceService
+ summary: Create a InferenceService
+ description: Creates a new instance of a `InferenceService`.
+ /api/model_registry/v1alpha1/serving_environment:
+ summary: Path used to find a servingenvironment.
+ description: >-
+ The REST endpoint/path used to search for a `ServingEnvironment` entity. This path contains a `GET` operation to perform the find task.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ServingEnvironmentResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: findServingEnvironment
+ summary: Find ServingEnvironment
+ description: Finds a `ServingEnvironment` entity that matches query parameters.
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ /api/model_registry/v1alpha1/serving_environments:
+ summary: Path used to manage the list of servingenvironments.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `ServingEnvironment` entities. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/ServingEnvironmentListResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getServingEnvironments
+ summary: List All ServingEnvironments
+ description: Gets a list of all `ServingEnvironment` entities.
+ post:
+ requestBody:
+ description: A new `ServingEnvironment` to be created.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ServingEnvironmentCreate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "201":
+ $ref: "#/components/responses/ServingEnvironmentResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createServingEnvironment
+ summary: Create a ServingEnvironment
+ description: Creates a new instance of a `ServingEnvironment`.
+ "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}":
+ summary: Path used to manage a single ServingEnvironment.
+ description: >-
+ The REST endpoint/path used to get, update, and delete single instances of an `ServingEnvironment`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ServingEnvironmentResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getServingEnvironment
+ summary: Get a ServingEnvironment
+ description: Gets the details of a single instance of a `ServingEnvironment`.
+ patch:
+ requestBody:
+ description: Updated `ServingEnvironment` information.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ServingEnvironmentUpdate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ServingEnvironmentResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: updateServingEnvironment
+ summary: Update a ServingEnvironment
+ description: Updates an existing `ServingEnvironment`.
+ parameters:
+ - name: servingenvironmentId
+ description: A unique identifier for a `ServingEnvironment`.
+ schema:
+ type: string
+ in: path
+ required: true
+ "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}/inference_services":
+ summary: Path used to manage the list of `InferenceServices` for a `ServingEnvironment`.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `InferenceService` entities for a `ServingEnvironment`. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/InferenceServiceListResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getEnvironmentInferenceServices
+ summary: List All ServingEnvironment's InferenceServices
+ description: Gets a list of all `InferenceService` entities for the `ServingEnvironment`.
+ post:
+ requestBody:
+ description: A new `InferenceService` to be created.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/InferenceServiceCreate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "201":
+ $ref: "#/components/responses/InferenceServiceResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createEnvironmentInferenceService
+ summary: Create a InferenceService in ServingEnvironment
+ description: Creates a new instance of a `InferenceService`.
+ parameters:
+ - name: servingenvironmentId
+ description: A unique identifier for a `ServingEnvironment`.
+ schema:
+ type: string
+ in: path
+ required: true
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/serves":
+ summary: Path used to manage the list of `ServeModels` for a `InferenceService`.
+ description: >-
+ The REST endpoint/path used to list and create zero or more `ServeModel` entities for a `InferenceService`. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
+ get:
+ tags:
+ - ModelRegistryService
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ - $ref: "#/components/parameters/pageSize"
+ - $ref: "#/components/parameters/orderBy"
+ - $ref: "#/components/parameters/sortOrder"
+ - $ref: "#/components/parameters/nextPageToken"
+ responses:
+ "200":
+ $ref: "#/components/responses/ServeModelListResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getInferenceServiceServes
+ summary: List All InferenceService's ServeModel actions
+ description: Gets a list of all `ServeModel` entities for the `InferenceService`.
+ post:
+ requestBody:
+ description: A new `ServeModel` to be associated with the `InferenceService`.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ServeModelCreate"
+ required: true
+ tags:
+ - ModelRegistryService
+ responses:
+ "201":
+ $ref: "#/components/responses/ServeModelResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: createInferenceServiceServe
+ summary: Create a ServeModel action in a InferenceService
+ description: Creates a new instance of a `ServeModel` associated with `InferenceService`.
+ parameters:
+ - name: inferenceserviceId
+ description: A unique identifier for a `InferenceService`.
+ schema:
+ type: string
+ in: path
+ required: true
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/model":
+ summary: Path used to manage a `RegisteredModel` associated with an `InferenceService`.
+ description: >-
+ The REST endpoint/path used to list the `RegisteredModel` entity for an `InferenceService`. This path contains a `GET` operation to perform the get task.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/RegisteredModelResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getInferenceServiceModel
+ summary: Get InferenceService's RegisteredModel
+ description: Gets the `RegisteredModel` entity for the `InferenceService`.
+ parameters:
+ - name: inferenceserviceId
+ description: A unique identifier for a `InferenceService`.
+ schema:
+ type: string
+ in: path
+ required: true
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/version":
+ summary: Path used to get the current `ModelVersion` associated with an `InferenceService`.
+ description: >-
+ The REST endpoint/path used to get the current `ModelVersion` entity for a `InferenceService`. This path contains a `GET` operation to perform the get task.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelVersionResponse"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: getInferenceServiceVersion
+ summary: Get InferenceService's ModelVersion
+ description: Gets the `ModelVersion` entity for the `InferenceService`.
+ parameters:
+ - name: inferenceserviceId
+ description: A unique identifier for a `InferenceService`.
+ schema:
+ type: string
+ in: path
+ required: true
+ /api/model_registry/v1alpha1/model_version:
+ summary: Path used to search for a modelversion.
+ description: >-
+ The REST endpoint/path used to search for a `ModelVersion` entity. This path contains a `GET` operation to perform the find task.
+ get:
+ tags:
+ - ModelRegistryService
+ responses:
+ "200":
+ $ref: "#/components/responses/ModelVersionResponse"
+ "400":
+ $ref: "#/components/responses/BadRequest"
+ "401":
+ $ref: "#/components/responses/Unauthorized"
+ "404":
+ $ref: "#/components/responses/NotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ operationId: findModelVersion
+ summary: Get a ModelVersion that matches search parameters.
+ description: Gets the details of a single instance of a `ModelVersion` that matches search parameters.
+ parameters:
+ - $ref: "#/components/parameters/name"
+ - $ref: "#/components/parameters/externalID"
+ - $ref: "#/components/parameters/parentResourceID"
+components:
+ schemas:
+ ArtifactState:
+ description: |2-
+ - PENDING: A state indicating that the artifact may exist.
+ - LIVE: A state indicating that the artifact should exist, unless something
+ external to the system deletes it.
+ - MARKED_FOR_DELETION: A state indicating that the artifact should be deleted.
+ - DELETED: A state indicating that the artifact has been deleted.
+ - ABANDONED: A state indicating that the artifact has been abandoned, which may be
+ due to a failed or cancelled execution.
+ - REFERENCE: A state indicating that the artifact is a reference artifact. At
+ execution start time, the orchestrator produces an output artifact for
+ each output key with state PENDING. However, for an intermediate
+ artifact, this first artifact's state will be REFERENCE. Intermediate
+ artifacts emitted during a component's execution will copy the REFERENCE
+ artifact's attributes. At the end of an execution, the artifact state
+ should remain REFERENCE instead of being changed to LIVE.
+
+ See also: ml-metadata Artifact.State
+ default: UNKNOWN
+ enum:
+ - UNKNOWN
+ - PENDING
+ - LIVE
+ - MARKED_FOR_DELETION
+ - DELETED
+ - ABANDONED
+ - REFERENCE
+ type: string
+ RegisteredModelState:
+ description: |-
+ - LIVE: A state indicating that the `RegisteredModel` exists
+ - ARCHIVED: A state indicating that the `RegisteredModel` has been archived.
+ default: LIVE
+ enum:
+ - LIVE
+ - ARCHIVED
+ type: string
+ ModelVersionState:
+ description: |-
+ - LIVE: A state indicating that the `ModelVersion` exists
+ - ARCHIVED: A state indicating that the `ModelVersion` has been archived.
+ default: LIVE
+ enum:
+ - LIVE
+ - ARCHIVED
+ type: string
+ InferenceServiceState:
+ description: |-
+ - DEPLOYED: A state indicating that the `InferenceService` should be deployed.
+ - UNDEPLOYED: A state indicating that the `InferenceService` should be un-deployed.
+ The state indicates the desired state of inference service.
+ See the associated `ServeModel` for the actual status of service deployment action.
+ default: DEPLOYED
+ enum:
+ - DEPLOYED
+ - UNDEPLOYED
+ type: string
+ ExecutionState:
+ description: |-
+ The state of the Execution. The state transitions are
+ NEW -> RUNNING -> COMPLETE | CACHED | FAILED | CANCELED
+ CACHED means the execution is skipped due to cached results.
+ CANCELED means the execution is skipped due to precondition not met. It is
+ different from CACHED in that a CANCELED execution will not have any event
+ associated with it. It is different from FAILED in that there is no
+ unexpected error happened and it is regarded as a normal state.
+
+ See also: ml-metadata Execution.State
+ default: UNKNOWN
+ enum:
+ - UNKNOWN
+ - NEW
+ - RUNNING
+ - COMPLETE
+ - FAILED
+ - CACHED
+ - CANCELED
+ type: string
+ ModelArtifact:
+ description: An ML model artifact.
+ type: object
+ allOf:
+ - $ref: "#/components/schemas/BaseArtifact"
+ - $ref: "#/components/schemas/ModelArtifactCreate"
+ - type: object
+ properties:
+ artifactType:
+ type: string
+ default: "model-artifact"
+ RegisteredModel:
+ description: A registered model in model registry. A registered model has ModelVersion children.
+ allOf:
+ - $ref: "#/components/schemas/BaseResource"
+ - type: object
+ - $ref: "#/components/schemas/RegisteredModelCreate"
+ ModelVersionList:
+ description: List of ModelVersion entities.
+ type: object
+ allOf:
+ - type: object
+ properties:
+ items:
+ description: Array of `ModelVersion` entities.
+ type: array
+ items:
+ $ref: "#/components/schemas/ModelVersion"
+ - $ref: "#/components/schemas/BaseResourceList"
+ ModelArtifactList:
+ description: List of ModelArtifact entities.
+ type: object
+ allOf:
+ - type: object
+ properties:
+ items:
+ description: Array of `ModelArtifact` entities.
+ type: array
+ items:
+ $ref: "#/components/schemas/ModelArtifact"
+ - $ref: "#/components/schemas/BaseResourceList"
+ RegisteredModelCreate:
+ description: A registered model in model registry. A registered model has ModelVersion children.
+ allOf:
+ - type: object
+ - $ref: "#/components/schemas/BaseResourceCreate"
+ - $ref: "#/components/schemas/RegisteredModelUpdate"
+ RegisteredModelUpdate:
+ description: A registered model in model registry. A registered model has ModelVersion children.
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceUpdate"
+ - type: object
+ properties:
+ state:
+ $ref: "#/components/schemas/RegisteredModelState"
+ ModelVersion:
+ description: Represents a ModelVersion belonging to a RegisteredModel.
+ allOf:
+ - $ref: "#/components/schemas/ModelVersionCreate"
+ - $ref: "#/components/schemas/BaseResource"
+ ModelVersionCreate:
+ description: Represents a ModelVersion belonging to a RegisteredModel.
+ required:
+ - registeredModelID
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceCreate"
+ - $ref: "#/components/schemas/ModelVersionUpdate"
+ properties:
+ registeredModelID:
+ description: ID of the `RegisteredModel` to which this version belongs.
+ type: string
+ ModelVersionUpdate:
+ description: Represents a ModelVersion belonging to a RegisteredModel.
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceUpdate"
+ - type: object
+ properties:
+ state:
+ $ref: "#/components/schemas/ModelVersionState"
+ author:
+ description: Name of the author.
+ type: string
+ BaseArtifactCreate:
+ allOf:
+ - $ref: "#/components/schemas/BaseArtifactUpdate"
+ - $ref: "#/components/schemas/BaseResourceCreate"
+ BaseArtifactUpdate:
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceUpdate"
+ - type: object
+ properties:
+ uri:
+ description: |-
+ The uniform resource identifier of the physical artifact.
+ May be empty if there is no physical artifact.
+ type: string
+ state:
+ $ref: "#/components/schemas/ArtifactState"
+ BaseExecution:
+ allOf:
+ - $ref: "#/components/schemas/BaseExecutionCreate"
+ - type: object
+ - $ref: "#/components/schemas/BaseResource"
+ BaseExecutionCreate:
+ allOf:
+ - $ref: "#/components/schemas/BaseExecutionUpdate"
+ - type: object
+ - $ref: "#/components/schemas/BaseResourceCreate"
+ BaseExecutionUpdate:
+ type: object
+ allOf:
+ - type: object
+ properties:
+ lastKnownState:
+ $ref: "#/components/schemas/ExecutionState"
+ - $ref: "#/components/schemas/BaseResourceUpdate"
+ MetadataValue:
+ oneOf:
+ - $ref: "#/components/schemas/MetadataIntValue"
+ - $ref: "#/components/schemas/MetadataDoubleValue"
+ - $ref: "#/components/schemas/MetadataStringValue"
+ - $ref: "#/components/schemas/MetadataStructValue"
+ - $ref: "#/components/schemas/MetadataProtoValue"
+ - $ref: "#/components/schemas/MetadataBoolValue"
+ description: A value in properties.
+ MetadataIntValue:
+ description: An integer (int64) property value.
+ type: object
+ properties:
+ int_value:
+ format: int64
+ type: string
+ MetadataDoubleValue:
+ description: A double property value.
+ type: object
+ properties:
+ double_value:
+ format: double
+ type: number
+ MetadataStringValue:
+ description: A string property value.
+ type: object
+ properties:
+ string_value:
+ type: string
+ MetadataStructValue:
+ description: A struct property value.
+ type: object
+ properties:
+ struct_value:
+ description: Base64 encoded bytes for struct value
+ type: string
+ MetadataProtoValue:
+ description: A proto property value.
+ type: object
+ properties:
+ type:
+ description: url describing proto value
+ type: string
+ proto_value:
+ description: Base64 encoded bytes for proto value
+ type: string
+ MetadataBoolValue:
+ description: A bool property value.
+ type: object
+ properties:
+ bool_value:
+ type: boolean
+ BaseResource:
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceCreate"
+ - type: object
+ properties:
+ id:
+ format: int64
+ description: Output only. The unique server generated id of the resource.
+ type: string
+ readOnly: true
+ createTimeSinceEpoch:
+ format: int64
+ description: Output only. Create time of the resource in millisecond since epoch.
+ type: string
+ readOnly: true
+ lastUpdateTimeSinceEpoch:
+ format: int64
+ description: |-
+ Output only. Last update time of the resource since epoch in millisecond
+ since epoch.
+ type: string
+ readOnly: true
+ BaseResourceCreate:
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceUpdate"
+ - type: object
+ properties:
+ name:
+ description: |-
+ The client provided name of the artifact. This field is optional. If set,
+ it must be unique among all the artifacts of the same artifact type within
+ a database instance and cannot be changed once set.
+ type: string
+ BaseResourceUpdate:
+ type: object
+ properties:
+ customProperties:
+ description: User provided custom properties which are not defined by its type.
+ type: object
+ additionalProperties:
+ $ref: "#/components/schemas/MetadataValue"
+ description:
+ description: |-
+ An optional description about the resource.
+ type: string
+ externalID:
+ description: |-
+ The external id that come from the clients’ system. This field is optional.
+ If set, it must be unique among all resources within a database instance.
+ type: string
+ BaseResourceList:
+ required:
+ - nextPageToken
+ - pageSize
+ - size
+ type: object
+ properties:
+ nextPageToken:
+ description: Token to use to retrieve next page of results.
+ type: string
+ pageSize:
+ format: int32
+ description: Maximum number of resources to return in the result.
+ type: integer
+ size:
+ format: int32
+ description: Number of items in result list.
+ type: integer
+ ArtifactList:
+ description: A list of Artifact entities.
+ type: object
+ allOf:
+ - type: object
+ properties:
+ items:
+ description: Array of `Artifact` entities.
+ type: array
+ items:
+ $ref: "#/components/schemas/Artifact"
+ - $ref: "#/components/schemas/BaseResourceList"
+ ModelArtifactUpdate:
+ description: An ML model artifact.
+ allOf:
+ - $ref: "#/components/schemas/BaseArtifactUpdate"
+ - type: object
+ properties:
+ modelFormatName:
+ description: Name of the model format.
+ type: string
+ storageKey:
+ description: Storage secret name.
+ type: string
+ storagePath:
+ description: Path for model in storage provided by `storageKey`.
+ type: string
+ modelFormatVersion:
+ description: Version of the model format.
+ type: string
+ serviceAccountName:
+ description: Name of the service account with storage secret.
+ type: string
+ ModelArtifactCreate:
+ description: An ML model artifact.
+ type: object
+ allOf:
+ - $ref: "#/components/schemas/BaseArtifactCreate"
+ - $ref: "#/components/schemas/ModelArtifactUpdate"
+ Error:
+ description: Error code and message.
+ required:
+ - code
+ - message
+ type: object
+ properties:
+ code:
+ description: Error code
+ type: string
+ message:
+ description: Error message
+ type: string
+ SortOrder:
+ description: Supported sort direction for ordering result entities.
+ enum:
+ - ASC
+ - DESC
+ type: string
+ OrderByField:
+ description: Supported fields for ordering result entities.
+ enum:
+ - CREATE_TIME
+ - LAST_UPDATE_TIME
+ - ID
+ type: string
+ Artifact:
+ oneOf:
+ - $ref: "#/components/schemas/ModelArtifact"
+ discriminator:
+ propertyName: artifactType
+ mapping:
+ model-artifact: "#/components/schemas/ModelArtifact"
+ description: A metadata Artifact Entity.
+ BaseArtifact:
+ allOf:
+ - $ref: "#/components/schemas/BaseArtifactCreate"
+ - $ref: "#/components/schemas/BaseResource"
+ - required:
+ - artifactType
+ type: object
+ properties:
+ artifactType:
+ type: string
+ ServingEnvironmentList:
+ description: List of ServingEnvironments.
+ type: object
+ allOf:
+ - type: object
+ properties:
+ items:
+ description: ""
+ type: array
+ items:
+ $ref: "#/components/schemas/ServingEnvironment"
+ readOnly: false
+ - $ref: "#/components/schemas/BaseResourceList"
+ RegisteredModelList:
+ description: List of RegisteredModels.
+ type: object
+ allOf:
+ - type: object
+ properties:
+ items:
+ description: ""
+ type: array
+ items:
+ $ref: "#/components/schemas/RegisteredModel"
+ readOnly: false
+ - $ref: "#/components/schemas/BaseResourceList"
+ ServingEnvironment:
+ description: A Model Serving environment for serving `RegisteredModels`.
+ allOf:
+ - $ref: "#/components/schemas/BaseResource"
+ - type: object
+ - $ref: "#/components/schemas/ServingEnvironmentCreate"
+ ServingEnvironmentUpdate:
+ description: A Model Serving environment for serving `RegisteredModels`.
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceUpdate"
+ ServingEnvironmentCreate:
+ description: A Model Serving environment for serving `RegisteredModels`.
+ allOf:
+ - type: object
+ - $ref: "#/components/schemas/BaseResourceCreate"
+ - $ref: "#/components/schemas/ServingEnvironmentUpdate"
+ InferenceService:
+ description: >-
+ An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving.
+ allOf:
+ - $ref: "#/components/schemas/BaseResource"
+ - $ref: "#/components/schemas/InferenceServiceCreate"
+ InferenceServiceList:
+ description: List of InferenceServices.
+ type: object
+ allOf:
+ - type: object
+ properties:
+ items:
+ description: ""
+ type: array
+ items:
+ $ref: "#/components/schemas/InferenceService"
+ readOnly: false
+ - $ref: "#/components/schemas/BaseResourceList"
+ ServeModelList:
+ description: List of ServeModel entities.
+ type: object
+ allOf:
+ - type: object
+ properties:
+ items:
+ description: Array of `ModelArtifact` entities.
+ type: array
+ items:
+ $ref: "#/components/schemas/ServeModel"
+ - $ref: "#/components/schemas/BaseResourceList"
+ ServeModel:
+ description: An ML model serving action.
+ type: object
+ allOf:
+ - $ref: "#/components/schemas/BaseExecution"
+ - $ref: "#/components/schemas/ServeModelCreate"
+ ServeModelUpdate:
+ description: An ML model serving action.
+ allOf:
+ - $ref: "#/components/schemas/BaseExecutionUpdate"
+ ServeModelCreate:
+ description: An ML model serving action.
+ allOf:
+ - $ref: "#/components/schemas/BaseExecutionCreate"
+ - $ref: "#/components/schemas/ServeModelUpdate"
+ - required:
+ - modelVersionId
+ type: object
+ properties:
+ modelVersionId:
+ description: ID of the `ModelVersion` that was served in `InferenceService`.
+ type: string
+ InferenceServiceUpdate:
+ description: >-
+ An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving.
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceUpdate"
+ - type: object
+ properties:
+ modelVersionId:
+ description: >-
+ ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served.
+ type: string
+ runtime:
+ description: Model runtime.
+ type: string
+ desiredState:
+ $ref: "#/components/schemas/InferenceServiceState"
+ InferenceServiceCreate:
+ description: >-
+ An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving.
+ allOf:
+ - $ref: "#/components/schemas/BaseResourceCreate"
+ - $ref: "#/components/schemas/InferenceServiceUpdate"
+ - required:
+ - registeredModelId
+ - servingEnvironmentId
+ type: object
+ properties:
+ registeredModelId:
+ description: ID of the `RegisteredModel` to serve.
+ type: string
+ servingEnvironmentId:
+ description: ID of the parent `ServingEnvironment` for this `InferenceService` entity.
+ type: string
+ responses:
+ NotFound:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ description: The specified resource was not found
+ BadRequest:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ description: Bad Request parameters
+ Unauthorized:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ description: Unauthorized
+ InternalServerError:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ description: Unexpected internal server error
+ ModelArtifactListResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelArtifactList"
+ description: A response containing a list of ModelArtifact entities.
+ ModelArtifactResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelArtifact"
+ description: A response containing a `ModelArtifact` entity.
+ ModelVersionListResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelVersionList"
+ description: A response containing a list of `ModelVersion` entities.
+ ModelVersionResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ModelVersion"
+ description: A response containing a `ModelVersion` entity.
+ RegisteredModelListResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RegisteredModelList"
+ description: A response containing a list of `RegisteredModel` entities.
+ RegisteredModelResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RegisteredModel"
+ description: A response containing a `RegisteredModel` entity.
+ ArtifactResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Artifact"
+ description: A response containing an `Artifact` entity.
+ ArtifactListResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ArtifactList"
+ description: A response containing a list of `Artifact` entities.
+ ServingEnvironmentListResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ServingEnvironmentList"
+ description: A response containing a list of `ServingEnvironment` entities.
+ ServingEnvironmentResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ServingEnvironment"
+ description: A response containing a `ServingEnvironment` entity.
+ InferenceServiceListResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/InferenceServiceList"
+ description: A response containing a list of `InferenceService` entities.
+ InferenceServiceResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/InferenceService"
+ description: A response containing a `InferenceService` entity.
+ ServeModelListResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ServeModelList"
+ description: A response containing a list of `ServeModel` entities.
+ ServeModelResponse:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ServeModel"
+ description: A response containing a `ServeModel` entity.
+ parameters:
+ id:
+ name: id
+ description: The ID of resource.
+ schema:
+ type: string
+ in: path
+ required: true
+ name:
+ examples:
+ name:
+ value: entity-name
+ name: name
+ description: Name of entity to search.
+ schema:
+ type: string
+ in: query
+ required: false
+ externalID:
+ examples:
+ externalID:
+ value: "10"
+ name: externalID
+ description: External ID of entity to search.
+ schema:
+ type: string
+ in: query
+ required: false
+ parentResourceID:
+ examples:
+ parentResourceID:
+ value: "10"
+ name: parentResourceID
+ description: ID of the parent resource to use for search.
+ schema:
+ type: string
+ in: query
+ required: false
+ pageSize:
+ examples:
+ pageSize:
+ value: "100"
+ name: pageSize
+ description: Number of entities in each page.
+ schema:
+ type: string
+ in: query
+ required: false
+ nextPageToken:
+ examples:
+ nextPageToken:
+ value: IkhlbGxvLCB3b3JsZC4i
+ name: nextPageToken
+ description: Token to use to retrieve next page of results.
+ schema:
+ type: string
+ in: query
+ required: false
+ orderBy:
+ style: form
+ explode: true
+ examples:
+ orderBy:
+ value: ID
+ name: orderBy
+ description: Specifies the order by criteria for listing entities.
+ schema:
+ $ref: "#/components/schemas/OrderByField"
+ in: query
+ required: false
+ sortOrder:
+ style: form
+ explode: true
+ examples:
+ sortOrder:
+ value: DESC
+ name: sortOrder
+ description: "Specifies the sort order for listing entities, defaults to ASC."
+ schema:
+ $ref: "#/components/schemas/SortOrder"
+ in: query
+ required: false
+ securitySchemes:
+ Bearer:
+ scheme: bearer
+ bearerFormat: JWT
+ type: http
+ description: Bearer JWT scheme
+security:
+ - Bearer: []
+tags:
+ - name: ModelRegistryService
+ description: Model Registry Service REST API
diff --git a/bin/.gitignore b/bin/.gitignore
new file mode 100644
index 000000000..5e7d2734c
--- /dev/null
+++ b/bin/.gitignore
@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore
diff --git a/clients/python/.gitignore b/clients/python/.gitignore
new file mode 100644
index 000000000..8c3b53c50
--- /dev/null
+++ b/clients/python/.gitignore
@@ -0,0 +1,7 @@
+.mypy_cache/
+/.coverage*
+/dist/
+/docs/_build/
+/.nox/
+/.python-version
+__pycache__/
diff --git a/clients/python/README.md b/clients/python/README.md
new file mode 100644
index 000000000..f088f8443
--- /dev/null
+++ b/clients/python/README.md
@@ -0,0 +1,97 @@
+# Model Registry Python Client
+
+[![Python](https://img.shields.io/badge/python%20-3.9%7C3.10-blue)](https://github.com/opendatahub-io/model-registry)
+[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](../../../LICENSE)
+
+This library provides a high level interface for interacting with a model registry server.
+
+## Basic usage
+
+```py
+from model_registry import ModelRegistry
+
+registry = ModelRegistry(server_address="server-address", port=9090, author="author")
+
+model = registry.register_model(
+ "my-model", # model name
+ "s3://path/to/model", # model URI
+ version="2.0.0",
+ description="lorem ipsum",
+ model_format_name="onnx",
+ model_format_version="1",
+ storage_key="aws-connection-path",
+ storage_path="path/to/model",
+ metadata={
+ # can be one of the following types
+ "int_key": 1,
+ "bool_key": False,
+ "float_key": 3.14,
+ "str_key": "str_value",
+ }
+)
+
+model = registry.get_registered_model("my-model")
+
+version = registry.get_model_version("my-model", "v2.0")
+
+experiment = registry.get_model_artifact("my-model", "v2.0")
+```
+
+### Importing from Hugging Face Hub
+
+To import models from Hugging Face Hub, start by installing the `huggingface-hub` package, either directly or as an
+extra (available as `model-registry[hf]`).
+Models can be imported with
+
+```py
+hf_model = registry.register_hf_model(
+ "hf-namespace/hf-model", # HF repo
+ "relative/path/to/model/file.onnx",
+ version="1.2.3",
+ model_name="my-model",
+ description="lorem ipsum",
+ model_format_name="onnx",
+ model_format_version="1",
+)
+```
+
+There are caveats to be noted when using this method:
+
+- It's only possible to import a single model file per Hugging Face Hub repo right now.
+- If the model you want to import is in a global namespace, you should provide an author, e.g.
+
+ ```py
+ hf_model = registry.register_hf_model(
+ "gpt2", # this model implicitly has no author
+ "onnx/decoder_model.onnx",
+ author="OpenAI", # Defaults to unknown in the absence of an author
+ version="1.0.0",
+ description="gpt-2 model",
+ model_format_name="onnx",
+ model_format_version="1",
+ )
+ ```
+
+## Development
+
+Common tasks, such as building documentation and running tests, can be executed using [`nox`](https://github.com/wntrblm/nox) sessions.
+
+Use `nox -l` to list sessions and execute them using `nox -s [session]`.
+
+### Running Locally on Mac M1 or M2 (arm64 architecture)
+
+If you want run tests locally you will need to set up a colima develeopment environment using the instructions [here](https://github.com/opendatahub-io/model-registry/blob/main/CONTRIBUTING.md#colima)
+
+You will also have to change the package source to one compatible with ARM64 architecture. This can be actioned by uncommenting lines 14 or 15 in the pyproject.toml file. Run the following command after you have uncommented the line.
+
+```sh
+poetry lock
+```
+Use the following commands to directly run the tests with individual test output. Alternatively you can use the nox session commands above.
+
+```sh
+poetry install
+poetry run pytest -v
+```
+
+
diff --git a/clients/python/docs/conf.py b/clients/python/docs/conf.py
new file mode 100644
index 000000000..11886ea7c
--- /dev/null
+++ b/clients/python/docs/conf.py
@@ -0,0 +1,36 @@
+"""Sphinx configuration."""
+
+project = "model-registry"
+author = "Isabella Basso do Amaral"
+copyright = f"2023, {author}"
+html_theme = "furo"
+extensions = [
+ "sphinx.ext.autodoc", # support for automatic documentation
+ "sphinx.ext.napoleon", # support for NumPy and Google style docstrings
+ "sphinx.ext.todo", # support for TODOs on docstrings
+ "sphinx.ext.viewcode", # Add links to highlighted source code
+ "myst_parser", # Markdown support
+]
+autodoc_typehints = "signature"
+napoleon_google_docstring = True
+napoleon_use_param = True
+napoleon_use_rtype = True
+
+autodoc_default_options = {
+ "members": True,
+ "show-inheritance": True,
+ "inherited-members": True,
+ "member-order": "bysource",
+}
+
+# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
+myst_enable_extensions = [
+ "strikethrough", # enable ~~strikethrough~~
+ "smartquotes", # converts quotes to “ ” ‘ ’
+ "replacements", # converts symbols like (c), (tm), (r), --, ---, +-
+ "colon_fence", # use ::: to delimit a myst block
+ "linkify", # automatically create links for URLs
+ "deflist", # enables less verbose definition lists
+]
+myst_heading_anchors = 3 # automatically create anchors for headings up to h3 (###)
+myst_linkify_fuzzy_links = False # only linkify schema-prefixed URLs (e.g. https://*)
diff --git a/clients/python/docs/index.md b/clients/python/docs/index.md
new file mode 100644
index 000000000..f77e9a9a5
--- /dev/null
+++ b/clients/python/docs/index.md
@@ -0,0 +1,15 @@
+```{include} ../README.md
+---
+end-before:
+---
+```
+
+## Full Table of Contents
+
+```{toctree}
+---
+maxdepth: 2
+---
+
+reference
+```
diff --git a/clients/python/docs/reference.md b/clients/python/docs/reference.md
new file mode 100644
index 000000000..f8fb44c5f
--- /dev/null
+++ b/clients/python/docs/reference.md
@@ -0,0 +1,157 @@
+# API Reference
+
+## Client
+
+```{eval-rst}
+.. automodule:: model_registry
+```
+
+## Core
+
+### Register objects
+
+```py
+from model_registry import ModelRegistry
+
+registry = ModelRegistry("server-address", "port")
+
+model_id = registry.upsert_registered_model(model)
+
+# we need a model to associate the version to
+version_id = registry.upsert_model_version(version, model_id)
+
+# we need a version to associate an trained model to
+experiment_id = registry.upsert_model_artifact(trained_model, version_id)
+```
+
+### Query objects
+
+There are several ways to get previously registered objects from the registry.
+
+#### By ID
+
+IDs are created once the object is registered, you can either keep the string returned by the
+`upsert_*` functions, or access the `id` property of the objects.
+
+```py
+new_model = RegisteredModel("new_model")
+
+new_model_id = registry.upsert_registered_model(new_model)
+
+assert new_model_id == new_model.id
+```
+
+To query objects using IDs, do
+
+```py
+another_model = registry.get_registered_model_by_id("another-model-id")
+
+another_version = registry.get_model_version_by_id("another-version-id", another_model.id)
+
+another_trained_model = registry.get_model_artifact_by_id("another-model-artifact-id")
+```
+
+#### By parameters
+
+External IDs can be used to query objects in the wild.
+Note that external IDs must be unique among artifacts or
+contexts (see [Types](#types)).
+
+```py
+trained_model = ModelArtifact("my_model_name", "resource_URI",
+ description="Model description",
+ external_id="unique_reference")
+
+# As a version is a context, we can have the same external_id as the above
+version = ModelVersion(trained_model, "v1.0", "model author",
+ external_id="unique_reference")
+
+# Registering this will cause an error!
+# model = RegisteredModel("my_model_name",
+# external_id="unique_reference")
+
+model = RegisteredModel("my_model_name",
+ external_id="another_unique_reference")
+```
+
+You can also perform queries by parameters:
+
+```py
+# We can get the model artifact associated to a version
+another_trained_model = registry.get_model_artifact_by_params(model_version_id=another_version.id)
+
+# Or by its unique identifier
+trained_model = registry.get_model_artifact_by_params(external_id="unique_reference")
+
+# Same thing for a version
+version = registry.get_model_version_by_params(external_id="unique_reference")
+
+# Or for a model
+model = registry.get_registered_model_by_params(external_id="another_unique_reference")
+
+# We can also get a version by its name and associated model id
+version = registry.get_model_version_by_params(version="v1.0", registered_model_id="x")
+
+# And we can get a model by simply calling its name
+model = registry.get_registered_model_by_params(name="my_model_name")
+```
+
+### Query multiple objects
+
+We can query all objects of a type
+
+```py
+models = registry.get_registered_models()
+
+versions = registry.get_model_versions("registered_model_id")
+
+# We can get a list of all model artifacts
+all_model_artifacts = registry.get_model_artifacts()
+```
+
+
+To limit or order the query, provide a `ListOptions` object
+
+```py
+from model_registry import ListOptions, OrderByField
+
+options = ListOptions(limit=50)
+
+first_50_models = registry.get_registered_models(options)
+
+# By default we get ascending order
+options = ListOptions(order_by=OrderByField.CREATE_TIME, is_asc=False)
+
+last_50_models = registry.get_registered_models(options)
+```
+
+```{eval-rst}
+.. automodule:: model_registry.core
+```
+
+## Types
+
+### Create objects
+
+Registry objects can be created by doing
+
+```py
+from model_registry.types import ModelArtifact, ModelVersion, RegisteredModel
+
+trained_model = ModelArtifact("my_model_name", "resource_URI",
+ description="Model description")
+
+version = ModelVersion(trained_model.name, "v1.0", "model author")
+
+model = RegisteredModel(trained_model.name)
+```
+
+```{eval-rst}
+.. automodule:: model_registry.types
+```
+
+## Exceptions
+
+```{eval-rst}
+.. automodule:: model_registry.exceptions
+```
diff --git a/clients/python/noxfile.py b/clients/python/noxfile.py
new file mode 100644
index 000000000..ad66ffd69
--- /dev/null
+++ b/clients/python/noxfile.py
@@ -0,0 +1,114 @@
+"""Nox sessions."""
+import os
+import shutil
+import sys
+from pathlib import Path
+from textwrap import dedent
+
+import nox
+
+try:
+ from nox_poetry import Session, session
+except ImportError:
+ message = f"""\
+ Nox failed to import the 'nox-poetry' package.
+
+ Please install it using the following command:
+
+ {sys.executable} -m pip install nox-poetry"""
+ raise SystemExit(dedent(message)) from None
+
+
+package = "model_registry"
+python_versions = ["3.10", "3.9"]
+nox.needs_version = ">= 2021.6.6"
+nox.options.sessions = (
+ "tests",
+ "docs-build",
+)
+
+
+@session(python=python_versions)
+def lint(session: Session) -> None:
+ """Lint using ruff."""
+ session.install("ruff")
+
+ session.run("ruff", "check", ".")
+
+
+@session(python=python_versions)
+def mypy(session: Session) -> None:
+ """Type check using mypy."""
+ session.install(".")
+ session.install("mypy")
+
+ session.run("mypy", "src")
+
+
+@session(python=python_versions)
+def tests(session: Session) -> None:
+ """Run the test suite."""
+ session.install(".")
+ session.install(
+ "coverage[toml]",
+ "pytest",
+ "pytest-cov",
+ "pygments",
+ "testcontainers",
+ "huggingface-hub",
+ )
+ try:
+ session.run(
+ "pytest",
+ "--cov",
+ "--cov-config=pyproject.toml",
+ *session.posargs,
+ env={"COVERAGE_FILE": f".coverage.{session.python}"},
+ )
+ finally:
+ if session.interactive:
+ session.notify("coverage", posargs=[])
+
+
+@session(python=python_versions[0])
+def coverage(session: Session) -> None:
+ """Produce the coverage report."""
+ args = session.posargs or ["report"]
+
+ session.install("coverage[toml]")
+
+ if not session.posargs and any(Path().glob(".coverage.*")):
+ session.run("coverage", "combine")
+
+ session.run("coverage", *args)
+
+
+@session(name="docs-build", python=python_versions[0])
+def docs_build(session: Session) -> None:
+ """Build the documentation."""
+ args = session.posargs or ["docs", "docs/_build"]
+ if not session.posargs and "FORCE_COLOR" in os.environ:
+ args.insert(0, "--color")
+
+ session.install(".")
+ session.install("sphinx", "myst-parser[linkify]", "furo")
+
+ build_dir = Path("docs", "_build")
+ if build_dir.exists():
+ shutil.rmtree(build_dir)
+
+ session.run("sphinx-build", *args)
+
+
+@session(python=python_versions[0])
+def docs(session: Session) -> None:
+ """Build and serve the documentation with live reloading on file changes."""
+ args = session.posargs or ["--open-browser", "docs", "docs/_build"]
+ session.install(".")
+ session.install("sphinx", "myst-parser[linkify]", "furo", "sphinx-autobuild")
+
+ build_dir = Path("docs", "_build")
+ if build_dir.exists():
+ shutil.rmtree(build_dir)
+
+ session.run("sphinx-autobuild", *args)
diff --git a/clients/python/poetry.lock b/clients/python/poetry.lock
new file mode 100644
index 000000000..e09d83386
--- /dev/null
+++ b/clients/python/poetry.lock
@@ -0,0 +1,1515 @@
+# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
+
+[[package]]
+name = "absl-py"
+version = "1.4.0"
+description = "Abseil Python Common Libraries, see https://github.com/abseil/abseil-py."
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "absl-py-1.4.0.tar.gz", hash = "sha256:d2c244d01048ba476e7c080bd2c6df5e141d211de80223460d5b3b8a2a58433d"},
+ {file = "absl_py-1.4.0-py3-none-any.whl", hash = "sha256:0d3fe606adfa4f7db64792dd4c7aee4ee0c38ab75dfd353b7a83ed3e957fcb47"},
+]
+
+[[package]]
+name = "alabaster"
+version = "0.7.13"
+description = "A configurable sidebar-enabled Sphinx theme"
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"},
+ {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"},
+]
+
+[[package]]
+name = "attrs"
+version = "21.4.0"
+description = "Classes Without Boilerplate"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+files = [
+ {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"},
+ {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"},
+]
+
+[package.extras]
+dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "sphinx", "sphinx-notfound-page", "zope.interface"]
+docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
+tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "zope.interface"]
+tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six"]
+
+[[package]]
+name = "babel"
+version = "2.13.1"
+description = "Internationalization utilities"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "Babel-2.13.1-py3-none-any.whl", hash = "sha256:7077a4984b02b6727ac10f1f7294484f737443d7e2e66c5e4380e41a3ae0b4ed"},
+ {file = "Babel-2.13.1.tar.gz", hash = "sha256:33e0952d7dd6374af8dbf6768cc4ddf3ccfefc244f9986d4074704f2fbd18900"},
+]
+
+[package.extras]
+dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"]
+
+[[package]]
+name = "beautifulsoup4"
+version = "4.12.2"
+description = "Screen-scraping library"
+optional = false
+python-versions = ">=3.6.0"
+files = [
+ {file = "beautifulsoup4-4.12.2-py3-none-any.whl", hash = "sha256:bd2520ca0d9d7d12694a53d44ac482d181b4ec1888909b035a3dbf40d0f57d4a"},
+ {file = "beautifulsoup4-4.12.2.tar.gz", hash = "sha256:492bbc69dca35d12daac71c4db1bfff0c876c00ef4a2ffacce226d4638eb72da"},
+]
+
+[package.dependencies]
+soupsieve = ">1.2"
+
+[package.extras]
+html5lib = ["html5lib"]
+lxml = ["lxml"]
+
+[[package]]
+name = "certifi"
+version = "2023.11.17"
+description = "Python package for providing Mozilla's CA Bundle."
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "certifi-2023.11.17-py3-none-any.whl", hash = "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474"},
+ {file = "certifi-2023.11.17.tar.gz", hash = "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1"},
+]
+
+[[package]]
+name = "charset-normalizer"
+version = "3.3.2"
+description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
+optional = false
+python-versions = ">=3.7.0"
+files = [
+ {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"},
+ {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"},
+ {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"},
+ {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"},
+ {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"},
+ {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"},
+ {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"},
+ {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"},
+]
+
+[[package]]
+name = "colorama"
+version = "0.4.6"
+description = "Cross-platform colored terminal text."
+optional = false
+python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
+files = [
+ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
+ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
+]
+
+[[package]]
+name = "coverage"
+version = "7.3.2"
+description = "Code coverage measurement for Python"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "coverage-7.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d872145f3a3231a5f20fd48500274d7df222e291d90baa2026cc5152b7ce86bf"},
+ {file = "coverage-7.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:310b3bb9c91ea66d59c53fa4989f57d2436e08f18fb2f421a1b0b6b8cc7fffda"},
+ {file = "coverage-7.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f47d39359e2c3779c5331fc740cf4bce6d9d680a7b4b4ead97056a0ae07cb49a"},
+ {file = "coverage-7.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa72dbaf2c2068404b9870d93436e6d23addd8bbe9295f49cbca83f6e278179c"},
+ {file = "coverage-7.3.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:beaa5c1b4777f03fc63dfd2a6bd820f73f036bfb10e925fce067b00a340d0f3f"},
+ {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:dbc1b46b92186cc8074fee9d9fbb97a9dd06c6cbbef391c2f59d80eabdf0faa6"},
+ {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:315a989e861031334d7bee1f9113c8770472db2ac484e5b8c3173428360a9148"},
+ {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d1bc430677773397f64a5c88cb522ea43175ff16f8bfcc89d467d974cb2274f9"},
+ {file = "coverage-7.3.2-cp310-cp310-win32.whl", hash = "sha256:a889ae02f43aa45032afe364c8ae84ad3c54828c2faa44f3bfcafecb5c96b02f"},
+ {file = "coverage-7.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c0ba320de3fb8c6ec16e0be17ee1d3d69adcda99406c43c0409cb5c41788a611"},
+ {file = "coverage-7.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ac8c802fa29843a72d32ec56d0ca792ad15a302b28ca6203389afe21f8fa062c"},
+ {file = "coverage-7.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:89a937174104339e3a3ffcf9f446c00e3a806c28b1841c63edb2b369310fd074"},
+ {file = "coverage-7.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e267e9e2b574a176ddb983399dec325a80dbe161f1a32715c780b5d14b5f583a"},
+ {file = "coverage-7.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2443cbda35df0d35dcfb9bf8f3c02c57c1d6111169e3c85fc1fcc05e0c9f39a3"},
+ {file = "coverage-7.3.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4175e10cc8dda0265653e8714b3174430b07c1dca8957f4966cbd6c2b1b8065a"},
+ {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1"},
+ {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5c913b556a116b8d5f6ef834038ba983834d887d82187c8f73dec21049abd65c"},
+ {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1981f785239e4e39e6444c63a98da3a1db8e971cb9ceb50a945ba6296b43f312"},
+ {file = "coverage-7.3.2-cp311-cp311-win32.whl", hash = "sha256:43668cabd5ca8258f5954f27a3aaf78757e6acf13c17604d89648ecc0cc66640"},
+ {file = "coverage-7.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10c39c0452bf6e694511c901426d6b5ac005acc0f78ff265dbe36bf81f808a2"},
+ {file = "coverage-7.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4cbae1051ab791debecc4a5dcc4a1ff45fc27b91b9aee165c8a27514dd160836"},
+ {file = "coverage-7.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63"},
+ {file = "coverage-7.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c7bba973ebee5e56fe9251300c00f1579652587a9f4a5ed8404b15a0471f216"},
+ {file = "coverage-7.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe494faa90ce6381770746077243231e0b83ff3f17069d748f645617cefe19d4"},
+ {file = "coverage-7.3.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6e9589bd04d0461a417562649522575d8752904d35c12907d8c9dfeba588faf"},
+ {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d51ac2a26f71da1b57f2dc81d0e108b6ab177e7d30e774db90675467c847bbdf"},
+ {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:99b89d9f76070237975b315b3d5f4d6956ae354a4c92ac2388a5695516e47c84"},
+ {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fa28e909776dc69efb6ed975a63691bc8172b64ff357e663a1bb06ff3c9b589a"},
+ {file = "coverage-7.3.2-cp312-cp312-win32.whl", hash = "sha256:289fe43bf45a575e3ab10b26d7b6f2ddb9ee2dba447499f5401cfb5ecb8196bb"},
+ {file = "coverage-7.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:7dbc3ed60e8659bc59b6b304b43ff9c3ed858da2839c78b804973f613d3e92ed"},
+ {file = "coverage-7.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f94b734214ea6a36fe16e96a70d941af80ff3bfd716c141300d95ebc85339738"},
+ {file = "coverage-7.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:af3d828d2c1cbae52d34bdbb22fcd94d1ce715d95f1a012354a75e5913f1bda2"},
+ {file = "coverage-7.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:630b13e3036e13c7adc480ca42fa7afc2a5d938081d28e20903cf7fd687872e2"},
+ {file = "coverage-7.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9eacf273e885b02a0273bb3a2170f30e2d53a6d53b72dbe02d6701b5296101c"},
+ {file = "coverage-7.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8f17966e861ff97305e0801134e69db33b143bbfb36436efb9cfff6ec7b2fd9"},
+ {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b4275802d16882cf9c8b3d057a0839acb07ee9379fa2749eca54efbce1535b82"},
+ {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:72c0cfa5250f483181e677ebc97133ea1ab3eb68645e494775deb6a7f6f83901"},
+ {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:cb536f0dcd14149425996821a168f6e269d7dcd2c273a8bff8201e79f5104e76"},
+ {file = "coverage-7.3.2-cp38-cp38-win32.whl", hash = "sha256:307adb8bd3abe389a471e649038a71b4eb13bfd6b7dd9a129fa856f5c695cf92"},
+ {file = "coverage-7.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:88ed2c30a49ea81ea3b7f172e0269c182a44c236eb394718f976239892c0a27a"},
+ {file = "coverage-7.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b631c92dfe601adf8f5ebc7fc13ced6bb6e9609b19d9a8cd59fa47c4186ad1ce"},
+ {file = "coverage-7.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d3d9df4051c4a7d13036524b66ecf7a7537d14c18a384043f30a303b146164e9"},
+ {file = "coverage-7.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f7363d3b6a1119ef05015959ca24a9afc0ea8a02c687fe7e2d557705375c01f"},
+ {file = "coverage-7.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2f11cc3c967a09d3695d2a6f03fb3e6236622b93be7a4b5dc09166a861be6d25"},
+ {file = "coverage-7.3.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9"},
+ {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3a4006916aa6fee7cd38db3bfc95aa9c54ebb4ffbfc47c677c8bba949ceba0a6"},
+ {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9028a3871280110d6e1aa2df1afd5ef003bab5fb1ef421d6dc748ae1c8ef2ebc"},
+ {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9f805d62aec8eb92bab5b61c0f07329275b6f41c97d80e847b03eb894f38d083"},
+ {file = "coverage-7.3.2-cp39-cp39-win32.whl", hash = "sha256:d1c88ec1a7ff4ebca0219f5b1ef863451d828cccf889c173e1253aa84b1e07ce"},
+ {file = "coverage-7.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b4767da59464bb593c07afceaddea61b154136300881844768037fd5e859353f"},
+ {file = "coverage-7.3.2-pp38.pp39.pp310-none-any.whl", hash = "sha256:ae97af89f0fbf373400970c0a21eef5aa941ffeed90aee43650b81f7d7f47637"},
+ {file = "coverage-7.3.2.tar.gz", hash = "sha256:be32ad29341b0170e795ca590e1c07e81fc061cb5b10c74ce7203491484404ef"},
+]
+
+[package.dependencies]
+tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
+
+[package.extras]
+toml = ["tomli"]
+
+[[package]]
+name = "deprecation"
+version = "2.1.0"
+description = "A library to handle automated deprecations"
+optional = false
+python-versions = "*"
+files = [
+ {file = "deprecation-2.1.0-py2.py3-none-any.whl", hash = "sha256:a10811591210e1fb0e768a8c25517cabeabcba6f0bf96564f8ff45189f90b14a"},
+ {file = "deprecation-2.1.0.tar.gz", hash = "sha256:72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff"},
+]
+
+[package.dependencies]
+packaging = "*"
+
+[[package]]
+name = "docker"
+version = "6.1.3"
+description = "A Python library for the Docker Engine API."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "docker-6.1.3-py3-none-any.whl", hash = "sha256:aecd2277b8bf8e506e484f6ab7aec39abe0038e29fa4a6d3ba86c3fe01844ed9"},
+ {file = "docker-6.1.3.tar.gz", hash = "sha256:aa6d17830045ba5ef0168d5eaa34d37beeb113948c413affe1d5991fc11f9a20"},
+]
+
+[package.dependencies]
+packaging = ">=14.0"
+pywin32 = {version = ">=304", markers = "sys_platform == \"win32\""}
+requests = ">=2.26.0"
+urllib3 = ">=1.26.0"
+websocket-client = ">=0.32.0"
+
+[package.extras]
+ssh = ["paramiko (>=2.4.3)"]
+
+[[package]]
+name = "docutils"
+version = "0.20.1"
+description = "Docutils -- Python Documentation Utilities"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"},
+ {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"},
+]
+
+[[package]]
+name = "exceptiongroup"
+version = "1.2.0"
+description = "Backport of PEP 654 (exception groups)"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"},
+ {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"},
+]
+
+[package.extras]
+test = ["pytest (>=6)"]
+
+[[package]]
+name = "filelock"
+version = "3.13.1"
+description = "A platform independent file lock."
+optional = true
+python-versions = ">=3.8"
+files = [
+ {file = "filelock-3.13.1-py3-none-any.whl", hash = "sha256:57dbda9b35157b05fb3e58ee91448612eb674172fab98ee235ccb0b5bee19a1c"},
+ {file = "filelock-3.13.1.tar.gz", hash = "sha256:521f5f56c50f8426f5e03ad3b281b490a87ef15bc6c526f168290f0c7148d44e"},
+]
+
+[package.extras]
+docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.24)"]
+testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"]
+typing = ["typing-extensions (>=4.8)"]
+
+[[package]]
+name = "fsspec"
+version = "2023.12.2"
+description = "File-system specification"
+optional = true
+python-versions = ">=3.8"
+files = [
+ {file = "fsspec-2023.12.2-py3-none-any.whl", hash = "sha256:d800d87f72189a745fa3d6b033b9dc4a34ad069f60ca60b943a63599f5501960"},
+ {file = "fsspec-2023.12.2.tar.gz", hash = "sha256:8548d39e8810b59c38014934f6b31e57f40c1b20f911f4cc2b85389c7e9bf0cb"},
+]
+
+[package.extras]
+abfs = ["adlfs"]
+adl = ["adlfs"]
+arrow = ["pyarrow (>=1)"]
+dask = ["dask", "distributed"]
+devel = ["pytest", "pytest-cov"]
+dropbox = ["dropbox", "dropboxdrivefs", "requests"]
+full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"]
+fuse = ["fusepy"]
+gcs = ["gcsfs"]
+git = ["pygit2"]
+github = ["requests"]
+gs = ["gcsfs"]
+gui = ["panel"]
+hdfs = ["pyarrow (>=1)"]
+http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)", "requests"]
+libarchive = ["libarchive-c"]
+oci = ["ocifs"]
+s3 = ["s3fs"]
+sftp = ["paramiko"]
+smb = ["smbprotocol"]
+ssh = ["paramiko"]
+tqdm = ["tqdm"]
+
+[[package]]
+name = "furo"
+version = "2023.9.10"
+description = "A clean customisable Sphinx documentation theme."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "furo-2023.9.10-py3-none-any.whl", hash = "sha256:513092538537dc5c596691da06e3c370714ec99bc438680edc1debffb73e5bfc"},
+ {file = "furo-2023.9.10.tar.gz", hash = "sha256:5707530a476d2a63b8cad83b4f961f3739a69f4b058bcf38a03a39fa537195b2"},
+]
+
+[package.dependencies]
+beautifulsoup4 = "*"
+pygments = ">=2.7"
+sphinx = ">=6.0,<8.0"
+sphinx-basic-ng = "*"
+
+[[package]]
+name = "grpcio"
+version = "1.59.3"
+description = "HTTP/2-based RPC framework"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "grpcio-1.59.3-cp310-cp310-linux_armv7l.whl", hash = "sha256:aca028a6c7806e5b61e5f9f4232432c52856f7fcb98e330b20b6bc95d657bdcc"},
+ {file = "grpcio-1.59.3-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:19ad26a7967f7999c8960d2b9fe382dae74c55b0c508c613a6c2ba21cddf2354"},
+ {file = "grpcio-1.59.3-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:72b71dad2a3d1650e69ad42a5c4edbc59ee017f08c32c95694172bc501def23c"},
+ {file = "grpcio-1.59.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0f0a11d82d0253656cc42e04b6a149521e02e755fe2e4edd21123de610fd1d4"},
+ {file = "grpcio-1.59.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60cddafb70f9a2c81ba251b53b4007e07cca7389e704f86266e22c4bffd8bf1d"},
+ {file = "grpcio-1.59.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6c75a1fa0e677c1d2b6d4196ad395a5c381dfb8385f07ed034ef667cdcdbcc25"},
+ {file = "grpcio-1.59.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e1d8e01438d5964a11167eec1edb5f85ed8e475648f36c834ed5db4ffba24ac8"},
+ {file = "grpcio-1.59.3-cp310-cp310-win32.whl", hash = "sha256:c4b0076f0bf29ee62335b055a9599f52000b7941f577daa001c7ef961a1fbeab"},
+ {file = "grpcio-1.59.3-cp310-cp310-win_amd64.whl", hash = "sha256:b1f00a3e6e0c3dccccffb5579fc76ebfe4eb40405ba308505b41ef92f747746a"},
+ {file = "grpcio-1.59.3-cp311-cp311-linux_armv7l.whl", hash = "sha256:3996aaa21231451161dc29df6a43fcaa8b332042b6150482c119a678d007dd86"},
+ {file = "grpcio-1.59.3-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:cb4e9cbd9b7388fcb06412da9f188c7803742d06d6f626304eb838d1707ec7e3"},
+ {file = "grpcio-1.59.3-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:8022ca303d6c694a0d7acfb2b472add920217618d3a99eb4b14edc7c6a7e8fcf"},
+ {file = "grpcio-1.59.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b36683fad5664283755a7f4e2e804e243633634e93cd798a46247b8e54e3cb0d"},
+ {file = "grpcio-1.59.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8239b853226e4824e769517e1b5232e7c4dda3815b200534500338960fcc6118"},
+ {file = "grpcio-1.59.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0511af8653fbda489ff11d542a08505d56023e63cafbda60e6e00d4e0bae86ea"},
+ {file = "grpcio-1.59.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e78dc982bda74cef2ddfce1c91d29b96864c4c680c634e279ed204d51e227473"},
+ {file = "grpcio-1.59.3-cp311-cp311-win32.whl", hash = "sha256:6a5c3a96405966c023e139c3bcccb2c7c776a6f256ac6d70f8558c9041bdccc3"},
+ {file = "grpcio-1.59.3-cp311-cp311-win_amd64.whl", hash = "sha256:ed26826ee423b11477297b187371cdf4fa1eca874eb1156422ef3c9a60590dd9"},
+ {file = "grpcio-1.59.3-cp312-cp312-linux_armv7l.whl", hash = "sha256:45dddc5cb5227d30fa43652d8872dc87f086d81ab4b500be99413bad0ae198d7"},
+ {file = "grpcio-1.59.3-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:1736496d74682e53dd0907fd515f2694d8e6a96c9a359b4080b2504bf2b2d91b"},
+ {file = "grpcio-1.59.3-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:ddbd1a16138e52e66229047624de364f88a948a4d92ba20e4e25ad7d22eef025"},
+ {file = "grpcio-1.59.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fcfa56f8d031ffda902c258c84c4b88707f3a4be4827b4e3ab8ec7c24676320d"},
+ {file = "grpcio-1.59.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2eb8f0c7c0c62f7a547ad7a91ba627a5aa32a5ae8d930783f7ee61680d7eb8d"},
+ {file = "grpcio-1.59.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8d993399cc65e3a34f8fd48dd9ad7a376734564b822e0160dd18b3d00c1a33f9"},
+ {file = "grpcio-1.59.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c0bd141f4f41907eb90bda74d969c3cb21c1c62779419782a5b3f5e4b5835718"},
+ {file = "grpcio-1.59.3-cp312-cp312-win32.whl", hash = "sha256:33b8fd65d4e97efa62baec6171ce51f9cf68f3a8ba9f866f4abc9d62b5c97b79"},
+ {file = "grpcio-1.59.3-cp312-cp312-win_amd64.whl", hash = "sha256:0e735ed002f50d4f3cb9ecfe8ac82403f5d842d274c92d99db64cfc998515e07"},
+ {file = "grpcio-1.59.3-cp37-cp37m-linux_armv7l.whl", hash = "sha256:ea40ce4404e7cca0724c91a7404da410f0144148fdd58402a5942971e3469b94"},
+ {file = "grpcio-1.59.3-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:83113bcc393477b6f7342b9f48e8a054330c895205517edc66789ceea0796b53"},
+ {file = "grpcio-1.59.3-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:73afbac602b8f1212a50088193601f869b5073efa9855b3e51aaaec97848fc8a"},
+ {file = "grpcio-1.59.3-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:575d61de1950b0b0699917b686b1ca108690702fcc2df127b8c9c9320f93e069"},
+ {file = "grpcio-1.59.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cd76057b5c9a4d68814610ef9226925f94c1231bbe533fdf96f6181f7d2ff9e"},
+ {file = "grpcio-1.59.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:95d6fd804c81efe4879e38bfd84d2b26e339a0a9b797e7615e884ef4686eb47b"},
+ {file = "grpcio-1.59.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0d42048b8a3286ea4134faddf1f9a59cf98192b94aaa10d910a25613c5eb5bfb"},
+ {file = "grpcio-1.59.3-cp37-cp37m-win_amd64.whl", hash = "sha256:4619fea15c64bcdd9d447cdbdde40e3d5f1da3a2e8ae84103d94a9c1df210d7e"},
+ {file = "grpcio-1.59.3-cp38-cp38-linux_armv7l.whl", hash = "sha256:95b5506e70284ac03b2005dd9ffcb6708c9ae660669376f0192a710687a22556"},
+ {file = "grpcio-1.59.3-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:9e17660947660ccfce56c7869032910c179a5328a77b73b37305cd1ee9301c2e"},
+ {file = "grpcio-1.59.3-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:00912ce19914d038851be5cd380d94a03f9d195643c28e3ad03d355cc02ce7e8"},
+ {file = "grpcio-1.59.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e58b3cadaa3c90f1efca26ba33e0d408b35b497307027d3d707e4bcd8de862a6"},
+ {file = "grpcio-1.59.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d787ecadea865bdf78f6679f6f5bf4b984f18f659257ba612979df97a298b3c3"},
+ {file = "grpcio-1.59.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:0814942ba1bba269db4e760a34388640c601dece525c6a01f3b4ff030cc0db69"},
+ {file = "grpcio-1.59.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fb111aa99d3180c361a35b5ae1e2c63750220c584a1344229abc139d5c891881"},
+ {file = "grpcio-1.59.3-cp38-cp38-win32.whl", hash = "sha256:eb8ba504c726befe40a356ecbe63c6c3c64c9a439b3164f5a718ec53c9874da0"},
+ {file = "grpcio-1.59.3-cp38-cp38-win_amd64.whl", hash = "sha256:cdbc6b32fadab9bebc6f49d3e7ec4c70983c71e965497adab7f87de218e84391"},
+ {file = "grpcio-1.59.3-cp39-cp39-linux_armv7l.whl", hash = "sha256:c82ca1e4be24a98a253d6dbaa216542e4163f33f38163fc77964b0f0d255b552"},
+ {file = "grpcio-1.59.3-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:36636babfda14f9e9687f28d5b66d349cf88c1301154dc71c6513de2b6c88c59"},
+ {file = "grpcio-1.59.3-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:5f9b2e591da751ac7fdd316cc25afafb7a626dededa9b414f90faad7f3ccebdb"},
+ {file = "grpcio-1.59.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a93a82876a4926bf451db82ceb725bd87f42292bacc94586045261f501a86994"},
+ {file = "grpcio-1.59.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce31fa0bfdd1f2bb15b657c16105c8652186eab304eb512e6ae3b99b2fdd7d13"},
+ {file = "grpcio-1.59.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:16da0e40573962dab6cba16bec31f25a4f468e6d05b658e589090fe103b03e3d"},
+ {file = "grpcio-1.59.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d1d1a17372fd425addd5812049fa7374008ffe689585f27f802d0935522cf4b7"},
+ {file = "grpcio-1.59.3-cp39-cp39-win32.whl", hash = "sha256:52cc38a7241b5f7b4a91aaf9000fdd38e26bb00d5e8a71665ce40cfcee716281"},
+ {file = "grpcio-1.59.3-cp39-cp39-win_amd64.whl", hash = "sha256:b491e5bbcad3020a96842040421e508780cade35baba30f402df9d321d1c423e"},
+ {file = "grpcio-1.59.3.tar.gz", hash = "sha256:7800f99568a74a06ebdccd419dd1b6e639b477dcaf6da77ea702f8fb14ce5f80"},
+]
+
+[package.extras]
+protobuf = ["grpcio-tools (>=1.59.3)"]
+
+[[package]]
+name = "huggingface-hub"
+version = "0.20.1"
+description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
+optional = true
+python-versions = ">=3.8.0"
+files = [
+ {file = "huggingface_hub-0.20.1-py3-none-any.whl", hash = "sha256:ecfdea395a8bc68cd160106c5bd857f7e010768d95f9e1862a779010cc304831"},
+ {file = "huggingface_hub-0.20.1.tar.gz", hash = "sha256:8c88c4c3c8853e22f2dfb4d84c3d493f4e1af52fb3856a90e1eeddcf191ddbb1"},
+]
+
+[package.dependencies]
+filelock = "*"
+fsspec = ">=2023.5.0"
+packaging = ">=20.9"
+pyyaml = ">=5.1"
+requests = "*"
+tqdm = ">=4.42.1"
+typing-extensions = ">=3.7.4.3"
+
+[package.extras]
+all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.1.3)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"]
+cli = ["InquirerPy (==0.3.4)"]
+dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.1.3)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"]
+fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"]
+inference = ["aiohttp", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)"]
+quality = ["mypy (==1.5.1)", "ruff (>=0.1.3)"]
+tensorflow = ["graphviz", "pydot", "tensorflow"]
+testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"]
+torch = ["torch"]
+typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)"]
+
+[[package]]
+name = "idna"
+version = "3.6"
+description = "Internationalized Domain Names in Applications (IDNA)"
+optional = false
+python-versions = ">=3.5"
+files = [
+ {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"},
+ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"},
+]
+
+[[package]]
+name = "imagesize"
+version = "1.4.1"
+description = "Getting image size from png/jpeg/jpeg2000/gif file"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+files = [
+ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"},
+ {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"},
+]
+
+[[package]]
+name = "importlib-metadata"
+version = "7.0.0"
+description = "Read metadata from Python packages"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "importlib_metadata-7.0.0-py3-none-any.whl", hash = "sha256:d97503976bb81f40a193d41ee6570868479c69d5068651eb039c40d850c59d67"},
+ {file = "importlib_metadata-7.0.0.tar.gz", hash = "sha256:7fc841f8b8332803464e5dc1c63a2e59121f46ca186c0e2e182e80bf8c1319f7"},
+]
+
+[package.dependencies]
+zipp = ">=0.5"
+
+[package.extras]
+docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"]
+perf = ["ipython"]
+testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"]
+
+[[package]]
+name = "iniconfig"
+version = "2.0.0"
+description = "brain-dead simple config-ini parsing"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"},
+ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
+]
+
+[[package]]
+name = "jinja2"
+version = "3.1.3"
+description = "A very fast and expressive template engine."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"},
+ {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"},
+]
+
+[package.dependencies]
+MarkupSafe = ">=2.0"
+
+[package.extras]
+i18n = ["Babel (>=2.7)"]
+
+[[package]]
+name = "linkify-it-py"
+version = "2.0.2"
+description = "Links recognition library with FULL unicode support."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "linkify-it-py-2.0.2.tar.gz", hash = "sha256:19f3060727842c254c808e99d465c80c49d2c7306788140987a1a7a29b0d6ad2"},
+ {file = "linkify_it_py-2.0.2-py3-none-any.whl", hash = "sha256:a3a24428f6c96f27370d7fe61d2ac0be09017be5190d68d8658233171f1b6541"},
+]
+
+[package.dependencies]
+uc-micro-py = "*"
+
+[package.extras]
+benchmark = ["pytest", "pytest-benchmark"]
+dev = ["black", "flake8", "isort", "pre-commit", "pyproject-flake8"]
+doc = ["myst-parser", "sphinx", "sphinx-book-theme"]
+test = ["coverage", "pytest", "pytest-cov"]
+
+[[package]]
+name = "livereload"
+version = "2.6.3"
+description = "Python LiveReload is an awesome tool for web developers"
+optional = false
+python-versions = "*"
+files = [
+ {file = "livereload-2.6.3-py2.py3-none-any.whl", hash = "sha256:ad4ac6f53b2d62bb6ce1a5e6e96f1f00976a32348afedcb4b6d68df2a1d346e4"},
+ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"},
+]
+
+[package.dependencies]
+six = "*"
+tornado = {version = "*", markers = "python_version > \"2.7\""}
+
+[[package]]
+name = "markdown-it-py"
+version = "3.0.0"
+description = "Python port of markdown-it. Markdown parsing, done right!"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"},
+ {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"},
+]
+
+[package.dependencies]
+mdurl = ">=0.1,<1.0"
+
+[package.extras]
+benchmarking = ["psutil", "pytest", "pytest-benchmark"]
+code-style = ["pre-commit (>=3.0,<4.0)"]
+compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"]
+linkify = ["linkify-it-py (>=1,<3)"]
+plugins = ["mdit-py-plugins"]
+profiling = ["gprof2dot"]
+rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"]
+testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"]
+
+[[package]]
+name = "markupsafe"
+version = "2.1.3"
+description = "Safely add untrusted strings to HTML/XML markup."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"},
+ {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"},
+ {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"},
+ {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"},
+ {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"},
+ {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"},
+ {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"},
+ {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"},
+]
+
+[[package]]
+name = "mdit-py-plugins"
+version = "0.4.0"
+description = "Collection of plugins for markdown-it-py"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "mdit_py_plugins-0.4.0-py3-none-any.whl", hash = "sha256:b51b3bb70691f57f974e257e367107857a93b36f322a9e6d44ca5bf28ec2def9"},
+ {file = "mdit_py_plugins-0.4.0.tar.gz", hash = "sha256:d8ab27e9aed6c38aa716819fedfde15ca275715955f8a185a8e1cf90fb1d2c1b"},
+]
+
+[package.dependencies]
+markdown-it-py = ">=1.0.0,<4.0.0"
+
+[package.extras]
+code-style = ["pre-commit"]
+rtd = ["myst-parser", "sphinx-book-theme"]
+testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"]
+
+[[package]]
+name = "mdurl"
+version = "0.1.2"
+description = "Markdown URL utilities"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"},
+ {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"},
+]
+
+[[package]]
+name = "ml-metadata"
+version = "1.14.0"
+description = "A library for maintaining metadata for artifacts."
+optional = false
+python-versions = ">=3.8,<4"
+files = [
+ {file = "ml_metadata-1.14.0-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:50ef7c83e917f591639447e8b395fb97abded9a86be9afddab79b2155eb5a32c"},
+ {file = "ml_metadata-1.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69bd8690c0c54a9332f4958ec4c541d44f994a7d7e382801fa242e63b182ec37"},
+ {file = "ml_metadata-1.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:367e9bfe8449baed86242ba0ffc7956b0e8cac1d0bb0ccb296ff5634410fd07b"},
+ {file = "ml_metadata-1.14.0-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:8823d01fa3488a6918ce8c7b318929b71aff0774c238b2426cc469d2ee115efd"},
+ {file = "ml_metadata-1.14.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebaabd99c1028a98a947787a9d195b752c787270bc5105b2414cdefb0204c0d0"},
+ {file = "ml_metadata-1.14.0-cp38-cp38-win_amd64.whl", hash = "sha256:b40be36440a63b40a4a788a40fbbe37c086cc89977867f10ae17150146474098"},
+ {file = "ml_metadata-1.14.0-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:5671da7d3f765fb37d7c2a302d597ad0adeaf9655bf0e59dbe06ff7e9f6b155e"},
+ {file = "ml_metadata-1.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:92bdfccdfe3755ad1545ed052c84f47880713ce49e72a5fcc395ad6699ccedd9"},
+ {file = "ml_metadata-1.14.0-cp39-cp39-win_amd64.whl", hash = "sha256:8dd44943c61716a9086635f24b75c3b18e1bee33cf5a600600616f0307400845"},
+]
+
+[package.dependencies]
+absl-py = ">=0.9,<2.0.0"
+attrs = ">=20.3,<22"
+grpcio = ">=1.8.6,<2"
+protobuf = ">=3.13,<4"
+six = ">=1.10,<2"
+
+[[package]]
+name = "mypy"
+version = "1.7.1"
+description = "Optional static typing for Python"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "mypy-1.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:12cce78e329838d70a204293e7b29af9faa3ab14899aec397798a4b41be7f340"},
+ {file = "mypy-1.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1484b8fa2c10adf4474f016e09d7a159602f3239075c7bf9f1627f5acf40ad49"},
+ {file = "mypy-1.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31902408f4bf54108bbfb2e35369877c01c95adc6192958684473658c322c8a5"},
+ {file = "mypy-1.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f2c2521a8e4d6d769e3234350ba7b65ff5d527137cdcde13ff4d99114b0c8e7d"},
+ {file = "mypy-1.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:fcd2572dd4519e8a6642b733cd3a8cfc1ef94bafd0c1ceed9c94fe736cb65b6a"},
+ {file = "mypy-1.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4b901927f16224d0d143b925ce9a4e6b3a758010673eeded9b748f250cf4e8f7"},
+ {file = "mypy-1.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2f7f6985d05a4e3ce8255396df363046c28bea790e40617654e91ed580ca7c51"},
+ {file = "mypy-1.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:944bdc21ebd620eafefc090cdf83158393ec2b1391578359776c00de00e8907a"},
+ {file = "mypy-1.7.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9c7ac372232c928fff0645d85f273a726970c014749b924ce5710d7d89763a28"},
+ {file = "mypy-1.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:f6efc9bd72258f89a3816e3a98c09d36f079c223aa345c659622f056b760ab42"},
+ {file = "mypy-1.7.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6dbdec441c60699288adf051f51a5d512b0d818526d1dcfff5a41f8cd8b4aaf1"},
+ {file = "mypy-1.7.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4fc3d14ee80cd22367caaaf6e014494415bf440980a3045bf5045b525680ac33"},
+ {file = "mypy-1.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c6e4464ed5f01dc44dc9821caf67b60a4e5c3b04278286a85c067010653a0eb"},
+ {file = "mypy-1.7.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:d9b338c19fa2412f76e17525c1b4f2c687a55b156320acb588df79f2e6fa9fea"},
+ {file = "mypy-1.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:204e0d6de5fd2317394a4eff62065614c4892d5a4d1a7ee55b765d7a3d9e3f82"},
+ {file = "mypy-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:84860e06ba363d9c0eeabd45ac0fde4b903ad7aa4f93cd8b648385a888e23200"},
+ {file = "mypy-1.7.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8c5091ebd294f7628eb25ea554852a52058ac81472c921150e3a61cdd68f75a7"},
+ {file = "mypy-1.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40716d1f821b89838589e5b3106ebbc23636ffdef5abc31f7cd0266db936067e"},
+ {file = "mypy-1.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5cf3f0c5ac72139797953bd50bc6c95ac13075e62dbfcc923571180bebb662e9"},
+ {file = "mypy-1.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:78e25b2fd6cbb55ddfb8058417df193f0129cad5f4ee75d1502248e588d9e0d7"},
+ {file = "mypy-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:75c4d2a6effd015786c87774e04331b6da863fc3fc4e8adfc3b40aa55ab516fe"},
+ {file = "mypy-1.7.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2643d145af5292ee956aa0a83c2ce1038a3bdb26e033dadeb2f7066fb0c9abce"},
+ {file = "mypy-1.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75aa828610b67462ffe3057d4d8a4112105ed211596b750b53cbfe182f44777a"},
+ {file = "mypy-1.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ee5d62d28b854eb61889cde4e1dbc10fbaa5560cb39780c3995f6737f7e82120"},
+ {file = "mypy-1.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:72cf32ce7dd3562373f78bd751f73c96cfb441de147cc2448a92c1a308bd0ca6"},
+ {file = "mypy-1.7.1-py3-none-any.whl", hash = "sha256:f7c5d642db47376a0cc130f0de6d055056e010debdaf0707cd2b0fc7e7ef30ea"},
+ {file = "mypy-1.7.1.tar.gz", hash = "sha256:fcb6d9afb1b6208b4c712af0dafdc650f518836065df0d4fb1d800f5d6773db2"},
+]
+
+[package.dependencies]
+mypy-extensions = ">=1.0.0"
+tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
+typing-extensions = ">=4.1.0"
+
+[package.extras]
+dmypy = ["psutil (>=4.0)"]
+install-types = ["pip"]
+mypyc = ["setuptools (>=50)"]
+reports = ["lxml"]
+
+[[package]]
+name = "mypy-extensions"
+version = "1.0.0"
+description = "Type system extensions for programs checked with the mypy type checker."
+optional = false
+python-versions = ">=3.5"
+files = [
+ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
+ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
+]
+
+[[package]]
+name = "myst-parser"
+version = "2.0.0"
+description = "An extended [CommonMark](https://spec.commonmark.org/) compliant parser,"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "myst_parser-2.0.0-py3-none-any.whl", hash = "sha256:7c36344ae39c8e740dad7fdabf5aa6fc4897a813083c6cc9990044eb93656b14"},
+ {file = "myst_parser-2.0.0.tar.gz", hash = "sha256:ea929a67a6a0b1683cdbe19b8d2e724cd7643f8aa3e7bb18dd65beac3483bead"},
+]
+
+[package.dependencies]
+docutils = ">=0.16,<0.21"
+jinja2 = "*"
+linkify-it-py = {version = ">=2.0,<3.0", optional = true, markers = "extra == \"linkify\""}
+markdown-it-py = ">=3.0,<4.0"
+mdit-py-plugins = ">=0.4,<1.0"
+pyyaml = "*"
+sphinx = ">=6,<8"
+
+[package.extras]
+code-style = ["pre-commit (>=3.0,<4.0)"]
+linkify = ["linkify-it-py (>=2.0,<3.0)"]
+rtd = ["ipython", "pydata-sphinx-theme (==v0.13.0rc4)", "sphinx-autodoc2 (>=0.4.2,<0.5.0)", "sphinx-book-theme (==1.0.0rc2)", "sphinx-copybutton", "sphinx-design2", "sphinx-pyscript", "sphinx-tippy (>=0.3.1)", "sphinx-togglebutton", "sphinxext-opengraph (>=0.8.2,<0.9.0)", "sphinxext-rediraffe (>=0.2.7,<0.3.0)"]
+testing = ["beautifulsoup4", "coverage[toml]", "pytest (>=7,<8)", "pytest-cov", "pytest-param-files (>=0.3.4,<0.4.0)", "pytest-regressions", "sphinx-pytest"]
+testing-docutils = ["pygments", "pytest (>=7,<8)", "pytest-param-files (>=0.3.4,<0.4.0)"]
+
+[[package]]
+name = "packaging"
+version = "23.2"
+description = "Core utilities for Python packages"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
+ {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
+]
+
+[[package]]
+name = "pluggy"
+version = "1.3.0"
+description = "plugin and hook calling mechanisms for python"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"},
+ {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"},
+]
+
+[package.extras]
+dev = ["pre-commit", "tox"]
+testing = ["pytest", "pytest-benchmark"]
+
+[[package]]
+name = "protobuf"
+version = "3.20.3"
+description = "Protocol Buffers"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "protobuf-3.20.3-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:f4bd856d702e5b0d96a00ec6b307b0f51c1982c2bf9c0052cf9019e9a544ba99"},
+ {file = "protobuf-3.20.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9aae4406ea63d825636cc11ffb34ad3379335803216ee3a856787bcf5ccc751e"},
+ {file = "protobuf-3.20.3-cp310-cp310-win32.whl", hash = "sha256:28545383d61f55b57cf4df63eebd9827754fd2dc25f80c5253f9184235db242c"},
+ {file = "protobuf-3.20.3-cp310-cp310-win_amd64.whl", hash = "sha256:67a3598f0a2dcbc58d02dd1928544e7d88f764b47d4a286202913f0b2801c2e7"},
+ {file = "protobuf-3.20.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:899dc660cd599d7352d6f10d83c95df430a38b410c1b66b407a6b29265d66469"},
+ {file = "protobuf-3.20.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e64857f395505ebf3d2569935506ae0dfc4a15cb80dc25261176c784662cdcc4"},
+ {file = "protobuf-3.20.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:d9e4432ff660d67d775c66ac42a67cf2453c27cb4d738fc22cb53b5d84c135d4"},
+ {file = "protobuf-3.20.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:74480f79a023f90dc6e18febbf7b8bac7508420f2006fabd512013c0c238f454"},
+ {file = "protobuf-3.20.3-cp37-cp37m-win32.whl", hash = "sha256:b6cc7ba72a8850621bfec987cb72623e703b7fe2b9127a161ce61e61558ad905"},
+ {file = "protobuf-3.20.3-cp37-cp37m-win_amd64.whl", hash = "sha256:8c0c984a1b8fef4086329ff8dd19ac77576b384079247c770f29cc8ce3afa06c"},
+ {file = "protobuf-3.20.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:de78575669dddf6099a8a0f46a27e82a1783c557ccc38ee620ed8cc96d3be7d7"},
+ {file = "protobuf-3.20.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:f4c42102bc82a51108e449cbb32b19b180022941c727bac0cfd50170341f16ee"},
+ {file = "protobuf-3.20.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:44246bab5dd4b7fbd3c0c80b6f16686808fab0e4aca819ade6e8d294a29c7050"},
+ {file = "protobuf-3.20.3-cp38-cp38-win32.whl", hash = "sha256:c02ce36ec760252242a33967d51c289fd0e1c0e6e5cc9397e2279177716add86"},
+ {file = "protobuf-3.20.3-cp38-cp38-win_amd64.whl", hash = "sha256:447d43819997825d4e71bf5769d869b968ce96848b6479397e29fc24c4a5dfe9"},
+ {file = "protobuf-3.20.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:398a9e0c3eaceb34ec1aee71894ca3299605fa8e761544934378bbc6c97de23b"},
+ {file = "protobuf-3.20.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:bf01b5720be110540be4286e791db73f84a2b721072a3711efff6c324cdf074b"},
+ {file = "protobuf-3.20.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:daa564862dd0d39c00f8086f88700fdbe8bc717e993a21e90711acfed02f2402"},
+ {file = "protobuf-3.20.3-cp39-cp39-win32.whl", hash = "sha256:819559cafa1a373b7096a482b504ae8a857c89593cf3a25af743ac9ecbd23480"},
+ {file = "protobuf-3.20.3-cp39-cp39-win_amd64.whl", hash = "sha256:03038ac1cfbc41aa21f6afcbcd357281d7521b4157926f30ebecc8d4ea59dcb7"},
+ {file = "protobuf-3.20.3-py2.py3-none-any.whl", hash = "sha256:a7ca6d488aa8ff7f329d4c545b2dbad8ac31464f1d8b1c87ad1346717731e4db"},
+ {file = "protobuf-3.20.3.tar.gz", hash = "sha256:2e3427429c9cffebf259491be0af70189607f365c2f41c7c3764af6f337105f2"},
+]
+
+[[package]]
+name = "pygments"
+version = "2.17.2"
+description = "Pygments is a syntax highlighting package written in Python."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"},
+ {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"},
+]
+
+[package.extras]
+plugins = ["importlib-metadata"]
+windows-terminal = ["colorama (>=0.4.6)"]
+
+[[package]]
+name = "pytest"
+version = "7.4.3"
+description = "pytest: simple powerful testing with Python"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"},
+ {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"},
+]
+
+[package.dependencies]
+colorama = {version = "*", markers = "sys_platform == \"win32\""}
+exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
+iniconfig = "*"
+packaging = "*"
+pluggy = ">=0.12,<2.0"
+tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
+
+[package.extras]
+testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
+
+[[package]]
+name = "pytest-cov"
+version = "4.1.0"
+description = "Pytest plugin for measuring coverage."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"},
+ {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"},
+]
+
+[package.dependencies]
+coverage = {version = ">=5.2.1", extras = ["toml"]}
+pytest = ">=4.6"
+
+[package.extras]
+testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"]
+
+[[package]]
+name = "pywin32"
+version = "306"
+description = "Python for Window Extensions"
+optional = false
+python-versions = "*"
+files = [
+ {file = "pywin32-306-cp310-cp310-win32.whl", hash = "sha256:06d3420a5155ba65f0b72f2699b5bacf3109f36acbe8923765c22938a69dfc8d"},
+ {file = "pywin32-306-cp310-cp310-win_amd64.whl", hash = "sha256:84f4471dbca1887ea3803d8848a1616429ac94a4a8d05f4bc9c5dcfd42ca99c8"},
+ {file = "pywin32-306-cp311-cp311-win32.whl", hash = "sha256:e65028133d15b64d2ed8f06dd9fbc268352478d4f9289e69c190ecd6818b6407"},
+ {file = "pywin32-306-cp311-cp311-win_amd64.whl", hash = "sha256:a7639f51c184c0272e93f244eb24dafca9b1855707d94c192d4a0b4c01e1100e"},
+ {file = "pywin32-306-cp311-cp311-win_arm64.whl", hash = "sha256:70dba0c913d19f942a2db25217d9a1b726c278f483a919f1abfed79c9cf64d3a"},
+ {file = "pywin32-306-cp312-cp312-win32.whl", hash = "sha256:383229d515657f4e3ed1343da8be101000562bf514591ff383ae940cad65458b"},
+ {file = "pywin32-306-cp312-cp312-win_amd64.whl", hash = "sha256:37257794c1ad39ee9be652da0462dc2e394c8159dfd913a8a4e8eb6fd346da0e"},
+ {file = "pywin32-306-cp312-cp312-win_arm64.whl", hash = "sha256:5821ec52f6d321aa59e2db7e0a35b997de60c201943557d108af9d4ae1ec7040"},
+ {file = "pywin32-306-cp37-cp37m-win32.whl", hash = "sha256:1c73ea9a0d2283d889001998059f5eaaba3b6238f767c9cf2833b13e6a685f65"},
+ {file = "pywin32-306-cp37-cp37m-win_amd64.whl", hash = "sha256:72c5f621542d7bdd4fdb716227be0dd3f8565c11b280be6315b06ace35487d36"},
+ {file = "pywin32-306-cp38-cp38-win32.whl", hash = "sha256:e4c092e2589b5cf0d365849e73e02c391c1349958c5ac3e9d5ccb9a28e017b3a"},
+ {file = "pywin32-306-cp38-cp38-win_amd64.whl", hash = "sha256:e8ac1ae3601bee6ca9f7cb4b5363bf1c0badb935ef243c4733ff9a393b1690c0"},
+ {file = "pywin32-306-cp39-cp39-win32.whl", hash = "sha256:e25fd5b485b55ac9c057f67d94bc203f3f6595078d1fb3b458c9c28b7153a802"},
+ {file = "pywin32-306-cp39-cp39-win_amd64.whl", hash = "sha256:39b61c15272833b5c329a2989999dcae836b1eed650252ab1b7bfbe1d59f30f4"},
+]
+
+[[package]]
+name = "pyyaml"
+version = "6.0.1"
+description = "YAML parser and emitter for Python"
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"},
+ {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"},
+ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"},
+ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"},
+ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"},
+ {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"},
+ {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"},
+ {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"},
+ {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"},
+ {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"},
+ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"},
+ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"},
+ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"},
+ {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"},
+ {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"},
+ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
+ {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"},
+ {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"},
+ {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"},
+ {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"},
+ {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"},
+ {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"},
+ {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"},
+ {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"},
+ {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"},
+ {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"},
+ {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"},
+ {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"},
+ {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"},
+ {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"},
+ {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"},
+ {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"},
+ {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"},
+ {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"},
+ {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"},
+ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"},
+ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"},
+ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"},
+ {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"},
+ {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"},
+ {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"},
+ {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"},
+ {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"},
+ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"},
+ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"},
+ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"},
+ {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"},
+ {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"},
+ {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"},
+ {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"},
+]
+
+[[package]]
+name = "requests"
+version = "2.31.0"
+description = "Python HTTP for Humans."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"},
+ {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"},
+]
+
+[package.dependencies]
+certifi = ">=2017.4.17"
+charset-normalizer = ">=2,<4"
+idna = ">=2.5,<4"
+urllib3 = ">=1.21.1,<3"
+
+[package.extras]
+socks = ["PySocks (>=1.5.6,!=1.5.7)"]
+use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
+
+[[package]]
+name = "ruff"
+version = "0.1.6"
+description = "An extremely fast Python linter and code formatter, written in Rust."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "ruff-0.1.6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:88b8cdf6abf98130991cbc9f6438f35f6e8d41a02622cc5ee130a02a0ed28703"},
+ {file = "ruff-0.1.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c549ed437680b6105a1299d2cd30e4964211606eeb48a0ff7a93ef70b902248"},
+ {file = "ruff-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cf5f701062e294f2167e66d11b092bba7af6a057668ed618a9253e1e90cfd76"},
+ {file = "ruff-0.1.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:05991ee20d4ac4bb78385360c684e4b417edd971030ab12a4fbd075ff535050e"},
+ {file = "ruff-0.1.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87455a0c1f739b3c069e2f4c43b66479a54dea0276dd5d4d67b091265f6fd1dc"},
+ {file = "ruff-0.1.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:683aa5bdda5a48cb8266fcde8eea2a6af4e5700a392c56ea5fb5f0d4bfdc0240"},
+ {file = "ruff-0.1.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:137852105586dcbf80c1717facb6781555c4e99f520c9c827bd414fac67ddfb6"},
+ {file = "ruff-0.1.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd98138a98d48a1c36c394fd6b84cd943ac92a08278aa8ac8c0fdefcf7138f35"},
+ {file = "ruff-0.1.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a0cd909d25f227ac5c36d4e7e681577275fb74ba3b11d288aff7ec47e3ae745"},
+ {file = "ruff-0.1.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e8fd1c62a47aa88a02707b5dd20c5ff20d035d634aa74826b42a1da77861b5ff"},
+ {file = "ruff-0.1.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:fd89b45d374935829134a082617954120d7a1470a9f0ec0e7f3ead983edc48cc"},
+ {file = "ruff-0.1.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:491262006e92f825b145cd1e52948073c56560243b55fb3b4ecb142f6f0e9543"},
+ {file = "ruff-0.1.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:ea284789861b8b5ca9d5443591a92a397ac183d4351882ab52f6296b4fdd5462"},
+ {file = "ruff-0.1.6-py3-none-win32.whl", hash = "sha256:1610e14750826dfc207ccbcdd7331b6bd285607d4181df9c1c6ae26646d6848a"},
+ {file = "ruff-0.1.6-py3-none-win_amd64.whl", hash = "sha256:4558b3e178145491e9bc3b2ee3c4b42f19d19384eaa5c59d10acf6e8f8b57e33"},
+ {file = "ruff-0.1.6-py3-none-win_arm64.whl", hash = "sha256:03910e81df0d8db0e30050725a5802441c2022ea3ae4fe0609b76081731accbc"},
+ {file = "ruff-0.1.6.tar.gz", hash = "sha256:1b09f29b16c6ead5ea6b097ef2764b42372aebe363722f1605ecbcd2b9207184"},
+]
+
+[[package]]
+name = "six"
+version = "1.16.0"
+description = "Python 2 and 3 compatibility utilities"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
+files = [
+ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
+ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
+]
+
+[[package]]
+name = "snowballstemmer"
+version = "2.2.0"
+description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms."
+optional = false
+python-versions = "*"
+files = [
+ {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"},
+ {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"},
+]
+
+[[package]]
+name = "soupsieve"
+version = "2.5"
+description = "A modern CSS selector implementation for Beautiful Soup."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "soupsieve-2.5-py3-none-any.whl", hash = "sha256:eaa337ff55a1579b6549dc679565eac1e3d000563bcb1c8ab0d0fefbc0c2cdc7"},
+ {file = "soupsieve-2.5.tar.gz", hash = "sha256:5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690"},
+]
+
+[[package]]
+name = "sphinx"
+version = "7.2.6"
+description = "Python documentation generator"
+optional = false
+python-versions = ">=3.9"
+files = [
+ {file = "sphinx-7.2.6-py3-none-any.whl", hash = "sha256:1e09160a40b956dc623c910118fa636da93bd3ca0b9876a7b3df90f07d691560"},
+ {file = "sphinx-7.2.6.tar.gz", hash = "sha256:9a5160e1ea90688d5963ba09a2dcd8bdd526620edbb65c328728f1b2228d5ab5"},
+]
+
+[package.dependencies]
+alabaster = ">=0.7,<0.8"
+babel = ">=2.9"
+colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
+docutils = ">=0.18.1,<0.21"
+imagesize = ">=1.3"
+importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""}
+Jinja2 = ">=3.0"
+packaging = ">=21.0"
+Pygments = ">=2.14"
+requests = ">=2.25.0"
+snowballstemmer = ">=2.0"
+sphinxcontrib-applehelp = "*"
+sphinxcontrib-devhelp = "*"
+sphinxcontrib-htmlhelp = ">=2.0.0"
+sphinxcontrib-jsmath = "*"
+sphinxcontrib-qthelp = "*"
+sphinxcontrib-serializinghtml = ">=1.1.9"
+
+[package.extras]
+docs = ["sphinxcontrib-websupport"]
+lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"]
+test = ["cython (>=3.0)", "filelock", "html5lib", "pytest (>=4.6)", "setuptools (>=67.0)"]
+
+[[package]]
+name = "sphinx-autobuild"
+version = "2021.3.14"
+description = "Rebuild Sphinx documentation on changes, with live-reload in the browser."
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "sphinx-autobuild-2021.3.14.tar.gz", hash = "sha256:de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05"},
+ {file = "sphinx_autobuild-2021.3.14-py3-none-any.whl", hash = "sha256:8fe8cbfdb75db04475232f05187c776f46f6e9e04cacf1e49ce81bdac649ccac"},
+]
+
+[package.dependencies]
+colorama = "*"
+livereload = "*"
+sphinx = "*"
+
+[package.extras]
+test = ["pytest", "pytest-cov"]
+
+[[package]]
+name = "sphinx-basic-ng"
+version = "1.0.0b2"
+description = "A modern skeleton for Sphinx themes."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b"},
+ {file = "sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9"},
+]
+
+[package.dependencies]
+sphinx = ">=4.0"
+
+[package.extras]
+docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-tabs"]
+
+[[package]]
+name = "sphinxcontrib-applehelp"
+version = "1.0.7"
+description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books"
+optional = false
+python-versions = ">=3.9"
+files = [
+ {file = "sphinxcontrib_applehelp-1.0.7-py3-none-any.whl", hash = "sha256:094c4d56209d1734e7d252f6e0b3ccc090bd52ee56807a5d9315b19c122ab15d"},
+ {file = "sphinxcontrib_applehelp-1.0.7.tar.gz", hash = "sha256:39fdc8d762d33b01a7d8f026a3b7d71563ea3b72787d5f00ad8465bd9d6dfbfa"},
+]
+
+[package.dependencies]
+Sphinx = ">=5"
+
+[package.extras]
+lint = ["docutils-stubs", "flake8", "mypy"]
+test = ["pytest"]
+
+[[package]]
+name = "sphinxcontrib-devhelp"
+version = "1.0.5"
+description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents"
+optional = false
+python-versions = ">=3.9"
+files = [
+ {file = "sphinxcontrib_devhelp-1.0.5-py3-none-any.whl", hash = "sha256:fe8009aed765188f08fcaadbb3ea0d90ce8ae2d76710b7e29ea7d047177dae2f"},
+ {file = "sphinxcontrib_devhelp-1.0.5.tar.gz", hash = "sha256:63b41e0d38207ca40ebbeabcf4d8e51f76c03e78cd61abe118cf4435c73d4212"},
+]
+
+[package.dependencies]
+Sphinx = ">=5"
+
+[package.extras]
+lint = ["docutils-stubs", "flake8", "mypy"]
+test = ["pytest"]
+
+[[package]]
+name = "sphinxcontrib-htmlhelp"
+version = "2.0.4"
+description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files"
+optional = false
+python-versions = ">=3.9"
+files = [
+ {file = "sphinxcontrib_htmlhelp-2.0.4-py3-none-any.whl", hash = "sha256:8001661c077a73c29beaf4a79968d0726103c5605e27db92b9ebed8bab1359e9"},
+ {file = "sphinxcontrib_htmlhelp-2.0.4.tar.gz", hash = "sha256:6c26a118a05b76000738429b724a0568dbde5b72391a688577da08f11891092a"},
+]
+
+[package.dependencies]
+Sphinx = ">=5"
+
+[package.extras]
+lint = ["docutils-stubs", "flake8", "mypy"]
+test = ["html5lib", "pytest"]
+
+[[package]]
+name = "sphinxcontrib-jsmath"
+version = "1.0.1"
+description = "A sphinx extension which renders display math in HTML via JavaScript"
+optional = false
+python-versions = ">=3.5"
+files = [
+ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"},
+ {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"},
+]
+
+[package.extras]
+test = ["flake8", "mypy", "pytest"]
+
+[[package]]
+name = "sphinxcontrib-qthelp"
+version = "1.0.6"
+description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents"
+optional = false
+python-versions = ">=3.9"
+files = [
+ {file = "sphinxcontrib_qthelp-1.0.6-py3-none-any.whl", hash = "sha256:bf76886ee7470b934e363da7a954ea2825650013d367728588732c7350f49ea4"},
+ {file = "sphinxcontrib_qthelp-1.0.6.tar.gz", hash = "sha256:62b9d1a186ab7f5ee3356d906f648cacb7a6bdb94d201ee7adf26db55092982d"},
+]
+
+[package.dependencies]
+Sphinx = ">=5"
+
+[package.extras]
+lint = ["docutils-stubs", "flake8", "mypy"]
+test = ["pytest"]
+
+[[package]]
+name = "sphinxcontrib-serializinghtml"
+version = "1.1.9"
+description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)"
+optional = false
+python-versions = ">=3.9"
+files = [
+ {file = "sphinxcontrib_serializinghtml-1.1.9-py3-none-any.whl", hash = "sha256:9b36e503703ff04f20e9675771df105e58aa029cfcbc23b8ed716019b7416ae1"},
+ {file = "sphinxcontrib_serializinghtml-1.1.9.tar.gz", hash = "sha256:0c64ff898339e1fac29abd2bf5f11078f3ec413cfe9c046d3120d7ca65530b54"},
+]
+
+[package.dependencies]
+Sphinx = ">=5"
+
+[package.extras]
+lint = ["docutils-stubs", "flake8", "mypy"]
+test = ["pytest"]
+
+[[package]]
+name = "testcontainers"
+version = "3.7.1"
+description = "Library provides lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "testcontainers-3.7.1-py2.py3-none-any.whl", hash = "sha256:7f48cef4bf0ccd78f1a4534d4b701a003a3bace851f24eae58a32f9e3f0aeba0"},
+]
+
+[package.dependencies]
+deprecation = "*"
+docker = ">=4.0.0"
+wrapt = "*"
+
+[package.extras]
+arangodb = ["python-arango"]
+azurite = ["azure-storage-blob"]
+clickhouse = ["clickhouse-driver"]
+docker-compose = ["docker-compose"]
+google-cloud-pubsub = ["google-cloud-pubsub (<2)"]
+kafka = ["kafka-python"]
+keycloak = ["python-keycloak"]
+mongo = ["pymongo"]
+mssqlserver = ["pymssql"]
+mysql = ["pymysql", "sqlalchemy"]
+neo4j = ["neo4j"]
+oracle = ["cx-Oracle", "sqlalchemy"]
+postgresql = ["psycopg2-binary", "sqlalchemy"]
+rabbitmq = ["pika"]
+redis = ["redis"]
+selenium = ["selenium"]
+
+[[package]]
+name = "tomli"
+version = "2.0.1"
+description = "A lil' TOML parser"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
+ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+]
+
+[[package]]
+name = "tornado"
+version = "6.4"
+description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed."
+optional = false
+python-versions = ">= 3.8"
+files = [
+ {file = "tornado-6.4-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:02ccefc7d8211e5a7f9e8bc3f9e5b0ad6262ba2fbb683a6443ecc804e5224ce0"},
+ {file = "tornado-6.4-cp38-abi3-macosx_10_9_x86_64.whl", hash = "sha256:27787de946a9cffd63ce5814c33f734c627a87072ec7eed71f7fc4417bb16263"},
+ {file = "tornado-6.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f7894c581ecdcf91666a0912f18ce5e757213999e183ebfc2c3fdbf4d5bd764e"},
+ {file = "tornado-6.4-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e43bc2e5370a6a8e413e1e1cd0c91bedc5bd62a74a532371042a18ef19e10579"},
+ {file = "tornado-6.4-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0251554cdd50b4b44362f73ad5ba7126fc5b2c2895cc62b14a1c2d7ea32f212"},
+ {file = "tornado-6.4-cp38-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fd03192e287fbd0899dd8f81c6fb9cbbc69194d2074b38f384cb6fa72b80e9c2"},
+ {file = "tornado-6.4-cp38-abi3-musllinux_1_1_i686.whl", hash = "sha256:88b84956273fbd73420e6d4b8d5ccbe913c65d31351b4c004ae362eba06e1f78"},
+ {file = "tornado-6.4-cp38-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:71ddfc23a0e03ef2df1c1397d859868d158c8276a0603b96cf86892bff58149f"},
+ {file = "tornado-6.4-cp38-abi3-win32.whl", hash = "sha256:6f8a6c77900f5ae93d8b4ae1196472d0ccc2775cc1dfdc9e7727889145c45052"},
+ {file = "tornado-6.4-cp38-abi3-win_amd64.whl", hash = "sha256:10aeaa8006333433da48dec9fe417877f8bcc21f48dda8d661ae79da357b2a63"},
+ {file = "tornado-6.4.tar.gz", hash = "sha256:72291fa6e6bc84e626589f1c29d90a5a6d593ef5ae68052ee2ef000dfd273dee"},
+]
+
+[[package]]
+name = "tqdm"
+version = "4.66.1"
+description = "Fast, Extensible Progress Meter"
+optional = true
+python-versions = ">=3.7"
+files = [
+ {file = "tqdm-4.66.1-py3-none-any.whl", hash = "sha256:d302b3c5b53d47bce91fea46679d9c3c6508cf6332229aa1e7d8653723793386"},
+ {file = "tqdm-4.66.1.tar.gz", hash = "sha256:d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"},
+]
+
+[package.dependencies]
+colorama = {version = "*", markers = "platform_system == \"Windows\""}
+
+[package.extras]
+dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"]
+notebook = ["ipywidgets (>=6)"]
+slack = ["slack-sdk"]
+telegram = ["requests"]
+
+[[package]]
+name = "typing-extensions"
+version = "4.8.0"
+description = "Backported and Experimental Type Hints for Python 3.8+"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"},
+ {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"},
+]
+
+[[package]]
+name = "uc-micro-py"
+version = "1.0.2"
+description = "Micro subset of unicode data files for linkify-it-py projects."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "uc-micro-py-1.0.2.tar.gz", hash = "sha256:30ae2ac9c49f39ac6dce743bd187fcd2b574b16ca095fa74cd9396795c954c54"},
+ {file = "uc_micro_py-1.0.2-py3-none-any.whl", hash = "sha256:8c9110c309db9d9e87302e2f4ad2c3152770930d88ab385cd544e7a7e75f3de0"},
+]
+
+[package.extras]
+test = ["coverage", "pytest", "pytest-cov"]
+
+[[package]]
+name = "urllib3"
+version = "2.1.0"
+description = "HTTP library with thread-safe connection pooling, file post, and more."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "urllib3-2.1.0-py3-none-any.whl", hash = "sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3"},
+ {file = "urllib3-2.1.0.tar.gz", hash = "sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54"},
+]
+
+[package.extras]
+brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"]
+socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
+zstd = ["zstandard (>=0.18.0)"]
+
+[[package]]
+name = "websocket-client"
+version = "1.7.0"
+description = "WebSocket client for Python with low level API options"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "websocket-client-1.7.0.tar.gz", hash = "sha256:10e511ea3a8c744631d3bd77e61eb17ed09304c413ad42cf6ddfa4c7787e8fe6"},
+ {file = "websocket_client-1.7.0-py3-none-any.whl", hash = "sha256:f4c3d22fec12a2461427a29957ff07d35098ee2d976d3ba244e688b8b4057588"},
+]
+
+[package.extras]
+docs = ["Sphinx (>=6.0)", "sphinx-rtd-theme (>=1.1.0)"]
+optional = ["python-socks", "wsaccel"]
+test = ["websockets"]
+
+[[package]]
+name = "wrapt"
+version = "1.16.0"
+description = "Module for decorators, wrappers and monkey patching."
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"},
+ {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"},
+ {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"},
+ {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"},
+ {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"},
+ {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"},
+ {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"},
+ {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"},
+ {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"},
+ {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"},
+ {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"},
+ {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"},
+ {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"},
+ {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"},
+ {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"},
+ {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"},
+ {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"},
+ {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"},
+ {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"},
+ {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"},
+ {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"},
+ {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"},
+ {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"},
+ {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"},
+ {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"},
+ {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"},
+ {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"},
+ {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"},
+ {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"},
+ {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"},
+ {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"},
+ {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"},
+ {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"},
+ {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"},
+ {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"},
+ {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"},
+ {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"},
+ {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"},
+ {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"},
+ {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"},
+ {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"},
+ {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"},
+ {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"},
+ {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"},
+ {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"},
+ {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"},
+ {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"},
+ {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"},
+ {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"},
+ {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"},
+ {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"},
+ {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"},
+ {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"},
+ {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"},
+ {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"},
+ {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"},
+ {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"},
+ {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"},
+ {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"},
+ {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"},
+ {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"},
+ {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"},
+ {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"},
+ {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"},
+ {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"},
+ {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"},
+ {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"},
+ {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"},
+ {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"},
+ {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"},
+]
+
+[[package]]
+name = "zipp"
+version = "3.17.0"
+description = "Backport of pathlib-compatible object wrapper for zip files"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"},
+ {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"},
+]
+
+[package.extras]
+docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"]
+testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"]
+
+[extras]
+hf = ["huggingface-hub"]
+
+[metadata]
+lock-version = "2.0"
+python-versions = ">= 3.9, < 3.11"
+content-hash = "9a15e6a019ed38f48c6f58fa910b57d01492a59dd415423416ebf43084067d95"
diff --git a/clients/python/pyproject.toml b/clients/python/pyproject.toml
new file mode 100644
index 000000000..656792f60
--- /dev/null
+++ b/clients/python/pyproject.toml
@@ -0,0 +1,90 @@
+[tool.poetry]
+name = "model-registry"
+version = "0.1.0"
+description = "Client for Red Hat OpenDataHub Model Registry"
+authors = ["Isabella Basso do Amaral "]
+license = "Apache-2.0"
+readme = "README.md"
+
+[tool.poetry.dependencies]
+python = ">= 3.9, < 3.11"
+attrs = "^21.0"
+ml-metadata = "^1.14.0"
+# you might consider using locally the following alternative, when developing on Apple-silicon/ARM-based computers:
+# ml-metadata = { url = "https://github.com/opendatahub-io/ml-metadata/releases/download/v1.14.0%2Bremote.1/ml_metadata-1.14.0+remote.1-py3-none-any.whl" }
+typing-extensions = "^4.8"
+
+huggingface-hub = { version = "^0.20.1", optional = true }
+
+[tool.poetry.extras]
+hf = ["huggingface-hub"]
+
+[tool.poetry.group.dev.dependencies]
+sphinx = "^7.2.6"
+furo = "^2023.9.10"
+myst-parser = { extras = ["linkify"], version = "^2.0.0" }
+pytest = "^7.4.2"
+coverage = { extras = ["toml"], version = "^7.3.2" }
+pytest-cov = "^4.1.0"
+sphinx-autobuild = "^2021.3.14"
+ruff = "^0.1.6"
+mypy = "^1.7.0"
+testcontainers = "^3.7.1"
+
+[tool.coverage.run]
+branch = true
+source = ["model_registry"]
+
+[tool.coverage.paths]
+source = ["src", "*/site-packages"]
+tests = ["tests", "*/tests"]
+
+[tool.coverage.report]
+show_missing = true
+
+[build-system]
+requires = ["poetry-core"]
+build-backend = "poetry.core.masonry.api"
+
+[tool.black]
+line-length = 119
+
+[tool.ruff]
+target-version = "py39"
+select = [
+ "F", # pyflakes
+ # pycodestyle
+ "W", # warnings
+ "E", # errors
+
+ "C90", # mccabe
+ "B", # bugbear
+ "S", # flake8-bandit
+
+ "C4", # flake8-comprehensions
+ "D", # pydocstyle
+ "EM", # flake8-errmsg
+ "I", # isort
+ "PT", # pytest
+ "Q", # flake8-quotes
+ "RET", # flake8-return
+ "SIM", # flake8-simplify
+ "UP", # pyupgrade
+]
+respect-gitignore = true
+ignore = [
+ "D105", # missing docstring in magic method
+ "E501", # line too long
+ "S101", # use of assert detected
+]
+
+[tool.ruff.lint.pydocstyle]
+convention = "google"
+
+[tool.ruff.per-file-ignores]
+"tests/**/*.py" = [
+ "D", # missing docstring in public module
+]
+
+[tool.ruff.mccabe]
+max-complexity = 8
diff --git a/clients/python/src/model_registry/__init__.py b/clients/python/src/model_registry/__init__.py
new file mode 100644
index 000000000..b99728784
--- /dev/null
+++ b/clients/python/src/model_registry/__init__.py
@@ -0,0 +1,9 @@
+"""Main package for the ODH model registry."""
+
+__version__ = "0.1.0"
+
+from ._client import ModelRegistry
+
+__all__ = [
+ "ModelRegistry",
+]
diff --git a/clients/python/src/model_registry/_client.py b/clients/python/src/model_registry/_client.py
new file mode 100644
index 000000000..a4d5bafcf
--- /dev/null
+++ b/clients/python/src/model_registry/_client.py
@@ -0,0 +1,263 @@
+"""Standard client for the model registry."""
+from __future__ import annotations
+
+from typing import get_args
+from warnings import warn
+
+from .core import ModelRegistryAPIClient
+from .exceptions import StoreException
+from .store import ScalarType
+from .types import ModelArtifact, ModelVersion, RegisteredModel
+
+
+class ModelRegistry:
+ """Model registry client."""
+
+ def __init__(
+ self,
+ server_address: str,
+ port: int,
+ author: str,
+ client_key: str | None = None,
+ server_cert: str | None = None,
+ custom_ca: str | None = None,
+ ):
+ """Constructor.
+
+ Args:
+ server_address: Server address.
+ port: Server port.
+ author: Name of the author.
+ client_key: The PEM-encoded private key as a byte string.
+ server_cert: The PEM-encoded certificate as a byte string.
+ custom_ca: The PEM-encoded root certificates as a byte string.
+ """
+ # TODO: get args from env
+ self._author = author
+ self._api = ModelRegistryAPIClient(
+ server_address, port, client_key, server_cert, custom_ca
+ )
+
+ def _register_model(self, name: str) -> RegisteredModel:
+ if rm := self._api.get_registered_model_by_params(name):
+ return rm
+
+ rm = RegisteredModel(name)
+ self._api.upsert_registered_model(rm)
+ return rm
+
+ def _register_new_version(
+ self, rm: RegisteredModel, version: str, author: str, /, **kwargs
+ ) -> ModelVersion:
+ assert rm.id is not None, "Registered model must have an ID"
+ if self._api.get_model_version_by_params(rm.id, version):
+ msg = f"Version {version} already exists"
+ raise StoreException(msg)
+
+ mv = ModelVersion(rm.name, version, author, **kwargs)
+ self._api.upsert_model_version(mv, rm.id)
+ return mv
+
+ def _register_model_artifact(
+ self, mv: ModelVersion, uri: str, /, **kwargs
+ ) -> ModelArtifact:
+ assert mv.id is not None, "Model version must have an ID"
+ ma = ModelArtifact(mv.model_name, uri, **kwargs)
+ self._api.upsert_model_artifact(ma, mv.id)
+ return ma
+
+ def register_model(
+ self,
+ name: str,
+ uri: str,
+ *,
+ model_format_name: str,
+ model_format_version: str,
+ version: str,
+ author: str | None = None,
+ description: str | None = None,
+ storage_key: str | None = None,
+ storage_path: str | None = None,
+ service_account_name: str | None = None,
+ metadata: dict[str, ScalarType] | None = None,
+ ) -> RegisteredModel:
+ """Register a model.
+
+ Either `storage_key` and `storage_path`, or `service_account_name` must be provided.
+
+ Args:
+ name: Name of the model.
+ uri: URI of the model.
+
+ Keyword Args:
+ version: Version of the model. Has to be unique.
+ model_format_name: Name of the model format.
+ model_format_version: Version of the model format.
+ description: Description of the model.
+ author: Author of the model. Defaults to the client author.
+ storage_key: Storage key.
+ storage_path: Storage path.
+ service_account_name: Service account name.
+ metadata: Additional version metadata.
+
+ Returns:
+ Registered model.
+ """
+ rm = self._register_model(name)
+ mv = self._register_new_version(
+ rm,
+ version,
+ author or self._author,
+ description=description,
+ metadata=metadata or {},
+ )
+ self._register_model_artifact(
+ mv,
+ uri,
+ model_format_name=model_format_name,
+ model_format_version=model_format_version,
+ storage_key=storage_key,
+ storage_path=storage_path,
+ service_account_name=service_account_name,
+ )
+
+ return rm
+
+ def register_hf_model(
+ self,
+ repo: str,
+ path: str,
+ *,
+ version: str,
+ model_format_name: str,
+ model_format_version: str,
+ author: str | None = None,
+ model_name: str | None = None,
+ description: str | None = None,
+ git_ref: str = "main",
+ ) -> RegisteredModel:
+ """Register a Hugging Face model.
+
+ This imports a model from Hugging Face hub and registers it in the model registry.
+ Note that the model is not downloaded.
+
+ Args:
+ repo: Name of the repository from Hugging Face hub.
+ path: URI of the model.
+
+ Keyword Args:
+ version: Version of the model. Has to be unique.
+ model_format_name: Name of the model format.
+ model_format_version: Version of the model format.
+ author: Author of the model. Defaults to repo owner.
+ model_name: Name of the model. Defaults to the repo name.
+ description: Description of the model.
+ git_ref: Git reference to use. Defaults to `main`.
+
+ Returns:
+ Registered model.
+ """
+ try:
+ from huggingface_hub import HfApi, hf_hub_url, utils
+ except ImportError as e:
+ msg = "huggingface_hub is not installed"
+ raise StoreException(msg) from e
+
+ api = HfApi()
+ try:
+ model_info = api.model_info(repo, revision=git_ref)
+ except utils.RepositoryNotFoundError as e:
+ msg = f"Repository {repo} does not exist"
+ raise StoreException(msg) from e
+ except utils.RevisionNotFoundError as e:
+ # TODO: as all hf-hub client calls default to using main, should we provide a tip?
+ msg = f"Revision {git_ref} does not exist"
+ raise StoreException(msg) from e
+
+ if not author:
+ # model author can be None if the repo is in a "global" namespace (i.e. no / in repo).
+ if model_info.author is None:
+ model_author = "unknown"
+ warn(
+ "Model author is unknown. This is likely because the model is in a global namespace.",
+ stacklevel=2,
+ )
+ else:
+ model_author = model_info.author
+ else:
+ model_author = author
+ source_uri = hf_hub_url(repo, path, revision=git_ref)
+ metadata = {
+ "repo": repo,
+ "source_uri": source_uri,
+ "model_origin": "huggingface_hub",
+ "model_author": model_author,
+ }
+ # card_data is the new field, but let's use the old one for backwards compatibility.
+ if card_data := model_info.cardData:
+ metadata.update(
+ {
+ k: v
+ for k, v in card_data.to_dict().items()
+ # TODO: (#151) preserve tags, possibly other complex metadata
+ if isinstance(v, get_args(ScalarType))
+ }
+ )
+ return self.register_model(
+ model_name or model_info.id,
+ source_uri,
+ author=author or model_author,
+ version=version,
+ model_format_name=model_format_name,
+ model_format_version=model_format_version,
+ description=description,
+ storage_path=path,
+ metadata=metadata,
+ )
+
+ def get_registered_model(self, name: str) -> RegisteredModel | None:
+ """Get a registered model.
+
+ Args:
+ name: Name of the model.
+
+ Returns:
+ Registered model.
+ """
+ return self._api.get_registered_model_by_params(name)
+
+ def get_model_version(self, name: str, version: str) -> ModelVersion | None:
+ """Get a model version.
+
+ Args:
+ name: Name of the model.
+ version: Version of the model.
+
+ Returns:
+ Model version.
+
+ Raises:
+ StoreException: If the model does not exist.
+ """
+ if not (rm := self._api.get_registered_model_by_params(name)):
+ msg = f"Model {name} does not exist"
+ raise StoreException(msg)
+ return self._api.get_model_version_by_params(rm.id, version)
+
+ def get_model_artifact(self, name: str, version: str) -> ModelArtifact | None:
+ """Get a model artifact.
+
+ Args:
+ name: Name of the model.
+ version: Version of the model.
+
+ Returns:
+ Model artifact.
+
+ Raises:
+ StoreException: If either the model or the version don't exist.
+ """
+ if not (mv := self.get_model_version(name, version)):
+ msg = f"Version {version} does not exist"
+ raise StoreException(msg)
+ return self._api.get_model_artifact_by_params(mv.id)
diff --git a/clients/python/src/model_registry/core.py b/clients/python/src/model_registry/core.py
new file mode 100644
index 000000000..270d89b8b
--- /dev/null
+++ b/clients/python/src/model_registry/core.py
@@ -0,0 +1,364 @@
+"""Client for the model registry."""
+from __future__ import annotations
+
+from collections.abc import Sequence
+
+from ml_metadata.proto import MetadataStoreClientConfig
+
+from .exceptions import StoreException
+from .store import MLMDStore, ProtoType
+from .types import ListOptions, ModelArtifact, ModelVersion, RegisteredModel
+from .types.base import ProtoBase
+from .types.options import MLMDListOptions
+
+
+class ModelRegistryAPIClient:
+ """Model registry API."""
+
+ def __init__(
+ self,
+ server_address: str,
+ port: int,
+ client_key: str | None = None,
+ server_cert: str | None = None,
+ custom_ca: str | None = None,
+ ):
+ """Constructor.
+
+ Args:
+ server_address: Server address.
+ port: Server port.
+ client_key: The PEM-encoded private key as a byte string.
+ server_cert: The PEM-encoded certificate as a byte string.
+ custom_ca: The PEM-encoded root certificates as a byte string.
+ """
+ config = MetadataStoreClientConfig()
+ config.host = server_address
+ config.port = port
+ if client_key is not None:
+ config.ssl_config.client_key = client_key
+ if server_cert is not None:
+ config.ssl_config.server_cert = server_cert
+ if custom_ca is not None:
+ config.ssl_config.custom_ca = custom_ca
+ self._store = MLMDStore(config)
+
+ def _map(self, py_obj: ProtoBase) -> ProtoType:
+ """Map a Python object to a proto object.
+
+ Helper around the `map` method of the Python object.
+
+ Args:
+ py_obj: Python object.
+
+ Returns:
+ Proto object.
+ """
+ type_id = self._store.get_type_id(
+ py_obj.get_proto_type(), py_obj.get_proto_type_name()
+ )
+ return py_obj.map(type_id)
+
+ def upsert_registered_model(self, registered_model: RegisteredModel) -> str:
+ """Upsert a registered model.
+
+ Updates or creates a registered model on the server.
+ This updates the registered_model instance passed in with new data from the servers.
+
+ Args:
+ registered_model: Registered model.
+
+ Returns:
+ ID of the registered model.
+ """
+ id = self._store.put_context(self._map(registered_model))
+ new_py_rm = RegisteredModel.unmap(
+ self._store.get_context(RegisteredModel.get_proto_type_name(), id)
+ )
+ id = str(id)
+ registered_model.id = id
+ registered_model.create_time_since_epoch = new_py_rm.create_time_since_epoch
+ registered_model.last_update_time_since_epoch = (
+ new_py_rm.last_update_time_since_epoch
+ )
+ return id
+
+ def get_registered_model_by_id(self, id: str) -> RegisteredModel | None:
+ """Fetch a registered model by its ID.
+
+ Args:
+ id: Registered model ID.
+
+ Returns:
+ Registered model.
+ """
+ proto_rm = self._store.get_context(
+ RegisteredModel.get_proto_type_name(), id=int(id)
+ )
+ if proto_rm is not None:
+ return RegisteredModel.unmap(proto_rm)
+
+ return None
+
+ def get_registered_model_by_params(
+ self, name: str | None = None, external_id: str | None = None
+ ) -> RegisteredModel | None:
+ """Fetch a registered model by its name or external ID.
+
+ Args:
+ name: Registered model name.
+ external_id: Registered model external ID.
+
+ Returns:
+ Registered model.
+
+ Raises:
+ StoreException: If neither name nor external ID is provided.
+ """
+ if name is None and external_id is None:
+ msg = "Either name or external_id must be provided"
+ raise StoreException(msg)
+ proto_rm = self._store.get_context(
+ RegisteredModel.get_proto_type_name(),
+ name=name,
+ external_id=external_id,
+ )
+ if proto_rm is not None:
+ return RegisteredModel.unmap(proto_rm)
+
+ return None
+
+ def get_registered_models(
+ self, options: ListOptions | None = None
+ ) -> Sequence[RegisteredModel]:
+ """Fetch registered models.
+
+ Args:
+ options: Options for listing registered models.
+
+ Returns:
+ Registered models.
+ """
+ mlmd_options = options.as_mlmd_list_options() if options else MLMDListOptions()
+ proto_rms = self._store.get_contexts(
+ RegisteredModel.get_proto_type_name(), mlmd_options
+ )
+ return [RegisteredModel.unmap(proto_rm) for proto_rm in proto_rms]
+
+ def upsert_model_version(
+ self, model_version: ModelVersion, registered_model_id: str
+ ) -> str:
+ """Upsert a model version.
+
+ Updates or creates a model version on the server.
+ This updates the model_version instance passed in with new data from the servers.
+
+ Args:
+ model_version: Model version to upsert.
+ registered_model_id: ID of the registered model this version will be associated to.
+
+ Returns:
+ ID of the model version.
+ """
+ # this is not ideal but we need this info for the prefix
+ model_version._registered_model_id = registered_model_id
+ id = self._store.put_context(self._map(model_version))
+ self._store.put_context_parent(int(registered_model_id), id)
+ new_py_mv = ModelVersion.unmap(
+ self._store.get_context(ModelVersion.get_proto_type_name(), id)
+ )
+ id = str(id)
+ model_version.id = id
+ model_version.create_time_since_epoch = new_py_mv.create_time_since_epoch
+ model_version.last_update_time_since_epoch = (
+ new_py_mv.last_update_time_since_epoch
+ )
+ return id
+
+ def get_model_version_by_id(self, model_version_id: str) -> ModelVersion | None:
+ """Fetch a model version by its ID.
+
+ Args:
+ model_version_id: Model version ID.
+
+ Returns:
+ Model version.
+ """
+ proto_mv = self._store.get_context(
+ ModelVersion.get_proto_type_name(), id=int(model_version_id)
+ )
+ if proto_mv is not None:
+ return ModelVersion.unmap(proto_mv)
+
+ return None
+
+ def get_model_versions(
+ self, registered_model_id: str, options: ListOptions | None = None
+ ) -> Sequence[ModelVersion]:
+ """Fetch model versions by registered model ID.
+
+ Args:
+ registered_model_id: Registered model ID.
+ options: Options for listing model versions.
+
+ Returns:
+ Model versions.
+ """
+ mlmd_options = options.as_mlmd_list_options() if options else MLMDListOptions()
+ mlmd_options.filter_query = f"parent_contexts_a.id = {registered_model_id}"
+ return [
+ ModelVersion.unmap(proto_mv)
+ for proto_mv in self._store.get_contexts(
+ ModelVersion.get_proto_type_name(), mlmd_options
+ )
+ ]
+
+ def get_model_version_by_params(
+ self,
+ registered_model_id: str | None = None,
+ version: str | None = None,
+ external_id: str | None = None,
+ ) -> ModelVersion | None:
+ """Fetch a model version by associated parameters.
+
+ Either fetches by using external ID or by using registered model ID and version.
+
+ Args:
+ registered_model_id: Registered model ID.
+ version: Model version.
+ external_id: Model version external ID.
+
+ Returns:
+ Model version.
+
+ Raises:
+ StoreException: If neither external ID nor registered model ID and version is provided.
+ """
+ if external_id is not None:
+ proto_mv = self._store.get_context(
+ ModelVersion.get_proto_type_name(), external_id=external_id
+ )
+ elif registered_model_id is None or version is None:
+ msg = (
+ "Either registered_model_id and version or external_id must be provided"
+ )
+ raise StoreException(msg)
+ else:
+ proto_mv = self._store.get_context(
+ ModelVersion.get_proto_type_name(),
+ name=f"{registered_model_id}:{version}",
+ )
+ if proto_mv is not None:
+ return ModelVersion.unmap(proto_mv)
+
+ return None
+
+ def upsert_model_artifact(
+ self, model_artifact: ModelArtifact, model_version_id: str
+ ) -> str:
+ """Upsert a model artifact.
+
+ Updates or creates a model artifact on the server.
+ This updates the model_artifact instance passed in with new data from the servers.
+
+ Args:
+ model_artifact: Model artifact to upsert.
+ model_version_id: ID of the model version this artifact will be associated to.
+
+ Returns:
+ ID of the model artifact.
+
+ Raises:
+ StoreException: If the model version already has a model artifact.
+ """
+ mv_id = int(model_version_id)
+ if self._store.get_attributed_artifact(
+ ModelArtifact.get_proto_type_name(), mv_id
+ ):
+ msg = f"Model version with ID {mv_id} already has a model artifact"
+ raise StoreException(msg)
+
+ model_artifact._model_version_id = model_version_id
+ id = self._store.put_artifact(self._map(model_artifact))
+ self._store.put_attribution(mv_id, id)
+ new_py_ma = ModelArtifact.unmap(
+ self._store.get_artifact(ModelArtifact.get_proto_type_name(), id)
+ )
+ id = str(id)
+ model_artifact.id = id
+ model_artifact.create_time_since_epoch = new_py_ma.create_time_since_epoch
+ model_artifact.last_update_time_since_epoch = (
+ new_py_ma.last_update_time_since_epoch
+ )
+ return id
+
+ def get_model_artifact_by_id(self, id: str) -> ModelArtifact | None:
+ """Fetch a model artifact by its ID.
+
+ Args:
+ id: Model artifact ID.
+
+ Returns:
+ Model artifact.
+ """
+ proto_ma = self._store.get_artifact(
+ ModelArtifact.get_proto_type_name(), int(id)
+ )
+ if proto_ma is not None:
+ return ModelArtifact.unmap(proto_ma)
+
+ return None
+
+ def get_model_artifact_by_params(
+ self, model_version_id: str | None = None, external_id: str | None = None
+ ) -> ModelArtifact | None:
+ """Fetch a model artifact either by external ID or by the ID of its associated model version.
+
+ Args:
+ model_version_id: ID of the associated model version.
+ external_id: Model artifact external ID.
+
+ Returns:
+ Model artifact.
+
+ Raises:
+ StoreException: If neither external ID nor model version ID is provided.
+ """
+ if external_id:
+ proto_ma = self._store.get_artifact(
+ ModelArtifact.get_proto_type_name(), external_id=external_id
+ )
+ elif not model_version_id:
+ msg = "Either model_version_id or external_id must be provided"
+ raise StoreException(msg)
+ else:
+ proto_ma = self._store.get_attributed_artifact(
+ ModelArtifact.get_proto_type_name(), int(model_version_id)
+ )
+ if proto_ma is not None:
+ return ModelArtifact.unmap(proto_ma)
+
+ return None
+
+ def get_model_artifacts(
+ self,
+ model_version_id: str | None = None,
+ options: ListOptions | None = None,
+ ) -> Sequence[ModelArtifact]:
+ """Fetches model artifacts.
+
+ Args:
+ model_version_id: ID of the associated model version.
+ options: Options for listing model artifacts.
+
+ Returns:
+ Model artifacts.
+ """
+ mlmd_options = options.as_mlmd_list_options() if options else MLMDListOptions()
+ if model_version_id is not None:
+ mlmd_options.filter_query = f"contexts_a.id = {model_version_id}"
+
+ proto_mas = self._store.get_artifacts(
+ ModelArtifact.get_proto_type_name(), mlmd_options
+ )
+ return [ModelArtifact.unmap(proto_ma) for proto_ma in proto_mas]
diff --git a/clients/python/src/model_registry/exceptions.py b/clients/python/src/model_registry/exceptions.py
new file mode 100644
index 000000000..bac601d24
--- /dev/null
+++ b/clients/python/src/model_registry/exceptions.py
@@ -0,0 +1,21 @@
+"""Exceptions for the model registry."""
+
+
+class StoreException(Exception):
+ """Storage related error."""
+
+
+class UnsupportedTypeException(StoreException):
+ """Raised when an unsupported type is encountered."""
+
+
+class TypeNotFoundException(StoreException):
+ """Raised when a type cannot be found."""
+
+
+class ServerException(StoreException):
+ """Raised when the server returns a bad response."""
+
+
+class DuplicateException(StoreException):
+ """Raised when the user tries to put an object with a conflicting property."""
diff --git a/clients/python/src/model_registry/store/__init__.py b/clients/python/src/model_registry/store/__init__.py
new file mode 100644
index 000000000..d35c27500
--- /dev/null
+++ b/clients/python/src/model_registry/store/__init__.py
@@ -0,0 +1,10 @@
+"""Model registry storage backends."""
+
+from .base import ProtoType, ScalarType
+from .wrapper import MLMDStore
+
+__all__ = [
+ "ProtoType",
+ "ScalarType",
+ "MLMDStore",
+]
diff --git a/clients/python/src/model_registry/store/base.py b/clients/python/src/model_registry/store/base.py
new file mode 100644
index 000000000..3482ee9ea
--- /dev/null
+++ b/clients/python/src/model_registry/store/base.py
@@ -0,0 +1,12 @@
+"""Base classes and types for MLMD store."""
+
+from typing import Union
+
+from ml_metadata.proto import Artifact, Context
+
+# Union of all proto types.
+ProtoType = Union[Artifact, Context]
+# Union of all scalar types.
+#
+# Those types are easy to map to and from proto types, and can also be queried in MLMD.
+ScalarType = Union[str, int, float, bool]
diff --git a/clients/python/src/model_registry/store/wrapper.py b/clients/python/src/model_registry/store/wrapper.py
new file mode 100644
index 000000000..57c56dd78
--- /dev/null
+++ b/clients/python/src/model_registry/store/wrapper.py
@@ -0,0 +1,338 @@
+"""MLMD storage backend wrapper."""
+
+from __future__ import annotations
+
+from collections.abc import Sequence
+from typing import ClassVar
+
+from ml_metadata import errors
+from ml_metadata.metadata_store import ListOptions, MetadataStore
+from ml_metadata.proto import (
+ Artifact,
+ Attribution,
+ Context,
+ MetadataStoreClientConfig,
+ ParentContext,
+)
+
+from model_registry.exceptions import (
+ DuplicateException,
+ ServerException,
+ StoreException,
+ TypeNotFoundException,
+)
+
+from .base import ProtoType
+
+
+class MLMDStore:
+ """MLMD storage backend."""
+
+ # cache for MLMD type IDs
+ _type_ids: ClassVar[dict[str, int]] = {}
+
+ def __init__(self, config: MetadataStoreClientConfig):
+ """Constructor.
+
+ Args:
+ config: MLMD config.
+ """
+ self._mlmd_store = MetadataStore(config)
+
+ def get_type_id(self, pt: type[ProtoType], type_name: str) -> int:
+ """Get backend ID for a type.
+
+ Args:
+ pt: Proto type.
+ type_name: Name of the type.
+
+ Returns:
+ Backend ID.
+
+ Raises:
+ TypeNotFoundException: If the type doesn't exist.
+ ServerException: If there was an error getting the type.
+ """
+ if type_name in self._type_ids:
+ return self._type_ids[type_name]
+
+ pt_name = pt.__name__.lower()
+
+ try:
+ _type = getattr(self._mlmd_store, f"get_{pt_name}_type")(type_name)
+ except errors.NotFoundError as e:
+ msg = f"{pt_name} type {type_name} does not exist"
+ raise TypeNotFoundException(msg) from e
+ except errors.InternalError as e:
+ msg = f"Couldn't get {pt_name} type {type_name} from MLMD store"
+ raise ServerException(msg) from e
+
+ self._type_ids[type_name] = _type.id
+ return _type.id
+
+ def put_artifact(self, artifact: Artifact) -> int:
+ """Put an artifact in the store.
+
+ Args:
+ artifact: Artifact to put.
+
+ Returns:
+ ID of the artifact.
+
+ Raises:
+ DuplicateException: If an artifact with the same name or external id already exists.
+ TypeNotFoundException: If the type doesn't exist.
+ StoreException: If the artifact isn't properly formed.
+ """
+ try:
+ return self._mlmd_store.put_artifacts([artifact])[0]
+ except errors.AlreadyExistsError as e:
+ msg = f"Artifact {artifact.name} already exists"
+ raise DuplicateException(msg) from e
+ except errors.InvalidArgumentError as e:
+ msg = "Artifact has invalid properties"
+ raise StoreException(msg) from e
+ except errors.NotFoundError as e:
+ msg = f"Artifact type {artifact.type} does not exist"
+ raise TypeNotFoundException(msg) from e
+
+ def put_context(self, context: Context) -> int:
+ """Put a context in the store.
+
+ Args:
+ context: Context to put.
+
+ Returns:
+ ID of the context.
+
+ Raises:
+ DuplicateException: If a context with the same name or external id already exists.
+ TypeNotFoundException: If the type doesn't exist.
+ StoreException: If the context isn't propertly formed.
+ """
+ try:
+ return self._mlmd_store.put_contexts([context])[0]
+ except errors.AlreadyExistsError as e:
+ msg = f"Context {context.name} already exists"
+ raise DuplicateException(msg) from e
+ except errors.InvalidArgumentError as e:
+ msg = "Context has invalid properties"
+ raise StoreException(msg) from e
+ except errors.NotFoundError as e:
+ msg = f"Context type {context.type} does not exist"
+ raise TypeNotFoundException(msg) from e
+
+ def _filter_type(
+ self, type_name: str, protos: Sequence[ProtoType]
+ ) -> Sequence[ProtoType]:
+ return [proto for proto in protos if proto.type == type_name]
+
+ def get_context(
+ self,
+ ctx_type_name: str,
+ id: int | None = None,
+ name: str | None = None,
+ external_id: str | None = None,
+ ) -> Context | None:
+ """Get a context from the store.
+
+ This gets a context either by ID, name or external ID.
+ If multiple arguments are provided, the simplest query will be performed.
+
+ Args:
+ ctx_type_name: Name of the context type.
+ id: ID of the context.
+ name: Name of the context.
+ external_id: External ID of the context.
+
+ Returns:
+ Context.
+
+ Raises:
+ StoreException: Invalid arguments.
+ """
+ if name is not None:
+ return self._mlmd_store.get_context_by_type_and_name(ctx_type_name, name)
+
+ if id is not None:
+ contexts = self._mlmd_store.get_contexts_by_id([id])
+ elif external_id is not None:
+ contexts = self._mlmd_store.get_contexts_by_external_ids([external_id])
+ else:
+ msg = "Either id, name or external_id must be provided"
+ raise StoreException(msg)
+
+ contexts = self._filter_type(ctx_type_name, contexts)
+ if contexts:
+ return contexts[0]
+
+ return None
+
+ def get_contexts(
+ self, ctx_type_name: str, options: ListOptions
+ ) -> Sequence[Context]:
+ """Get contexts from the store.
+
+ Args:
+ ctx_type_name: Name of the context type.
+ options: List options.
+
+ Returns:
+ Contexts.
+ """
+ # TODO: should we make options optional?
+ # if options is not None:
+ try:
+ contexts = self._mlmd_store.get_contexts(options)
+ except errors.InvalidArgumentError as e:
+ msg = f"Invalid arguments for get_contexts: {e}"
+ raise StoreException(msg) from e
+ except errors.InternalError as e:
+ msg = "Couldn't get contexts from MLMD store"
+ raise ServerException(msg) from e
+
+ contexts = self._filter_type(ctx_type_name, contexts)
+ # else:
+ # contexts = self._mlmd_store.get_contexts_by_type(ctx_type_name)
+
+ if not contexts:
+ msg = f"Context type {ctx_type_name} does not exist"
+ raise StoreException(msg)
+
+ return contexts
+
+ def put_context_parent(self, parent_id: int, child_id: int):
+ """Put a parent-child relationship between two contexts.
+
+ Args:
+ parent_id: ID of the parent context.
+ child_id: ID of the child context.
+
+ Raises:
+ StoreException: If the parent context doesn't exist.
+ ServerException: If there was an error putting the parent context.
+ """
+ try:
+ self._mlmd_store.put_parent_contexts(
+ [ParentContext(parent_id=parent_id, child_id=child_id)]
+ )
+ except errors.AlreadyExistsError as e:
+ msg = f"Parent context {parent_id} already exists for context {child_id}"
+ raise StoreException(msg) from e
+ except errors.InternalError as e:
+ msg = f"Couldn't put parent context {parent_id} for context {child_id}"
+ raise ServerException(msg) from e
+
+ def put_attribution(self, context_id: int, artifact_id: int):
+ """Put an attribution relationship between a context and an artifact.
+
+ Args:
+ context_id: ID of the context.
+ artifact_id: ID of the artifact.
+
+ Raises:
+ StoreException: Invalid argument.
+ """
+ attribution = Attribution(context_id=context_id, artifact_id=artifact_id)
+ try:
+ self._mlmd_store.put_attributions_and_associations([attribution], [])
+ except errors.InvalidArgumentError as e:
+ if "artifact" in str(e).lower():
+ msg = f"Artifact with ID {artifact_id} does not exist"
+ raise StoreException(msg) from e
+
+ if "context" in str(e).lower():
+ msg = f"Context with ID {context_id} does not exist"
+ raise StoreException(msg) from e
+
+ msg = f"Invalid argument: {e}"
+ raise StoreException(msg) from e
+
+ def get_artifact(
+ self,
+ art_type_name: str,
+ id: int | None = None,
+ name: str | None = None,
+ external_id: str | None = None,
+ ) -> Artifact | None:
+ """Get an artifact from the store.
+
+ Gets an artifact either by ID, name or external ID.
+
+ Args:
+ art_type_name: Name of the artifact type.
+ id: ID of the artifact.
+ name: Name of the artifact.
+ external_id: External ID of the artifact.
+
+ Returns:
+ Artifact.
+
+ Raises:
+ StoreException: Invalid arguments.
+ """
+ if name is not None:
+ return self._mlmd_store.get_artifact_by_type_and_name(art_type_name, name)
+
+ if id is not None:
+ artifacts = self._mlmd_store.get_artifacts_by_id([id])
+ elif external_id is not None:
+ artifacts = self._mlmd_store.get_artifacts_by_external_ids([external_id])
+ else:
+ msg = "Either id, name or external_id must be provided"
+ raise StoreException(msg)
+
+ artifacts = self._filter_type(art_type_name, artifacts)
+ if artifacts:
+ return artifacts[0]
+
+ return None
+
+ def get_attributed_artifact(self, art_type_name: str, ctx_id: int) -> Artifact:
+ """Get an artifact from the store by its attributed context.
+
+ Args:
+ art_type_name: Name of the artifact type.
+ ctx_id: ID of the context.
+
+ Returns:
+ Artifact.
+ """
+ try:
+ artifacts = self._mlmd_store.get_artifacts_by_context(ctx_id)
+ except errors.InternalError as e:
+ msg = f"Couldn't get artifacts by context {ctx_id}"
+ raise ServerException(msg) from e
+ artifacts = self._filter_type(art_type_name, artifacts)
+ if artifacts:
+ return artifacts[0]
+
+ return None
+
+ def get_artifacts(
+ self, art_type_name: str, options: ListOptions
+ ) -> Sequence[Artifact]:
+ """Get artifacts from the store.
+
+ Args:
+ art_type_name: Name of the artifact type.
+ options: List options.
+
+ Returns:
+ Artifacts.
+ """
+ try:
+ artifacts = self._mlmd_store.get_artifacts(options)
+ except errors.InvalidArgumentError as e:
+ msg = f"Invalid arguments for get_artifacts: {e}"
+ raise StoreException(msg) from e
+ except errors.InternalError as e:
+ msg = "Couldn't get artifacts from MLMD store"
+ raise ServerException(msg) from e
+
+ artifacts = self._filter_type(art_type_name, artifacts)
+ if not artifacts:
+ msg = f"Artifact type {art_type_name} does not exist"
+ raise StoreException(msg)
+
+ return artifacts
diff --git a/clients/python/src/model_registry/types/__init__.py b/clients/python/src/model_registry/types/__init__.py
new file mode 100644
index 000000000..722dc9d14
--- /dev/null
+++ b/clients/python/src/model_registry/types/__init__.py
@@ -0,0 +1,21 @@
+"""Model registry types.
+
+Types are based on [ML Metadata](https://github.com/google/ml-metadata), with Pythonic class wrappers.
+"""
+
+from .artifacts import ArtifactState, ModelArtifact
+from .contexts import ContextState, ModelVersion, RegisteredModel
+from .options import ListOptions, OrderByField
+
+__all__ = [
+ # Artifacts
+ "ModelArtifact",
+ "ArtifactState",
+ # Contexts
+ "ModelVersion",
+ "RegisteredModel",
+ "ContextState",
+ # Options
+ "ListOptions",
+ "OrderByField",
+]
diff --git a/clients/python/src/model_registry/types/artifacts.py b/clients/python/src/model_registry/types/artifacts.py
new file mode 100644
index 000000000..da7c27998
--- /dev/null
+++ b/clients/python/src/model_registry/types/artifacts.py
@@ -0,0 +1,135 @@
+"""Artifact types for model registry.
+
+Artifacts represent pieces of data.
+This could be datasets, models, metrics, or any other piece of data produced or consumed by an
+execution, such as an experiment run.
+
+Those types are used to map between proto types based on artifacts and Python objects.
+
+Todo:
+ * Move part of the description to API Reference docs (#120).
+"""
+
+from __future__ import annotations
+
+from enum import Enum, unique
+from uuid import uuid4
+
+from attrs import define, field
+from ml_metadata.proto import Artifact
+from typing_extensions import override
+
+from .base import Prefixable, ProtoBase
+
+
+@unique
+class ArtifactState(Enum):
+ """State of an artifact."""
+
+ UNKNOWN = Artifact.UNKNOWN
+ PENDING = Artifact.PENDING
+ LIVE = Artifact.LIVE
+ MARKED_FOR_DELETION = Artifact.MARKED_FOR_DELETION
+ DELETED = Artifact.DELETED
+ ABANDONED = Artifact.ABANDONED
+ REFERENCE = Artifact.REFERENCE
+
+
+@define(slots=False)
+class BaseArtifact(ProtoBase):
+ """Abstract base class for all artifacts.
+
+ Attributes:
+ name: Name of the artifact.
+ uri: URI of the artifact.
+ state: State of the artifact.
+ """
+
+ name: str
+ uri: str
+ state: ArtifactState = field(init=False, default=ArtifactState.UNKNOWN)
+
+ @classmethod
+ @override
+ def get_proto_type(cls) -> type[Artifact]:
+ return Artifact
+
+ @override
+ def map(self, type_id: int) -> Artifact:
+ mlmd_obj = super().map(type_id)
+ mlmd_obj.uri = self.uri
+ mlmd_obj.state = self.state.value
+ return mlmd_obj
+
+ @classmethod
+ @override
+ def unmap(cls, mlmd_obj: Artifact) -> BaseArtifact:
+ py_obj = super().unmap(mlmd_obj)
+ assert isinstance(
+ py_obj, BaseArtifact
+ ), f"Expected BaseArtifact, got {type(py_obj)}"
+ py_obj.uri = mlmd_obj.uri
+ py_obj.state = ArtifactState(mlmd_obj.state)
+ return py_obj
+
+
+@define(slots=False, auto_attribs=True)
+class ModelArtifact(BaseArtifact, Prefixable):
+ """Represents a Model.
+
+ Attributes:
+ name: Name of the model.
+ uri: URI of the model.
+ description: Description of the object.
+ external_id: Customizable ID. Has to be unique among instances of the same type.
+ model_format_name: Name of the model format.
+ model_format_version: Version of the model format.
+ storage_key: Storage secret name.
+ storage_path: Storage path of the model.
+ service_account_name: Name of the service account with storage secret.
+ """
+
+ # TODO: this could be an enum of valid formats
+ model_format_name: str | None = field(kw_only=True, default=None)
+ model_format_version: str | None = field(kw_only=True, default=None)
+ storage_key: str | None = field(kw_only=True, default=None)
+ storage_path: str | None = field(kw_only=True, default=None)
+ service_account_name: str | None = field(kw_only=True, default=None)
+
+ _model_version_id: str | None = field(init=False, default=None)
+
+ @property
+ @override
+ def mlmd_name_prefix(self) -> str:
+ return self._model_version_id if self._model_version_id else uuid4().hex
+
+ @override
+ def map(self, type_id: int) -> Artifact:
+ mlmd_obj = super().map(type_id)
+ props = {
+ "model_format_name": self.model_format_name,
+ "model_format_version": self.model_format_version,
+ "storage_key": self.storage_key,
+ "storage_path": self.storage_path,
+ "service_account_name": self.service_account_name,
+ }
+ self._map_props(props, mlmd_obj.properties)
+ return mlmd_obj
+
+ @override
+ @classmethod
+ def unmap(cls, mlmd_obj: Artifact) -> ModelArtifact:
+ py_obj = super().unmap(mlmd_obj)
+ assert isinstance(
+ py_obj, ModelArtifact
+ ), f"Expected ModelArtifact, got {type(py_obj)}"
+ py_obj.model_format_name = mlmd_obj.properties["model_format_name"].string_value
+ py_obj.model_format_version = mlmd_obj.properties[
+ "model_format_version"
+ ].string_value
+ py_obj.storage_key = mlmd_obj.properties["storage_key"].string_value
+ py_obj.storage_path = mlmd_obj.properties["storage_path"].string_value
+ py_obj.service_account_name = mlmd_obj.properties[
+ "service_account_name"
+ ].string_value
+ return py_obj
diff --git a/clients/python/src/model_registry/types/base.py b/clients/python/src/model_registry/types/base.py
new file mode 100644
index 000000000..723813dc9
--- /dev/null
+++ b/clients/python/src/model_registry/types/base.py
@@ -0,0 +1,189 @@
+"""Base types for model registry."""
+
+from __future__ import annotations
+
+from abc import ABC, abstractmethod
+from collections.abc import Mapping
+from typing import Any, TypeVar, get_args
+
+from attrs import define, field
+from typing_extensions import override
+
+from model_registry.store import ProtoType, ScalarType
+
+
+class Mappable(ABC):
+ """Interface for types that can be mapped to and from proto types."""
+
+ @classmethod
+ def get_proto_type_name(cls) -> str:
+ """Name of the proto type.
+
+ Returns:
+ Name of the class prefixed with `odh.`
+ """
+ return f"odh.{cls.__name__}"
+
+ @property
+ @abstractmethod
+ def proto_name(self) -> str:
+ """Name of the proto object."""
+ pass
+
+ @abstractmethod
+ def map(self, type_id: int) -> ProtoType:
+ """Map to a proto object.
+
+ Args:
+ type_id (int): ID of the type.
+
+ Returns:
+ Proto object.
+ """
+ pass
+
+ @classmethod
+ @abstractmethod
+ def unmap(cls, mlmd_obj: ProtoType) -> Mappable:
+ """Map from a proto object.
+
+ Args:
+ mlmd_obj: Proto object.
+
+ Returns:
+ Python object.
+ """
+ pass
+
+
+class Prefixable(ABC):
+ """Interface for types that are prefixed.
+
+ We use prefixes to ensure that the user can insert more than one instance of the same type
+ with the same name/external_id.
+ """
+
+ @property
+ @abstractmethod
+ def mlmd_name_prefix(self) -> str:
+ """Prefix to be used in the proto object."""
+ pass
+
+
+@define(slots=False, init=False)
+class ProtoBase(Mappable, ABC):
+ """Abstract base type for protos.
+
+ This is a type defining common functionality for all types representing Model Registry protos,
+ such as Artifacts, Contexts, and Executions.
+
+ Attributes:
+ id: Protobuf object ID. Auto-assigned when put on the server.
+ name: Name of the object.
+ description: Description of the object.
+ external_id: Customizable ID. Has to be unique among instances of the same type.
+ create_time_since_epoch: Seconds elapsed since object creation time, measured against epoch.
+ last_update_time_since_epoch: Seconds elapsed since object last update time, measured against epoch.
+ """
+
+ name: str = field(init=False)
+ id: str | None = field(init=False, default=None)
+ description: str | None = field(kw_only=True, default=None)
+ external_id: str | None = field(kw_only=True, default=None)
+ create_time_since_epoch: int | None = field(init=False, default=None)
+ last_update_time_since_epoch: int | None = field(init=False, default=None)
+
+ @property
+ @override
+ def proto_name(self) -> str:
+ if isinstance(self, Prefixable):
+ return f"{self.mlmd_name_prefix}:{self.name}"
+ return self.name
+
+ @classmethod
+ @abstractmethod
+ def get_proto_type(cls) -> type[ProtoType]:
+ """Proto type associated with this class.
+
+ Returns:
+ Proto type.
+ """
+ pass
+
+ @staticmethod
+ def _map_props(
+ py_props: Mapping[str, ScalarType | None], mlmd_props: dict[str, Any]
+ ):
+ """Map properties from Python to proto.
+
+ Args:
+ py_props: Python properties.
+ mlmd_props: Proto properties, will be modified in place.
+ """
+ for key, value in py_props.items():
+ if value is None:
+ continue
+ # TODO: use pattern matching here (3.10)
+ if isinstance(value, bool):
+ mlmd_props[key].bool_value = value
+ elif isinstance(value, int):
+ mlmd_props[key].int_value = value
+ elif isinstance(value, float):
+ mlmd_props[key].double_value = value
+ elif isinstance(value, str):
+ mlmd_props[key].string_value = value
+ else:
+ msg = f"Unsupported type: {type(value)}"
+ raise Exception(msg)
+
+ @override
+ def map(self, type_id: int) -> ProtoType:
+ mlmd_obj = (self.get_proto_type())()
+ mlmd_obj.name = self.proto_name
+ mlmd_obj.type_id = type_id
+ if self.id:
+ mlmd_obj.id = int(self.id)
+ if self.external_id:
+ mlmd_obj.external_id = self.external_id
+ if self.description:
+ mlmd_obj.properties["description"].string_value = self.description
+ return mlmd_obj
+
+ @staticmethod
+ def _unmap_props(mlmd_props: dict[str, Any]) -> dict[str, ScalarType]:
+ """Map properties from proto to Python.
+
+ Args:
+ mlmd_props: Proto properties.
+
+ Returns:
+ Python properties.
+ """
+ py_props: dict[str, ScalarType] = {}
+ for key, prop in mlmd_props.items():
+ _, value = prop.ListFields()[0]
+ if not isinstance(value, get_args(ScalarType)):
+ msg = f"Unsupported type {type(value)} on key {key}"
+ raise Exception(msg)
+ py_props[key] = value
+
+ return py_props
+
+ T = TypeVar("T", bound="ProtoBase")
+
+ @classmethod
+ @override
+ def unmap(cls: type[T], mlmd_obj: ProtoType) -> T:
+ py_obj = cls.__new__(cls)
+ py_obj.id = str(mlmd_obj.id)
+ if isinstance(py_obj, Prefixable):
+ name: str = mlmd_obj.name
+ assert ":" in name, f"Expected {name} to be prefixed"
+ py_obj.name = name.split(":", 1)[1]
+ else:
+ py_obj.name = mlmd_obj.name
+ py_obj.description = mlmd_obj.properties["description"].string_value
+ py_obj.external_id = mlmd_obj.external_id
+ py_obj.create_time_since_epoch = mlmd_obj.create_time_since_epoch
+ py_obj.last_update_time_since_epoch = mlmd_obj.last_update_time_since_epoch
+ return py_obj
diff --git a/clients/python/src/model_registry/types/contexts.py b/clients/python/src/model_registry/types/contexts.py
new file mode 100644
index 000000000..5d7d964d3
--- /dev/null
+++ b/clients/python/src/model_registry/types/contexts.py
@@ -0,0 +1,145 @@
+"""Context types for model registry.
+
+Contexts group related Artifacts together.
+They provide a way to organize and categorize components in a workflow.
+
+Those types are used to map between proto types based on contexts and Python objects.
+
+Todo:
+ * Move part of the description to API Reference docs (#120).
+"""
+
+from __future__ import annotations
+
+from abc import ABC
+from enum import Enum, unique
+
+from attrs import define, field
+from ml_metadata.proto import Context
+from typing_extensions import override
+
+from model_registry.store import ScalarType
+
+from .artifacts import BaseArtifact
+from .base import Prefixable, ProtoBase
+
+
+@unique
+class ContextState(Enum):
+ """State of the context.
+
+ LIVE: The context is live and can be used.
+ ARCHIVED: The context is archived and can't be used.
+ """
+
+ LIVE = "LIVE"
+ ARCHIVED = "ARCHIVED"
+
+
+@define(slots=False, init=False)
+class BaseContext(ProtoBase, ABC):
+ """Abstract base class for all contexts."""
+
+ state: ContextState = field(init=False, default=ContextState.LIVE)
+
+ @override
+ def map(self, type_id: int) -> Context:
+ mlmd_obj = super().map(type_id)
+ mlmd_obj.properties["state"].string_value = self.state.value
+ return mlmd_obj
+
+ @classmethod
+ @override
+ def unmap(cls, mlmd_obj: Context) -> BaseContext:
+ py_obj = super().unmap(mlmd_obj)
+ assert isinstance(
+ py_obj, BaseContext
+ ), f"Expected BaseContext, got {type(py_obj)}"
+ py_obj.state = ContextState(mlmd_obj.properties["state"].string_value)
+ return py_obj
+
+ @classmethod
+ @override
+ def get_proto_type(cls) -> type[Context]:
+ return Context
+
+
+@define(slots=False)
+class ModelVersion(BaseContext, Prefixable):
+ """Represents a model version.
+
+ Attributes:
+ model_name: Name of the model associated with this version.
+ version: Version of the model.
+ author: Author of the model version.
+ description: Description of the object.
+ external_id: Customizable ID. Has to be unique among instances of the same type.
+ artifacts: Artifacts associated with this version.
+ metadata: Metadata associated with this version.
+ """
+
+ model_name: str
+ version: str
+ author: str
+ metadata: dict[str, ScalarType] = field(factory=dict)
+ artifacts: list[BaseArtifact] = field(init=False, factory=list)
+
+ _registered_model_id: str | None = field(init=False, default=None)
+
+ def __attrs_post_init__(self) -> None:
+ self.name = self.version
+
+ @property
+ @override
+ def mlmd_name_prefix(self) -> str:
+ assert (
+ self._registered_model_id is not None
+ ), "There's no registered model associated with this version"
+ return self._registered_model_id
+
+ @override
+ def map(self, type_id: int) -> Context:
+ mlmd_obj = super().map(type_id)
+ # this should match the name of the registered model
+ props = {
+ "model_name": self.model_name,
+ "author": self.author,
+ }
+ self._map_props(props, mlmd_obj.properties)
+ self._map_props(self.metadata, mlmd_obj.custom_properties)
+ return mlmd_obj
+
+ @classmethod
+ @override
+ def unmap(cls, mlmd_obj: Context) -> ModelVersion:
+ py_obj = super().unmap(mlmd_obj)
+ assert isinstance(
+ py_obj, ModelVersion
+ ), f"Expected ModelVersion, got {type(py_obj)}"
+ py_obj.version = py_obj.name
+ py_obj.model_name = mlmd_obj.properties["model_name"].string_value
+ py_obj.author = mlmd_obj.properties["author"].string_value
+ py_obj.metadata = cls._unmap_props(mlmd_obj.custom_properties)
+ return py_obj
+
+
+@define(slots=False)
+class RegisteredModel(BaseContext):
+ """Represents a registered model.
+
+ Attributes:
+ name: Registered model name.
+ description: Description of the object.
+ external_id: Customizable ID. Has to be unique among instances of the same type.
+ """
+
+ name: str
+
+ @classmethod
+ @override
+ def unmap(cls, mlmd_obj: Context) -> RegisteredModel:
+ py_obj = super().unmap(mlmd_obj)
+ assert isinstance(
+ py_obj, RegisteredModel
+ ), f"Expected RegisteredModel, got {type(py_obj)}"
+ return py_obj
diff --git a/clients/python/src/model_registry/types/options.py b/clients/python/src/model_registry/types/options.py
new file mode 100644
index 000000000..3e4ef688a
--- /dev/null
+++ b/clients/python/src/model_registry/types/options.py
@@ -0,0 +1,47 @@
+"""Options for listing objects.
+
+Provides a thin wrappers around the options classes defined in the MLMD Py lib.
+"""
+
+from __future__ import annotations
+
+from enum import Enum
+
+from attrs import define, field
+from ml_metadata.metadata_store import ListOptions as MLMDListOptions
+from ml_metadata.metadata_store import OrderByField as MLMDOrderByField
+
+
+class OrderByField(Enum):
+ """Fields to order by."""
+
+ CREATE_TIME = MLMDOrderByField.CREATE_TIME
+ UPDATE_TIME = MLMDOrderByField.UPDATE_TIME
+ ID = MLMDOrderByField.ID
+
+
+@define
+class ListOptions:
+ """Options for listing objects.
+
+ Attributes:
+ limit: Maximum number of objects to return.
+ order_by: Field to order by.
+ is_asc: Whether to order in ascending order. Defaults to True.
+ """
+
+ limit: int | None = field(default=None)
+ order_by: OrderByField | None = field(default=None)
+ is_asc: bool = field(default=True)
+
+ def as_mlmd_list_options(self) -> MLMDListOptions:
+ """Convert to MLMD ListOptions.
+
+ Returns:
+ MLMD ListOptions.
+ """
+ return MLMDListOptions(
+ limit=self.limit,
+ order_by=OrderByField(self.order_by).value if self.order_by else None,
+ is_asc=self.is_asc,
+ )
diff --git a/clients/python/tests/__init__.py b/clients/python/tests/__init__.py
new file mode 100644
index 000000000..b2b301e14
--- /dev/null
+++ b/clients/python/tests/__init__.py
@@ -0,0 +1,15 @@
+"""Tests for model registry."""
+
+from dataclasses import dataclass
+from typing import Generic, TypeVar
+
+from model_registry.store import ProtoType
+from model_registry.types.base import ProtoBase
+
+P = TypeVar("P", bound=ProtoBase)
+
+
+@dataclass
+class Mapped(Generic[P]):
+ proto: ProtoType
+ py: P
diff --git a/clients/python/tests/conftest.py b/clients/python/tests/conftest.py
new file mode 100644
index 000000000..04e81fe48
--- /dev/null
+++ b/clients/python/tests/conftest.py
@@ -0,0 +1,173 @@
+import os
+import time
+from typing import Union
+
+import pytest
+from ml_metadata import errors, metadata_store
+from ml_metadata.proto import (
+ ArtifactType,
+ ContextType,
+ metadata_store_pb2,
+)
+from ml_metadata.proto.metadata_store_pb2 import MetadataStoreClientConfig
+from model_registry.core import ModelRegistryAPIClient
+from model_registry.store.wrapper import MLMDStore
+from model_registry.types import ModelArtifact, ModelVersion, RegisteredModel
+from testcontainers.core.container import DockerContainer
+from testcontainers.core.waiting_utils import wait_for_logs
+
+ProtoTypeType = Union[ArtifactType, ContextType]
+
+
+# ruff: noqa: PT021 supported
+@pytest.fixture(scope="session")
+def mlmd_conn(request) -> MetadataStoreClientConfig:
+ model_registry_root_dir = model_registry_root(request)
+ print(
+ "Assuming this is the Model Registry root directory:", model_registry_root_dir
+ )
+ shared_volume = model_registry_root_dir / "test/config/ml-metadata"
+ sqlite_db_file = shared_volume / "metadata.sqlite.db"
+ if sqlite_db_file.exists():
+ msg = f"The file {sqlite_db_file} already exists; make sure to cancel it before running these tests."
+ raise FileExistsError(msg)
+ container = DockerContainer("gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0")
+ container.with_exposed_ports(8080)
+ container.with_volume_mapping(
+ shared_volume,
+ "/tmp/shared", # noqa: S108
+ "rw",
+ )
+ container.with_env(
+ "METADATA_STORE_SERVER_CONFIG_FILE",
+ "/tmp/shared/conn_config.pb", # noqa: S108
+ )
+ container.start()
+ wait_for_logs(container, "Server listening on")
+ os.system('docker container ls --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" -a') # noqa governed test
+ print("waited for logs and port")
+ cfg = MetadataStoreClientConfig(
+ host="localhost", port=int(container.get_exposed_port(8080))
+ )
+ print(cfg)
+
+ # this callback is needed in order to perform the container.stop()
+ # removing this callback might result in mlmd container shutting down before the tests had chance to fully run,
+ # and resulting in grpc connection resets.
+ def teardown():
+ container.stop()
+ print("teardown of plain_wrapper completed.")
+
+ request.addfinalizer(teardown)
+
+ time.sleep(
+ 3
+ ) # allowing some time for mlmd grpc to fully stabilize (is "spent" once per pytest session anyway)
+ _throwaway_store = metadata_store.MetadataStore(cfg)
+ wait_for_grpc(container, _throwaway_store)
+
+ return cfg
+
+
+def model_registry_root(request):
+ return (request.config.rootpath / "../..").resolve() # resolves to absolute path
+
+
+@pytest.fixture()
+def plain_wrapper(request, mlmd_conn: MetadataStoreClientConfig) -> MLMDStore:
+ sqlite_db_file = (
+ model_registry_root(request) / "test/config/ml-metadata/metadata.sqlite.db"
+ )
+
+ def teardown():
+ try:
+ os.remove(sqlite_db_file)
+ print(f"Removed {sqlite_db_file} successfully.")
+ except Exception as e:
+ print(f"An error occurred while removing {sqlite_db_file}: {e}")
+ print("plain_wrapper_after_each done.")
+
+ request.addfinalizer(teardown)
+
+ return MLMDStore(mlmd_conn)
+
+
+def set_type_attrs(mlmd_obj: ProtoTypeType, name: str, props: list[str]):
+ mlmd_obj.name = name
+ for key in props:
+ mlmd_obj.properties[key] = metadata_store_pb2.STRING
+ return mlmd_obj
+
+
+@pytest.fixture()
+def store_wrapper(plain_wrapper: MLMDStore) -> MLMDStore:
+ ma_type = set_type_attrs(
+ ArtifactType(),
+ ModelArtifact.get_proto_type_name(),
+ [
+ "description",
+ "model_format_name",
+ "model_format_version",
+ "storage_key",
+ "storage_path",
+ "service_account_name",
+ ],
+ )
+
+ plain_wrapper._mlmd_store.put_artifact_type(ma_type)
+
+ mv_type = set_type_attrs(
+ ContextType(),
+ ModelVersion.get_proto_type_name(),
+ [
+ "author",
+ "description",
+ "model_name",
+ "state",
+ ],
+ )
+
+ plain_wrapper._mlmd_store.put_context_type(mv_type)
+
+ rm_type = set_type_attrs(
+ ContextType(),
+ RegisteredModel.get_proto_type_name(),
+ [
+ "description",
+ "state",
+ ],
+ )
+
+ plain_wrapper._mlmd_store.put_context_type(rm_type)
+
+ return plain_wrapper
+
+
+@pytest.fixture()
+def mr_api(store_wrapper: MLMDStore) -> ModelRegistryAPIClient:
+ mr = object.__new__(ModelRegistryAPIClient)
+ mr._store = store_wrapper
+ return mr
+
+
+def wait_for_grpc(
+ container: DockerContainer,
+ store: metadata_store.MetadataStore,
+ timeout=6,
+ interval=2,
+):
+ start = time.time()
+ while True:
+ duration = time.time() - start
+ results = None
+ try:
+ results = store.get_contexts()
+ except errors.UnavailableError as e:
+ print(e)
+ print("Container logs:\n", container.get_logs())
+ print("Container not ready. Retrying...")
+ if results is not None:
+ return duration
+ if timeout and duration > timeout:
+ raise TimeoutError("wait_for_grpc not ready %.3f seconds" % timeout)
+ time.sleep(interval)
diff --git a/clients/python/tests/store/__init__.py b/clients/python/tests/store/__init__.py
new file mode 100644
index 000000000..ec9239a76
--- /dev/null
+++ b/clients/python/tests/store/__init__.py
@@ -0,0 +1 @@
+"""Tests for the store module."""
diff --git a/clients/python/tests/store/test_wrapper.py b/clients/python/tests/store/test_wrapper.py
new file mode 100644
index 000000000..c2d379de1
--- /dev/null
+++ b/clients/python/tests/store/test_wrapper.py
@@ -0,0 +1,110 @@
+"""Tests behavior of the MLMD wrapper.
+
+Tests whether the wrapper is properly handling misuses of the MLMD store, as common use cases
+are already covered by the Registry client.
+"""
+
+import pytest
+from ml_metadata.proto import (
+ Artifact,
+ ArtifactType,
+ Context,
+ ContextType,
+)
+from model_registry.exceptions import (
+ DuplicateException,
+ StoreException,
+ TypeNotFoundException,
+)
+from model_registry.store import MLMDStore
+
+
+@pytest.fixture()
+def artifact(plain_wrapper: MLMDStore) -> Artifact:
+ art_type = ArtifactType()
+ art_type.name = "test_artifact"
+
+ art = Artifact()
+ art.name = "test_artifact"
+ art.type_id = plain_wrapper._mlmd_store.put_artifact_type(art_type)
+
+ return art
+
+
+@pytest.fixture()
+def context(plain_wrapper: MLMDStore) -> Context:
+ ctx_type = ContextType()
+ ctx_type.name = "test_context"
+
+ ctx = Context()
+ ctx.name = "test_context"
+ ctx.type_id = plain_wrapper._mlmd_store.put_context_type(ctx_type)
+
+ return ctx
+
+
+def test_get_undefined_artifact_type_id(plain_wrapper: MLMDStore):
+ with pytest.raises(TypeNotFoundException):
+ plain_wrapper.get_type_id(Artifact, "undefined")
+
+
+def test_get_undefined_context_type_id(plain_wrapper: MLMDStore):
+ with pytest.raises(TypeNotFoundException):
+ plain_wrapper.get_type_id(Context, "undefined")
+
+
+def test_put_invalid_artifact(plain_wrapper: MLMDStore, artifact: Artifact):
+ artifact.properties["null"].int_value = 0
+
+ with pytest.raises(StoreException):
+ plain_wrapper.put_artifact(artifact)
+
+
+def test_put_duplicate_artifact(plain_wrapper: MLMDStore, artifact: Artifact):
+ plain_wrapper._mlmd_store.put_artifacts([artifact])
+ with pytest.raises(DuplicateException):
+ plain_wrapper.put_artifact(artifact)
+
+
+def test_put_invalid_context(plain_wrapper: MLMDStore, context: Context):
+ context.properties["null"].int_value = 0
+
+ with pytest.raises(StoreException):
+ plain_wrapper.put_context(context)
+
+
+def test_put_duplicate_context(plain_wrapper: MLMDStore, context: Context):
+ plain_wrapper._mlmd_store.put_contexts([context])
+
+ with pytest.raises(DuplicateException):
+ plain_wrapper.put_context(context)
+
+
+def test_put_attribution_with_invalid_context(
+ plain_wrapper: MLMDStore, artifact: Artifact
+):
+ art_id = plain_wrapper._mlmd_store.put_artifacts([artifact])[0]
+
+ with pytest.raises(StoreException) as store_error:
+ plain_wrapper.put_attribution(0, art_id)
+
+ assert "context" in str(store_error.value).lower()
+
+
+def test_put_attribution_with_invalid_artifact(
+ plain_wrapper: MLMDStore, context: Context
+):
+ ctx_id = plain_wrapper._mlmd_store.put_contexts([context])[0]
+
+ with pytest.raises(StoreException) as store_error:
+ plain_wrapper.put_attribution(ctx_id, 0)
+
+ assert "artifact" in str(store_error.value).lower()
+
+
+def test_get_undefined_artifact_by_id(plain_wrapper: MLMDStore):
+ assert plain_wrapper.get_artifact("dup", 0) is None
+
+
+def test_get_undefined_context_by_id(plain_wrapper: MLMDStore):
+ assert plain_wrapper.get_context("dup", 0) is None
diff --git a/clients/python/tests/test_client.py b/clients/python/tests/test_client.py
new file mode 100644
index 000000000..a88f8d076
--- /dev/null
+++ b/clients/python/tests/test_client.py
@@ -0,0 +1,102 @@
+import pytest
+from model_registry import ModelRegistry
+from model_registry.core import ModelRegistryAPIClient
+from model_registry.exceptions import StoreException
+
+
+@pytest.fixture()
+def mr_client(mr_api: ModelRegistryAPIClient) -> ModelRegistry:
+ mr = ModelRegistry.__new__(ModelRegistry)
+ mr._api = mr_api
+ mr._author = "test_author"
+ return mr
+
+
+def test_register_new(mr_client: ModelRegistry):
+ name = "test_model"
+ version = "1.0.0"
+ rm = mr_client.register_model(
+ name,
+ "s3",
+ model_format_name="test_format",
+ model_format_version="test_version",
+ version=version,
+ )
+ assert rm.id is not None
+
+ mr_api = mr_client._api
+ assert (mv := mr_api.get_model_version_by_params(rm.id, version)) is not None
+ assert mr_api.get_model_artifact_by_params(mv.id) is not None
+
+
+def test_register_existing_version(mr_client: ModelRegistry):
+ params = {
+ "name": "test_model",
+ "uri": "s3",
+ "model_format_name": "test_format",
+ "model_format_version": "test_version",
+ "version": "1.0.0",
+ }
+ mr_client.register_model(**params)
+
+ with pytest.raises(StoreException):
+ mr_client.register_model(**params)
+
+
+def test_get(mr_client: ModelRegistry):
+ name = "test_model"
+ version = "1.0.0"
+
+ rm = mr_client.register_model(
+ name,
+ "s3",
+ model_format_name="test_format",
+ model_format_version="test_version",
+ version=version,
+ )
+
+ assert (_rm := mr_client.get_registered_model(name))
+ assert rm.id == _rm.id
+
+ mr_api = mr_client._api
+ assert (mv := mr_api.get_model_version_by_params(rm.id, version))
+ assert (ma := mr_api.get_model_artifact_by_params(mv.id))
+
+ assert (_mv := mr_client.get_model_version(name, version))
+ assert mv.id == _mv.id
+ assert (_ma := mr_client.get_model_artifact(name, version))
+ assert ma.id == _ma.id
+
+
+def test_hf_import(mr_client: ModelRegistry):
+ pytest.importorskip("huggingface_hub")
+ name = "openai-community/gpt2"
+ version = "1.2.3"
+
+ assert mr_client.register_hf_model(
+ name,
+ "onnx/decoder_model.onnx",
+ author="test author",
+ version=version,
+ model_format_name="test format",
+ model_format_version="test version",
+ )
+ assert mr_client.get_model_version(name, version)
+ assert mr_client.get_model_artifact(name, version)
+
+
+def test_hf_import_missing_author(mr_client: ModelRegistry):
+ pytest.importorskip("huggingface_hub")
+ name = "bert-base-uncased"
+ version = "1.2.3"
+
+ with pytest.warns(match=r".*author is unknown.*"):
+ assert mr_client.register_hf_model(
+ name,
+ "model.onnx",
+ version=version,
+ model_format_name="test format",
+ model_format_version="test version",
+ )
+ assert (mv := mr_client.get_model_version(name, version))
+ assert mv.author == "unknown"
diff --git a/clients/python/tests/test_core.py b/clients/python/tests/test_core.py
new file mode 100644
index 000000000..bdb3ba144
--- /dev/null
+++ b/clients/python/tests/test_core.py
@@ -0,0 +1,353 @@
+"""Tests for user facing model registry APIs."""
+
+import pytest
+from attrs import evolve
+from ml_metadata.proto import (
+ Artifact,
+ Attribution,
+ Context,
+ ParentContext,
+)
+from model_registry.core import ModelRegistryAPIClient
+from model_registry.exceptions import StoreException
+from model_registry.store import MLMDStore
+from model_registry.types import ModelArtifact, ModelVersion, RegisteredModel
+
+from . import Mapped
+
+
+@pytest.fixture()
+def model(store_wrapper: MLMDStore) -> Mapped:
+ art = Artifact()
+ # we can't test the name directly as it's prefixed
+ art.name = "model"
+ art.type_id = store_wrapper.get_type_id(
+ Artifact, ModelArtifact.get_proto_type_name()
+ )
+
+ art.uri = "uri"
+
+ return Mapped(art, ModelArtifact("model", "uri"))
+
+
+@pytest.fixture()
+def model_version(store_wrapper: MLMDStore, model: Mapped) -> Mapped:
+ ctx = Context()
+ # we can't test the name directly as it's prefixed
+ ctx.name = "version"
+ ctx.type_id = store_wrapper.get_type_id(Context, ModelVersion.get_proto_type_name())
+ ctx.properties["author"].string_value = "author"
+ ctx.properties["model_name"].string_value = model.py.name
+ ctx.properties["state"].string_value = "LIVE"
+
+ return Mapped(ctx, ModelVersion(model.py.name, "version", "author"))
+
+
+@pytest.fixture()
+def registered_model(store_wrapper: MLMDStore, model: Mapped) -> Mapped:
+ ctx = Context()
+ ctx.name = model.py.name
+ ctx.type_id = store_wrapper.get_type_id(
+ Context, RegisteredModel.get_proto_type_name()
+ )
+ ctx.properties["state"].string_value = "LIVE"
+
+ return Mapped(ctx, RegisteredModel(model.py.name))
+
+
+# TODO: should we test insert/update separately?
+def test_upsert_registered_model(
+ mr_api: ModelRegistryAPIClient, registered_model: Mapped
+):
+ mr_api.upsert_registered_model(registered_model.py)
+
+ rm_proto = mr_api._store._mlmd_store.get_context_by_type_and_name(
+ RegisteredModel.get_proto_type_name(), registered_model.proto.name
+ )
+ assert rm_proto is not None
+ assert registered_model.py.id == str(rm_proto.id)
+ assert registered_model.py.name == rm_proto.name
+
+
+def test_get_registered_model_by_id(
+ mr_api: ModelRegistryAPIClient,
+ registered_model: Mapped,
+):
+ rm_id = mr_api._store._mlmd_store.put_contexts([registered_model.proto])[0]
+
+ assert (mlmd_rm := mr_api.get_registered_model_by_id(str(rm_id)))
+ assert mlmd_rm.id == str(rm_id)
+ assert mlmd_rm.name == registered_model.py.name
+ assert mlmd_rm.name == registered_model.proto.name
+
+
+def test_get_registered_model_by_name(
+ mr_api: ModelRegistryAPIClient,
+ registered_model: Mapped,
+):
+ rm_id = mr_api._store._mlmd_store.put_contexts([registered_model.proto])[0]
+
+ assert (
+ mlmd_rm := mr_api.get_registered_model_by_params(name=registered_model.py.name)
+ )
+ assert mlmd_rm.id == str(rm_id)
+ assert mlmd_rm.name == registered_model.py.name
+ assert mlmd_rm.name == registered_model.proto.name
+
+
+def test_get_registered_model_by_external_id(
+ mr_api: ModelRegistryAPIClient,
+ registered_model: Mapped,
+):
+ registered_model.py.external_id = "external_id"
+ registered_model.proto.external_id = "external_id"
+ rm_id = mr_api._store._mlmd_store.put_contexts([registered_model.proto])[0]
+
+ assert (
+ mlmd_rm := mr_api.get_registered_model_by_params(
+ external_id=registered_model.py.external_id
+ )
+ )
+ assert mlmd_rm.id == str(rm_id)
+ assert mlmd_rm.name == registered_model.py.name
+ assert mlmd_rm.name == registered_model.proto.name
+
+
+def test_get_registered_models(
+ mr_api: ModelRegistryAPIClient, registered_model: Mapped
+):
+ rm1_id = mr_api._store._mlmd_store.put_contexts([registered_model.proto])[0]
+ registered_model.proto.name = "model2"
+ rm2_id = mr_api._store._mlmd_store.put_contexts([registered_model.proto])[0]
+
+ mlmd_rms = mr_api.get_registered_models()
+ assert len(mlmd_rms) == 2
+ assert mlmd_rms[0].id in [str(rm1_id), str(rm2_id)]
+
+
+def test_upsert_model_version(
+ mr_api: ModelRegistryAPIClient,
+ model_version: Mapped,
+ registered_model: Mapped,
+):
+ rm_id = mr_api._store._mlmd_store.put_contexts([registered_model.proto])[0]
+ rm_id = str(rm_id)
+
+ mr_api.upsert_model_version(model_version.py, rm_id)
+
+ mv_proto = mr_api._store._mlmd_store.get_context_by_type_and_name(
+ ModelVersion.get_proto_type_name(), f"{rm_id}:{model_version.proto.name}"
+ )
+ assert mv_proto is not None
+ assert model_version.py.id == str(mv_proto.id)
+ assert model_version.py.version != mv_proto.name
+
+
+def test_get_model_version_by_id(mr_api: ModelRegistryAPIClient, model_version: Mapped):
+ model_version.proto.name = f"1:{model_version.proto.name}"
+ ctx_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+
+ id = str(ctx_id)
+ assert (mlmd_mv := mr_api.get_model_version_by_id(id))
+ assert mlmd_mv.id == id
+ assert mlmd_mv.name == model_version.py.name
+ assert mlmd_mv.version != model_version.proto.name
+
+
+def test_get_model_version_by_name(
+ mr_api: ModelRegistryAPIClient, model_version: Mapped
+):
+ model_version.proto.name = f"1:{model_version.proto.name}"
+ mv_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+
+ assert (
+ mlmd_mv := mr_api.get_model_version_by_params(
+ registered_model_id="1", version=model_version.py.name
+ )
+ )
+ assert mlmd_mv.id == str(mv_id)
+ assert mlmd_mv.name == model_version.py.name
+ assert mlmd_mv.name != model_version.proto.name
+
+
+def test_get_model_version_by_external_id(
+ mr_api: ModelRegistryAPIClient, model_version: Mapped
+):
+ model_version.proto.name = f"1:{model_version.proto.name}"
+ model_version.proto.external_id = "external_id"
+ model_version.py.external_id = "external_id"
+ mv_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+
+ assert (
+ mlmd_mv := mr_api.get_model_version_by_params(
+ external_id=model_version.py.external_id
+ )
+ )
+ assert mlmd_mv.id == str(mv_id)
+ assert mlmd_mv.name == model_version.py.name
+ assert mlmd_mv.name != model_version.proto.name
+
+
+def test_get_model_versions(
+ mr_api: ModelRegistryAPIClient,
+ model_version: Mapped,
+ registered_model: Mapped,
+):
+ rm_id = mr_api._store._mlmd_store.put_contexts([registered_model.proto])[0]
+
+ model_version.proto.name = f"{rm_id}:version"
+ mv1_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+ model_version.proto.name = f"{rm_id}:version2"
+ mv2_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+
+ mr_api._store._mlmd_store.put_parent_contexts(
+ [
+ ParentContext(parent_id=rm_id, child_id=mv1_id),
+ ParentContext(parent_id=rm_id, child_id=mv2_id),
+ ]
+ )
+
+ mlmd_mvs = mr_api.get_model_versions(str(rm_id))
+ assert len(mlmd_mvs) == 2
+ assert mlmd_mvs[0].id in [str(mv1_id), str(mv2_id)]
+
+
+def test_upsert_model_artifact(
+ monkeypatch,
+ mr_api: ModelRegistryAPIClient,
+ model: Mapped,
+ model_version: Mapped,
+):
+ monkeypatch.setattr(ModelArtifact, "mlmd_name_prefix", "test_prefix")
+
+ mv_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+ mv_id = str(mv_id)
+
+ mr_api.upsert_model_artifact(model.py, mv_id)
+
+ ma_proto = mr_api._store._mlmd_store.get_artifact_by_type_and_name(
+ ModelArtifact.get_proto_type_name(), f"test_prefix:{model.proto.name}"
+ )
+ assert ma_proto is not None
+ assert model.py.id == str(ma_proto.id)
+ assert model.py.name != ma_proto.name
+
+
+def test_upsert_duplicate_model_artifact_with_different_version(
+ mr_api: ModelRegistryAPIClient, model: Mapped, model_version: Mapped
+):
+ mv1_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+ mv1_id = str(mv1_id)
+
+ model_version.proto.name = "version2"
+ mv2_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+ mv2_id = str(mv2_id)
+
+ ma1 = evolve(model.py)
+ mr_api.upsert_model_artifact(ma1, mv1_id)
+ ma2 = evolve(model.py)
+ mr_api.upsert_model_artifact(ma2, mv2_id)
+
+ ma_protos = mr_api._store._mlmd_store.get_artifacts_by_id(
+ [int(ma1.id), int(ma2.id)]
+ )
+ assert ma1.name == ma2.name
+ assert ma1.name != str(ma_protos[0].name)
+ assert ma2.name != str(ma_protos[1].name)
+
+
+def test_upsert_duplicate_model_artifact_with_same_version(
+ mr_api: ModelRegistryAPIClient, model: Mapped, model_version: Mapped
+):
+ mv_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+ mv_id = str(mv_id)
+
+ ma1 = evolve(model.py)
+ mr_api.upsert_model_artifact(ma1, mv_id)
+ ma2 = evolve(model.py)
+ with pytest.raises(StoreException):
+ mr_api.upsert_model_artifact(ma2, mv_id)
+
+
+def test_get_model_artifact_by_id(mr_api: ModelRegistryAPIClient, model: Mapped):
+ model.proto.name = f"test_prefix:{model.proto.name}"
+ id = mr_api._store._mlmd_store.put_artifacts([model.proto])[0]
+ id = str(id)
+
+ assert (mlmd_ma := mr_api.get_model_artifact_by_id(id))
+ assert mlmd_ma.id == id
+ assert mlmd_ma.name == model.py.name
+ assert mlmd_ma.name != model.proto.name
+
+
+def test_get_model_artifact_by_model_version_id(
+ mr_api: ModelRegistryAPIClient, model: Mapped, model_version: Mapped
+):
+ mv_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+
+ model.proto.name = f"test_prefix:{model.proto.name}"
+ ma_id = mr_api._store._mlmd_store.put_artifacts([model.proto])[0]
+
+ mr_api._store._mlmd_store.put_attributions_and_associations(
+ [Attribution(context_id=mv_id, artifact_id=ma_id)], []
+ )
+
+ assert (mlmd_ma := mr_api.get_model_artifact_by_params(model_version_id=str(mv_id)))
+ assert mlmd_ma.id == str(ma_id)
+ assert mlmd_ma.name == model.py.name
+ assert mlmd_ma.name != model.proto.name
+
+
+def test_get_model_artifact_by_external_id(
+ mr_api: ModelRegistryAPIClient, model: Mapped
+):
+ model.proto.name = f"test_prefix:{model.proto.name}"
+ model.proto.external_id = "external_id"
+ model.py.external_id = "external_id"
+
+ id = mr_api._store._mlmd_store.put_artifacts([model.proto])[0]
+ id = str(id)
+
+ assert (
+ mlmd_ma := mr_api.get_model_artifact_by_params(external_id=model.py.external_id)
+ )
+ assert mlmd_ma.id == id
+ assert mlmd_ma.name == model.py.name
+ assert mlmd_ma.name != model.proto.name
+
+
+def test_get_all_model_artifacts(mr_api: ModelRegistryAPIClient, model: Mapped):
+ model.proto.name = "test_prefix:model1"
+ ma1_id = mr_api._store._mlmd_store.put_artifacts([model.proto])[0]
+ model.proto.name = "test_prefix:model2"
+ ma2_id = mr_api._store._mlmd_store.put_artifacts([model.proto])[0]
+
+ mlmd_mas = mr_api.get_model_artifacts()
+ assert len(mlmd_mas) == 2
+ assert mlmd_mas[0].id in [str(ma1_id), str(ma2_id)]
+
+
+def test_get_model_artifacts_by_mv_id(
+ mr_api: ModelRegistryAPIClient, model: Mapped, model_version: Mapped
+):
+ mv1_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+
+ model_version.proto.name = "version2"
+ mv2_id = mr_api._store._mlmd_store.put_contexts([model_version.proto])[0]
+
+ model.proto.name = "test_prefix:model1"
+ ma1_id = mr_api._store._mlmd_store.put_artifacts([model.proto])[0]
+ model.proto.name = "test_prefix:model2"
+ ma2_id = mr_api._store._mlmd_store.put_artifacts([model.proto])[0]
+
+ mr_api._store._mlmd_store.put_attributions_and_associations(
+ [
+ Attribution(context_id=mv1_id, artifact_id=ma1_id),
+ Attribution(context_id=mv2_id, artifact_id=ma2_id),
+ ],
+ [],
+ )
+
+ mlmd_mas = mr_api.get_model_artifacts(str(mv1_id))
+ assert len(mlmd_mas) == 1
+ assert mlmd_mas[0].id == str(ma1_id)
diff --git a/clients/python/tests/types/__init__.py b/clients/python/tests/types/__init__.py
new file mode 100644
index 000000000..04c524def
--- /dev/null
+++ b/clients/python/tests/types/__init__.py
@@ -0,0 +1 @@
+"""Tests for model registry types."""
diff --git a/clients/python/tests/types/test_artifact_mapping.py b/clients/python/tests/types/test_artifact_mapping.py
new file mode 100644
index 000000000..f1e45b9d5
--- /dev/null
+++ b/clients/python/tests/types/test_artifact_mapping.py
@@ -0,0 +1,106 @@
+"""Tests for artifact type mapping.
+
+Todo:
+ * should we parametrize the tests?
+"""
+
+import pytest
+from ml_metadata.proto import Artifact
+from model_registry.types import ModelArtifact
+
+from .. import Mapped
+
+
+@pytest.fixture()
+def complete_model() -> Mapped:
+ proto_model = Artifact()
+ proto_model.name = "test_prefix:test_model"
+ proto_model.type_id = 1
+ proto_model.external_id = "test_external_id"
+ proto_model.state = Artifact.UNKNOWN
+ proto_model.uri = "test_uri"
+ proto_model.properties["description"].string_value = "test description"
+ proto_model.properties["model_format_name"].string_value = "test_format"
+ proto_model.properties["model_format_version"].string_value = "test_format_version"
+ proto_model.properties["storage_key"].string_value = "test_storage_key"
+ proto_model.properties["storage_path"].string_value = "test_storage_path"
+ proto_model.properties["service_account_name"].string_value = "test_account_name"
+
+ py_model = ModelArtifact(
+ "test_model",
+ "test_uri",
+ description="test description",
+ external_id="test_external_id",
+ model_format_name="test_format",
+ model_format_version="test_format_version",
+ storage_key="test_storage_key",
+ storage_path="test_storage_path",
+ service_account_name="test_account_name",
+ )
+
+ return Mapped(proto_model, py_model)
+
+
+@pytest.fixture()
+def minimal_model() -> Mapped:
+ proto_model = Artifact()
+ proto_model.name = "test_prefix:test_model"
+ proto_model.type_id = 1
+ proto_model.state = Artifact.UNKNOWN
+ proto_model.uri = "test_uri"
+
+ py_model = ModelArtifact("test_model", "test_uri")
+ return Mapped(proto_model, py_model)
+
+
+def test_partial_model_mapping(monkeypatch, minimal_model: Mapped):
+ monkeypatch.setattr(ModelArtifact, "mlmd_name_prefix", "test_prefix")
+
+ mapped_model = minimal_model.py.map(1)
+ proto_model = minimal_model.proto
+ assert mapped_model.name == proto_model.name
+ assert mapped_model.type_id == proto_model.type_id
+ assert mapped_model.state == proto_model.state
+ assert mapped_model.uri == proto_model.uri
+
+
+def test_full_model_mapping(monkeypatch, complete_model: Mapped):
+ monkeypatch.setattr(ModelArtifact, "mlmd_name_prefix", "test_prefix")
+
+ mapped_model = complete_model.py.map(1)
+ proto_model = complete_model.proto
+ assert mapped_model.name == proto_model.name
+ assert mapped_model.type_id == proto_model.type_id
+ assert mapped_model.state == proto_model.state
+ assert mapped_model.uri == proto_model.uri
+ assert mapped_model.external_id == proto_model.external_id
+ assert mapped_model.properties == proto_model.properties
+
+
+def test_partial_model_unmapping(minimal_model: Mapped):
+ unmapped_model = ModelArtifact.unmap(minimal_model.proto)
+ py_model = minimal_model.py
+ assert unmapped_model.name == py_model.name
+ assert unmapped_model.state == py_model.state
+ assert unmapped_model.uri == py_model.uri
+
+
+def test_full_model_unmapping(complete_model: Mapped):
+ unmapped_model = ModelArtifact.unmap(complete_model.proto)
+ py_model = complete_model.py
+ assert unmapped_model.name == py_model.name
+ assert unmapped_model.state == py_model.state
+ assert unmapped_model.uri == py_model.uri
+ assert unmapped_model.external_id == py_model.external_id
+ assert unmapped_model.description == py_model.description
+ assert unmapped_model.model_format_name == py_model.model_format_name
+ assert unmapped_model.model_format_version == py_model.model_format_version
+ assert unmapped_model.storage_key == py_model.storage_key
+ assert unmapped_model.storage_path == py_model.storage_path
+ assert unmapped_model.service_account_name == py_model.service_account_name
+
+
+def test_model_prefix_generation(minimal_model: Mapped):
+ name1 = minimal_model.py.map(1).name
+ name2 = minimal_model.py.map(1).name
+ assert name1 != name2
diff --git a/clients/python/tests/types/test_context_mapping.py b/clients/python/tests/types/test_context_mapping.py
new file mode 100644
index 000000000..4ca24cff9
--- /dev/null
+++ b/clients/python/tests/types/test_context_mapping.py
@@ -0,0 +1,97 @@
+"""Tests for context type mapping.
+
+Todo:
+ * should we parametrize the tests?
+"""
+
+import pytest
+from ml_metadata.proto import Context
+from model_registry.types import ContextState, ModelVersion
+
+from .. import Mapped
+
+
+@pytest.fixture()
+def full_model_version() -> Mapped:
+ proto_version = Context(
+ name="1:1.0.0",
+ type_id=2,
+ external_id="test_external_id",
+ )
+ proto_version.properties["description"].string_value = "test description"
+ proto_version.properties["model_name"].string_value = "test_model"
+ proto_version.properties["author"].string_value = "test_author"
+ proto_version.properties["state"].string_value = "ARCHIVED"
+ proto_version.custom_properties["int_key"].int_value = 1
+ proto_version.custom_properties["float_key"].double_value = 1.0
+ proto_version.custom_properties["bool_key"].bool_value = True
+ proto_version.custom_properties["str_key"].string_value = "test_str"
+
+ py_version = ModelVersion(
+ "test_model",
+ "1.0.0",
+ "test_author",
+ external_id="test_external_id",
+ description="test description",
+ metadata={
+ "int_key": 1,
+ "float_key": 1.0,
+ "bool_key": True,
+ "str_key": "test_str",
+ },
+ )
+ py_version._registered_model_id = "1"
+ py_version.state = ContextState.ARCHIVED
+ return Mapped(proto_version, py_version)
+
+
+@pytest.fixture()
+def minimal_model_version() -> Mapped:
+ proto_version = Context(name="1:1.0.0", type_id=2)
+ proto_version.properties["model_name"].string_value = "test_model"
+ proto_version.properties["author"].string_value = "test_author"
+ proto_version.properties["state"].string_value = "LIVE"
+
+ py_version = ModelVersion("test_model", "1.0.0", "test_author")
+ py_version._registered_model_id = "1"
+ return Mapped(proto_version, py_version)
+
+
+def test_partial_model_version_mapping(minimal_model_version: Mapped):
+ mapped_version = minimal_model_version.py.map(2)
+ proto_version = minimal_model_version.proto
+ assert mapped_version.name == proto_version.name
+ assert mapped_version.type_id == proto_version.type_id
+ assert mapped_version.properties == proto_version.properties
+
+
+def test_partial_model_version_unmapping(minimal_model_version: Mapped):
+ unmapped_version = ModelVersion.unmap(minimal_model_version.proto)
+ py_version = minimal_model_version.py
+ assert unmapped_version.version == py_version.version
+ assert unmapped_version.model_name == py_version.model_name
+ assert unmapped_version.author == py_version.author
+ assert unmapped_version.state == py_version.state
+ assert unmapped_version.metadata == py_version.metadata
+
+
+def test_full_model_version_mapping(full_model_version: Mapped):
+ mapped_version = full_model_version.py.map(2)
+ proto_version = full_model_version.proto
+ assert mapped_version.name == proto_version.name
+ assert mapped_version.type_id == proto_version.type_id
+ assert mapped_version.external_id == proto_version.external_id
+ assert mapped_version.properties == proto_version.properties
+ assert mapped_version.custom_properties == proto_version.custom_properties
+
+
+def test_full_model_version_unmapping(full_model_version: Mapped):
+ unmapped_version = ModelVersion.unmap(full_model_version.proto)
+ py_version = full_model_version.py
+ assert unmapped_version.version == py_version.version
+ assert unmapped_version.description == py_version.description
+ assert unmapped_version.external_id == py_version.external_id
+ assert unmapped_version.model_name == py_version.model_name
+ assert unmapped_version.author == py_version.author
+ assert unmapped_version.state == py_version.state
+ assert unmapped_version.metadata == py_version.metadata
diff --git a/cmd/config.go b/cmd/config.go
new file mode 100644
index 000000000..0a7720a4d
--- /dev/null
+++ b/cmd/config.go
@@ -0,0 +1,12 @@
+package cmd
+
+type Config struct {
+ DbFile string `mapstructure:"db-file" yaml:"db-file"`
+ Hostname string `mapstructure:"hostname" yaml:"hostname"`
+ Port int `mapstructure:"port" yaml:"port"`
+ LibraryDirs []string `mapstructure:"metadata-library-dir" yaml:"metadata-library-dir"`
+}
+
+var cfg = Config{DbFile: "metadata.sqlite.db", Hostname: "localhost", Port: 8080, LibraryDirs: []string(nil)}
+
+const EnvPrefix = "MR"
diff --git a/cmd/proxy.go b/cmd/proxy.go
new file mode 100644
index 000000000..f3ef67932
--- /dev/null
+++ b/cmd/proxy.go
@@ -0,0 +1,88 @@
+package cmd
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+
+ "github.com/golang/glog"
+ "github.com/opendatahub-io/model-registry/internal/mlmdtypes"
+ "github.com/opendatahub-io/model-registry/internal/server/openapi"
+ "github.com/opendatahub-io/model-registry/pkg/core"
+ "github.com/spf13/cobra"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
+)
+
+var (
+ // proxyCmd represents the proxy command
+ proxyCmd = &cobra.Command{
+ Use: "proxy",
+ Short: "Starts the ml-metadata go OpenAPI proxy",
+ Long: `This command launches the ml-metadata go OpenAPI proxy server.
+
+The server connects to a mlmd CPP server. It supports options to customize the
+hostname and port where it listens.'`,
+ RunE: runProxyServer,
+ }
+)
+
+func runProxyServer(cmd *cobra.Command, args []string) error {
+ glog.Infof("proxy server started at %s:%v", cfg.Hostname, cfg.Port)
+
+ ctxTimeout, cancel := context.WithTimeout(context.Background(), time.Second*30)
+ defer cancel()
+
+ mlmdAddr := fmt.Sprintf("%s:%d", proxyCfg.MLMDHostname, proxyCfg.MLMDPort)
+ glog.Infof("connecting to MLMD server %s..", mlmdAddr)
+ conn, err := grpc.DialContext(
+ ctxTimeout,
+ mlmdAddr,
+ grpc.WithReturnConnectionError(),
+ grpc.WithBlock(),
+ grpc.WithTransportCredentials(insecure.NewCredentials()),
+ )
+ if err != nil {
+ return fmt.Errorf("error dialing connection to mlmd server %s: %v", mlmdAddr, err)
+ }
+ defer conn.Close()
+ glog.Infof("connected to MLMD server")
+
+ _, err = mlmdtypes.CreateMLMDTypes(conn)
+ if err != nil {
+ return fmt.Errorf("error creating MLMD types: %v", err)
+ }
+ service, err := core.NewModelRegistryService(conn)
+ if err != nil {
+ return fmt.Errorf("error creating core service: %v", err)
+ }
+
+ ModelRegistryServiceAPIService := openapi.NewModelRegistryServiceAPIService(service)
+ ModelRegistryServiceAPIController := openapi.NewModelRegistryServiceAPIController(ModelRegistryServiceAPIService)
+
+ router := openapi.NewRouter(ModelRegistryServiceAPIController)
+
+ glog.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%d", cfg.Hostname, cfg.Port), router))
+ return nil
+}
+
+func init() {
+ rootCmd.AddCommand(proxyCmd)
+
+ proxyCmd.Flags().StringVarP(&cfg.Hostname, "hostname", "n", cfg.Hostname, "Proxy server listen hostname")
+ proxyCmd.Flags().IntVarP(&cfg.Port, "port", "p", cfg.Port, "Proxy server listen port")
+
+ proxyCmd.Flags().StringVar(&proxyCfg.MLMDHostname, "mlmd-hostname", proxyCfg.MLMDHostname, "MLMD hostname")
+ proxyCmd.Flags().IntVar(&proxyCfg.MLMDPort, "mlmd-port", proxyCfg.MLMDPort, "MLMD port")
+}
+
+type ProxyConfig struct {
+ MLMDHostname string
+ MLMDPort int
+}
+
+var proxyCfg = ProxyConfig{
+ MLMDHostname: "localhost",
+ MLMDPort: 9090,
+}
diff --git a/cmd/root.go b/cmd/root.go
new file mode 100644
index 000000000..a2ff45cd0
--- /dev/null
+++ b/cmd/root.go
@@ -0,0 +1,116 @@
+package cmd
+
+import (
+ "errors"
+ "flag"
+ "fmt"
+ "github.com/golang/glog"
+ "github.com/spf13/pflag"
+ "os"
+ "strings"
+
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+)
+
+var cfgFile string
+
+// rootCmd represents the base command when called without any subcommands
+var rootCmd = &cobra.Command{
+ Use: "model-registry",
+ Short: "A go server for ml-metadata",
+ Long: `The model-registry is a gRPC server that stores metadata
+for ML applications.
+
+It's based on the ml-metadata project that provides a python client library
+for ML applications to record metadata about metadata such as Artifacts,
+Executions and Contexts.
+This go server is an alternative to the CPP gRPC service provided by the
+ml-metadata project. It's meant to provide extra features such as loading
+custom metadata libraries, exposing a higher level GraphQL API, RBAC, etc.`,
+ // Uncomment the following line if your bare application
+ // has an action associated with it:
+ // Run: func(cmd *cobra.Command, args []string) { },
+ PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
+ return initConfig(cmd)
+ },
+}
+
+// Execute adds all child commands to the root command and sets flags appropriately.
+// This is called by main.main(). It only needs to happen once to the rootCmd.
+func Execute() {
+ err := rootCmd.Execute()
+ if err != nil {
+ glog.Exitf("error: %v", err)
+ }
+}
+
+func init() {
+ //cobra.OnInitialize(initConfig)
+
+ // Here you will define your flags and configuration settings.
+ // Cobra supports persistent flags, which, if defined here,
+ // will be global for your application.
+
+ rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.model-registry.yaml)")
+
+ // default to logging to stderr
+ _ = flag.Set("logtostderr", "true")
+ // also add standard glog flags
+ rootCmd.PersistentFlags().AddGoFlagSet(flag.CommandLine)
+
+ // Cobra also supports local flags, which will only run
+ // when this action is called directly.
+ //rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
+
+}
+
+// initConfig reads in config file and ENV variables if set.
+func initConfig(cmd *cobra.Command) error {
+ if cfgFile != "" {
+ // Use config file from the flag.
+ viper.SetConfigFile(cfgFile)
+ } else {
+ // Find home directory.
+ home, err := os.UserHomeDir()
+ if err != nil {
+ return err
+ }
+
+ // Search config in home directory with name ".model-registry" (without extension).
+ viper.AddConfigPath(home)
+ viper.SetConfigType("yaml")
+ viper.SetConfigName(".model-registry")
+ }
+
+ viper.SetEnvPrefix(EnvPrefix)
+ viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
+ viper.AutomaticEnv() // read in environment variables that match
+
+ // If a config file is found, read it in.
+ if err := viper.ReadInConfig(); err == nil {
+ glog.Info("using config file: ", viper.ConfigFileUsed())
+ } else {
+ var configFileNotFoundError viper.ConfigFileNotFoundError
+ ok := errors.As(err, &configFileNotFoundError)
+ // ignore if it's a file not found error for default config file
+ if !(cfgFile == "" && ok) {
+ return fmt.Errorf("reading config %s: %v", viper.ConfigFileUsed(), err)
+ }
+ }
+
+ // bind flags to config
+ if err := viper.BindPFlags(cmd.Flags()); err != nil {
+ return err
+ }
+ var err error
+ cmd.Flags().VisitAll(func(f *pflag.Flag) {
+ name := f.Name
+ if err == nil && !f.Changed && viper.IsSet(name) {
+ value := viper.Get(name)
+ err = cmd.Flags().Set(name, fmt.Sprintf("%v", value))
+ }
+ })
+
+ return err
+}
diff --git a/docker-compose-local.yaml b/docker-compose-local.yaml
new file mode 100644
index 000000000..52b7601ff
--- /dev/null
+++ b/docker-compose-local.yaml
@@ -0,0 +1,20 @@
+version: '3'
+services:
+ mlmd-server:
+ image: gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0
+ container_name: mlmd-server
+ ports:
+ - "9090:8080"
+ environment:
+ - METADATA_STORE_SERVER_CONFIG_FILE=/tmp/shared/conn_config.pb
+ volumes:
+ - ./test/config/ml-metadata:/tmp/shared
+ model-registry:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ command: ["proxy", "--mlmd-hostname", "localhost", "--mlmd-port", "9090"]
+ container_name: model-registry
+ network_mode: host
+ depends_on:
+ - mlmd-server
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100644
index 000000000..4f8e2d985
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,18 @@
+version: '3'
+services:
+ mlmd-server:
+ image: gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0
+ container_name: mlmd-server
+ ports:
+ - "9090:8080"
+ environment:
+ - METADATA_STORE_SERVER_CONFIG_FILE=/tmp/shared/conn_config.pb
+ volumes:
+ - ./test/config/ml-metadata:/tmp/shared
+ model-registry:
+ image: quay.io/opendatahub/model-registry:latest
+ command: ["proxy", "--mlmd-hostname", "localhost", "--mlmd-port", "9090"]
+ container_name: model-registry
+ network_mode: host
+ depends_on:
+ - mlmd-server
diff --git a/docs/Model Registry Testing areas.drawio b/docs/Model Registry Testing areas.drawio
new file mode 100644
index 000000000..a9e9ce252
--- /dev/null
+++ b/docs/Model Registry Testing areas.drawio
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/Model Registry Testing areas.png b/docs/Model Registry Testing areas.png
new file mode 100644
index 000000000..3ff9391f8
Binary files /dev/null and b/docs/Model Registry Testing areas.png differ
diff --git a/docs/Screenshot 2023-11-29 at 14.08.12.png b/docs/Screenshot 2023-11-29 at 14.08.12.png
new file mode 100644
index 000000000..fbdfc13e4
Binary files /dev/null and b/docs/Screenshot 2023-11-29 at 14.08.12.png differ
diff --git a/docs/Screenshot 2023-11-29 at 14.10.14.png b/docs/Screenshot 2023-11-29 at 14.10.14.png
new file mode 100644
index 000000000..98ba389e7
Binary files /dev/null and b/docs/Screenshot 2023-11-29 at 14.10.14.png differ
diff --git a/docs/mr_go_library.md b/docs/mr_go_library.md
new file mode 100644
index 000000000..1754eec62
--- /dev/null
+++ b/docs/mr_go_library.md
@@ -0,0 +1,145 @@
+# Model Registry Service
+
+The Model Registry Service go library provides a convenient interface for managing and interacting with models, model versions, artifacts, serving environments, inference services, and serve models through the underlying [ML Metadata (MLMD)](https://github.com/google/ml-metadata) service.
+
+## Installation
+
+The recommended way is using `go get`, from your custom project run:
+```bash
+go get github.com/opendatahub-io/model-registry
+```
+
+## Getting Started
+
+Model Registry Service is an high level Go client (or library) for ML Metadata (MLMD) store/service.
+It provides model registry metadata capabilities, e.g., store and retrieve ML models metadata and related artifacts, through a custom defined [API](../pkg/api/api.go).
+
+### Prerequisites
+
+* MLMD server, check [ml-metadata doc](https://github.com/google/ml-metadata/blob/f0fef74eae2bdf6650a79ba976b36bea0b777c2e/g3doc/get_started.md#use-mlmd-with-a-remote-grpc-server) for more details on how to startup a MLMD store server.
+* Go >= 1.19
+
+### Usage
+
+Assuming that MLMD server is already running at `localhost:9090`, as first step you should setup a gRPC connection to the server:
+
+```go
+import (
+ "context"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
+)
+
+conn, err := grpc.DialContext(
+ context.Background(),
+ "localhost:9090",
+ grpc.WithReturnConnectionError(),
+ grpc.WithBlock(), // optional
+ grpc.WithTransportCredentials(insecure.NewCredentials()),
+)
+if err != nil {
+ return fmt.Errorf("error dialing connection to mlmd server localhost:9090: %v", err)
+}
+defer conn.Close()
+```
+
+> NOTE: check [grpc doc](https://pkg.go.dev/google.golang.org/grpc#DialContext) for more details.
+
+Once the gRPC connection is setup, let's create the `ModelRegistryService`:
+
+```go
+import (
+ "fmt"
+ "github.com/opendatahub-io/model-registry/pkg/core"
+)
+
+service, err := core.NewModelRegistryService(conn)
+if err != nil {
+ return fmt.Errorf("error creating model registry core service: %v", err)
+}
+```
+
+Everything is ready, you can start using the `ModelRegistryService` library!
+
+Here some usage examples:
+
+#### Model Registration
+
+Create a `RegisteredModel`
+
+```go
+modelName := "MODEL_NAME"
+modelDescription := "MODEL_DESCRIPTION"
+
+// register a new model
+registeredModel, err = service.UpsertRegisteredModel(&openapi.RegisteredModel{
+ Name: &modelName,
+ Description: &modelDescription,
+})
+if err != nil {
+ return fmt.Errorf("error registering model: %v", err)
+}
+```
+
+Create a new `ModelVersion` for the previous registered model
+
+```go
+versionName := "VERSION_NAME"
+versionDescription := "VERSION_DESCRIPTION"
+versionScore := 0.83
+
+// register model version
+modelVersion, err = service.UpsertModelVersion(&openapi.ModelVersion{
+ Name: &versionName,
+ Description: &versionDescription,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "score": {
+ MetadataDoubleValue: &openapi.MetadataDoubleValue{
+ DoubleValue: &versionScore,
+ },
+ },
+ },
+}, registeredModel.Id)
+if err != nil {
+ return fmt.Errorf("error registering model version: %v", err)
+}
+```
+
+Create a new `ModelArtifact` for the newly created version
+
+```go
+artifactName := "ARTIFACT_NAME"
+artifactDescription := "ARTIFACT_DESCRIPTION"
+artifactUri := "ARTIFACT_URI"
+
+// register model artifact
+modelArtifact, err := service.UpsertModelArtifact(&openapi.ModelArtifact{
+ Name: &artifactName,
+ Description: &artifactDescription,
+ Uri: &artifactUri,
+}, modelVersion.Id)
+if err != nil {
+ return fmt.Errorf("error creating model artifact: %v", err)
+}
+```
+
+#### Model Query
+
+Get `RegisteredModel` by name, for now the `name` must match.
+```go
+modelName := "QUERY_MODEL_NAME"
+registeredModel, err := service.GetRegisteredModelByParams(&modelName, nil)
+if err != nil {
+ log.Printf("unable to find model %s: %v", getModelCfg.RegisteredModelName, err)
+ return err
+}
+```
+
+Get all `ModelVersion` associated to a specific registered model
+
+```go
+allVersions, err := service.GetModelVersions(api.ListOptions{}, registeredModel.Id)
+if err != nil {
+ return fmt.Errorf("error retrieving model versions for model %s: %v", *registeredModel.Id, err)
+}
+```
diff --git a/docs/remote_only_packaging_of_MLMD_Python_lib.md b/docs/remote_only_packaging_of_MLMD_Python_lib.md
new file mode 100644
index 000000000..57bd0c655
--- /dev/null
+++ b/docs/remote_only_packaging_of_MLMD_Python_lib.md
@@ -0,0 +1,126 @@
+# Remote-only packaging of MLMD Python lib
+
+## Context and Problem statement
+
+Google’s ML Metadata (MLMD) is a project composed of a C++ server, and a Python client library.
+The server exposes a gRPC interface, and is only distributed for x86-64 architectures.
+It is embedded in the client's wheel binary, providing an additional convenience [method for running the server locally (in memory)](https://www.tensorflow.org/tfx/guide/mlmd#metadata_storage_backends_and_store_connection_configuration),
+whilst also making it [architecture specific](https://pypi.org/project/ml-metadata/1.14.0/#files).
+
+The [Model Registry project](https://docs.google.com/document/d/1G-pjdGaS2kLELsB5kYk_D4AmH-fTfnCnJOhJ8xENjx0/edit?usp=sharing) (MR) is built on top of MLMD.
+The Go implementation interfaces with the MLMD server via gRPC, typically available as a Docker container.
+The [MR Python client](https://github.com/opendatahub-io/model-registry/tree/main/clients/python#readme) wraps the MLMD client.
+
+As the MLMD client is architecture specific, so is the MR Python client, which **severely limits the targets it can run on**, as it only supports x86-64.
+This **poses many challenges to contributors** using other CPU architectures, specially ARM, as that's become more prevalent in recent years.
+
+Since the Model Registry python client does _not_ leverage the embedded MLMD server's in-memory connection, we present options for a “soft-fork” and re-distribution of the MLMD client as a pure Python library, making it platform/architecture agnostic.
+
+The resulting artifact, a MLMD python wheel supporting only remote gRPC connections at the same time being a “pure library” hence not requiring specific CPU architectures, OSes, or CPython versions, could be as well published on PyPI under the ODH org, and become the dependency of [MR python client](/clients/python/README.md).
+
+
+## Goals
+
+* consider required changes to “soft-fork” MLMD wheel to support only remote gRPC connections
+* repackaging as a pure library
+
+
+## Non-Goals
+
+* “hard”-fork of MLMD
+* maintaining original MLMD tests (those bound to embedded server)
+
+
+## Proposed solution
+
+Refer to the conclusions section for the motivations behind selecting:
+1. soft-fork upstream repo, modify pip+bazel build, to produce the distributable Python client ("Alternative B", below)
+2. create a `ml-metadata-remote` or similarly named package on PyPI based on the distributable wheel and files from the step1 above ("Packaging Option1", below)
+
+For documentation purposes, the exploration of the different alternatives is reported below.
+
+
+## Alternative A: repackage the resulting wheel
+
+This solution explores the steps required to simply repackage the existing and distributed (by Google) MLMD python wheel, removing all embedded binaries, and repackaging the wheel as a pure library.
+
+This has been experimented with success on this repository: ([link](https://github.com/tarilabs/ml-metadata-remote))
+
+The steps required are recorded here: ([link](https://github.com/tarilabs/ml-metadata-remote/commits/v1.14.0))
+
+and mainly consists of:
+
+1. Download one platform-specific MLMD v1.14.0 wheel and extract its content ([reference](https://github.com/tarilabs/ml-metadata-remote/commit/39dd0c7dcd063e0440a6354017445dada8423f0c#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5))
+2. Remove embedded code, apply required code changes ([reference](https://github.com/tarilabs/ml-metadata-remote/commit/bcb1f0ffd37600e056342aff39e154bb35422668#diff-f363c85a1cf3536a48a7b721b02a6999b80a08b9c305d185327e87e2769b6f21))
+3. Recompute dist-info checksums before repackaging ([reference](https://github.com/tarilabs/ml-metadata-remote/commit/fda125fb742ab8ecf4a7153705717d8b50f59326#diff-53bdc596caf062825dbb42b65e5b2305db70d2e533c03bc677b13cc8c7cfd236))
+4. Repackage the directories as a new pure library wheel ([reference](https://github.com/tarilabs/ml-metadata-remote/commit/5d199f808eea0cb7ba78a0702be8de3306477df8))
+
+The resulting artifact has been [tested](https://github.com/tarilabs/ml-metadata-remote#readme:~:text=Testing%20with%20launching%20a%20local%20server) locally with a gRPC connection to MLMD server made available via Docker. The resulting artifact is directly available for local download: ([link](https://github.com/tarilabs/ml-metadata-remote/releases/tag/1.14.0))
+
+
+## Alternative B: build by soft-fork upstream repo
+
+This solution explores how to use the upstream MLMD repo by Google and by making necessary code changes, so to directly produce with the pip+bazel build the wheel as a pure library.
+
+This has been experimented with success on this fork: ([link](https://github.com/tarilabs/ml-metadata/commits/remote-r1.14.0))
+
+The steps required mainly consists of:
+
+1. Make changes to the bazel BUILD file ([reference](https://github.com/tarilabs/ml-metadata/commit/079aeb3a9da69eb960e428a7866e279d0bfb533b#diff-c8858dec4f58c1d8a280af8c117ff8480f7ed4ae863b96e1ba20b52f83222aab))
+2. Make changes to sh build script ([reference](https://github.com/tarilabs/ml-metadata/commit/079aeb3a9da69eb960e428a7866e279d0bfb533b#diff-125a2f247ce39f711e1c8a77f430bd5b1b865cd10b5c5fef0d9140d276c617f2))
+3. Make changes to setup.py build file ([reference](https://github.com/tarilabs/ml-metadata/commit/079aeb3a9da69eb960e428a7866e279d0bfb533b#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7))
+4. Apply required code changes analogously to “Alternative A” (see other changes in [this commit](https://github.com/tarilabs/ml-metadata/commit/079aeb3a9da69eb960e428a7866e279d0bfb533b))
+
+The resulting artifact has been [tested](https://github.com/tarilabs/ml-metadata/commit/794ec39d97e3ac70db2ca18fcf5807c44f339f0b) locally with a gRPC connection to MLMD server made available via Docker, similar to instructions provided in “Alternative A”.
+
+
+## Packaging
+
+In this section we consider packaging and delivery options for the resulting artifact from the alternative selected above.
+
+
+### Packaging Option1: separate repo on ODH
+
+This delivery option considers having a separate repo on ODH, called “ml-metadata-remote” (or the likes). Repeat the exercise from the alternative selected above on this repo. Then deliver this as a package on PyPI.
+
+Pros:
+
+* Well isolated dependency
+ * also, if one day upstream Google MLMD resolves to be platform/arch agnostic, is just a matter of changing again the consumed dependency from MR python client
+* Google code (copyright header) is isolated from Model Registry code
+* The resulting artifact could also be re-used by other communities/users
+
+Cons:
+
+* Additional artifact to publish on PyPI
+
+
+### Packaging Option2: mix resulting artifact inside Model Registry repo
+
+This delivery option considers placing the resulting artifact by executing the exercise from the alternative selected above and placing it directly inside the Model Registry repo, with the python client source [location](https://github.com/opendatahub-io/model-registry/tree/main/clients/python). (for analogy, this is similar to “shading”/”uberjar” in Java world for those familiar with the concept)
+
+Pros:
+
+* Only one artifact to publish on PyPI
+
+Cons:
+
+* Google code (copyright header) is mixed with Model Registry code
+ * at this stage is not clear if any implications with uplifting the MR project in KF community
+* The resulting artifact cannot be re-used by other communities/users
+* If one day upstream Google MLMD resolves to be platform/arch agnostic, changing back the MR python client to use the original ml-metadata could require extra work and effort
+
+
+## Conclusion
+
+Based on analysis of the alternatives provided, we decided to further pursue:
+- the repackaging by **Alternative B** because makes it actually easier to demonstrate the steps and modifications required using as baseline the upstream repo.
+- the distribution by **Packaging Option1** because it will make it easier to "revert" to the upstream `ml-metadata` dependency if upstream will publish for all architectures, OSes, etc. and as the pros outweight considered cons.
+
+MR python client [tests](https://github.com/opendatahub-io/model-registry/blob/259b39320953bf05942dcec1fb5ec74f7eb5d4a7/clients/python/tests/conftest.py#L19) should be rewritten using Testcontainers, and not leveraging the embedded server (already done with [this PR](https://github.com/opendatahub-io/model-registry/pull/225)).
+
+The group concur this is a sensible approach ([recorded here](https://redhat-internal.slack.com/archives/C05LGBNUK9C/p1700763823505259?thread_ts=1700427888.670999&cid=C05LGBNUK9C)).
+
+This change would also better align the test approach used for the MR python client, by aligning with the same strategy of the MR core Go layer test framework, which already makes use of Testcontainers for Go ([reference](https://github.com/opendatahub-io/model-registry/blob/259b39320953bf05942dcec1fb5ec74f7eb5d4a7/internal/testutils/test_container_utils.go#L59)).
+
+This would allow to update the constraint on the version for the `attrs` dependency as part of this activity.
diff --git a/go.mod b/go.mod
new file mode 100644
index 000000000..f25c4fd5e
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,80 @@
+module github.com/opendatahub-io/model-registry
+
+go 1.19
+
+require (
+ github.com/go-chi/chi/v5 v5.0.11
+ github.com/go-chi/cors v1.2.1
+ github.com/golang/glog v1.2.0
+ github.com/spf13/cobra v1.8.0
+ github.com/spf13/pflag v1.0.5
+ github.com/spf13/viper v1.18.2
+ github.com/stretchr/testify v1.8.4
+ github.com/testcontainers/testcontainers-go v0.26.0
+ google.golang.org/grpc v1.61.0
+ google.golang.org/protobuf v1.32.0
+)
+
+require (
+ github.com/containerd/log v0.1.0 // indirect
+ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
+ github.com/sagikazarmark/locafero v0.4.0 // indirect
+ github.com/sagikazarmark/slog-shim v0.1.0 // indirect
+ github.com/sourcegraph/conc v0.3.0 // indirect
+ go.uber.org/atomic v1.9.0 // indirect
+ go.uber.org/multierr v1.9.0 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+)
+
+require (
+ dario.cat/mergo v1.0.0 // indirect
+ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
+ github.com/Microsoft/go-winio v0.6.1 // indirect
+ github.com/Microsoft/hcsshim v0.11.4 // indirect
+ github.com/cenkalti/backoff/v4 v4.2.1 // indirect
+ github.com/containerd/containerd v1.7.11 // indirect
+ github.com/cpuguy83/dockercfg v0.3.1 // indirect
+ github.com/docker/distribution v2.8.2+incompatible // indirect
+ github.com/docker/docker v24.0.7+incompatible // indirect
+ github.com/docker/go-connections v0.4.0 // indirect
+ github.com/docker/go-units v0.5.0 // indirect
+ github.com/fsnotify/fsnotify v1.7.0 // indirect
+ github.com/go-ole/go-ole v1.2.6 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/protobuf v1.5.3 // indirect
+ github.com/google/uuid v1.6.0
+ github.com/hashicorp/hcl v1.0.0 // indirect
+ github.com/inconshreveable/mousetrap v1.1.0 // indirect
+ github.com/klauspost/compress v1.17.0 // indirect
+ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
+ github.com/magiconair/properties v1.8.7 // indirect
+ github.com/mitchellh/mapstructure v1.5.0 // indirect
+ github.com/moby/patternmatcher v0.6.0 // indirect
+ github.com/moby/sys/sequential v0.5.0 // indirect
+ github.com/moby/term v0.5.0 // indirect
+ github.com/morikuni/aec v1.0.0 // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
+ github.com/opencontainers/runc v1.1.12 // indirect
+ github.com/pelletier/go-toml/v2 v2.1.0 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
+ github.com/shirou/gopsutil/v3 v3.23.9 // indirect
+ github.com/shoenig/go-m1cpu v0.1.6 // indirect
+ github.com/sirupsen/logrus v1.9.3 // indirect
+ github.com/spf13/afero v1.11.0 // indirect
+ github.com/spf13/cast v1.6.0 // indirect
+ github.com/subosito/gotenv v1.6.0 // indirect
+ github.com/tklauser/go-sysconf v0.3.12 // indirect
+ github.com/tklauser/numcpus v0.6.1 // indirect
+ github.com/yusufpapurcu/wmi v1.2.3 // indirect
+ golang.org/x/exp v0.0.0-20230905200255-921286631fa9
+ golang.org/x/mod v0.12.0 // indirect
+ golang.org/x/net v0.19.0 // indirect
+ golang.org/x/sys v0.15.0 // indirect
+ golang.org/x/text v0.14.0 // indirect
+ golang.org/x/tools v0.13.0 // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
+ gopkg.in/ini.v1 v1.67.0 // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 000000000..07009374e
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,205 @@
+dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
+dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
+github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU=
+github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
+github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
+github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
+github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
+github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=
+github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w=
+github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
+github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
+github.com/containerd/containerd v1.7.11 h1:lfGKw3eU35sjV0aG2eYZTiwFEY1pCzxdzicHP3SZILw=
+github.com/containerd/containerd v1.7.11/go.mod h1:5UluHxHTX2rdvYuZ5OJTC5m/KJNs0Zs9wVoJm9zf5ZE=
+github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
+github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
+github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E=
+github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=
+github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
+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=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
+github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM=
+github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
+github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
+github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
+github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
+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.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA=
+github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
+github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4=
+github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
+github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
+github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=
+github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
+github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+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/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
+github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
+github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM=
+github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
+github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
+github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
+github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
+github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
+github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
+github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
+github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc=
+github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo=
+github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
+github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
+github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
+github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
+github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
+github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
+github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
+github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
+github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss=
+github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8=
+github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
+github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
+github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
+github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
+github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
+github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
+github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
+github.com/shirou/gopsutil/v3 v3.23.9 h1:ZI5bWVeu2ep4/DIxB4U9okeYJ7zp/QLTO4auRb/ty/E=
+github.com/shirou/gopsutil/v3 v3.23.9/go.mod h1:x/NWSb71eMcjFIO0vhyGW5nZ7oSIgVjrCnADckb85GA=
+github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
+github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
+github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
+github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
+github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
+github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
+github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
+github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
+github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
+github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
+github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
+github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
+github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
+github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=
+github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
+github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
+github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c=
+github.com/testcontainers/testcontainers-go v0.26.0/go.mod h1:ICriE9bLX5CLxL9OFQ2N+2N+f+803LNJ1utJb1+Inx0=
+github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
+github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
+github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
+github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
+github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
+go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
+go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
+golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
+golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+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=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
+golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
+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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
+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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
+golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc=
+google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0=
+google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
+google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+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/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
+gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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=
+gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY=
diff --git a/internal/apiutils/api_utils.go b/internal/apiutils/api_utils.go
new file mode 100644
index 000000000..ac28515c0
--- /dev/null
+++ b/internal/apiutils/api_utils.go
@@ -0,0 +1,81 @@
+package apiutils
+
+import (
+ "github.com/opendatahub-io/model-registry/internal/converter"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/api"
+ model "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+func BuildListOperationOptions(listOptions api.ListOptions) (*proto.ListOperationOptions, error) {
+
+ result := proto.ListOperationOptions{}
+ if listOptions.PageSize != nil {
+ result.MaxResultSize = listOptions.PageSize
+ }
+ if listOptions.NextPageToken != nil {
+ result.NextPageToken = listOptions.NextPageToken
+ }
+ if listOptions.OrderBy != nil {
+ so := listOptions.SortOrder
+
+ // default is DESC
+ isAsc := false
+ if so != nil && *so == "ASC" {
+ isAsc = true
+ }
+
+ var orderByField proto.ListOperationOptions_OrderByField_Field
+ if val, ok := proto.ListOperationOptions_OrderByField_Field_value[*listOptions.OrderBy]; ok {
+ orderByField = proto.ListOperationOptions_OrderByField_Field(val)
+ }
+
+ result.OrderByField = &proto.ListOperationOptions_OrderByField{
+ Field: &orderByField,
+ IsAsc: &isAsc,
+ }
+ }
+ return &result, nil
+}
+
+// ZeroIfNil return the zeroed value if input is a nil pointer
+func ZeroIfNil[T any](input *T) T {
+ if input != nil {
+ return *input
+ }
+ return *new(T)
+}
+
+// of returns a pointer to the provided literal/const input
+func Of[E any](e E) *E {
+ return &e
+}
+
+func BuildListOption(pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (api.ListOptions, error) {
+ var pageSizeInt32 *int32
+ if pageSize != "" {
+ conv, err := converter.StringToInt32(pageSize)
+ if err != nil {
+ return api.ListOptions{}, err
+ }
+ pageSizeInt32 = &conv
+ }
+ var orderByString *string
+ if orderBy != "" {
+ orderByString = (*string)(&orderBy)
+ }
+ var sortOrderString *string
+ if sortOrder != "" {
+ sortOrderString = (*string)(&sortOrder)
+ }
+ var nextPageTokenParam *string
+ if nextPageToken != "" {
+ nextPageTokenParam = &nextPageToken
+ }
+ return api.ListOptions{
+ PageSize: pageSizeInt32,
+ OrderBy: orderByString,
+ SortOrder: sortOrderString,
+ NextPageToken: nextPageTokenParam,
+ }, nil
+}
diff --git a/internal/constants/constants.go b/internal/constants/constants.go
new file mode 100644
index 000000000..d218d3fbd
--- /dev/null
+++ b/internal/constants/constants.go
@@ -0,0 +1,11 @@
+package constants
+
+// MLMD type names
+const (
+ RegisteredModelTypeName = "odh.RegisteredModel"
+ ModelVersionTypeName = "odh.ModelVersion"
+ ModelArtifactTypeName = "odh.ModelArtifact"
+ ServingEnvironmentTypeName = "odh.ServingEnvironment"
+ InferenceServiceTypeName = "odh.InferenceService"
+ ServeModelTypeName = "odh.ServeModel"
+)
diff --git a/internal/converter/generated/mlmd_openapi_converter.gen.go b/internal/converter/generated/mlmd_openapi_converter.gen.go
new file mode 100755
index 000000000..0be2c2a5d
--- /dev/null
+++ b/internal/converter/generated/mlmd_openapi_converter.gen.go
@@ -0,0 +1,189 @@
+// Code generated by github.com/jmattheis/goverter, DO NOT EDIT.
+
+package generated
+
+import (
+ "fmt"
+ converter "github.com/opendatahub-io/model-registry/internal/converter"
+ proto "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ openapi "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+type MLMDToOpenAPIConverterImpl struct{}
+
+func (c *MLMDToOpenAPIConverterImpl) ConvertInferenceService(source *proto.Context) (*openapi.InferenceService, error) {
+ var pOpenapiInferenceService *openapi.InferenceService
+ if source != nil {
+ var openapiInferenceService openapi.InferenceService
+ mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties)
+ if err != nil {
+ return nil, err
+ }
+ openapiInferenceService.CustomProperties = &mapStringOpenapiMetadataValue
+ openapiInferenceService.Description = converter.MapDescription((*source).Properties)
+ var pString *string
+ if (*source).ExternalId != nil {
+ xstring := *(*source).ExternalId
+ pString = &xstring
+ }
+ openapiInferenceService.ExternalID = pString
+ openapiInferenceService.Name = converter.MapNameFromOwned((*source).Name)
+ openapiInferenceService.Id = converter.Int64ToString((*source).Id)
+ openapiInferenceService.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
+ openapiInferenceService.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch)
+ openapiInferenceService.ModelVersionId = converter.MapPropertyModelVersionId((*source).Properties)
+ openapiInferenceService.Runtime = converter.MapPropertyRuntime((*source).Properties)
+ openapiInferenceService.DesiredState = converter.MapInferenceServiceDesiredState((*source).Properties)
+ openapiInferenceService.RegisteredModelId = converter.MapPropertyRegisteredModelId((*source).Properties)
+ openapiInferenceService.ServingEnvironmentId = converter.MapPropertyServingEnvironmentId((*source).Properties)
+ pOpenapiInferenceService = &openapiInferenceService
+ }
+ return pOpenapiInferenceService, nil
+}
+func (c *MLMDToOpenAPIConverterImpl) ConvertModelArtifact(source *proto.Artifact) (*openapi.ModelArtifact, error) {
+ var pOpenapiModelArtifact *openapi.ModelArtifact
+ if source != nil {
+ var openapiModelArtifact openapi.ModelArtifact
+ mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties)
+ if err != nil {
+ return nil, err
+ }
+ openapiModelArtifact.CustomProperties = &mapStringOpenapiMetadataValue
+ openapiModelArtifact.Description = converter.MapDescription((*source).Properties)
+ var pString *string
+ if (*source).ExternalId != nil {
+ xstring := *(*source).ExternalId
+ pString = &xstring
+ }
+ openapiModelArtifact.ExternalID = pString
+ var pString2 *string
+ if (*source).Uri != nil {
+ xstring2 := *(*source).Uri
+ pString2 = &xstring2
+ }
+ openapiModelArtifact.Uri = pString2
+ openapiModelArtifact.State = converter.MapMLMDModelArtifactState((*source).State)
+ openapiModelArtifact.Name = converter.MapNameFromOwned((*source).Name)
+ openapiModelArtifact.Id = converter.Int64ToString((*source).Id)
+ openapiModelArtifact.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
+ openapiModelArtifact.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch)
+ xstring3, err := converter.MapArtifactType(source)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field ArtifactType: %w", err)
+ }
+ openapiModelArtifact.ArtifactType = xstring3
+ openapiModelArtifact.ModelFormatName = converter.MapModelArtifactFormatName((*source).Properties)
+ openapiModelArtifact.StorageKey = converter.MapModelArtifactStorageKey((*source).Properties)
+ openapiModelArtifact.StoragePath = converter.MapModelArtifactStoragePath((*source).Properties)
+ openapiModelArtifact.ModelFormatVersion = converter.MapModelArtifactFormatVersion((*source).Properties)
+ openapiModelArtifact.ServiceAccountName = converter.MapModelArtifactServiceAccountName((*source).Properties)
+ pOpenapiModelArtifact = &openapiModelArtifact
+ }
+ return pOpenapiModelArtifact, nil
+}
+func (c *MLMDToOpenAPIConverterImpl) ConvertModelVersion(source *proto.Context) (*openapi.ModelVersion, error) {
+ var pOpenapiModelVersion *openapi.ModelVersion
+ if source != nil {
+ var openapiModelVersion openapi.ModelVersion
+ mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties)
+ if err != nil {
+ return nil, err
+ }
+ openapiModelVersion.CustomProperties = &mapStringOpenapiMetadataValue
+ openapiModelVersion.Description = converter.MapDescription((*source).Properties)
+ var pString *string
+ if (*source).ExternalId != nil {
+ xstring := *(*source).ExternalId
+ pString = &xstring
+ }
+ openapiModelVersion.ExternalID = pString
+ openapiModelVersion.Name = converter.MapNameFromOwned((*source).Name)
+ openapiModelVersion.State = converter.MapModelVersionState((*source).Properties)
+ openapiModelVersion.Author = converter.MapPropertyAuthor((*source).Properties)
+ openapiModelVersion.Id = converter.Int64ToString((*source).Id)
+ openapiModelVersion.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
+ openapiModelVersion.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch)
+ pOpenapiModelVersion = &openapiModelVersion
+ }
+ return pOpenapiModelVersion, nil
+}
+func (c *MLMDToOpenAPIConverterImpl) ConvertRegisteredModel(source *proto.Context) (*openapi.RegisteredModel, error) {
+ var pOpenapiRegisteredModel *openapi.RegisteredModel
+ if source != nil {
+ var openapiRegisteredModel openapi.RegisteredModel
+ mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties)
+ if err != nil {
+ return nil, err
+ }
+ openapiRegisteredModel.CustomProperties = &mapStringOpenapiMetadataValue
+ openapiRegisteredModel.Description = converter.MapDescription((*source).Properties)
+ var pString *string
+ if (*source).ExternalId != nil {
+ xstring := *(*source).ExternalId
+ pString = &xstring
+ }
+ openapiRegisteredModel.ExternalID = pString
+ var pString2 *string
+ if (*source).Name != nil {
+ xstring2 := *(*source).Name
+ pString2 = &xstring2
+ }
+ openapiRegisteredModel.Name = pString2
+ openapiRegisteredModel.Id = converter.Int64ToString((*source).Id)
+ openapiRegisteredModel.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
+ openapiRegisteredModel.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch)
+ openapiRegisteredModel.State = converter.MapRegisteredModelState((*source).Properties)
+ pOpenapiRegisteredModel = &openapiRegisteredModel
+ }
+ return pOpenapiRegisteredModel, nil
+}
+func (c *MLMDToOpenAPIConverterImpl) ConvertServeModel(source *proto.Execution) (*openapi.ServeModel, error) {
+ var pOpenapiServeModel *openapi.ServeModel
+ if source != nil {
+ var openapiServeModel openapi.ServeModel
+ openapiServeModel.LastKnownState = converter.MapMLMDServeModelLastKnownState((*source).LastKnownState)
+ mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties)
+ if err != nil {
+ return nil, err
+ }
+ openapiServeModel.CustomProperties = &mapStringOpenapiMetadataValue
+ openapiServeModel.Description = converter.MapDescription((*source).Properties)
+ var pString *string
+ if (*source).ExternalId != nil {
+ xstring := *(*source).ExternalId
+ pString = &xstring
+ }
+ openapiServeModel.ExternalID = pString
+ openapiServeModel.Name = converter.MapNameFromOwned((*source).Name)
+ openapiServeModel.Id = converter.Int64ToString((*source).Id)
+ openapiServeModel.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
+ openapiServeModel.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch)
+ openapiServeModel.ModelVersionId = converter.MapPropertyModelVersionIdAsValue((*source).Properties)
+ pOpenapiServeModel = &openapiServeModel
+ }
+ return pOpenapiServeModel, nil
+}
+func (c *MLMDToOpenAPIConverterImpl) ConvertServingEnvironment(source *proto.Context) (*openapi.ServingEnvironment, error) {
+ var pOpenapiServingEnvironment *openapi.ServingEnvironment
+ if source != nil {
+ var openapiServingEnvironment openapi.ServingEnvironment
+ mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties)
+ if err != nil {
+ return nil, err
+ }
+ openapiServingEnvironment.CustomProperties = &mapStringOpenapiMetadataValue
+ openapiServingEnvironment.Description = converter.MapDescription((*source).Properties)
+ var pString *string
+ if (*source).ExternalId != nil {
+ xstring := *(*source).ExternalId
+ pString = &xstring
+ }
+ openapiServingEnvironment.ExternalID = pString
+ openapiServingEnvironment.Name = converter.MapNameFromOwned((*source).Name)
+ openapiServingEnvironment.Id = converter.Int64ToString((*source).Id)
+ openapiServingEnvironment.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
+ openapiServingEnvironment.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch)
+ pOpenapiServingEnvironment = &openapiServingEnvironment
+ }
+ return pOpenapiServingEnvironment, nil
+}
diff --git a/internal/converter/generated/openapi_converter.gen.go b/internal/converter/generated/openapi_converter.gen.go
new file mode 100755
index 000000000..2603742b2
--- /dev/null
+++ b/internal/converter/generated/openapi_converter.gen.go
@@ -0,0 +1,786 @@
+// Code generated by github.com/jmattheis/goverter, DO NOT EDIT.
+
+package generated
+
+import (
+ converter "github.com/opendatahub-io/model-registry/internal/converter"
+ openapi "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+type OpenAPIConverterImpl struct{}
+
+func (c *OpenAPIConverterImpl) ConvertInferenceServiceCreate(source *openapi.InferenceServiceCreate) (*openapi.InferenceService, error) {
+ var pOpenapiInferenceService *openapi.InferenceService
+ if source != nil {
+ var openapiInferenceService openapi.InferenceService
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiInferenceService.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiInferenceService.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiInferenceService.ExternalID = pString2
+ var pString3 *string
+ if (*source).Name != nil {
+ xstring3 := *(*source).Name
+ pString3 = &xstring3
+ }
+ openapiInferenceService.Name = pString3
+ var pString4 *string
+ if (*source).ModelVersionId != nil {
+ xstring4 := *(*source).ModelVersionId
+ pString4 = &xstring4
+ }
+ openapiInferenceService.ModelVersionId = pString4
+ var pString5 *string
+ if (*source).Runtime != nil {
+ xstring5 := *(*source).Runtime
+ pString5 = &xstring5
+ }
+ openapiInferenceService.Runtime = pString5
+ var pOpenapiInferenceServiceState *openapi.InferenceServiceState
+ if (*source).DesiredState != nil {
+ openapiInferenceServiceState := openapi.InferenceServiceState(*(*source).DesiredState)
+ pOpenapiInferenceServiceState = &openapiInferenceServiceState
+ }
+ openapiInferenceService.DesiredState = pOpenapiInferenceServiceState
+ openapiInferenceService.RegisteredModelId = (*source).RegisteredModelId
+ openapiInferenceService.ServingEnvironmentId = (*source).ServingEnvironmentId
+ pOpenapiInferenceService = &openapiInferenceService
+ }
+ return pOpenapiInferenceService, nil
+}
+func (c *OpenAPIConverterImpl) ConvertInferenceServiceUpdate(source *openapi.InferenceServiceUpdate) (*openapi.InferenceService, error) {
+ var pOpenapiInferenceService *openapi.InferenceService
+ if source != nil {
+ var openapiInferenceService openapi.InferenceService
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiInferenceService.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiInferenceService.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiInferenceService.ExternalID = pString2
+ var pString3 *string
+ if (*source).ModelVersionId != nil {
+ xstring3 := *(*source).ModelVersionId
+ pString3 = &xstring3
+ }
+ openapiInferenceService.ModelVersionId = pString3
+ var pString4 *string
+ if (*source).Runtime != nil {
+ xstring4 := *(*source).Runtime
+ pString4 = &xstring4
+ }
+ openapiInferenceService.Runtime = pString4
+ var pOpenapiInferenceServiceState *openapi.InferenceServiceState
+ if (*source).DesiredState != nil {
+ openapiInferenceServiceState := openapi.InferenceServiceState(*(*source).DesiredState)
+ pOpenapiInferenceServiceState = &openapiInferenceServiceState
+ }
+ openapiInferenceService.DesiredState = pOpenapiInferenceServiceState
+ pOpenapiInferenceService = &openapiInferenceService
+ }
+ return pOpenapiInferenceService, nil
+}
+func (c *OpenAPIConverterImpl) ConvertModelArtifactCreate(source *openapi.ModelArtifactCreate) (*openapi.ModelArtifact, error) {
+ var pOpenapiModelArtifact *openapi.ModelArtifact
+ if source != nil {
+ var openapiModelArtifact openapi.ModelArtifact
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiModelArtifact.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiModelArtifact.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiModelArtifact.ExternalID = pString2
+ var pString3 *string
+ if (*source).Uri != nil {
+ xstring3 := *(*source).Uri
+ pString3 = &xstring3
+ }
+ openapiModelArtifact.Uri = pString3
+ var pOpenapiArtifactState *openapi.ArtifactState
+ if (*source).State != nil {
+ openapiArtifactState := openapi.ArtifactState(*(*source).State)
+ pOpenapiArtifactState = &openapiArtifactState
+ }
+ openapiModelArtifact.State = pOpenapiArtifactState
+ var pString4 *string
+ if (*source).Name != nil {
+ xstring4 := *(*source).Name
+ pString4 = &xstring4
+ }
+ openapiModelArtifact.Name = pString4
+ var pString5 *string
+ if (*source).ModelFormatName != nil {
+ xstring5 := *(*source).ModelFormatName
+ pString5 = &xstring5
+ }
+ openapiModelArtifact.ModelFormatName = pString5
+ var pString6 *string
+ if (*source).StorageKey != nil {
+ xstring6 := *(*source).StorageKey
+ pString6 = &xstring6
+ }
+ openapiModelArtifact.StorageKey = pString6
+ var pString7 *string
+ if (*source).StoragePath != nil {
+ xstring7 := *(*source).StoragePath
+ pString7 = &xstring7
+ }
+ openapiModelArtifact.StoragePath = pString7
+ var pString8 *string
+ if (*source).ModelFormatVersion != nil {
+ xstring8 := *(*source).ModelFormatVersion
+ pString8 = &xstring8
+ }
+ openapiModelArtifact.ModelFormatVersion = pString8
+ var pString9 *string
+ if (*source).ServiceAccountName != nil {
+ xstring9 := *(*source).ServiceAccountName
+ pString9 = &xstring9
+ }
+ openapiModelArtifact.ServiceAccountName = pString9
+ pOpenapiModelArtifact = &openapiModelArtifact
+ }
+ return pOpenapiModelArtifact, nil
+}
+func (c *OpenAPIConverterImpl) ConvertModelArtifactUpdate(source *openapi.ModelArtifactUpdate) (*openapi.ModelArtifact, error) {
+ var pOpenapiModelArtifact *openapi.ModelArtifact
+ if source != nil {
+ var openapiModelArtifact openapi.ModelArtifact
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiModelArtifact.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiModelArtifact.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiModelArtifact.ExternalID = pString2
+ var pString3 *string
+ if (*source).Uri != nil {
+ xstring3 := *(*source).Uri
+ pString3 = &xstring3
+ }
+ openapiModelArtifact.Uri = pString3
+ var pOpenapiArtifactState *openapi.ArtifactState
+ if (*source).State != nil {
+ openapiArtifactState := openapi.ArtifactState(*(*source).State)
+ pOpenapiArtifactState = &openapiArtifactState
+ }
+ openapiModelArtifact.State = pOpenapiArtifactState
+ var pString4 *string
+ if (*source).ModelFormatName != nil {
+ xstring4 := *(*source).ModelFormatName
+ pString4 = &xstring4
+ }
+ openapiModelArtifact.ModelFormatName = pString4
+ var pString5 *string
+ if (*source).StorageKey != nil {
+ xstring5 := *(*source).StorageKey
+ pString5 = &xstring5
+ }
+ openapiModelArtifact.StorageKey = pString5
+ var pString6 *string
+ if (*source).StoragePath != nil {
+ xstring6 := *(*source).StoragePath
+ pString6 = &xstring6
+ }
+ openapiModelArtifact.StoragePath = pString6
+ var pString7 *string
+ if (*source).ModelFormatVersion != nil {
+ xstring7 := *(*source).ModelFormatVersion
+ pString7 = &xstring7
+ }
+ openapiModelArtifact.ModelFormatVersion = pString7
+ var pString8 *string
+ if (*source).ServiceAccountName != nil {
+ xstring8 := *(*source).ServiceAccountName
+ pString8 = &xstring8
+ }
+ openapiModelArtifact.ServiceAccountName = pString8
+ pOpenapiModelArtifact = &openapiModelArtifact
+ }
+ return pOpenapiModelArtifact, nil
+}
+func (c *OpenAPIConverterImpl) ConvertModelVersionCreate(source *openapi.ModelVersionCreate) (*openapi.ModelVersion, error) {
+ var pOpenapiModelVersion *openapi.ModelVersion
+ if source != nil {
+ var openapiModelVersion openapi.ModelVersion
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiModelVersion.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiModelVersion.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiModelVersion.ExternalID = pString2
+ var pString3 *string
+ if (*source).Name != nil {
+ xstring3 := *(*source).Name
+ pString3 = &xstring3
+ }
+ openapiModelVersion.Name = pString3
+ var pOpenapiModelVersionState *openapi.ModelVersionState
+ if (*source).State != nil {
+ openapiModelVersionState := openapi.ModelVersionState(*(*source).State)
+ pOpenapiModelVersionState = &openapiModelVersionState
+ }
+ openapiModelVersion.State = pOpenapiModelVersionState
+ var pString4 *string
+ if (*source).Author != nil {
+ xstring4 := *(*source).Author
+ pString4 = &xstring4
+ }
+ openapiModelVersion.Author = pString4
+ pOpenapiModelVersion = &openapiModelVersion
+ }
+ return pOpenapiModelVersion, nil
+}
+func (c *OpenAPIConverterImpl) ConvertModelVersionUpdate(source *openapi.ModelVersionUpdate) (*openapi.ModelVersion, error) {
+ var pOpenapiModelVersion *openapi.ModelVersion
+ if source != nil {
+ var openapiModelVersion openapi.ModelVersion
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiModelVersion.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiModelVersion.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiModelVersion.ExternalID = pString2
+ var pOpenapiModelVersionState *openapi.ModelVersionState
+ if (*source).State != nil {
+ openapiModelVersionState := openapi.ModelVersionState(*(*source).State)
+ pOpenapiModelVersionState = &openapiModelVersionState
+ }
+ openapiModelVersion.State = pOpenapiModelVersionState
+ var pString3 *string
+ if (*source).Author != nil {
+ xstring3 := *(*source).Author
+ pString3 = &xstring3
+ }
+ openapiModelVersion.Author = pString3
+ pOpenapiModelVersion = &openapiModelVersion
+ }
+ return pOpenapiModelVersion, nil
+}
+func (c *OpenAPIConverterImpl) ConvertRegisteredModelCreate(source *openapi.RegisteredModelCreate) (*openapi.RegisteredModel, error) {
+ var pOpenapiRegisteredModel *openapi.RegisteredModel
+ if source != nil {
+ var openapiRegisteredModel openapi.RegisteredModel
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiRegisteredModel.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiRegisteredModel.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiRegisteredModel.ExternalID = pString2
+ var pString3 *string
+ if (*source).Name != nil {
+ xstring3 := *(*source).Name
+ pString3 = &xstring3
+ }
+ openapiRegisteredModel.Name = pString3
+ var pOpenapiRegisteredModelState *openapi.RegisteredModelState
+ if (*source).State != nil {
+ openapiRegisteredModelState := openapi.RegisteredModelState(*(*source).State)
+ pOpenapiRegisteredModelState = &openapiRegisteredModelState
+ }
+ openapiRegisteredModel.State = pOpenapiRegisteredModelState
+ pOpenapiRegisteredModel = &openapiRegisteredModel
+ }
+ return pOpenapiRegisteredModel, nil
+}
+func (c *OpenAPIConverterImpl) ConvertRegisteredModelUpdate(source *openapi.RegisteredModelUpdate) (*openapi.RegisteredModel, error) {
+ var pOpenapiRegisteredModel *openapi.RegisteredModel
+ if source != nil {
+ var openapiRegisteredModel openapi.RegisteredModel
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiRegisteredModel.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiRegisteredModel.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiRegisteredModel.ExternalID = pString2
+ var pOpenapiRegisteredModelState *openapi.RegisteredModelState
+ if (*source).State != nil {
+ openapiRegisteredModelState := openapi.RegisteredModelState(*(*source).State)
+ pOpenapiRegisteredModelState = &openapiRegisteredModelState
+ }
+ openapiRegisteredModel.State = pOpenapiRegisteredModelState
+ pOpenapiRegisteredModel = &openapiRegisteredModel
+ }
+ return pOpenapiRegisteredModel, nil
+}
+func (c *OpenAPIConverterImpl) ConvertServeModelCreate(source *openapi.ServeModelCreate) (*openapi.ServeModel, error) {
+ var pOpenapiServeModel *openapi.ServeModel
+ if source != nil {
+ var openapiServeModel openapi.ServeModel
+ var pOpenapiExecutionState *openapi.ExecutionState
+ if (*source).LastKnownState != nil {
+ openapiExecutionState := openapi.ExecutionState(*(*source).LastKnownState)
+ pOpenapiExecutionState = &openapiExecutionState
+ }
+ openapiServeModel.LastKnownState = pOpenapiExecutionState
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiServeModel.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiServeModel.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiServeModel.ExternalID = pString2
+ var pString3 *string
+ if (*source).Name != nil {
+ xstring3 := *(*source).Name
+ pString3 = &xstring3
+ }
+ openapiServeModel.Name = pString3
+ openapiServeModel.ModelVersionId = (*source).ModelVersionId
+ pOpenapiServeModel = &openapiServeModel
+ }
+ return pOpenapiServeModel, nil
+}
+func (c *OpenAPIConverterImpl) ConvertServeModelUpdate(source *openapi.ServeModelUpdate) (*openapi.ServeModel, error) {
+ var pOpenapiServeModel *openapi.ServeModel
+ if source != nil {
+ var openapiServeModel openapi.ServeModel
+ var pOpenapiExecutionState *openapi.ExecutionState
+ if (*source).LastKnownState != nil {
+ openapiExecutionState := openapi.ExecutionState(*(*source).LastKnownState)
+ pOpenapiExecutionState = &openapiExecutionState
+ }
+ openapiServeModel.LastKnownState = pOpenapiExecutionState
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiServeModel.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiServeModel.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiServeModel.ExternalID = pString2
+ pOpenapiServeModel = &openapiServeModel
+ }
+ return pOpenapiServeModel, nil
+}
+func (c *OpenAPIConverterImpl) ConvertServingEnvironmentCreate(source *openapi.ServingEnvironmentCreate) (*openapi.ServingEnvironment, error) {
+ var pOpenapiServingEnvironment *openapi.ServingEnvironment
+ if source != nil {
+ var openapiServingEnvironment openapi.ServingEnvironment
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiServingEnvironment.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiServingEnvironment.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiServingEnvironment.ExternalID = pString2
+ var pString3 *string
+ if (*source).Name != nil {
+ xstring3 := *(*source).Name
+ pString3 = &xstring3
+ }
+ openapiServingEnvironment.Name = pString3
+ pOpenapiServingEnvironment = &openapiServingEnvironment
+ }
+ return pOpenapiServingEnvironment, nil
+}
+func (c *OpenAPIConverterImpl) ConvertServingEnvironmentUpdate(source *openapi.ServingEnvironmentUpdate) (*openapi.ServingEnvironment, error) {
+ var pOpenapiServingEnvironment *openapi.ServingEnvironment
+ if source != nil {
+ var openapiServingEnvironment openapi.ServingEnvironment
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).CustomProperties != nil {
+ mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties)))
+ for key, value := range *(*source).CustomProperties {
+ mapStringOpenapiMetadataValue[key] = c.openapiMetadataValueToOpenapiMetadataValue(value)
+ }
+ pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue
+ }
+ openapiServingEnvironment.CustomProperties = pMapStringOpenapiMetadataValue
+ var pString *string
+ if (*source).Description != nil {
+ xstring := *(*source).Description
+ pString = &xstring
+ }
+ openapiServingEnvironment.Description = pString
+ var pString2 *string
+ if (*source).ExternalID != nil {
+ xstring2 := *(*source).ExternalID
+ pString2 = &xstring2
+ }
+ openapiServingEnvironment.ExternalID = pString2
+ pOpenapiServingEnvironment = &openapiServingEnvironment
+ }
+ return pOpenapiServingEnvironment, nil
+}
+func (c *OpenAPIConverterImpl) OverrideNotEditableForInferenceService(source converter.OpenapiUpdateWrapper[openapi.InferenceService]) (openapi.InferenceService, error) {
+ openapiInferenceService := converter.InitInferenceServiceWithUpdate(source)
+ var pString *string
+ if source.Existing != nil {
+ pString = source.Existing.Name
+ }
+ var pString2 *string
+ if pString != nil {
+ xstring := *pString
+ pString2 = &xstring
+ }
+ openapiInferenceService.Name = pString2
+ var pString3 *string
+ if source.Existing != nil {
+ pString3 = &source.Existing.RegisteredModelId
+ }
+ var xstring2 string
+ if pString3 != nil {
+ xstring2 = *pString3
+ }
+ openapiInferenceService.RegisteredModelId = xstring2
+ var pString4 *string
+ if source.Existing != nil {
+ pString4 = &source.Existing.ServingEnvironmentId
+ }
+ var xstring3 string
+ if pString4 != nil {
+ xstring3 = *pString4
+ }
+ openapiInferenceService.ServingEnvironmentId = xstring3
+ return openapiInferenceService, nil
+}
+func (c *OpenAPIConverterImpl) OverrideNotEditableForModelArtifact(source converter.OpenapiUpdateWrapper[openapi.ModelArtifact]) (openapi.ModelArtifact, error) {
+ openapiModelArtifact := converter.InitModelArtifactWithUpdate(source)
+ var pString *string
+ if source.Existing != nil {
+ pString = source.Existing.Name
+ }
+ var pString2 *string
+ if pString != nil {
+ xstring := *pString
+ pString2 = &xstring
+ }
+ openapiModelArtifact.Name = pString2
+ var pString3 *string
+ if source.Existing != nil {
+ pString3 = &source.Existing.ArtifactType
+ }
+ var xstring2 string
+ if pString3 != nil {
+ xstring2 = *pString3
+ }
+ openapiModelArtifact.ArtifactType = xstring2
+ return openapiModelArtifact, nil
+}
+func (c *OpenAPIConverterImpl) OverrideNotEditableForModelVersion(source converter.OpenapiUpdateWrapper[openapi.ModelVersion]) (openapi.ModelVersion, error) {
+ openapiModelVersion := converter.InitModelVersionWithUpdate(source)
+ var pString *string
+ if source.Existing != nil {
+ pString = source.Existing.Name
+ }
+ var pString2 *string
+ if pString != nil {
+ xstring := *pString
+ pString2 = &xstring
+ }
+ openapiModelVersion.Name = pString2
+ return openapiModelVersion, nil
+}
+func (c *OpenAPIConverterImpl) OverrideNotEditableForRegisteredModel(source converter.OpenapiUpdateWrapper[openapi.RegisteredModel]) (openapi.RegisteredModel, error) {
+ openapiRegisteredModel := converter.InitRegisteredModelWithUpdate(source)
+ var pString *string
+ if source.Existing != nil {
+ pString = source.Existing.Name
+ }
+ var pString2 *string
+ if pString != nil {
+ xstring := *pString
+ pString2 = &xstring
+ }
+ openapiRegisteredModel.Name = pString2
+ return openapiRegisteredModel, nil
+}
+func (c *OpenAPIConverterImpl) OverrideNotEditableForServeModel(source converter.OpenapiUpdateWrapper[openapi.ServeModel]) (openapi.ServeModel, error) {
+ openapiServeModel := converter.InitServeModelWithUpdate(source)
+ var pString *string
+ if source.Existing != nil {
+ pString = source.Existing.Name
+ }
+ var pString2 *string
+ if pString != nil {
+ xstring := *pString
+ pString2 = &xstring
+ }
+ openapiServeModel.Name = pString2
+ var pString3 *string
+ if source.Existing != nil {
+ pString3 = &source.Existing.ModelVersionId
+ }
+ var xstring2 string
+ if pString3 != nil {
+ xstring2 = *pString3
+ }
+ openapiServeModel.ModelVersionId = xstring2
+ return openapiServeModel, nil
+}
+func (c *OpenAPIConverterImpl) OverrideNotEditableForServingEnvironment(source converter.OpenapiUpdateWrapper[openapi.ServingEnvironment]) (openapi.ServingEnvironment, error) {
+ openapiServingEnvironment := converter.InitServingEnvironmentWithUpdate(source)
+ var pString *string
+ if source.Existing != nil {
+ pString = source.Existing.Name
+ }
+ var pString2 *string
+ if pString != nil {
+ xstring := *pString
+ pString2 = &xstring
+ }
+ openapiServingEnvironment.Name = pString2
+ return openapiServingEnvironment, nil
+}
+func (c *OpenAPIConverterImpl) openapiMetadataValueToOpenapiMetadataValue(source openapi.MetadataValue) openapi.MetadataValue {
+ var openapiMetadataValue openapi.MetadataValue
+ openapiMetadataValue.MetadataBoolValue = c.pOpenapiMetadataBoolValueToPOpenapiMetadataBoolValue(source.MetadataBoolValue)
+ openapiMetadataValue.MetadataDoubleValue = c.pOpenapiMetadataDoubleValueToPOpenapiMetadataDoubleValue(source.MetadataDoubleValue)
+ openapiMetadataValue.MetadataIntValue = c.pOpenapiMetadataIntValueToPOpenapiMetadataIntValue(source.MetadataIntValue)
+ openapiMetadataValue.MetadataProtoValue = c.pOpenapiMetadataProtoValueToPOpenapiMetadataProtoValue(source.MetadataProtoValue)
+ openapiMetadataValue.MetadataStringValue = c.pOpenapiMetadataStringValueToPOpenapiMetadataStringValue(source.MetadataStringValue)
+ openapiMetadataValue.MetadataStructValue = c.pOpenapiMetadataStructValueToPOpenapiMetadataStructValue(source.MetadataStructValue)
+ return openapiMetadataValue
+}
+func (c *OpenAPIConverterImpl) pOpenapiMetadataBoolValueToPOpenapiMetadataBoolValue(source *openapi.MetadataBoolValue) *openapi.MetadataBoolValue {
+ var pOpenapiMetadataBoolValue *openapi.MetadataBoolValue
+ if source != nil {
+ var openapiMetadataBoolValue openapi.MetadataBoolValue
+ var pBool *bool
+ if (*source).BoolValue != nil {
+ xbool := *(*source).BoolValue
+ pBool = &xbool
+ }
+ openapiMetadataBoolValue.BoolValue = pBool
+ pOpenapiMetadataBoolValue = &openapiMetadataBoolValue
+ }
+ return pOpenapiMetadataBoolValue
+}
+func (c *OpenAPIConverterImpl) pOpenapiMetadataDoubleValueToPOpenapiMetadataDoubleValue(source *openapi.MetadataDoubleValue) *openapi.MetadataDoubleValue {
+ var pOpenapiMetadataDoubleValue *openapi.MetadataDoubleValue
+ if source != nil {
+ var openapiMetadataDoubleValue openapi.MetadataDoubleValue
+ var pFloat64 *float64
+ if (*source).DoubleValue != nil {
+ xfloat64 := *(*source).DoubleValue
+ pFloat64 = &xfloat64
+ }
+ openapiMetadataDoubleValue.DoubleValue = pFloat64
+ pOpenapiMetadataDoubleValue = &openapiMetadataDoubleValue
+ }
+ return pOpenapiMetadataDoubleValue
+}
+func (c *OpenAPIConverterImpl) pOpenapiMetadataIntValueToPOpenapiMetadataIntValue(source *openapi.MetadataIntValue) *openapi.MetadataIntValue {
+ var pOpenapiMetadataIntValue *openapi.MetadataIntValue
+ if source != nil {
+ var openapiMetadataIntValue openapi.MetadataIntValue
+ var pString *string
+ if (*source).IntValue != nil {
+ xstring := *(*source).IntValue
+ pString = &xstring
+ }
+ openapiMetadataIntValue.IntValue = pString
+ pOpenapiMetadataIntValue = &openapiMetadataIntValue
+ }
+ return pOpenapiMetadataIntValue
+}
+func (c *OpenAPIConverterImpl) pOpenapiMetadataProtoValueToPOpenapiMetadataProtoValue(source *openapi.MetadataProtoValue) *openapi.MetadataProtoValue {
+ var pOpenapiMetadataProtoValue *openapi.MetadataProtoValue
+ if source != nil {
+ var openapiMetadataProtoValue openapi.MetadataProtoValue
+ var pString *string
+ if (*source).Type != nil {
+ xstring := *(*source).Type
+ pString = &xstring
+ }
+ openapiMetadataProtoValue.Type = pString
+ var pString2 *string
+ if (*source).ProtoValue != nil {
+ xstring2 := *(*source).ProtoValue
+ pString2 = &xstring2
+ }
+ openapiMetadataProtoValue.ProtoValue = pString2
+ pOpenapiMetadataProtoValue = &openapiMetadataProtoValue
+ }
+ return pOpenapiMetadataProtoValue
+}
+func (c *OpenAPIConverterImpl) pOpenapiMetadataStringValueToPOpenapiMetadataStringValue(source *openapi.MetadataStringValue) *openapi.MetadataStringValue {
+ var pOpenapiMetadataStringValue *openapi.MetadataStringValue
+ if source != nil {
+ var openapiMetadataStringValue openapi.MetadataStringValue
+ var pString *string
+ if (*source).StringValue != nil {
+ xstring := *(*source).StringValue
+ pString = &xstring
+ }
+ openapiMetadataStringValue.StringValue = pString
+ pOpenapiMetadataStringValue = &openapiMetadataStringValue
+ }
+ return pOpenapiMetadataStringValue
+}
+func (c *OpenAPIConverterImpl) pOpenapiMetadataStructValueToPOpenapiMetadataStructValue(source *openapi.MetadataStructValue) *openapi.MetadataStructValue {
+ var pOpenapiMetadataStructValue *openapi.MetadataStructValue
+ if source != nil {
+ var openapiMetadataStructValue openapi.MetadataStructValue
+ var pString *string
+ if (*source).StructValue != nil {
+ xstring := *(*source).StructValue
+ pString = &xstring
+ }
+ openapiMetadataStructValue.StructValue = pString
+ pOpenapiMetadataStructValue = &openapiMetadataStructValue
+ }
+ return pOpenapiMetadataStructValue
+}
diff --git a/internal/converter/generated/openapi_mlmd_converter.gen.go b/internal/converter/generated/openapi_mlmd_converter.gen.go
new file mode 100755
index 000000000..f7cd116e3
--- /dev/null
+++ b/internal/converter/generated/openapi_mlmd_converter.gen.go
@@ -0,0 +1,329 @@
+// Code generated by github.com/jmattheis/goverter, DO NOT EDIT.
+
+package generated
+
+import (
+ "fmt"
+ converter "github.com/opendatahub-io/model-registry/internal/converter"
+ proto "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ openapi "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+type OpenAPIToMLMDConverterImpl struct{}
+
+func (c *OpenAPIToMLMDConverterImpl) ConvertInferenceService(source *converter.OpenAPIModelWrapper[openapi.InferenceService]) (*proto.Context, error) {
+ var pProtoContext *proto.Context
+ if source != nil {
+ var protoContext proto.Context
+ var pString *string
+ if (*source).Model != nil {
+ pString = (*source).Model.Id
+ }
+ pInt64, err := converter.StringToInt64(pString)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Id: %w", err)
+ }
+ protoContext.Id = pInt64
+ protoContext.Name = converter.MapInferenceServiceName(source)
+ pInt642 := (*source).TypeId
+ protoContext.TypeId = &pInt642
+ protoContext.Type = converter.MapInferenceServiceType((*source).Model)
+ var pString2 *string
+ if (*source).Model != nil {
+ pString2 = (*source).Model.ExternalID
+ }
+ var pString3 *string
+ if pString2 != nil {
+ xstring := *pString2
+ pString3 = &xstring
+ }
+ protoContext.ExternalId = pString3
+ mapStringPProtoValue, err := converter.MapInferenceServiceProperties((*source).Model)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Properties: %w", err)
+ }
+ protoContext.Properties = mapStringPProtoValue
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).Model != nil {
+ pMapStringOpenapiMetadataValue = (*source).Model.CustomProperties
+ }
+ mapStringPProtoValue2, err := converter.MapOpenAPICustomProperties(pMapStringOpenapiMetadataValue)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field CustomProperties: %w", err)
+ }
+ protoContext.CustomProperties = mapStringPProtoValue2
+ pProtoContext = &protoContext
+ }
+ return pProtoContext, nil
+}
+func (c *OpenAPIToMLMDConverterImpl) ConvertModelArtifact(source *converter.OpenAPIModelWrapper[openapi.ModelArtifact]) (*proto.Artifact, error) {
+ var pProtoArtifact *proto.Artifact
+ if source != nil {
+ var protoArtifact proto.Artifact
+ var pString *string
+ if (*source).Model != nil {
+ pString = (*source).Model.Id
+ }
+ pInt64, err := converter.StringToInt64(pString)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Id: %w", err)
+ }
+ protoArtifact.Id = pInt64
+ protoArtifact.Name = converter.MapModelArtifactName(source)
+ pInt642 := (*source).TypeId
+ protoArtifact.TypeId = &pInt642
+ protoArtifact.Type = converter.MapModelArtifactType((*source).Model)
+ var pString2 *string
+ if (*source).Model != nil {
+ pString2 = (*source).Model.Uri
+ }
+ var pString3 *string
+ if pString2 != nil {
+ xstring := *pString2
+ pString3 = &xstring
+ }
+ protoArtifact.Uri = pString3
+ var pString4 *string
+ if (*source).Model != nil {
+ pString4 = (*source).Model.ExternalID
+ }
+ var pString5 *string
+ if pString4 != nil {
+ xstring2 := *pString4
+ pString5 = &xstring2
+ }
+ protoArtifact.ExternalId = pString5
+ mapStringPProtoValue, err := converter.MapModelArtifactProperties((*source).Model)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Properties: %w", err)
+ }
+ protoArtifact.Properties = mapStringPProtoValue
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).Model != nil {
+ pMapStringOpenapiMetadataValue = (*source).Model.CustomProperties
+ }
+ mapStringPProtoValue2, err := converter.MapOpenAPICustomProperties(pMapStringOpenapiMetadataValue)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field CustomProperties: %w", err)
+ }
+ protoArtifact.CustomProperties = mapStringPProtoValue2
+ var pOpenapiArtifactState *openapi.ArtifactState
+ if (*source).Model != nil {
+ pOpenapiArtifactState = (*source).Model.State
+ }
+ pProtoArtifact_State, err := converter.MapOpenAPIModelArtifactState(pOpenapiArtifactState)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field State: %w", err)
+ }
+ protoArtifact.State = pProtoArtifact_State
+ pProtoArtifact = &protoArtifact
+ }
+ return pProtoArtifact, nil
+}
+func (c *OpenAPIToMLMDConverterImpl) ConvertModelVersion(source *converter.OpenAPIModelWrapper[openapi.ModelVersion]) (*proto.Context, error) {
+ var pProtoContext *proto.Context
+ if source != nil {
+ var protoContext proto.Context
+ var pString *string
+ if (*source).Model != nil {
+ pString = (*source).Model.Id
+ }
+ pInt64, err := converter.StringToInt64(pString)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Id: %w", err)
+ }
+ protoContext.Id = pInt64
+ protoContext.Name = converter.MapModelVersionName(source)
+ pInt642 := (*source).TypeId
+ protoContext.TypeId = &pInt642
+ protoContext.Type = converter.MapModelVersionType((*source).Model)
+ var pString2 *string
+ if (*source).Model != nil {
+ pString2 = (*source).Model.ExternalID
+ }
+ var pString3 *string
+ if pString2 != nil {
+ xstring := *pString2
+ pString3 = &xstring
+ }
+ protoContext.ExternalId = pString3
+ mapStringPProtoValue, err := converter.MapModelVersionProperties(source)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Properties: %w", err)
+ }
+ protoContext.Properties = mapStringPProtoValue
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).Model != nil {
+ pMapStringOpenapiMetadataValue = (*source).Model.CustomProperties
+ }
+ mapStringPProtoValue2, err := converter.MapOpenAPICustomProperties(pMapStringOpenapiMetadataValue)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field CustomProperties: %w", err)
+ }
+ protoContext.CustomProperties = mapStringPProtoValue2
+ pProtoContext = &protoContext
+ }
+ return pProtoContext, nil
+}
+func (c *OpenAPIToMLMDConverterImpl) ConvertRegisteredModel(source *converter.OpenAPIModelWrapper[openapi.RegisteredModel]) (*proto.Context, error) {
+ var pProtoContext *proto.Context
+ if source != nil {
+ var protoContext proto.Context
+ var pString *string
+ if (*source).Model != nil {
+ pString = (*source).Model.Id
+ }
+ pInt64, err := converter.StringToInt64(pString)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Id: %w", err)
+ }
+ protoContext.Id = pInt64
+ var pString2 *string
+ if (*source).Model != nil {
+ pString2 = (*source).Model.Name
+ }
+ var pString3 *string
+ if pString2 != nil {
+ xstring := *pString2
+ pString3 = &xstring
+ }
+ protoContext.Name = pString3
+ pInt642 := (*source).TypeId
+ protoContext.TypeId = &pInt642
+ protoContext.Type = converter.MapRegisteredModelType((*source).Model)
+ var pString4 *string
+ if (*source).Model != nil {
+ pString4 = (*source).Model.ExternalID
+ }
+ var pString5 *string
+ if pString4 != nil {
+ xstring2 := *pString4
+ pString5 = &xstring2
+ }
+ protoContext.ExternalId = pString5
+ mapStringPProtoValue, err := converter.MapRegisteredModelProperties((*source).Model)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Properties: %w", err)
+ }
+ protoContext.Properties = mapStringPProtoValue
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).Model != nil {
+ pMapStringOpenapiMetadataValue = (*source).Model.CustomProperties
+ }
+ mapStringPProtoValue2, err := converter.MapOpenAPICustomProperties(pMapStringOpenapiMetadataValue)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field CustomProperties: %w", err)
+ }
+ protoContext.CustomProperties = mapStringPProtoValue2
+ pProtoContext = &protoContext
+ }
+ return pProtoContext, nil
+}
+func (c *OpenAPIToMLMDConverterImpl) ConvertServeModel(source *converter.OpenAPIModelWrapper[openapi.ServeModel]) (*proto.Execution, error) {
+ var pProtoExecution *proto.Execution
+ if source != nil {
+ var protoExecution proto.Execution
+ var pString *string
+ if (*source).Model != nil {
+ pString = (*source).Model.Id
+ }
+ pInt64, err := converter.StringToInt64(pString)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Id: %w", err)
+ }
+ protoExecution.Id = pInt64
+ protoExecution.Name = converter.MapServeModelName(source)
+ pInt642 := (*source).TypeId
+ protoExecution.TypeId = &pInt642
+ protoExecution.Type = converter.MapServeModelType((*source).Model)
+ var pString2 *string
+ if (*source).Model != nil {
+ pString2 = (*source).Model.ExternalID
+ }
+ var pString3 *string
+ if pString2 != nil {
+ xstring := *pString2
+ pString3 = &xstring
+ }
+ protoExecution.ExternalId = pString3
+ var pOpenapiExecutionState *openapi.ExecutionState
+ if (*source).Model != nil {
+ pOpenapiExecutionState = (*source).Model.LastKnownState
+ }
+ pProtoExecution_State, err := converter.MapLastKnownState(pOpenapiExecutionState)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field LastKnownState: %w", err)
+ }
+ protoExecution.LastKnownState = pProtoExecution_State
+ mapStringPProtoValue, err := converter.MapServeModelProperties((*source).Model)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Properties: %w", err)
+ }
+ protoExecution.Properties = mapStringPProtoValue
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).Model != nil {
+ pMapStringOpenapiMetadataValue = (*source).Model.CustomProperties
+ }
+ mapStringPProtoValue2, err := converter.MapOpenAPICustomProperties(pMapStringOpenapiMetadataValue)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field CustomProperties: %w", err)
+ }
+ protoExecution.CustomProperties = mapStringPProtoValue2
+ pProtoExecution = &protoExecution
+ }
+ return pProtoExecution, nil
+}
+func (c *OpenAPIToMLMDConverterImpl) ConvertServingEnvironment(source *converter.OpenAPIModelWrapper[openapi.ServingEnvironment]) (*proto.Context, error) {
+ var pProtoContext *proto.Context
+ if source != nil {
+ var protoContext proto.Context
+ var pString *string
+ if (*source).Model != nil {
+ pString = (*source).Model.Id
+ }
+ pInt64, err := converter.StringToInt64(pString)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Id: %w", err)
+ }
+ protoContext.Id = pInt64
+ var pString2 *string
+ if (*source).Model != nil {
+ pString2 = (*source).Model.Name
+ }
+ var pString3 *string
+ if pString2 != nil {
+ xstring := *pString2
+ pString3 = &xstring
+ }
+ protoContext.Name = pString3
+ pInt642 := (*source).TypeId
+ protoContext.TypeId = &pInt642
+ protoContext.Type = converter.MapServingEnvironmentType((*source).Model)
+ var pString4 *string
+ if (*source).Model != nil {
+ pString4 = (*source).Model.ExternalID
+ }
+ var pString5 *string
+ if pString4 != nil {
+ xstring2 := *pString4
+ pString5 = &xstring2
+ }
+ protoContext.ExternalId = pString5
+ mapStringPProtoValue, err := converter.MapServingEnvironmentProperties((*source).Model)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field Properties: %w", err)
+ }
+ protoContext.Properties = mapStringPProtoValue
+ var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
+ if (*source).Model != nil {
+ pMapStringOpenapiMetadataValue = (*source).Model.CustomProperties
+ }
+ mapStringPProtoValue2, err := converter.MapOpenAPICustomProperties(pMapStringOpenapiMetadataValue)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field CustomProperties: %w", err)
+ }
+ protoContext.CustomProperties = mapStringPProtoValue2
+ pProtoContext = &protoContext
+ }
+ return pProtoContext, nil
+}
diff --git a/internal/converter/mlmd_converter_util_test.go b/internal/converter/mlmd_converter_util_test.go
new file mode 100644
index 000000000..d2f063c07
--- /dev/null
+++ b/internal/converter/mlmd_converter_util_test.go
@@ -0,0 +1,787 @@
+package converter
+
+import (
+ "encoding/base64"
+ "encoding/json"
+ "strings"
+ "testing"
+
+ "github.com/opendatahub-io/model-registry/internal/constants"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+ "github.com/stretchr/testify/assert"
+ "golang.org/x/exp/maps"
+)
+
+func setup(t *testing.T) *assert.Assertions {
+ return assert.New(t)
+}
+
+func TestStringToInt64(t *testing.T) {
+ assertion := setup(t)
+
+ valid := "12345"
+ converted, err := StringToInt64(&valid)
+ assertion.Nil(err)
+ assertion.Equal(int64(12345), *converted)
+ assertion.Nil(StringToInt64(nil))
+}
+
+func TestStringToInt64InvalidNumber(t *testing.T) {
+ assertion := setup(t)
+
+ invalid := "not-a-number"
+ converted, err := StringToInt64(&invalid)
+ assertion.NotNil(err)
+ assertion.Nil(converted)
+}
+
+func TestInt64ToString(t *testing.T) {
+ assertion := setup(t)
+
+ valid := int64(54321)
+ converted := Int64ToString(&valid)
+ assertion.Equal("54321", *converted)
+ assertion.Nil(Int64ToString(nil))
+}
+
+func TestStringToInt32(t *testing.T) {
+ assertion := setup(t)
+
+ valid := "12345"
+ converted, err := StringToInt32(valid)
+ assertion.Nil(err)
+ assertion.Equal(int32(12345), converted)
+}
+
+func TestStringToInt32InvalidNumber(t *testing.T) {
+ assertion := setup(t)
+
+ invalid := "not-a-number"
+ _, err := StringToInt32(invalid)
+ assertion.NotNil(err)
+}
+
+func TestMetadataValueBool(t *testing.T) {
+ data := make(map[string]openapi.MetadataValue)
+ key := "my bool"
+ mdValue := true
+ data[key] = openapi.MetadataBoolValueAsMetadataValue(&openapi.MetadataBoolValue{BoolValue: &mdValue})
+
+ roundTripAndAssert(t, data, key)
+}
+
+func TestMetadataValueInt(t *testing.T) {
+ data := make(map[string]openapi.MetadataValue)
+ key := "my int"
+ mdValue := "987"
+ data[key] = openapi.MetadataIntValueAsMetadataValue(&openapi.MetadataIntValue{IntValue: &mdValue})
+
+ roundTripAndAssert(t, data, key)
+}
+
+func TestMetadataValueIntFailure(t *testing.T) {
+ data := make(map[string]openapi.MetadataValue)
+ key := "my int"
+ mdValue := "not a number"
+ data[key] = openapi.MetadataIntValueAsMetadataValue(&openapi.MetadataIntValue{IntValue: &mdValue})
+
+ assertion := setup(t)
+ asGRPC, err := MapOpenAPICustomProperties(&data)
+ if err == nil {
+ assertion.Fail("Did not expected a converted value but an error: %v", asGRPC)
+ }
+}
+
+func TestMetadataValueDouble(t *testing.T) {
+ data := make(map[string]openapi.MetadataValue)
+ key := "my double"
+ mdValue := 3.1415
+ data[key] = openapi.MetadataDoubleValueAsMetadataValue(&openapi.MetadataDoubleValue{DoubleValue: &mdValue})
+
+ roundTripAndAssert(t, data, key)
+}
+
+func TestMetadataValueString(t *testing.T) {
+ data := make(map[string]openapi.MetadataValue)
+ key := "my string"
+ mdValue := "Hello, World!"
+ data[key] = openapi.MetadataStringValueAsMetadataValue(&openapi.MetadataStringValue{StringValue: &mdValue})
+
+ roundTripAndAssert(t, data, key)
+}
+
+func TestMetadataValueStruct(t *testing.T) {
+ data := make(map[string]openapi.MetadataValue)
+ key := "my struct"
+
+ myMap := make(map[string]interface{})
+ myMap["name"] = "John Doe"
+ myMap["age"] = 47
+ asJSON, err := json.Marshal(myMap)
+ if err != nil {
+ t.Error(err)
+ }
+ b64 := base64.StdEncoding.EncodeToString(asJSON)
+ data[key] = openapi.MetadataStructValueAsMetadataValue(&openapi.MetadataStructValue{StructValue: &b64})
+
+ roundTripAndAssert(t, data, key)
+}
+
+func TestMetadataValueProtoUnsupported(t *testing.T) {
+ data := make(map[string]openapi.MetadataValue)
+ key := "my proto"
+
+ myMap := make(map[string]interface{})
+ myMap["name"] = "John Doe"
+ myMap["age"] = 47
+ asJSON, err := json.Marshal(myMap)
+ if err != nil {
+ t.Error(err)
+ }
+ b64 := base64.StdEncoding.EncodeToString(asJSON)
+ typeDef := "map[string]openapi.MetadataValue"
+ data[key] = openapi.MetadataProtoValueAsMetadataValue(&openapi.MetadataProtoValue{
+ Type: &typeDef,
+ ProtoValue: &b64,
+ })
+
+ assertion := setup(t)
+ asGRPC, err := MapOpenAPICustomProperties(&data)
+ if err == nil {
+ assertion.Fail("Did not expected a converted value but an error: %v", asGRPC)
+ }
+}
+
+func roundTripAndAssert(t *testing.T, data map[string]openapi.MetadataValue, key string) {
+ assertion := setup(t)
+
+ // first half
+ asGRPC, err := MapOpenAPICustomProperties(&data)
+ if err != nil {
+ t.Error(err)
+ }
+ assertion.Contains(maps.Keys(asGRPC), key)
+
+ // second half
+ unmarshall, err := MapMLMDCustomProperties(asGRPC)
+ if err != nil {
+ t.Error(err)
+ }
+ assertion.Equal(data, unmarshall, "result of round-trip shall be equal to original data")
+}
+
+func TestPrefixWhenOwned(t *testing.T) {
+ assertion := setup(t)
+
+ owner := "owner"
+ entity := "name"
+ assertion.Equal("owner:name", PrefixWhenOwned(&owner, entity))
+}
+
+func TestPrefixWhenOwnedWithoutOwner(t *testing.T) {
+ assertion := setup(t)
+
+ entity := "name"
+ prefixed := PrefixWhenOwned(nil, entity)
+ assertion.Equal(2, len(strings.Split(prefixed, ":")))
+ assertion.Equal("name", strings.Split(prefixed, ":")[1])
+}
+
+func TestMapRegisteredModelProperties(t *testing.T) {
+ assertion := setup(t)
+
+ props, err := MapRegisteredModelProperties(&openapi.RegisteredModel{
+ Description: of("super description"),
+ })
+ assertion.Nil(err)
+ assertion.Equal(1, len(props))
+ assertion.Equal("super description", props["description"].GetStringValue())
+
+ props, err = MapRegisteredModelProperties(&openapi.RegisteredModel{})
+ assertion.Nil(err)
+ assertion.Equal(0, len(props))
+}
+
+func TestMapRegisteredModelType(t *testing.T) {
+ assertion := setup(t)
+
+ typeName := MapRegisteredModelType(&openapi.RegisteredModel{})
+ assertion.NotNil(typeName)
+ assertion.Equal(constants.RegisteredModelTypeName, *typeName)
+}
+
+func TestMapModelVersionProperties(t *testing.T) {
+ assertion := setup(t)
+
+ props, err := MapModelVersionProperties(&OpenAPIModelWrapper[openapi.ModelVersion]{
+ TypeId: 123,
+ ParentResourceId: of("123"),
+ ModelName: of("MyModel"),
+ Model: &openapi.ModelVersion{
+ Name: of("v1"),
+ Description: of("my model version description"),
+ Author: of("John Doe"),
+ },
+ })
+ assertion.Nil(err)
+ assertion.Equal(4, len(props))
+ assertion.Equal("my model version description", props["description"].GetStringValue())
+ assertion.Equal("v1", props["version"].GetStringValue())
+ assertion.Equal("John Doe", props["author"].GetStringValue())
+}
+
+func TestMapModelVersionType(t *testing.T) {
+ assertion := setup(t)
+
+ typeName := MapModelVersionType(&openapi.ModelVersion{})
+ assertion.NotNil(typeName)
+ assertion.Equal(constants.ModelVersionTypeName, *typeName)
+}
+
+func TestMapModelVersionName(t *testing.T) {
+ assertion := setup(t)
+
+ name := MapModelVersionName(&OpenAPIModelWrapper[openapi.ModelVersion]{
+ TypeId: 123,
+ ParentResourceId: of("123"),
+ ModelName: of("MyModel"),
+ Model: &openapi.ModelVersion{
+ Name: of("v1"),
+ },
+ })
+ assertion.NotNil(name)
+ assertion.Equal("123:v1", *name)
+}
+
+func TestMapModelArtifactProperties(t *testing.T) {
+ assertion := setup(t)
+
+ props, err := MapModelArtifactProperties(&openapi.ModelArtifact{
+ Name: of("v1"),
+ Description: of("my model art description"),
+ ModelFormatName: of("sklearn"),
+ ModelFormatVersion: of("1.0"),
+ StorageKey: of("storage-key"),
+ StoragePath: of("storage-path"),
+ ServiceAccountName: of("service-account-name"),
+ })
+ assertion.Nil(err)
+ assertion.Equal(6, len(props))
+ assertion.Equal("my model art description", props["description"].GetStringValue())
+ assertion.Equal("sklearn", props["model_format_name"].GetStringValue())
+ assertion.Equal("1.0", props["model_format_version"].GetStringValue())
+ assertion.Equal("storage-key", props["storage_key"].GetStringValue())
+ assertion.Equal("storage-path", props["storage_path"].GetStringValue())
+ assertion.Equal("service-account-name", props["service_account_name"].GetStringValue())
+
+ props, err = MapModelArtifactProperties(&openapi.ModelArtifact{
+ Name: of("v1"),
+ })
+ assertion.Nil(err)
+ assertion.Equal(0, len(props))
+}
+
+func TestMapModelArtifactType(t *testing.T) {
+ assertion := setup(t)
+
+ typeName := MapModelArtifactType(&openapi.ModelArtifact{})
+ assertion.NotNil(typeName)
+ assertion.Equal(constants.ModelArtifactTypeName, *typeName)
+}
+
+func TestMapModelArtifactName(t *testing.T) {
+ assertion := setup(t)
+
+ name := MapModelArtifactName(&OpenAPIModelWrapper[openapi.ModelArtifact]{
+ TypeId: 123,
+ ParentResourceId: of("parent"),
+ Model: &openapi.ModelArtifact{
+ Name: of("v1"),
+ },
+ })
+ assertion.NotNil(name)
+ assertion.Equal("parent:v1", *name)
+
+ name = MapModelArtifactName(&OpenAPIModelWrapper[openapi.ModelArtifact]{
+ TypeId: 123,
+ ParentResourceId: of("parent"),
+ Model: &openapi.ModelArtifact{
+ Name: nil,
+ },
+ })
+ assertion.NotNil(name)
+ assertion.Regexp("parent:.*", *name)
+
+ name = MapModelArtifactName(&OpenAPIModelWrapper[openapi.ModelArtifact]{
+ TypeId: 123,
+ Model: &openapi.ModelArtifact{
+ Name: of("v1"),
+ },
+ })
+ assertion.NotNil(name)
+ assertion.Regexp(".*:v1", *name)
+}
+
+func TestMapOpenAPIModelArtifactState(t *testing.T) {
+ assertion := setup(t)
+
+ state, err := MapOpenAPIModelArtifactState(of(openapi.ARTIFACTSTATE_LIVE))
+ assertion.Nil(err)
+ assertion.NotNil(state)
+ assertion.Equal(string(openapi.ARTIFACTSTATE_LIVE), state.String())
+
+ state, err = MapOpenAPIModelArtifactState(nil)
+ assertion.Nil(err)
+ assertion.Nil(state)
+}
+
+func TestMapStringPropertyWithMissingKey(t *testing.T) {
+ assertion := setup(t)
+
+ notPresent := MapStringProperty(map[string]*proto.Value{}, "not_present")
+
+ assertion.Nil(notPresent)
+}
+
+func TestMapDescription(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapDescription(map[string]*proto.Value{
+ "description": {
+ Value: &proto.Value_StringValue{
+ StringValue: "my-description",
+ },
+ },
+ })
+
+ assertion.Equal("my-description", *extracted)
+}
+
+func TestPropertyRuntime(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapPropertyRuntime(map[string]*proto.Value{
+ "runtime": {
+ Value: &proto.Value_StringValue{
+ StringValue: "my-runtime",
+ },
+ },
+ })
+
+ assertion.Equal("my-runtime", *extracted)
+}
+
+func TestMapModelArtifactFormatName(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapModelArtifactFormatName(map[string]*proto.Value{
+ "model_format_name": {
+ Value: &proto.Value_StringValue{
+ StringValue: "my-name",
+ },
+ },
+ })
+
+ assertion.Equal("my-name", *extracted)
+}
+
+func TestMapModelArtifactFormatVersion(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapModelArtifactFormatVersion(map[string]*proto.Value{
+ "model_format_version": {
+ Value: &proto.Value_StringValue{
+ StringValue: "my-version",
+ },
+ },
+ })
+
+ assertion.Equal("my-version", *extracted)
+}
+
+func TestMapModelArtifactStorageKey(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapModelArtifactStorageKey(map[string]*proto.Value{
+ "storage_key": {
+ Value: &proto.Value_StringValue{
+ StringValue: "my-key",
+ },
+ },
+ })
+
+ assertion.Equal("my-key", *extracted)
+}
+
+func TestMapModelArtifactStoragePath(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapModelArtifactStoragePath(map[string]*proto.Value{
+ "storage_path": {
+ Value: &proto.Value_StringValue{
+ StringValue: "my-path",
+ },
+ },
+ })
+
+ assertion.Equal("my-path", *extracted)
+}
+
+func TestMapModelArtifactServiceAccountName(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapModelArtifactServiceAccountName(map[string]*proto.Value{
+ "service_account_name": {
+ Value: &proto.Value_StringValue{
+ StringValue: "my-account",
+ },
+ },
+ })
+
+ assertion.Equal("my-account", *extracted)
+}
+
+func TestMapPropertyModelVersionId(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapPropertyModelVersionId(map[string]*proto.Value{
+ "model_version_id": {
+ Value: &proto.Value_IntValue{
+ IntValue: 123,
+ },
+ },
+ })
+
+ assertion.Equal("123", *extracted)
+}
+
+func TestMapPropertyModelVersionIdAsValue(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapPropertyModelVersionIdAsValue(map[string]*proto.Value{
+ "model_version_id": {
+ Value: &proto.Value_IntValue{
+ IntValue: 123,
+ },
+ },
+ })
+
+ assertion.Equal("123", extracted)
+}
+
+func TestMapPropertyRegisteredModelId(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapPropertyRegisteredModelId(map[string]*proto.Value{
+ "registered_model_id": {
+ Value: &proto.Value_IntValue{
+ IntValue: 123,
+ },
+ },
+ })
+
+ assertion.Equal("123", extracted)
+}
+
+func TestMapPropertyServingEnvironmentId(t *testing.T) {
+ assertion := setup(t)
+
+ extracted := MapPropertyServingEnvironmentId(map[string]*proto.Value{
+ "serving_environment_id": {
+ Value: &proto.Value_IntValue{
+ IntValue: 123,
+ },
+ },
+ })
+
+ assertion.Equal("123", extracted)
+}
+
+func TestMapNameFromOwned(t *testing.T) {
+ assertion := setup(t)
+
+ name := MapNameFromOwned(of("prefix:name"))
+ assertion.Equal("name", *name)
+
+ name = MapNameFromOwned(of("name"))
+ assertion.Equal("name", *name)
+
+ name = MapNameFromOwned(of("prefix:name:postfix"))
+ assertion.Equal("name", *name)
+
+ name = MapNameFromOwned(nil)
+ assertion.Nil(name)
+}
+
+func TestMapArtifactType(t *testing.T) {
+ assertion := setup(t)
+
+ artifactType, err := MapArtifactType(&proto.Artifact{
+ Type: of(constants.ModelArtifactTypeName),
+ })
+ assertion.Nil(err)
+ assertion.Equal("model-artifact", artifactType)
+
+ artifactType, err = MapArtifactType(&proto.Artifact{
+ Type: of("Invalid"),
+ })
+ assertion.NotNil(err)
+ assertion.Equal("", artifactType)
+}
+
+func TestMapMLMDModelArtifactState(t *testing.T) {
+ assertion := setup(t)
+
+ artifactState := MapMLMDModelArtifactState(proto.Artifact_LIVE.Enum())
+ assertion.NotNil(artifactState)
+ assertion.Equal("LIVE", string(*artifactState))
+
+ artifactState = MapMLMDModelArtifactState(nil)
+ assertion.Nil(artifactState)
+}
+
+func TestMapRegisteredModelState(t *testing.T) {
+ assertion := setup(t)
+
+ state := MapRegisteredModelState(map[string]*proto.Value{
+ "state": {Value: &proto.Value_StringValue{StringValue: string(openapi.REGISTEREDMODELSTATE_LIVE)}},
+ })
+ assertion.NotNil(state)
+ assertion.Equal(openapi.REGISTEREDMODELSTATE_LIVE, *state)
+
+ state = MapRegisteredModelState(map[string]*proto.Value{})
+ assertion.Nil(state)
+
+ state = MapRegisteredModelState(nil)
+ assertion.Nil(state)
+}
+
+func TestMapModelVersionState(t *testing.T) {
+ assertion := setup(t)
+
+ state := MapModelVersionState(map[string]*proto.Value{
+ "state": {Value: &proto.Value_StringValue{StringValue: string(openapi.MODELVERSIONSTATE_LIVE)}},
+ })
+ assertion.NotNil(state)
+ assertion.Equal(openapi.MODELVERSIONSTATE_LIVE, *state)
+
+ state = MapModelVersionState(map[string]*proto.Value{})
+ assertion.Nil(state)
+
+ state = MapModelVersionState(nil)
+ assertion.Nil(state)
+}
+
+func TestMapInferenceServiceState(t *testing.T) {
+ assertion := setup(t)
+
+ state := MapInferenceServiceDesiredState(map[string]*proto.Value{
+ "desired_state": {Value: &proto.Value_StringValue{StringValue: string(openapi.INFERENCESERVICESTATE_DEPLOYED)}},
+ })
+ assertion.NotNil(state)
+ assertion.Equal(openapi.INFERENCESERVICESTATE_DEPLOYED, *state)
+
+ state = MapInferenceServiceDesiredState(map[string]*proto.Value{})
+ assertion.Nil(state)
+
+ state = MapInferenceServiceDesiredState(nil)
+ assertion.Nil(state)
+}
+
+func TestMapServingEnvironmentType(t *testing.T) {
+ assertion := setup(t)
+
+ typeName := MapServingEnvironmentType(&openapi.ServingEnvironment{})
+ assertion.NotNil(typeName)
+ assertion.Equal(constants.ServingEnvironmentTypeName, *typeName)
+}
+
+func TestMapInferenceServiceType(t *testing.T) {
+ assertion := setup(t)
+
+ typeName := MapInferenceServiceType(&openapi.InferenceService{})
+ assertion.NotNil(typeName)
+ assertion.Equal(constants.InferenceServiceTypeName, *typeName)
+}
+
+func TestMapInferenceServiceProperties(t *testing.T) {
+ assertion := setup(t)
+
+ props, err := MapInferenceServiceProperties(&openapi.InferenceService{
+ Description: of("my custom description"),
+ ModelVersionId: of("1"),
+ Runtime: of("my-runtime"),
+ RegisteredModelId: "2",
+ ServingEnvironmentId: "3",
+ DesiredState: openapi.INFERENCESERVICESTATE_DEPLOYED.Ptr(),
+ })
+ assertion.Nil(err)
+ assertion.Equal(6, len(props))
+ assertion.Equal("my custom description", props["description"].GetStringValue())
+ assertion.Equal(int64(1), props["model_version_id"].GetIntValue())
+ assertion.Equal("my-runtime", props["runtime"].GetStringValue())
+ assertion.Equal(int64(2), props["registered_model_id"].GetIntValue())
+ assertion.Equal(int64(3), props["serving_environment_id"].GetIntValue())
+ assertion.Equal("DEPLOYED", props["desired_state"].GetStringValue())
+
+ // serving and model id must be provided and must be a valid numeric id
+ _, err = MapInferenceServiceProperties(&openapi.InferenceService{})
+ assertion.NotNil(err)
+ assertion.Equal("missing required RegisteredModelId field", err.Error())
+
+ _, err = MapInferenceServiceProperties(&openapi.InferenceService{RegisteredModelId: "1"})
+ assertion.NotNil(err)
+ assertion.Equal("missing required ServingEnvironmentId field", err.Error())
+
+ // invalid int
+ _, err = MapInferenceServiceProperties(&openapi.InferenceService{RegisteredModelId: "aa"})
+ assertion.NotNil(err)
+ assertion.Equal("invalid numeric string: strconv.Atoi: parsing \"aa\": invalid syntax", err.Error())
+}
+
+func TestMapServeModelType(t *testing.T) {
+ assertion := setup(t)
+
+ typeName := MapServeModelType(&openapi.ServeModel{})
+ assertion.NotNil(typeName)
+ assertion.Equal(constants.ServeModelTypeName, *typeName)
+}
+
+func TestMapServeModelProperties(t *testing.T) {
+ assertion := setup(t)
+
+ props, err := MapServeModelProperties(&openapi.ServeModel{
+ Description: of("my custom description"),
+ ModelVersionId: "1",
+ })
+ assertion.Nil(err)
+ assertion.Equal(2, len(props))
+ assertion.Equal("my custom description", props["description"].GetStringValue())
+ assertion.Equal(int64(1), props["model_version_id"].GetIntValue())
+
+ // model version id must be provided
+ _, err = MapServeModelProperties(&openapi.ServeModel{})
+ assertion.NotNil(err)
+ assertion.Equal("missing required ModelVersionId field", err.Error())
+
+ // model version id must be a valid numeric
+ _, err = MapServeModelProperties(&openapi.ServeModel{ModelVersionId: "bb"})
+ assertion.NotNil(err)
+ assertion.Equal("invalid numeric string: strconv.Atoi: parsing \"bb\": invalid syntax", err.Error())
+}
+
+func TestMapServingEnvironmentProperties(t *testing.T) {
+ assertion := setup(t)
+
+ props, err := MapServingEnvironmentProperties(&openapi.ServingEnvironment{
+ Description: of("my description"),
+ })
+ assertion.Nil(err)
+ assertion.Equal(1, len(props))
+
+ props, err = MapServingEnvironmentProperties(&openapi.ServingEnvironment{})
+ assertion.Nil(err)
+ assertion.Equal(0, len(props))
+}
+
+func TestMapInferenceServiceName(t *testing.T) {
+ assertion := setup(t)
+
+ name := MapInferenceServiceName(&OpenAPIModelWrapper[openapi.InferenceService]{
+ TypeId: 123,
+ ParentResourceId: of("123"),
+ ModelName: of("MyModel"),
+ Model: &openapi.InferenceService{
+ Name: of("inf-service"),
+ },
+ })
+ assertion.NotNil(name)
+ assertion.Equal("123:inf-service", *name)
+}
+
+func TestMapServeModelName(t *testing.T) {
+ assertion := setup(t)
+
+ name := MapServeModelName(&OpenAPIModelWrapper[openapi.ServeModel]{
+ TypeId: 123,
+ ParentResourceId: of("parent"),
+ Model: &openapi.ServeModel{
+ Name: of("v1"),
+ },
+ })
+ assertion.NotNil(name)
+ assertion.Equal("parent:v1", *name)
+
+ name = MapServeModelName(&OpenAPIModelWrapper[openapi.ServeModel]{
+ TypeId: 123,
+ ParentResourceId: of("parent"),
+ Model: &openapi.ServeModel{
+ Name: nil,
+ },
+ })
+ assertion.NotNil(name)
+ assertion.Regexp("parent:.*", *name)
+
+ name = MapServeModelName(&OpenAPIModelWrapper[openapi.ServeModel]{
+ TypeId: 123,
+ Model: &openapi.ServeModel{
+ Name: of("v1"),
+ },
+ })
+ assertion.NotNil(name)
+ assertion.Regexp(".*:v1", *name)
+}
+
+func TestMapLastKnownState(t *testing.T) {
+ assertion := setup(t)
+
+ state, err := MapLastKnownState(of(openapi.EXECUTIONSTATE_RUNNING))
+ assertion.Nil(err)
+ assertion.Equal("RUNNING", state.String())
+
+ state, err = MapLastKnownState(nil)
+ assertion.Nil(err)
+ assertion.Nil(state)
+}
+
+func TestMapIntProperty(t *testing.T) {
+ assertion := setup(t)
+
+ props := map[string]*proto.Value{
+ "key": {
+ Value: &proto.Value_IntValue{
+ IntValue: 10,
+ },
+ },
+ }
+
+ assertion.Equal("10", *MapIntProperty(props, "key"))
+ assertion.Nil(MapIntProperty(props, "not-present"))
+}
+
+func TestMapIntPropertyAsValue(t *testing.T) {
+ assertion := setup(t)
+
+ props := map[string]*proto.Value{
+ "key": {
+ Value: &proto.Value_IntValue{
+ IntValue: 10,
+ },
+ },
+ }
+
+ assertion.Equal("10", MapIntPropertyAsValue(props, "key"))
+ assertion.Equal("", MapIntPropertyAsValue(props, "not-present"))
+}
+
+func TestMapMLMDServeModelLastKnownState(t *testing.T) {
+ assertion := setup(t)
+
+ state := MapMLMDServeModelLastKnownState(of(proto.Execution_COMPLETE))
+ assertion.NotNil(state)
+ assertion.Equal("COMPLETE", string(*state))
+
+ state = MapMLMDServeModelLastKnownState(nil)
+ assertion.Nil(state)
+}
diff --git a/internal/converter/mlmd_openapi_converter.go b/internal/converter/mlmd_openapi_converter.go
new file mode 100644
index 000000000..dc28490ad
--- /dev/null
+++ b/internal/converter/mlmd_openapi_converter.go
@@ -0,0 +1,56 @@
+package converter
+
+import (
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+// goverter:converter
+// goverter:output:file ./generated/mlmd_openapi_converter.gen.go
+// goverter:wrapErrors
+// goverter:matchIgnoreCase
+// goverter:useZeroValueOnPointerInconsistency
+// goverter:extend Int64ToString
+// goverter:extend StringToInt64
+// goverter:extend MapMLMDCustomProperties
+type MLMDToOpenAPIConverter interface {
+ // goverter:map Properties Description | MapDescription
+ // goverter:map Properties State | MapRegisteredModelState
+ ConvertRegisteredModel(source *proto.Context) (*openapi.RegisteredModel, error)
+
+ // goverter:map Name | MapNameFromOwned
+ // goverter:map Properties Description | MapDescription
+ // goverter:map Properties State | MapModelVersionState
+ // goverter:map Properties Author | MapPropertyAuthor
+ ConvertModelVersion(source *proto.Context) (*openapi.ModelVersion, error)
+
+ // goverter:map Name | MapNameFromOwned
+ // goverter:map . ArtifactType | MapArtifactType
+ // goverter:map State | MapMLMDModelArtifactState
+ // goverter:map Properties Description | MapDescription
+ // goverter:map Properties ModelFormatName | MapModelArtifactFormatName
+ // goverter:map Properties ModelFormatVersion | MapModelArtifactFormatVersion
+ // goverter:map Properties StorageKey | MapModelArtifactStorageKey
+ // goverter:map Properties StoragePath | MapModelArtifactStoragePath
+ // goverter:map Properties ServiceAccountName | MapModelArtifactServiceAccountName
+ ConvertModelArtifact(source *proto.Artifact) (*openapi.ModelArtifact, error)
+
+ // goverter:map Name | MapNameFromOwned
+ // goverter:map Properties Description | MapDescription
+ ConvertServingEnvironment(source *proto.Context) (*openapi.ServingEnvironment, error)
+
+ // goverter:map Name | MapNameFromOwned
+ // goverter:map Properties Description | MapDescription
+ // goverter:map Properties Runtime | MapPropertyRuntime
+ // goverter:map Properties ModelVersionId | MapPropertyModelVersionId
+ // goverter:map Properties RegisteredModelId | MapPropertyRegisteredModelId
+ // goverter:map Properties ServingEnvironmentId | MapPropertyServingEnvironmentId
+ // goverter:map Properties DesiredState | MapInferenceServiceDesiredState
+ ConvertInferenceService(source *proto.Context) (*openapi.InferenceService, error)
+
+ // goverter:map Name | MapNameFromOwned
+ // goverter:map Properties Description | MapDescription
+ // goverter:map Properties ModelVersionId | MapPropertyModelVersionIdAsValue
+ // goverter:map LastKnownState | MapMLMDServeModelLastKnownState
+ ConvertServeModel(source *proto.Execution) (*openapi.ServeModel, error)
+}
diff --git a/internal/converter/mlmd_openapi_converter_util.go b/internal/converter/mlmd_openapi_converter_util.go
new file mode 100644
index 000000000..71f0a0b4c
--- /dev/null
+++ b/internal/converter/mlmd_openapi_converter_util.go
@@ -0,0 +1,216 @@
+package converter
+
+import (
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "strings"
+
+ "github.com/opendatahub-io/model-registry/internal/constants"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+// MapMLMDCustomProperties maps MLMD custom properties model to OpenAPI one
+func MapMLMDCustomProperties(source map[string]*proto.Value) (map[string]openapi.MetadataValue, error) {
+ data := make(map[string]openapi.MetadataValue)
+
+ for key, v := range source {
+ // data[key] = v.Value
+ customValue := openapi.MetadataValue{}
+
+ switch typedValue := v.Value.(type) {
+ case *proto.Value_BoolValue:
+ customValue.MetadataBoolValue = &openapi.MetadataBoolValue{
+ BoolValue: &typedValue.BoolValue,
+ }
+ case *proto.Value_IntValue:
+ customValue.MetadataIntValue = &openapi.MetadataIntValue{
+ IntValue: Int64ToString(&typedValue.IntValue),
+ }
+ case *proto.Value_DoubleValue:
+ customValue.MetadataDoubleValue = &openapi.MetadataDoubleValue{
+ DoubleValue: &typedValue.DoubleValue,
+ }
+ case *proto.Value_StringValue:
+ customValue.MetadataStringValue = &openapi.MetadataStringValue{
+ StringValue: &typedValue.StringValue,
+ }
+ case *proto.Value_StructValue:
+ sv := typedValue.StructValue
+ asMap := sv.AsMap()
+ asJSON, err := json.Marshal(asMap)
+ if err != nil {
+ return nil, err
+ }
+ b64 := base64.StdEncoding.EncodeToString(asJSON)
+ customValue.MetadataStructValue = &openapi.MetadataStructValue{
+ StructValue: &b64,
+ }
+ default:
+ return nil, fmt.Errorf("type mapping not found for %s:%v", key, v)
+ }
+
+ data[key] = customValue
+ }
+
+ return data, nil
+}
+
+// MapNameFromOwned derive the entity name from the mlmd fullname
+// for owned entity such as ModelVersion
+// for potentially owned entity such as ModelArtifact
+func MapNameFromOwned(source *string) *string {
+ if source == nil {
+ return nil
+ }
+
+ exploded := strings.Split(*source, ":")
+ if len(exploded) == 1 {
+ return source
+ }
+ return &exploded[1]
+}
+
+// REGISTERED MODEL
+
+// MODEL VERSION
+
+func MapPropertyAuthor(properties map[string]*proto.Value) *string {
+ return MapStringProperty(properties, "author")
+}
+
+// MODEL ARTIFACT
+
+func MapArtifactType(source *proto.Artifact) (string, error) {
+ if source.Type != nil && *source.Type == constants.ModelArtifactTypeName {
+ return "model-artifact", nil
+ }
+ return "", fmt.Errorf("invalid artifact type found: %v", source.Type)
+}
+
+func MapRegisteredModelState(properties map[string]*proto.Value) *openapi.RegisteredModelState {
+ state, ok := properties["state"]
+ if !ok {
+ return nil
+ }
+ str := state.GetStringValue()
+ return (*openapi.RegisteredModelState)(&str)
+}
+
+func MapModelVersionState(properties map[string]*proto.Value) *openapi.ModelVersionState {
+ state, ok := properties["state"]
+ if !ok {
+ return nil
+ }
+ str := state.GetStringValue()
+ return (*openapi.ModelVersionState)(&str)
+}
+
+func MapInferenceServiceDesiredState(properties map[string]*proto.Value) *openapi.InferenceServiceState {
+ state, ok := properties["desired_state"]
+ if !ok {
+ return nil
+ }
+ str := state.GetStringValue()
+ return (*openapi.InferenceServiceState)(&str)
+}
+
+func MapMLMDModelArtifactState(source *proto.Artifact_State) *openapi.ArtifactState {
+ if source == nil {
+ return nil
+ }
+
+ state := source.String()
+ return (*openapi.ArtifactState)(&state)
+}
+
+// MapStringProperty maps string proto.Value property to specific string field
+func MapStringProperty(properties map[string]*proto.Value, key string) *string {
+ val, ok := properties[key]
+ if ok {
+ res := val.GetStringValue()
+ if res != "" {
+ return &res
+ }
+ }
+
+ return nil
+}
+
+// MapIntProperty maps int proto.Value property to specific string field
+func MapIntProperty(properties map[string]*proto.Value, key string) *string {
+ val, ok := properties[key]
+ if ok {
+ res := val.GetIntValue()
+ return Int64ToString(&res)
+ }
+
+ return nil
+}
+
+// MapIntPropertyAsValue maps int proto.Value property to specific string field
+func MapIntPropertyAsValue(properties map[string]*proto.Value, key string) string {
+ val := MapIntProperty(properties, key)
+ if val != nil {
+ return *val
+ }
+ return ""
+}
+
+func MapDescription(properties map[string]*proto.Value) *string {
+ return MapStringProperty(properties, "description")
+}
+
+func MapModelArtifactFormatName(properties map[string]*proto.Value) *string {
+ return MapStringProperty(properties, "model_format_name")
+}
+
+func MapModelArtifactFormatVersion(properties map[string]*proto.Value) *string {
+ return MapStringProperty(properties, "model_format_version")
+}
+
+func MapModelArtifactStorageKey(properties map[string]*proto.Value) *string {
+ return MapStringProperty(properties, "storage_key")
+}
+
+func MapModelArtifactStoragePath(properties map[string]*proto.Value) *string {
+ return MapStringProperty(properties, "storage_path")
+}
+
+func MapModelArtifactServiceAccountName(properties map[string]*proto.Value) *string {
+ return MapStringProperty(properties, "service_account_name")
+}
+
+func MapPropertyModelVersionId(properties map[string]*proto.Value) *string {
+ return MapIntProperty(properties, "model_version_id")
+}
+
+func MapPropertyModelVersionIdAsValue(properties map[string]*proto.Value) string {
+ return MapIntPropertyAsValue(properties, "model_version_id")
+}
+
+func MapPropertyRegisteredModelId(properties map[string]*proto.Value) string {
+ return MapIntPropertyAsValue(properties, "registered_model_id")
+}
+
+func MapPropertyServingEnvironmentId(properties map[string]*proto.Value) string {
+ return MapIntPropertyAsValue(properties, "serving_environment_id")
+}
+
+// INFERENCE SERVICE
+
+func MapPropertyRuntime(properties map[string]*proto.Value) *string {
+ return MapStringProperty(properties, "runtime")
+}
+
+// SERVE MODEL
+
+func MapMLMDServeModelLastKnownState(source *proto.Execution_State) *openapi.ExecutionState {
+ if source == nil {
+ return nil
+ }
+
+ state := source.String()
+ return (*openapi.ExecutionState)(&state)
+}
diff --git a/internal/converter/openapi_converter.go b/internal/converter/openapi_converter.go
new file mode 100644
index 000000000..5d504c6c8
--- /dev/null
+++ b/internal/converter/openapi_converter.go
@@ -0,0 +1,87 @@
+package converter
+
+import "github.com/opendatahub-io/model-registry/pkg/openapi"
+
+// NOTE: methods must follow these patterns, otherwise tests could not find possible issues:
+// Converters createEntity to entity: ConvertCreate
+// Converters updateEntity to entity: ConvertUpdate
+// Converters override fields entity: OverrideNotEditableFor
+
+// goverter:converter
+// goverter:output:file ./generated/openapi_converter.gen.go
+// goverter:wrapErrors
+// goverter:matchIgnoreCase
+// goverter:useZeroValueOnPointerInconsistency
+type OpenAPIConverter interface {
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertRegisteredModelCreate(source *openapi.RegisteredModelCreate) (*openapi.RegisteredModel, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Name
+ ConvertRegisteredModelUpdate(source *openapi.RegisteredModelUpdate) (*openapi.RegisteredModel, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertModelVersionCreate(source *openapi.ModelVersionCreate) (*openapi.ModelVersion, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Name
+ ConvertModelVersionUpdate(source *openapi.ModelVersionUpdate) (*openapi.ModelVersion, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch ArtifactType
+ ConvertModelArtifactCreate(source *openapi.ModelArtifactCreate) (*openapi.ModelArtifact, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch ArtifactType Name
+ ConvertModelArtifactUpdate(source *openapi.ModelArtifactUpdate) (*openapi.ModelArtifact, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertServingEnvironmentCreate(source *openapi.ServingEnvironmentCreate) (*openapi.ServingEnvironment, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Name
+ ConvertServingEnvironmentUpdate(source *openapi.ServingEnvironmentUpdate) (*openapi.ServingEnvironment, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertInferenceServiceCreate(source *openapi.InferenceServiceCreate) (*openapi.InferenceService, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Name RegisteredModelId ServingEnvironmentId
+ ConvertInferenceServiceUpdate(source *openapi.InferenceServiceUpdate) (*openapi.InferenceService, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertServeModelCreate(source *openapi.ServeModelCreate) (*openapi.ServeModel, error)
+
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Name ModelVersionId
+ ConvertServeModelUpdate(source *openapi.ServeModelUpdate) (*openapi.ServeModel, error)
+
+ // Ignore all fields that ARE editable
+ // goverter:default InitRegisteredModelWithUpdate
+ // goverter:autoMap Existing
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties State
+ OverrideNotEditableForRegisteredModel(source OpenapiUpdateWrapper[openapi.RegisteredModel]) (openapi.RegisteredModel, error)
+
+ // Ignore all fields that ARE editable
+ // goverter:default InitModelVersionWithUpdate
+ // goverter:autoMap Existing
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties State Author
+ OverrideNotEditableForModelVersion(source OpenapiUpdateWrapper[openapi.ModelVersion]) (openapi.ModelVersion, error)
+
+ // Ignore all fields that ARE editable
+ // goverter:default InitModelArtifactWithUpdate
+ // goverter:autoMap Existing
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties Uri State ServiceAccountName ModelFormatName ModelFormatVersion StorageKey StoragePath
+ OverrideNotEditableForModelArtifact(source OpenapiUpdateWrapper[openapi.ModelArtifact]) (openapi.ModelArtifact, error)
+
+ // Ignore all fields that ARE editable
+ // goverter:default InitServingEnvironmentWithUpdate
+ // goverter:autoMap Existing
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties
+ OverrideNotEditableForServingEnvironment(source OpenapiUpdateWrapper[openapi.ServingEnvironment]) (openapi.ServingEnvironment, error)
+
+ // Ignore all fields that ARE editable
+ // goverter:default InitInferenceServiceWithUpdate
+ // goverter:autoMap Existing
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties ModelVersionId Runtime DesiredState
+ OverrideNotEditableForInferenceService(source OpenapiUpdateWrapper[openapi.InferenceService]) (openapi.InferenceService, error)
+
+ // Ignore all fields that ARE editable
+ // goverter:default InitServeModelWithUpdate
+ // goverter:autoMap Existing
+ // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties LastKnownState
+ OverrideNotEditableForServeModel(source OpenapiUpdateWrapper[openapi.ServeModel]) (openapi.ServeModel, error)
+}
diff --git a/internal/converter/openapi_converter_test.go b/internal/converter/openapi_converter_test.go
new file mode 100644
index 000000000..a2f1d4316
--- /dev/null
+++ b/internal/converter/openapi_converter_test.go
@@ -0,0 +1,162 @@
+package converter
+
+import (
+ "fmt"
+ "go/ast"
+ "go/parser"
+ "go/token"
+ "os"
+ "reflect"
+ "regexp"
+ "strings"
+ "testing"
+
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+// visitor
+type visitor struct {
+ t *testing.T
+ entities map[string]*oapiEntity
+}
+
+func newVisitor(t *testing.T, f *ast.File) visitor {
+ return visitor{
+ t: t,
+ entities: map[string]*oapiEntity{
+ "RegisteredModel": {
+ obj: openapi.RegisteredModel{},
+ },
+ "ModelVersion": {
+ obj: openapi.ModelVersion{},
+ },
+ "ModelArtifact": {
+ obj: openapi.ModelArtifact{},
+ },
+ "ServingEnvironment": {
+ obj: openapi.ServingEnvironment{},
+ },
+ "InferenceService": {
+ obj: openapi.InferenceService{},
+ },
+ "ServeModel": {
+ obj: openapi.ServeModel{},
+ },
+ },
+ }
+}
+
+func (v *visitor) extractGroup(regex *regexp.Regexp, s string) string {
+ extracted := regex.FindStringSubmatch(s)
+ if len(extracted) != 2 {
+ v.t.Errorf("unable to extract groups from %s for %s", regex.String(), s)
+ }
+ // the first one is the wole matched string, the second one is the group
+ return extracted[1]
+}
+
+func (v *visitor) getEntity(name string) *oapiEntity {
+ val, ok := v.entities[name]
+ if !ok {
+ v.t.Errorf("openapi entity not found in the entities map: %s", name)
+ }
+ return val
+}
+
+func (v visitor) Visit(n ast.Node) ast.Visitor {
+ if n == nil {
+ return nil
+ }
+
+ switch d := n.(type) {
+ case *ast.InterfaceType:
+ for _, m := range d.Methods.List {
+ methodName := m.Names[0].Name
+
+ if converterMethodPattern.MatchString(methodName) {
+ entityName := v.extractGroup(converterMethodPattern, methodName)
+ entity := v.getEntity(entityName)
+ // there should be just one doc comment matching ignoreDirectivePattern
+ for _, c := range m.Doc.List {
+ if ignoreDirectivePattern.MatchString(c.Text) {
+ entity.notEditableFields = v.extractGroup(ignoreDirectivePattern, c.Text)
+ }
+ }
+ } else if overrideNotEditableMethodPattern.MatchString(methodName) {
+ entityName := v.extractGroup(overrideNotEditableMethodPattern, methodName)
+ entity := v.getEntity(entityName)
+ // there should be just one doc comment matching ignoreDirectivePattern
+ for _, c := range m.Doc.List {
+ if ignoreDirectivePattern.MatchString(c.Text) {
+ entity.ignoredFields = v.extractGroup(ignoreDirectivePattern, c.Text)
+ }
+ }
+ }
+ }
+ v.checkEntities()
+ }
+ return v
+}
+
+// checkEntities check if all editable fields are listed in the goverter ignore directive of OverrideNotEditableFor
+func (v *visitor) checkEntities() {
+ errorMsgs := map[string][]string{}
+ for k, v := range v.entities {
+ msgs := checkEntity(v)
+ if len(msgs) > 0 {
+ errorMsgs[k] = msgs
+ }
+ }
+
+ if len(errorMsgs) > 0 {
+ missingFieldsMsg := ""
+ for k, fields := range errorMsgs {
+ missingFieldsMsg += fmt.Sprintf("%s: %v\n", k, fields)
+ }
+ v.t.Errorf("missing fields to be ignored for OverrideNotEditableFor* goverter methods:\n%v", missingFieldsMsg)
+ }
+}
+
+// checkEntity check if there are missing fields to be ignored in the override method
+func checkEntity(entity *oapiEntity) []string {
+ res := []string{}
+ objType := reflect.TypeOf(entity.obj)
+ for i := 0; i < objType.NumField(); i++ {
+ field := objType.Field(i)
+ if !strings.Contains(entity.notEditableFields, field.Name) && !strings.Contains(entity.ignoredFields, field.Name) {
+ // check if the not editable field (first check) is not present in the ignored fields (second check)
+ // if this condition is true, we missed that field in the Override method ignore list
+ res = append(res, field.Name)
+ }
+ }
+ return res
+}
+
+// test
+
+var (
+ converterMethodPattern *regexp.Regexp = regexp.MustCompile(`Convert(?P\w+)Update`)
+ overrideNotEditableMethodPattern *regexp.Regexp = regexp.MustCompile(`OverrideNotEditableFor(?P\w+)`)
+ ignoreDirectivePattern *regexp.Regexp = regexp.MustCompile(`// goverter:ignore (?P.+)`)
+)
+
+func TestOverrideNotEditableFields(t *testing.T) {
+ _ = setup(t)
+
+ fset := token.NewFileSet() // positions are relative to fset
+ wd, err := os.Getwd()
+ if err != nil {
+ t.Errorf("error getting current working directory")
+ }
+ filePath := fmt.Sprintf("%s/openapi_converter.go", wd)
+ f, _ := parser.ParseFile(fset, filePath, nil, parser.ParseComments)
+
+ v := newVisitor(t, f)
+ ast.Walk(v, f)
+}
+
+type oapiEntity struct {
+ obj any
+ notEditableFields string
+ ignoredFields string
+}
diff --git a/internal/converter/openapi_converter_util.go b/internal/converter/openapi_converter_util.go
new file mode 100644
index 000000000..c82bda4ad
--- /dev/null
+++ b/internal/converter/openapi_converter_util.go
@@ -0,0 +1,71 @@
+package converter
+
+import "github.com/opendatahub-io/model-registry/pkg/openapi"
+
+type OpenapiUpdateWrapper[
+ M openapi.RegisteredModel |
+ openapi.ModelVersion |
+ openapi.ModelArtifact |
+ openapi.ServingEnvironment |
+ openapi.InferenceService |
+ openapi.ServeModel,
+] struct {
+ Existing *M
+ Update *M
+}
+
+func NewOpenapiUpdateWrapper[
+ M openapi.RegisteredModel |
+ openapi.ModelVersion |
+ openapi.ModelArtifact |
+ openapi.ServingEnvironment |
+ openapi.InferenceService |
+ openapi.ServeModel,
+](existing *M, update *M) OpenapiUpdateWrapper[M] {
+ return OpenapiUpdateWrapper[M]{
+ Existing: existing,
+ Update: update,
+ }
+}
+
+func InitRegisteredModelWithUpdate(source OpenapiUpdateWrapper[openapi.RegisteredModel]) openapi.RegisteredModel {
+ if source.Update != nil {
+ return *source.Update
+ }
+ return openapi.RegisteredModel{}
+}
+
+func InitModelVersionWithUpdate(source OpenapiUpdateWrapper[openapi.ModelVersion]) openapi.ModelVersion {
+ if source.Update != nil {
+ return *source.Update
+ }
+ return openapi.ModelVersion{}
+}
+
+func InitModelArtifactWithUpdate(source OpenapiUpdateWrapper[openapi.ModelArtifact]) openapi.ModelArtifact {
+ if source.Update != nil {
+ return *source.Update
+ }
+ return openapi.ModelArtifact{}
+}
+
+func InitServingEnvironmentWithUpdate(source OpenapiUpdateWrapper[openapi.ServingEnvironment]) openapi.ServingEnvironment {
+ if source.Update != nil {
+ return *source.Update
+ }
+ return openapi.ServingEnvironment{}
+}
+
+func InitInferenceServiceWithUpdate(source OpenapiUpdateWrapper[openapi.InferenceService]) openapi.InferenceService {
+ if source.Update != nil {
+ return *source.Update
+ }
+ return openapi.InferenceService{}
+}
+
+func InitServeModelWithUpdate(source OpenapiUpdateWrapper[openapi.ServeModel]) openapi.ServeModel {
+ if source.Update != nil {
+ return *source.Update
+ }
+ return openapi.ServeModel{}
+}
diff --git a/internal/converter/openapi_mlmd_converter.go b/internal/converter/openapi_mlmd_converter.go
new file mode 100644
index 000000000..5d58c3dad
--- /dev/null
+++ b/internal/converter/openapi_mlmd_converter.go
@@ -0,0 +1,72 @@
+package converter
+
+import (
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+type OpenAPIModelWrapper[
+ M openapi.RegisteredModel |
+ openapi.ModelVersion |
+ openapi.ModelArtifact |
+ openapi.ServingEnvironment |
+ openapi.InferenceService |
+ openapi.ServeModel,
+] struct {
+ TypeId int64
+ Model *M
+ ParentResourceId *string // optional parent id
+ ModelName *string // optional registered model name
+}
+
+// goverter:converter
+// goverter:output:file ./generated/openapi_mlmd_converter.gen.go
+// goverter:wrapErrors
+// goverter:matchIgnoreCase
+// goverter:useZeroValueOnPointerInconsistency
+// goverter:extend Int64ToString
+// goverter:extend StringToInt64
+// goverter:extend MapOpenAPICustomProperties
+type OpenAPIToMLMDConverter interface {
+ // goverter:autoMap Model
+ // goverter:map Model Type | MapRegisteredModelType
+ // goverter:map Model Properties | MapRegisteredModelProperties
+ // goverter:ignore state sizeCache unknownFields SystemMetadata CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertRegisteredModel(source *OpenAPIModelWrapper[openapi.RegisteredModel]) (*proto.Context, error)
+
+ // goverter:autoMap Model
+ // goverter:map . Name | MapModelVersionName
+ // goverter:map Model Type | MapModelVersionType
+ // goverter:map . Properties | MapModelVersionProperties
+ // goverter:ignore state sizeCache unknownFields SystemMetadata CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertModelVersion(source *OpenAPIModelWrapper[openapi.ModelVersion]) (*proto.Context, error)
+
+ // goverter:autoMap Model
+ // goverter:map . Name | MapModelArtifactName
+ // goverter:map Model Type | MapModelArtifactType
+ // goverter:map Model Properties | MapModelArtifactProperties
+ // goverter:map Model.State State | MapOpenAPIModelArtifactState
+ // goverter:ignore state sizeCache unknownFields SystemMetadata CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertModelArtifact(source *OpenAPIModelWrapper[openapi.ModelArtifact]) (*proto.Artifact, error)
+
+ // goverter:autoMap Model
+ // goverter:map Model Type | MapServingEnvironmentType
+ // goverter:map Model Properties | MapServingEnvironmentProperties
+ // goverter:ignore state sizeCache unknownFields SystemMetadata CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertServingEnvironment(source *OpenAPIModelWrapper[openapi.ServingEnvironment]) (*proto.Context, error)
+
+ // goverter:autoMap Model
+ // goverter:map . Name | MapInferenceServiceName
+ // goverter:map Model Type | MapInferenceServiceType
+ // goverter:map Model Properties | MapInferenceServiceProperties
+ // goverter:ignore state sizeCache unknownFields SystemMetadata CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertInferenceService(source *OpenAPIModelWrapper[openapi.InferenceService]) (*proto.Context, error)
+
+ // goverter:autoMap Model
+ // goverter:map . Name | MapServeModelName
+ // goverter:map Model Type | MapServeModelType
+ // goverter:map Model Properties | MapServeModelProperties
+ // goverter:map Model.LastKnownState LastKnownState | MapLastKnownState
+ // goverter:ignore state sizeCache unknownFields SystemMetadata CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
+ ConvertServeModel(source *OpenAPIModelWrapper[openapi.ServeModel]) (*proto.Execution, error)
+}
diff --git a/internal/converter/openapi_mlmd_converter_util.go b/internal/converter/openapi_mlmd_converter_util.go
new file mode 100644
index 000000000..78bbb5041
--- /dev/null
+++ b/internal/converter/openapi_mlmd_converter_util.go
@@ -0,0 +1,465 @@
+package converter
+
+import (
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "strconv"
+
+ "github.com/google/uuid"
+ "github.com/opendatahub-io/model-registry/internal/constants"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+ "google.golang.org/protobuf/types/known/structpb"
+)
+
+// StringToInt64 converts string-based id to int64 if numeric, otherwise return error
+func StringToInt64(id *string) (*int64, error) {
+ if id == nil {
+ return nil, nil
+ }
+
+ idAsInt, err := strconv.Atoi(*id)
+ if err != nil {
+ return nil, fmt.Errorf("invalid numeric string: %v", err)
+ }
+
+ idInt64 := int64(idAsInt)
+ return &idInt64, nil
+}
+
+// Int64ToString converts numeric id to string-based one
+func Int64ToString(id *int64) *string {
+ if id == nil {
+ return nil
+ }
+
+ idAsString := strconv.FormatInt(*id, 10)
+ return &idAsString
+}
+
+// StringToInt32 converts string-based numeric value (a OpenAPI string literal consisting only of digits) to int32 if numeric, otherwise return error
+func StringToInt32(idString string) (int32, error) {
+ idInt, err := strconv.Atoi(idString)
+ if err != nil {
+ return 0, err
+ }
+
+ idInt32 := int32(idInt)
+ return idInt32, nil
+}
+
+// MapOpenAPICustomProperties maps OpenAPI custom properties model to MLMD one
+func MapOpenAPICustomProperties(source *map[string]openapi.MetadataValue) (map[string]*proto.Value, error) {
+ props := make(map[string]*proto.Value)
+
+ if source != nil {
+ for key, v := range *source {
+ value := proto.Value{}
+
+ switch {
+ // bool value
+ case v.MetadataBoolValue != nil:
+ value.Value = &proto.Value_BoolValue{BoolValue: *v.MetadataBoolValue.BoolValue}
+ // int value
+ case v.MetadataIntValue != nil:
+ intValue, err := StringToInt64(v.MetadataIntValue.IntValue)
+ if err != nil {
+ return nil, fmt.Errorf("unable to decode as int64 %w for key %s", err, key)
+ }
+ value.Value = &proto.Value_IntValue{IntValue: *intValue}
+ // double value
+ case v.MetadataDoubleValue != nil:
+ value.Value = &proto.Value_DoubleValue{DoubleValue: *v.MetadataDoubleValue.DoubleValue}
+ // string value
+ case v.MetadataStringValue != nil:
+ value.Value = &proto.Value_StringValue{StringValue: *v.MetadataStringValue.StringValue}
+ // struct value
+ case v.MetadataStructValue != nil:
+ data, err := base64.StdEncoding.DecodeString(*v.MetadataStructValue.StructValue)
+ if err != nil {
+ return nil, fmt.Errorf("unable to decode %w for key %s", err, key)
+ }
+ var asMap map[string]interface{}
+ err = json.Unmarshal(data, &asMap)
+ if err != nil {
+ return nil, fmt.Errorf("unable to decode %w for key %s", err, key)
+ }
+ asStruct, err := structpb.NewStruct(asMap)
+ if err != nil {
+ return nil, fmt.Errorf("unable to decode %w for key %s", err, key)
+ }
+ value.Value = &proto.Value_StructValue{
+ StructValue: asStruct,
+ }
+ default:
+ return nil, fmt.Errorf("type mapping not found for %s:%v", key, v)
+ }
+
+ props[key] = &value
+ }
+ }
+
+ return props, nil
+}
+
+// PrefixWhenOwned compose the mlmd fullname by using ownerId as prefix
+// For owned entity such as ModelVersion
+// for potentially owned entity such as ModelArtifact
+func PrefixWhenOwned(ownerId *string, entityName string) string {
+ var prefix string
+ if ownerId != nil {
+ prefix = *ownerId
+ } else {
+ prefix = uuid.New().String()
+ }
+ prefixedName := fmt.Sprintf("%s:%s", prefix, entityName)
+ return prefixedName
+}
+
+// REGISTERED MODEL
+
+// MapRegisteredModelProperties maps RegisteredModel fields to specific MLMD properties
+func MapRegisteredModelProperties(source *openapi.RegisteredModel) (map[string]*proto.Value, error) {
+ props := make(map[string]*proto.Value)
+ if source != nil {
+ if source.Description != nil {
+ props["description"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.Description,
+ },
+ }
+ }
+
+ if source.State != nil {
+ props["state"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: string(*source.State),
+ },
+ }
+ }
+ }
+ return props, nil
+}
+
+// MapRegisteredModelType return RegisteredModel corresponding MLMD context type
+func MapRegisteredModelType(_ *openapi.RegisteredModel) *string {
+ return of(constants.RegisteredModelTypeName)
+}
+
+// MODEL VERSION
+
+// MapModelVersionProperties maps ModelVersion fields to specific MLMD properties
+func MapModelVersionProperties(source *OpenAPIModelWrapper[openapi.ModelVersion]) (map[string]*proto.Value, error) {
+ props := make(map[string]*proto.Value)
+ if source != nil {
+ if (*source.Model).Description != nil {
+ props["description"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *(*source.Model).Description,
+ },
+ }
+ }
+ if (*source).ModelName != nil {
+ props["model_name"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *(*source).ModelName,
+ },
+ }
+ }
+ props["version"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *(*source.Model).Name,
+ },
+ }
+
+ if (*source.Model).State != nil {
+ props["state"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: string(*(*source.Model).State),
+ },
+ }
+ }
+
+ if (*source.Model).Author != nil {
+ props["author"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *(*source.Model).Author,
+ },
+ }
+ }
+ }
+ return props, nil
+}
+
+// MapModelVersionType return ModelVersion corresponding MLMD context type
+func MapModelVersionType(_ *openapi.ModelVersion) *string {
+ return of(constants.ModelVersionTypeName)
+}
+
+// MapModelVersionName maps the user-provided name into MLMD one, i.e., prefixing it with
+// either the parent resource id or a generated uuid
+func MapModelVersionName(source *OpenAPIModelWrapper[openapi.ModelVersion]) *string {
+ return of(PrefixWhenOwned(source.ParentResourceId, *(*source).Model.Name))
+}
+
+// MODEL ARTIFACT
+
+// MapModelArtifactProperties maps ModelArtifact fields to specific MLMD properties
+func MapModelArtifactProperties(source *openapi.ModelArtifact) (map[string]*proto.Value, error) {
+ props := make(map[string]*proto.Value)
+ if source != nil {
+ if source.Description != nil {
+ props["description"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.Description,
+ },
+ }
+ }
+ if source.ModelFormatName != nil {
+ props["model_format_name"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.ModelFormatName,
+ },
+ }
+ }
+ if source.ModelFormatVersion != nil {
+ props["model_format_version"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.ModelFormatVersion,
+ },
+ }
+ }
+ if source.StorageKey != nil {
+ props["storage_key"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.StorageKey,
+ },
+ }
+ }
+ if source.StoragePath != nil {
+ props["storage_path"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.StoragePath,
+ },
+ }
+ }
+ if source.ServiceAccountName != nil {
+ props["service_account_name"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.ServiceAccountName,
+ },
+ }
+ }
+ }
+ return props, nil
+}
+
+// MapModelArtifactType return ModelArtifact corresponding MLMD context type
+func MapModelArtifactType(_ *openapi.ModelArtifact) *string {
+ return of(constants.ModelArtifactTypeName)
+}
+
+// MapModelArtifactName maps the user-provided name into MLMD one, i.e., prefixing it with
+// either the parent resource id or a generated uuid. If not provided, autogenerate the name
+// itself
+func MapModelArtifactName(source *OpenAPIModelWrapper[openapi.ModelArtifact]) *string {
+ // openapi.Artifact is defined with optional name, so build arbitrary name for this artifact if missing
+ var artifactName string
+ if (*source).Model.Name != nil {
+ artifactName = *(*source).Model.Name
+ } else {
+ artifactName = uuid.New().String()
+ }
+ return of(PrefixWhenOwned(source.ParentResourceId, artifactName))
+}
+
+func MapOpenAPIModelArtifactState(source *openapi.ArtifactState) (*proto.Artifact_State, error) {
+ if source == nil {
+ return nil, nil
+ }
+
+ val, ok := proto.Artifact_State_value[string(*source)]
+ if !ok {
+ return nil, fmt.Errorf("invalid artifact state: %s", string(*source))
+ }
+
+ return (*proto.Artifact_State)(&val), nil
+}
+
+// SERVING ENVIRONMENT
+
+// MapServingEnvironmentType return ServingEnvironment corresponding MLMD context type
+func MapServingEnvironmentType(_ *openapi.ServingEnvironment) *string {
+ return of(constants.ServingEnvironmentTypeName)
+}
+
+// MapServingEnvironmentProperties maps ServingEnvironment fields to specific MLMD properties
+func MapServingEnvironmentProperties(source *openapi.ServingEnvironment) (map[string]*proto.Value, error) {
+ props := make(map[string]*proto.Value)
+ if source != nil {
+ if source.Description != nil {
+ props["description"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.Description,
+ },
+ }
+ }
+ }
+ return props, nil
+}
+
+// INFERENCE SERVICE
+
+// MapInferenceServiceType return InferenceService corresponding MLMD context type
+func MapInferenceServiceType(_ *openapi.InferenceService) *string {
+ return of(constants.InferenceServiceTypeName)
+}
+
+// MapInferenceServiceProperties maps InferenceService fields to specific MLMD properties
+func MapInferenceServiceProperties(source *openapi.InferenceService) (map[string]*proto.Value, error) {
+ props := make(map[string]*proto.Value)
+ if source != nil {
+ if source.Description != nil {
+ props["description"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.Description,
+ },
+ }
+ }
+
+ if source.Runtime != nil {
+ props["runtime"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.Runtime,
+ },
+ }
+ }
+
+ if source.DesiredState != nil {
+ props["desired_state"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: string(*source.DesiredState),
+ },
+ }
+ }
+
+ if source.RegisteredModelId != "" {
+ registeredModelId, err := StringToInt64(&source.RegisteredModelId)
+ if err != nil {
+ return nil, err
+ }
+ props["registered_model_id"] = &proto.Value{
+ Value: &proto.Value_IntValue{
+ IntValue: *registeredModelId,
+ },
+ }
+ } else {
+ return nil, fmt.Errorf("missing required RegisteredModelId field")
+ }
+
+ if source.ServingEnvironmentId != "" {
+ servingEnvironmentId, err := StringToInt64(&source.ServingEnvironmentId)
+ if err != nil {
+ return nil, err
+ }
+ props["serving_environment_id"] = &proto.Value{
+ Value: &proto.Value_IntValue{
+ IntValue: *servingEnvironmentId,
+ },
+ }
+ } else {
+ return nil, fmt.Errorf("missing required ServingEnvironmentId field")
+ }
+
+ if source.ModelVersionId != nil {
+ modelVersionId, err := StringToInt64(source.ModelVersionId)
+ if err != nil {
+ return nil, err
+ }
+ props["model_version_id"] = &proto.Value{
+ Value: &proto.Value_IntValue{
+ IntValue: *modelVersionId,
+ },
+ }
+ }
+
+ }
+ return props, nil
+}
+
+// MapInferenceServiceName maps the user-provided name into MLMD one, i.e., prefixing it with
+// either the parent resource id or a generated uuid
+// ref: > InferenceService context is actually a child of ServingEnvironment parent context
+func MapInferenceServiceName(source *OpenAPIModelWrapper[openapi.InferenceService]) *string {
+ return of(PrefixWhenOwned(source.ParentResourceId, *(*source).Model.Name))
+}
+
+// SERVE MODEL
+
+// MapServeModelType return ServeModel corresponding MLMD context type
+func MapServeModelType(_ *openapi.ServeModel) *string {
+ return of(constants.ServeModelTypeName)
+}
+
+// MapServeModelProperties maps ServeModel fields to specific MLMD properties
+func MapServeModelProperties(source *openapi.ServeModel) (map[string]*proto.Value, error) {
+ props := make(map[string]*proto.Value)
+ if source != nil {
+ if source.Description != nil {
+ props["description"] = &proto.Value{
+ Value: &proto.Value_StringValue{
+ StringValue: *source.Description,
+ },
+ }
+ }
+
+ if source.ModelVersionId != "" {
+ modelVersionId, err := StringToInt64(&source.ModelVersionId)
+ if err != nil {
+ return nil, err
+ }
+ props["model_version_id"] = &proto.Value{
+ Value: &proto.Value_IntValue{
+ IntValue: *modelVersionId,
+ },
+ }
+ } else {
+ return nil, fmt.Errorf("missing required ModelVersionId field")
+ }
+ }
+ return props, nil
+}
+
+// MapServeModelName maps the user-provided name into MLMD one, i.e., prefixing it with
+// either the parent resource id or a generated uuid. If not provided, autogenerate the name
+// itself
+func MapServeModelName(source *OpenAPIModelWrapper[openapi.ServeModel]) *string {
+ // openapi.ServeModel is defined with optional name, so build arbitrary name for this artifact if missing
+ var serveModelName string
+ if (*source).Model.Name != nil {
+ serveModelName = *(*source).Model.Name
+ } else {
+ serveModelName = uuid.New().String()
+ }
+ return of(PrefixWhenOwned(source.ParentResourceId, serveModelName))
+}
+
+// MapLastKnownState maps LastKnownState field from ServeModel to Execution
+func MapLastKnownState(source *openapi.ExecutionState) (*proto.Execution_State, error) {
+ if source == nil {
+ return nil, nil
+ }
+
+ val, ok := proto.Execution_State_value[string(*source)]
+ if !ok {
+ return nil, fmt.Errorf("invalid execution state: %s", string(*source))
+ }
+
+ return (*proto.Execution_State)(&val), nil
+}
+
+// of returns a pointer to the provided literal/const input
+func of[E any](e E) *E {
+ return &e
+}
diff --git a/internal/mapper/mapper.go b/internal/mapper/mapper.go
new file mode 100644
index 000000000..6ac31b5fe
--- /dev/null
+++ b/internal/mapper/mapper.go
@@ -0,0 +1,163 @@
+package mapper
+
+import (
+ "fmt"
+
+ "github.com/opendatahub-io/model-registry/internal/constants"
+ "github.com/opendatahub-io/model-registry/internal/converter"
+ "github.com/opendatahub-io/model-registry/internal/converter/generated"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+type Mapper struct {
+ OpenAPIConverter converter.OpenAPIToMLMDConverter
+ MLMDConverter converter.MLMDToOpenAPIConverter
+ MLMDTypes map[string]int64
+}
+
+func NewMapper(mlmdTypes map[string]int64) *Mapper {
+ return &Mapper{
+ OpenAPIConverter: &generated.OpenAPIToMLMDConverterImpl{},
+ MLMDConverter: &generated.MLMDToOpenAPIConverterImpl{},
+ MLMDTypes: mlmdTypes,
+ }
+}
+
+// Utilities for OpenAPI --> MLMD mapping, make use of generated Converters
+
+func (m *Mapper) MapFromRegisteredModel(registeredModel *openapi.RegisteredModel) (*proto.Context, error) {
+ ctx, err := m.OpenAPIConverter.ConvertRegisteredModel(&converter.OpenAPIModelWrapper[openapi.RegisteredModel]{
+ TypeId: m.MLMDTypes[constants.RegisteredModelTypeName],
+ Model: registeredModel,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return ctx, nil
+}
+
+func (m *Mapper) MapFromModelVersion(modelVersion *openapi.ModelVersion, registeredModelId string, registeredModelName *string) (*proto.Context, error) {
+ ctx, err := m.OpenAPIConverter.ConvertModelVersion(&converter.OpenAPIModelWrapper[openapi.ModelVersion]{
+ TypeId: m.MLMDTypes[constants.ModelVersionTypeName],
+ Model: modelVersion,
+ ParentResourceId: ®isteredModelId,
+ ModelName: registeredModelName,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return ctx, nil
+}
+
+func (m *Mapper) MapFromModelArtifact(modelArtifact *openapi.ModelArtifact, modelVersionId *string) (*proto.Artifact, error) {
+
+ artifact, err := m.OpenAPIConverter.ConvertModelArtifact(&converter.OpenAPIModelWrapper[openapi.ModelArtifact]{
+ TypeId: m.MLMDTypes[constants.ModelArtifactTypeName],
+ Model: modelArtifact,
+ ParentResourceId: modelVersionId,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return artifact, nil
+}
+
+func (m *Mapper) MapFromModelArtifacts(modelArtifacts []openapi.ModelArtifact, modelVersionId *string) ([]*proto.Artifact, error) {
+ artifacts := []*proto.Artifact{}
+ if modelArtifacts == nil {
+ return artifacts, nil
+ }
+ for _, a := range modelArtifacts {
+ mapped, err := m.MapFromModelArtifact(&a, modelVersionId)
+ if err != nil {
+ return nil, err
+ }
+ artifacts = append(artifacts, mapped)
+ }
+ return artifacts, nil
+}
+
+func (m *Mapper) MapFromServingEnvironment(servingEnvironment *openapi.ServingEnvironment) (*proto.Context, error) {
+ ctx, err := m.OpenAPIConverter.ConvertServingEnvironment(&converter.OpenAPIModelWrapper[openapi.ServingEnvironment]{
+ TypeId: m.MLMDTypes[constants.ServingEnvironmentTypeName],
+ Model: servingEnvironment,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return ctx, nil
+}
+
+func (m *Mapper) MapFromInferenceService(inferenceService *openapi.InferenceService, servingEnvironmentId string) (*proto.Context, error) {
+ ctx, err := m.OpenAPIConverter.ConvertInferenceService(&converter.OpenAPIModelWrapper[openapi.InferenceService]{
+ TypeId: m.MLMDTypes[constants.InferenceServiceTypeName],
+ Model: inferenceService,
+ ParentResourceId: &servingEnvironmentId,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return ctx, nil
+}
+
+func (m *Mapper) MapFromServeModel(serveModel *openapi.ServeModel, inferenceServiceId string) (*proto.Execution, error) {
+ ctx, err := m.OpenAPIConverter.ConvertServeModel(&converter.OpenAPIModelWrapper[openapi.ServeModel]{
+ TypeId: m.MLMDTypes[constants.ServeModelTypeName],
+ Model: serveModel,
+ ParentResourceId: &inferenceServiceId,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return ctx, nil
+}
+
+// Utilities for MLMD --> OpenAPI mapping, make use of generated Converters
+
+func (m *Mapper) MapToRegisteredModel(ctx *proto.Context) (*openapi.RegisteredModel, error) {
+ return mapTo(ctx, m.MLMDTypes, constants.RegisteredModelTypeName, m.MLMDConverter.ConvertRegisteredModel)
+}
+
+func (m *Mapper) MapToModelVersion(ctx *proto.Context) (*openapi.ModelVersion, error) {
+ return mapTo(ctx, m.MLMDTypes, constants.ModelVersionTypeName, m.MLMDConverter.ConvertModelVersion)
+}
+
+func (m *Mapper) MapToModelArtifact(art *proto.Artifact) (*openapi.ModelArtifact, error) {
+ return mapTo(art, m.MLMDTypes, constants.ModelArtifactTypeName, m.MLMDConverter.ConvertModelArtifact)
+}
+
+func (m *Mapper) MapToServingEnvironment(ctx *proto.Context) (*openapi.ServingEnvironment, error) {
+ return mapTo(ctx, m.MLMDTypes, constants.ServingEnvironmentTypeName, m.MLMDConverter.ConvertServingEnvironment)
+}
+
+func (m *Mapper) MapToInferenceService(ctx *proto.Context) (*openapi.InferenceService, error) {
+ return mapTo(ctx, m.MLMDTypes, constants.InferenceServiceTypeName, m.MLMDConverter.ConvertInferenceService)
+}
+
+func (m *Mapper) MapToServeModel(ex *proto.Execution) (*openapi.ServeModel, error) {
+ return mapTo(ex, m.MLMDTypes, constants.ServeModelTypeName, m.MLMDConverter.ConvertServeModel)
+}
+
+type getTypeIder interface {
+ GetTypeId() int64
+ GetType() string
+}
+
+func mapTo[S getTypeIder, T any](s S, typesMap map[string]int64, typeName string, convFn func(S) (*T, error)) (*T, error) {
+ id, ok := typesMap[typeName]
+ if !ok {
+ return nil, fmt.Errorf("unknown type name provided: %s", typeName)
+ }
+
+ if s.GetTypeId() != id {
+ return nil, fmt.Errorf("invalid entity: expected %s but received %s, please check the provided id", typeName, s.GetType())
+ }
+ return convFn(s)
+}
diff --git a/internal/mapper/mapper_test.go b/internal/mapper/mapper_test.go
new file mode 100644
index 000000000..4996e14cb
--- /dev/null
+++ b/internal/mapper/mapper_test.go
@@ -0,0 +1,264 @@
+package mapper
+
+import (
+ "fmt"
+ "testing"
+
+ "github.com/opendatahub-io/model-registry/internal/constants"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+ "github.com/stretchr/testify/assert"
+)
+
+const (
+ invalidTypeId = int64(9999)
+ registeredModelTypeId = int64(1)
+ modelVersionTypeId = int64(2)
+ modelArtifactTypeId = int64(3)
+ servingEnvironmentTypeId = int64(4)
+ inferenceServiceTypeId = int64(5)
+ serveModelTypeId = int64(6)
+)
+
+var typesMap = map[string]int64{
+ constants.RegisteredModelTypeName: registeredModelTypeId,
+ constants.ModelVersionTypeName: modelVersionTypeId,
+ constants.ModelArtifactTypeName: modelArtifactTypeId,
+ constants.ServingEnvironmentTypeName: servingEnvironmentTypeId,
+ constants.InferenceServiceTypeName: inferenceServiceTypeId,
+ constants.ServeModelTypeName: serveModelTypeId,
+}
+
+func setup(t *testing.T) (*assert.Assertions, *Mapper) {
+ return assert.New(t), NewMapper(
+ typesMap,
+ )
+}
+
+func TestMapFromRegisteredModel(t *testing.T) {
+ assertion, m := setup(t)
+
+ ctx, err := m.MapFromRegisteredModel(&openapi.RegisteredModel{Name: of("ModelName")})
+ assertion.Nil(err)
+ assertion.Equal("ModelName", ctx.GetName())
+ assertion.Equal(registeredModelTypeId, ctx.GetTypeId())
+}
+
+func TestMapFromModelVersion(t *testing.T) {
+ assertion, m := setup(t)
+
+ ctx, err := m.MapFromModelVersion(&openapi.ModelVersion{Name: of("v1")}, "1", of("ModelName"))
+ assertion.Nil(err)
+ assertion.Equal("1:v1", ctx.GetName())
+ assertion.Equal(modelVersionTypeId, ctx.GetTypeId())
+}
+
+func TestMapFromModelArtifact(t *testing.T) {
+ assertion, m := setup(t)
+
+ ctx, err := m.MapFromModelArtifact(&openapi.ModelArtifact{Name: of("ModelArtifact")}, of("2"))
+ assertion.Nil(err)
+ assertion.Equal("2:ModelArtifact", ctx.GetName())
+ assertion.Equal(modelArtifactTypeId, ctx.GetTypeId())
+}
+
+func TestMapFromModelArtifacts(t *testing.T) {
+ assertion, m := setup(t)
+
+ ctxList, err := m.MapFromModelArtifacts([]openapi.ModelArtifact{{Name: of("ModelArtifact1")}, {Name: of("ModelArtifact2")}}, of("2"))
+ assertion.Nil(err)
+ assertion.Equal(2, len(ctxList))
+ assertion.Equal("2:ModelArtifact1", ctxList[0].GetName())
+ assertion.Equal("2:ModelArtifact2", ctxList[1].GetName())
+ assertion.Equal(modelArtifactTypeId, ctxList[0].GetTypeId())
+ assertion.Equal(modelArtifactTypeId, ctxList[1].GetTypeId())
+}
+
+func TestMapFromModelArtifactsEmpty(t *testing.T) {
+ assertion, m := setup(t)
+
+ ctxList, err := m.MapFromModelArtifacts([]openapi.ModelArtifact{}, of("2"))
+ assertion.Nil(err)
+ assertion.Equal(0, len(ctxList))
+
+ ctxList, err = m.MapFromModelArtifacts(nil, nil)
+ assertion.Nil(err)
+ assertion.Equal(0, len(ctxList))
+}
+
+func TestMapFromServingEnvironment(t *testing.T) {
+ assertion, m := setup(t)
+
+ ctx, err := m.MapFromServingEnvironment(&openapi.ServingEnvironment{Name: of("Env")})
+ assertion.Nil(err)
+ assertion.Equal("Env", ctx.GetName())
+ assertion.Equal(servingEnvironmentTypeId, ctx.GetTypeId())
+}
+
+func TestMapFromInferenceService(t *testing.T) {
+ assertion, m := setup(t)
+
+ ctx, err := m.MapFromInferenceService(&openapi.InferenceService{Name: of("IS"), ServingEnvironmentId: "5", RegisteredModelId: "1"}, "5")
+ assertion.Nil(err)
+ assertion.Equal("5:IS", ctx.GetName())
+ assertion.Equal(inferenceServiceTypeId, ctx.GetTypeId())
+}
+
+func TestMapFromInferenceServiceMissingRequiredIds(t *testing.T) {
+ assertion, m := setup(t)
+
+ _, err := m.MapFromInferenceService(&openapi.InferenceService{Name: of("IS")}, "5")
+ assertion.NotNil(err)
+ assertion.Equal("error setting field Properties: missing required RegisteredModelId field", err.Error())
+}
+
+func TestMapFromServeModel(t *testing.T) {
+ assertion, m := setup(t)
+
+ ctx, err := m.MapFromServeModel(&openapi.ServeModel{Name: of("Serve"), ModelVersionId: "1"}, "10")
+ assertion.Nil(err)
+ assertion.Equal("10:Serve", ctx.GetName())
+ assertion.Equal(serveModelTypeId, ctx.GetTypeId())
+}
+
+func TestMapFromServeModelMissingRequiredId(t *testing.T) {
+ assertion, m := setup(t)
+
+ _, err := m.MapFromServeModel(&openapi.ServeModel{Name: of("Serve")}, "10")
+ assertion.NotNil(err)
+ assertion.Equal("error setting field Properties: missing required ModelVersionId field", err.Error())
+}
+
+func TestMapToRegisteredModel(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToRegisteredModel(&proto.Context{
+ TypeId: of(registeredModelTypeId),
+ Type: of(constants.RegisteredModelTypeName),
+ })
+ assertion.Nil(err)
+}
+
+func TestMapToRegisteredModelInvalid(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToRegisteredModel(&proto.Context{
+ TypeId: of(invalidTypeId),
+ Type: of("odh.OtherEntity"),
+ })
+ assertion.NotNil(err)
+ assertion.Equal(fmt.Sprintf("invalid entity: expected %s but received odh.OtherEntity, please check the provided id", constants.RegisteredModelTypeName), err.Error())
+}
+
+func TestMapToModelVersion(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToModelVersion(&proto.Context{
+ TypeId: of(modelVersionTypeId),
+ Type: of(constants.ModelVersionTypeName),
+ })
+ assertion.Nil(err)
+}
+
+func TestMapToModelVersionInvalid(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToModelVersion(&proto.Context{
+ TypeId: of(invalidTypeId),
+ Type: of("odh.OtherEntity"),
+ })
+ assertion.NotNil(err)
+ assertion.Equal(fmt.Sprintf("invalid entity: expected %s but received odh.OtherEntity, please check the provided id", constants.ModelVersionTypeName), err.Error())
+}
+
+func TestMapToModelArtifact(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToModelArtifact(&proto.Artifact{
+ TypeId: of(modelArtifactTypeId),
+ Type: of(constants.ModelArtifactTypeName),
+ })
+ assertion.Nil(err)
+}
+
+func TestMapToModelArtifactMissingType(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToModelArtifact(&proto.Artifact{
+ TypeId: of(modelArtifactTypeId),
+ })
+ assertion.NotNil(err)
+ assertion.Equal("error setting field ArtifactType: invalid artifact type found: ", err.Error())
+}
+
+func TestMapToModelArtifactInvalid(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToModelArtifact(&proto.Artifact{
+ TypeId: of(invalidTypeId),
+ Type: of("odh.OtherEntity"),
+ })
+ assertion.NotNil(err)
+ assertion.Equal(fmt.Sprintf("invalid entity: expected %s but received odh.OtherEntity, please check the provided id", constants.ModelArtifactTypeName), err.Error())
+}
+
+func TestMapToServingEnvironment(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToServingEnvironment(&proto.Context{
+ TypeId: of(servingEnvironmentTypeId),
+ Type: of(constants.ServingEnvironmentTypeName),
+ })
+ assertion.Nil(err)
+}
+
+func TestMapToServingEnvironmentInvalid(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToServingEnvironment(&proto.Context{
+ TypeId: of(invalidTypeId),
+ Type: of("odh.OtherEntity"),
+ })
+ assertion.NotNil(err)
+ assertion.Equal(fmt.Sprintf("invalid entity: expected %s but received odh.OtherEntity, please check the provided id", constants.ServingEnvironmentTypeName), err.Error())
+}
+
+func TestMapToInferenceService(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToInferenceService(&proto.Context{
+ TypeId: of(inferenceServiceTypeId),
+ Type: of(constants.InferenceServiceTypeName),
+ })
+ assertion.Nil(err)
+}
+
+func TestMapToInferenceServiceInvalid(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToInferenceService(&proto.Context{
+ TypeId: of(invalidTypeId),
+ Type: of("odh.OtherEntity"),
+ })
+ assertion.NotNil(err)
+ assertion.Equal(fmt.Sprintf("invalid entity: expected %s but received odh.OtherEntity, please check the provided id", constants.InferenceServiceTypeName), err.Error())
+}
+
+func TestMapToServeModel(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToServeModel(&proto.Execution{
+ TypeId: of(serveModelTypeId),
+ Type: of(constants.ServeModelTypeName),
+ })
+ assertion.Nil(err)
+}
+
+func TestMapToServeModelInvalid(t *testing.T) {
+ assertion, m := setup(t)
+ _, err := m.MapToServeModel(&proto.Execution{
+ TypeId: of(invalidTypeId),
+ Type: of("odh.OtherEntity"),
+ })
+ assertion.NotNil(err)
+ assertion.Equal(fmt.Sprintf("invalid entity: expected %s but received odh.OtherEntity, please check the provided id", constants.ServeModelTypeName), err.Error())
+}
+
+func TestMapTo(t *testing.T) {
+ _, err := mapTo[*proto.Execution, any](&proto.Execution{TypeId: of(registeredModelTypeId)}, typesMap, "notExisitingTypeName", func(e *proto.Execution) (*any, error) { return nil, nil })
+ assert.NotNil(t, err)
+ assert.Equal(t, "unknown type name provided: notExisitingTypeName", err.Error())
+}
+
+// of returns a pointer to the provided literal/const input
+func of[E any](e E) *E {
+ return &e
+}
diff --git a/internal/ml_metadata/proto/metadata_store.pb.go b/internal/ml_metadata/proto/metadata_store.pb.go
new file mode 100644
index 000000000..b616143bb
--- /dev/null
+++ b/internal/ml_metadata/proto/metadata_store.pb.go
@@ -0,0 +1,6450 @@
+// Copyright 2019 Google LLC
+//
+//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
+//
+//https://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.
+//==============================================================================
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.31.0
+// protoc v4.24.3
+// source: ml_metadata/proto/metadata_store.proto
+
+package proto
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// The list of supported property value types.
+type PropertyType int32
+
+const (
+ PropertyType_UNKNOWN PropertyType = 0
+ PropertyType_INT PropertyType = 1
+ PropertyType_DOUBLE PropertyType = 2
+ PropertyType_STRING PropertyType = 3
+ // Prefer to use `PROTO` to store structed data since this option has
+ // inefficient database storage usage.
+ PropertyType_STRUCT PropertyType = 4
+ PropertyType_PROTO PropertyType = 5
+ PropertyType_BOOLEAN PropertyType = 6
+)
+
+// Enum value maps for PropertyType.
+var (
+ PropertyType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "INT",
+ 2: "DOUBLE",
+ 3: "STRING",
+ 4: "STRUCT",
+ 5: "PROTO",
+ 6: "BOOLEAN",
+ }
+ PropertyType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "INT": 1,
+ "DOUBLE": 2,
+ "STRING": 3,
+ "STRUCT": 4,
+ "PROTO": 5,
+ "BOOLEAN": 6,
+ }
+)
+
+func (x PropertyType) Enum() *PropertyType {
+ p := new(PropertyType)
+ *p = x
+ return p
+}
+
+func (x PropertyType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PropertyType) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[0].Descriptor()
+}
+
+func (PropertyType) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[0]
+}
+
+func (x PropertyType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *PropertyType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = PropertyType(num)
+ return nil
+}
+
+// Deprecated: Use PropertyType.Descriptor instead.
+func (PropertyType) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{0}
+}
+
+type Artifact_State int32
+
+const (
+ Artifact_UNKNOWN Artifact_State = 0
+ // A state indicating that the artifact may exist.
+ Artifact_PENDING Artifact_State = 1
+ // A state indicating that the artifact should exist, unless something
+ // external to the system deletes it.
+ Artifact_LIVE Artifact_State = 2
+ // A state indicating that the artifact should be deleted.
+ Artifact_MARKED_FOR_DELETION Artifact_State = 3
+ // A state indicating that the artifact has been deleted.
+ Artifact_DELETED Artifact_State = 4
+ // A state indicating that the artifact has been abandoned, which may be
+ // due to a failed or cancelled execution.
+ Artifact_ABANDONED Artifact_State = 5
+ // A state indicating that the artifact is a reference artifact. At
+ // execution start time, the orchestrator produces an output artifact for
+ // each output key with state PENDING. However, for an intermediate
+ // artifact, this first artifact's state will be REFERENCE. Intermediate
+ // artifacts emitted during a component's execution will copy the REFERENCE
+ // artifact's attributes. At the end of an execution, the artifact state
+ // should remain REFERENCE instead of being changed to LIVE.
+ Artifact_REFERENCE Artifact_State = 6
+)
+
+// Enum value maps for Artifact_State.
+var (
+ Artifact_State_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "PENDING",
+ 2: "LIVE",
+ 3: "MARKED_FOR_DELETION",
+ 4: "DELETED",
+ 5: "ABANDONED",
+ 6: "REFERENCE",
+ }
+ Artifact_State_value = map[string]int32{
+ "UNKNOWN": 0,
+ "PENDING": 1,
+ "LIVE": 2,
+ "MARKED_FOR_DELETION": 3,
+ "DELETED": 4,
+ "ABANDONED": 5,
+ "REFERENCE": 6,
+ }
+)
+
+func (x Artifact_State) Enum() *Artifact_State {
+ p := new(Artifact_State)
+ *p = x
+ return p
+}
+
+func (x Artifact_State) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Artifact_State) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[1].Descriptor()
+}
+
+func (Artifact_State) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[1]
+}
+
+func (x Artifact_State) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Artifact_State) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = Artifact_State(num)
+ return nil
+}
+
+// Deprecated: Use Artifact_State.Descriptor instead.
+func (Artifact_State) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{2, 0}
+}
+
+// An enum of system-defined artifact types.
+type ArtifactType_SystemDefinedBaseType int32
+
+const (
+ ArtifactType_UNSET ArtifactType_SystemDefinedBaseType = 0
+ ArtifactType_DATASET ArtifactType_SystemDefinedBaseType = 1
+ ArtifactType_MODEL ArtifactType_SystemDefinedBaseType = 2
+ ArtifactType_METRICS ArtifactType_SystemDefinedBaseType = 3
+ ArtifactType_STATISTICS ArtifactType_SystemDefinedBaseType = 4
+)
+
+// Enum value maps for ArtifactType_SystemDefinedBaseType.
+var (
+ ArtifactType_SystemDefinedBaseType_name = map[int32]string{
+ 0: "UNSET",
+ 1: "DATASET",
+ 2: "MODEL",
+ 3: "METRICS",
+ 4: "STATISTICS",
+ }
+ ArtifactType_SystemDefinedBaseType_value = map[string]int32{
+ "UNSET": 0,
+ "DATASET": 1,
+ "MODEL": 2,
+ "METRICS": 3,
+ "STATISTICS": 4,
+ }
+)
+
+func (x ArtifactType_SystemDefinedBaseType) Enum() *ArtifactType_SystemDefinedBaseType {
+ p := new(ArtifactType_SystemDefinedBaseType)
+ *p = x
+ return p
+}
+
+func (x ArtifactType_SystemDefinedBaseType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ArtifactType_SystemDefinedBaseType) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[2].Descriptor()
+}
+
+func (ArtifactType_SystemDefinedBaseType) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[2]
+}
+
+func (x ArtifactType_SystemDefinedBaseType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ArtifactType_SystemDefinedBaseType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ArtifactType_SystemDefinedBaseType(num)
+ return nil
+}
+
+// Deprecated: Use ArtifactType_SystemDefinedBaseType.Descriptor instead.
+func (ArtifactType_SystemDefinedBaseType) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{3, 0}
+}
+
+// Events distinguish between an artifact that is written by the execution
+// (possibly as a cache), versus artifacts that are part of the declared
+// output of the Execution. For more information on what DECLARED_ means,
+// see the comment on the message.
+type Event_Type int32
+
+const (
+ Event_UNKNOWN Event_Type = 0
+ Event_DECLARED_OUTPUT Event_Type = 1 // A declared output of the execution.
+ Event_DECLARED_INPUT Event_Type = 2 // A declared input of the execution.
+ Event_INPUT Event_Type = 3 // An input of the execution.
+ Event_OUTPUT Event_Type = 4 // An output of the execution.
+ Event_INTERNAL_INPUT Event_Type = 5 // An internal input of the execution.
+ Event_INTERNAL_OUTPUT Event_Type = 6 // An internal output of the execution.
+ Event_PENDING_OUTPUT Event_Type = 7 // A pending output of the execution.
+)
+
+// Enum value maps for Event_Type.
+var (
+ Event_Type_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "DECLARED_OUTPUT",
+ 2: "DECLARED_INPUT",
+ 3: "INPUT",
+ 4: "OUTPUT",
+ 5: "INTERNAL_INPUT",
+ 6: "INTERNAL_OUTPUT",
+ 7: "PENDING_OUTPUT",
+ }
+ Event_Type_value = map[string]int32{
+ "UNKNOWN": 0,
+ "DECLARED_OUTPUT": 1,
+ "DECLARED_INPUT": 2,
+ "INPUT": 3,
+ "OUTPUT": 4,
+ "INTERNAL_INPUT": 5,
+ "INTERNAL_OUTPUT": 6,
+ "PENDING_OUTPUT": 7,
+ }
+)
+
+func (x Event_Type) Enum() *Event_Type {
+ p := new(Event_Type)
+ *p = x
+ return p
+}
+
+func (x Event_Type) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Event_Type) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[3].Descriptor()
+}
+
+func (Event_Type) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[3]
+}
+
+func (x Event_Type) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Event_Type) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = Event_Type(num)
+ return nil
+}
+
+// Deprecated: Use Event_Type.Descriptor instead.
+func (Event_Type) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{4, 0}
+}
+
+// The state of the Execution. The state transitions are
+//
+// NEW -> RUNNING -> COMPLETE | CACHED | FAILED | CANCELED
+//
+// CACHED means the execution is skipped due to cached results.
+// CANCELED means the execution is skipped due to precondition not met. It is
+// different from CACHED in that a CANCELED execution will not have any event
+// associated with it. It is different from FAILED in that there is no
+// unexpected error happened and it is regarded as a normal state.
+type Execution_State int32
+
+const (
+ Execution_UNKNOWN Execution_State = 0
+ Execution_NEW Execution_State = 1
+ Execution_RUNNING Execution_State = 2
+ Execution_COMPLETE Execution_State = 3
+ Execution_FAILED Execution_State = 4
+ Execution_CACHED Execution_State = 5
+ Execution_CANCELED Execution_State = 6
+)
+
+// Enum value maps for Execution_State.
+var (
+ Execution_State_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "NEW",
+ 2: "RUNNING",
+ 3: "COMPLETE",
+ 4: "FAILED",
+ 5: "CACHED",
+ 6: "CANCELED",
+ }
+ Execution_State_value = map[string]int32{
+ "UNKNOWN": 0,
+ "NEW": 1,
+ "RUNNING": 2,
+ "COMPLETE": 3,
+ "FAILED": 4,
+ "CACHED": 5,
+ "CANCELED": 6,
+ }
+)
+
+func (x Execution_State) Enum() *Execution_State {
+ p := new(Execution_State)
+ *p = x
+ return p
+}
+
+func (x Execution_State) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Execution_State) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[4].Descriptor()
+}
+
+func (Execution_State) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[4]
+}
+
+func (x Execution_State) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Execution_State) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = Execution_State(num)
+ return nil
+}
+
+// Deprecated: Use Execution_State.Descriptor instead.
+func (Execution_State) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{5, 0}
+}
+
+// An enum of system-defined execution types.
+type ExecutionType_SystemDefinedBaseType int32
+
+const (
+ ExecutionType_UNSET ExecutionType_SystemDefinedBaseType = 0
+ ExecutionType_TRAIN ExecutionType_SystemDefinedBaseType = 1
+ ExecutionType_TRANSFORM ExecutionType_SystemDefinedBaseType = 2
+ ExecutionType_PROCESS ExecutionType_SystemDefinedBaseType = 3
+ ExecutionType_EVALUATE ExecutionType_SystemDefinedBaseType = 4
+ ExecutionType_DEPLOY ExecutionType_SystemDefinedBaseType = 5
+)
+
+// Enum value maps for ExecutionType_SystemDefinedBaseType.
+var (
+ ExecutionType_SystemDefinedBaseType_name = map[int32]string{
+ 0: "UNSET",
+ 1: "TRAIN",
+ 2: "TRANSFORM",
+ 3: "PROCESS",
+ 4: "EVALUATE",
+ 5: "DEPLOY",
+ }
+ ExecutionType_SystemDefinedBaseType_value = map[string]int32{
+ "UNSET": 0,
+ "TRAIN": 1,
+ "TRANSFORM": 2,
+ "PROCESS": 3,
+ "EVALUATE": 4,
+ "DEPLOY": 5,
+ }
+)
+
+func (x ExecutionType_SystemDefinedBaseType) Enum() *ExecutionType_SystemDefinedBaseType {
+ p := new(ExecutionType_SystemDefinedBaseType)
+ *p = x
+ return p
+}
+
+func (x ExecutionType_SystemDefinedBaseType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ExecutionType_SystemDefinedBaseType) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[5].Descriptor()
+}
+
+func (ExecutionType_SystemDefinedBaseType) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[5]
+}
+
+func (x ExecutionType_SystemDefinedBaseType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ExecutionType_SystemDefinedBaseType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ExecutionType_SystemDefinedBaseType(num)
+ return nil
+}
+
+// Deprecated: Use ExecutionType_SystemDefinedBaseType.Descriptor instead.
+func (ExecutionType_SystemDefinedBaseType) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{6, 0}
+}
+
+// An enum of system-defined context types.
+type ContextType_SystemDefinedBaseType int32
+
+const (
+ ContextType_UNSET ContextType_SystemDefinedBaseType = 0
+)
+
+// Enum value maps for ContextType_SystemDefinedBaseType.
+var (
+ ContextType_SystemDefinedBaseType_name = map[int32]string{
+ 0: "UNSET",
+ }
+ ContextType_SystemDefinedBaseType_value = map[string]int32{
+ "UNSET": 0,
+ }
+)
+
+func (x ContextType_SystemDefinedBaseType) Enum() *ContextType_SystemDefinedBaseType {
+ p := new(ContextType_SystemDefinedBaseType)
+ *p = x
+ return p
+}
+
+func (x ContextType_SystemDefinedBaseType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ContextType_SystemDefinedBaseType) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[6].Descriptor()
+}
+
+func (ContextType_SystemDefinedBaseType) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[6]
+}
+
+func (x ContextType_SystemDefinedBaseType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ContextType_SystemDefinedBaseType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ContextType_SystemDefinedBaseType(num)
+ return nil
+}
+
+// Deprecated: Use ContextType_SystemDefinedBaseType.Descriptor instead.
+func (ContextType_SystemDefinedBaseType) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{7, 0}
+}
+
+// Connection parameters for SQLite3 based metadata source.
+type SqliteMetadataSourceConfig_ConnectionMode int32
+
+const (
+ SqliteMetadataSourceConfig_UNKNOWN SqliteMetadataSourceConfig_ConnectionMode = 0
+ // Connect a metadata source in read-only mode. Connection fail if the
+ // sqlite3 database at the `filename` does not exist. Any queries modifying
+ // the database fail.
+ SqliteMetadataSourceConfig_READONLY SqliteMetadataSourceConfig_ConnectionMode = 1
+ // Connect a metadata source in read/write mode. Connection fail if the
+ // sqlite3 database at the `filename` does not exist.
+ SqliteMetadataSourceConfig_READWRITE SqliteMetadataSourceConfig_ConnectionMode = 2
+ // Similar to READWRITE. In addition, it creates the database if it does not
+ // exist.
+ SqliteMetadataSourceConfig_READWRITE_OPENCREATE SqliteMetadataSourceConfig_ConnectionMode = 3
+)
+
+// Enum value maps for SqliteMetadataSourceConfig_ConnectionMode.
+var (
+ SqliteMetadataSourceConfig_ConnectionMode_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "READONLY",
+ 2: "READWRITE",
+ 3: "READWRITE_OPENCREATE",
+ }
+ SqliteMetadataSourceConfig_ConnectionMode_value = map[string]int32{
+ "UNKNOWN": 0,
+ "READONLY": 1,
+ "READWRITE": 2,
+ "READWRITE_OPENCREATE": 3,
+ }
+)
+
+func (x SqliteMetadataSourceConfig_ConnectionMode) Enum() *SqliteMetadataSourceConfig_ConnectionMode {
+ p := new(SqliteMetadataSourceConfig_ConnectionMode)
+ *p = x
+ return p
+}
+
+func (x SqliteMetadataSourceConfig_ConnectionMode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SqliteMetadataSourceConfig_ConnectionMode) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[7].Descriptor()
+}
+
+func (SqliteMetadataSourceConfig_ConnectionMode) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[7]
+}
+
+func (x SqliteMetadataSourceConfig_ConnectionMode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *SqliteMetadataSourceConfig_ConnectionMode) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = SqliteMetadataSourceConfig_ConnectionMode(num)
+ return nil
+}
+
+// Deprecated: Use SqliteMetadataSourceConfig_ConnectionMode.Descriptor instead.
+func (SqliteMetadataSourceConfig_ConnectionMode) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{23, 0}
+}
+
+// Supported fields for Ordering.
+type ListOperationOptions_OrderByField_Field int32
+
+const (
+ ListOperationOptions_OrderByField_FIELD_UNSPECIFIED ListOperationOptions_OrderByField_Field = 0
+ ListOperationOptions_OrderByField_CREATE_TIME ListOperationOptions_OrderByField_Field = 1
+ ListOperationOptions_OrderByField_LAST_UPDATE_TIME ListOperationOptions_OrderByField_Field = 2
+ ListOperationOptions_OrderByField_ID ListOperationOptions_OrderByField_Field = 3
+)
+
+// Enum value maps for ListOperationOptions_OrderByField_Field.
+var (
+ ListOperationOptions_OrderByField_Field_name = map[int32]string{
+ 0: "FIELD_UNSPECIFIED",
+ 1: "CREATE_TIME",
+ 2: "LAST_UPDATE_TIME",
+ 3: "ID",
+ }
+ ListOperationOptions_OrderByField_Field_value = map[string]int32{
+ "FIELD_UNSPECIFIED": 0,
+ "CREATE_TIME": 1,
+ "LAST_UPDATE_TIME": 2,
+ "ID": 3,
+ }
+)
+
+func (x ListOperationOptions_OrderByField_Field) Enum() *ListOperationOptions_OrderByField_Field {
+ p := new(ListOperationOptions_OrderByField_Field)
+ *p = x
+ return p
+}
+
+func (x ListOperationOptions_OrderByField_Field) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ListOperationOptions_OrderByField_Field) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[8].Descriptor()
+}
+
+func (ListOperationOptions_OrderByField_Field) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[8]
+}
+
+func (x ListOperationOptions_OrderByField_Field) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ListOperationOptions_OrderByField_Field) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ListOperationOptions_OrderByField_Field(num)
+ return nil
+}
+
+// Deprecated: Use ListOperationOptions_OrderByField_Field.Descriptor instead.
+func (ListOperationOptions_OrderByField_Field) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{31, 0, 0}
+}
+
+type LineageSubgraphQueryOptions_Direction int32
+
+const (
+ // Direction is by defult DIRECTION_UNSPECIFIED, which is equivalent to
+ // BIDIRECTIONAL.
+ LineageSubgraphQueryOptions_DIRECTION_UNSPECIFIED LineageSubgraphQueryOptions_Direction = 0
+ // Indicates tracing the lineage graph by hops in upstream direction.
+ LineageSubgraphQueryOptions_UPSTREAM LineageSubgraphQueryOptions_Direction = 1
+ // Indicates tracing the lineage graph by hops in downstream direction.
+ LineageSubgraphQueryOptions_DOWNSTREAM LineageSubgraphQueryOptions_Direction = 2
+ // Indicates tracing the lineage graph in both directions.
+ LineageSubgraphQueryOptions_BIDIRECTIONAL LineageSubgraphQueryOptions_Direction = 3
+)
+
+// Enum value maps for LineageSubgraphQueryOptions_Direction.
+var (
+ LineageSubgraphQueryOptions_Direction_name = map[int32]string{
+ 0: "DIRECTION_UNSPECIFIED",
+ 1: "UPSTREAM",
+ 2: "DOWNSTREAM",
+ 3: "BIDIRECTIONAL",
+ }
+ LineageSubgraphQueryOptions_Direction_value = map[string]int32{
+ "DIRECTION_UNSPECIFIED": 0,
+ "UPSTREAM": 1,
+ "DOWNSTREAM": 2,
+ "BIDIRECTIONAL": 3,
+ }
+)
+
+func (x LineageSubgraphQueryOptions_Direction) Enum() *LineageSubgraphQueryOptions_Direction {
+ p := new(LineageSubgraphQueryOptions_Direction)
+ *p = x
+ return p
+}
+
+func (x LineageSubgraphQueryOptions_Direction) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (LineageSubgraphQueryOptions_Direction) Descriptor() protoreflect.EnumDescriptor {
+ return file_ml_metadata_proto_metadata_store_proto_enumTypes[9].Descriptor()
+}
+
+func (LineageSubgraphQueryOptions_Direction) Type() protoreflect.EnumType {
+ return &file_ml_metadata_proto_metadata_store_proto_enumTypes[9]
+}
+
+func (x LineageSubgraphQueryOptions_Direction) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *LineageSubgraphQueryOptions_Direction) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = LineageSubgraphQueryOptions_Direction(num)
+ return nil
+}
+
+// Deprecated: Use LineageSubgraphQueryOptions_Direction.Descriptor instead.
+func (LineageSubgraphQueryOptions_Direction) EnumDescriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{35, 0}
+}
+
+type SystemTypeExtension struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of a system defined type.
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+}
+
+func (x *SystemTypeExtension) Reset() {
+ *x = SystemTypeExtension{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SystemTypeExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SystemTypeExtension) ProtoMessage() {}
+
+func (x *SystemTypeExtension) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SystemTypeExtension.ProtoReflect.Descriptor instead.
+func (*SystemTypeExtension) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SystemTypeExtension) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+// A value in properties.
+type Value struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Value:
+ //
+ // *Value_IntValue
+ // *Value_DoubleValue
+ // *Value_StringValue
+ // *Value_StructValue
+ // *Value_ProtoValue
+ // *Value_BoolValue
+ Value isValue_Value `protobuf_oneof:"value"`
+}
+
+func (x *Value) Reset() {
+ *x = Value{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Value) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Value) ProtoMessage() {}
+
+func (x *Value) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Value.ProtoReflect.Descriptor instead.
+func (*Value) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{1}
+}
+
+func (m *Value) GetValue() isValue_Value {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (x *Value) GetIntValue() int64 {
+ if x, ok := x.GetValue().(*Value_IntValue); ok {
+ return x.IntValue
+ }
+ return 0
+}
+
+func (x *Value) GetDoubleValue() float64 {
+ if x, ok := x.GetValue().(*Value_DoubleValue); ok {
+ return x.DoubleValue
+ }
+ return 0
+}
+
+func (x *Value) GetStringValue() string {
+ if x, ok := x.GetValue().(*Value_StringValue); ok {
+ return x.StringValue
+ }
+ return ""
+}
+
+func (x *Value) GetStructValue() *structpb.Struct {
+ if x, ok := x.GetValue().(*Value_StructValue); ok {
+ return x.StructValue
+ }
+ return nil
+}
+
+func (x *Value) GetProtoValue() *anypb.Any {
+ if x, ok := x.GetValue().(*Value_ProtoValue); ok {
+ return x.ProtoValue
+ }
+ return nil
+}
+
+func (x *Value) GetBoolValue() bool {
+ if x, ok := x.GetValue().(*Value_BoolValue); ok {
+ return x.BoolValue
+ }
+ return false
+}
+
+type isValue_Value interface {
+ isValue_Value()
+}
+
+type Value_IntValue struct {
+ IntValue int64 `protobuf:"varint,1,opt,name=int_value,json=intValue,oneof"`
+}
+
+type Value_DoubleValue struct {
+ DoubleValue float64 `protobuf:"fixed64,2,opt,name=double_value,json=doubleValue,oneof"`
+}
+
+type Value_StringValue struct {
+ StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"`
+}
+
+type Value_StructValue struct {
+ StructValue *structpb.Struct `protobuf:"bytes,4,opt,name=struct_value,json=structValue,oneof"`
+}
+
+type Value_ProtoValue struct {
+ ProtoValue *anypb.Any `protobuf:"bytes,5,opt,name=proto_value,json=protoValue,oneof"`
+}
+
+type Value_BoolValue struct {
+ BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,oneof"`
+}
+
+func (*Value_IntValue) isValue_Value() {}
+
+func (*Value_DoubleValue) isValue_Value() {}
+
+func (*Value_StringValue) isValue_Value() {}
+
+func (*Value_StructValue) isValue_Value() {}
+
+func (*Value_ProtoValue) isValue_Value() {}
+
+func (*Value_BoolValue) isValue_Value() {}
+
+type Artifact struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Output only. The unique server generated id of the artifact.
+ Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set,
+ // it must be unique among all the artifacts of the same artifact type within
+ // a database instance and cannot be changed once set.
+ Name *string `protobuf:"bytes,7,opt,name=name" json:"name,omitempty"`
+ // The id of an ArtifactType. This needs to be specified when an artifact is
+ // created, and it cannot be changed.
+ TypeId *int64 `protobuf:"varint,2,opt,name=type_id,json=typeId" json:"type_id,omitempty"`
+ // Output only. The name of an ArtifactType.
+ Type *string `protobuf:"bytes,8,opt,name=type" json:"type,omitempty"`
+ // The uniform resource identifier of the physical artifact.
+ // May be empty if there is no physical artifact.
+ Uri *string `protobuf:"bytes,3,opt,name=uri" json:"uri,omitempty"`
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all artifacts within a database instance.
+ ExternalId *string `protobuf:"bytes,11,opt,name=external_id,json=externalId" json:"external_id,omitempty"`
+ // Properties of the artifact.
+ // Properties must be specified in the ArtifactType.
+ Properties map[string]*Value `protobuf:"bytes,4,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties map[string]*Value `protobuf:"bytes,5,rep,name=custom_properties,json=customProperties" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // The state of the artifact known to the system.
+ State *Artifact_State `protobuf:"varint,6,opt,name=state,enum=ml_metadata.Artifact_State" json:"state,omitempty"`
+ // Output only. Create time of the artifact in millisecond since epoch.
+ CreateTimeSinceEpoch *int64 `protobuf:"varint,9,opt,name=create_time_since_epoch,json=createTimeSinceEpoch" json:"create_time_since_epoch,omitempty"`
+ // Output only. Last update time of the artifact since epoch in millisecond
+ // since epoch.
+ LastUpdateTimeSinceEpoch *int64 `protobuf:"varint,10,opt,name=last_update_time_since_epoch,json=lastUpdateTimeSinceEpoch" json:"last_update_time_since_epoch,omitempty"`
+ // Output only.
+ SystemMetadata *anypb.Any `protobuf:"bytes,12,opt,name=system_metadata,json=systemMetadata" json:"system_metadata,omitempty"`
+}
+
+func (x *Artifact) Reset() {
+ *x = Artifact{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Artifact) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Artifact) ProtoMessage() {}
+
+func (x *Artifact) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Artifact.ProtoReflect.Descriptor instead.
+func (*Artifact) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *Artifact) GetId() int64 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *Artifact) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *Artifact) GetTypeId() int64 {
+ if x != nil && x.TypeId != nil {
+ return *x.TypeId
+ }
+ return 0
+}
+
+func (x *Artifact) GetType() string {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return ""
+}
+
+func (x *Artifact) GetUri() string {
+ if x != nil && x.Uri != nil {
+ return *x.Uri
+ }
+ return ""
+}
+
+func (x *Artifact) GetExternalId() string {
+ if x != nil && x.ExternalId != nil {
+ return *x.ExternalId
+ }
+ return ""
+}
+
+func (x *Artifact) GetProperties() map[string]*Value {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *Artifact) GetCustomProperties() map[string]*Value {
+ if x != nil {
+ return x.CustomProperties
+ }
+ return nil
+}
+
+func (x *Artifact) GetState() Artifact_State {
+ if x != nil && x.State != nil {
+ return *x.State
+ }
+ return Artifact_UNKNOWN
+}
+
+func (x *Artifact) GetCreateTimeSinceEpoch() int64 {
+ if x != nil && x.CreateTimeSinceEpoch != nil {
+ return *x.CreateTimeSinceEpoch
+ }
+ return 0
+}
+
+func (x *Artifact) GetLastUpdateTimeSinceEpoch() int64 {
+ if x != nil && x.LastUpdateTimeSinceEpoch != nil {
+ return *x.LastUpdateTimeSinceEpoch
+ }
+ return 0
+}
+
+func (x *Artifact) GetSystemMetadata() *anypb.Any {
+ if x != nil {
+ return x.SystemMetadata
+ }
+ return nil
+}
+
+type ArtifactType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The id of the type. 1-1 relationship between type names and IDs.
+ Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ // The name of the type. It must be unique among ArtifactTypes within a
+ // database instance.
+ Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
+ // An optional version of the type. An empty string is treated as unset.
+ Version *string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
+ // An optional description about the type.
+ Description *string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all artifact types within a database
+ // instance.
+ ExternalId *string `protobuf:"bytes,7,opt,name=external_id,json=externalId" json:"external_id,omitempty"`
+ // The schema of the type.
+ // Properties are always optional in the artifact.
+ // Properties of an artifact type can be expanded but not contracted (i.e.,
+ // you can add columns but not remove them).
+ Properties map[string]PropertyType `protobuf:"bytes,3,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=ml_metadata.PropertyType"`
+ // An optional system defined base_type expressing the intent of the current
+ // type. This field is useful for the tool builders to utilize the stored MLMD
+ // information, e.g., `MyModel` ArtifactType could set base_type = MODEL.
+ BaseType *ArtifactType_SystemDefinedBaseType `protobuf:"varint,6,opt,name=base_type,json=baseType,enum=ml_metadata.ArtifactType_SystemDefinedBaseType" json:"base_type,omitempty"`
+}
+
+func (x *ArtifactType) Reset() {
+ *x = ArtifactType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ArtifactType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArtifactType) ProtoMessage() {}
+
+func (x *ArtifactType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArtifactType.ProtoReflect.Descriptor instead.
+func (*ArtifactType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ArtifactType) GetId() int64 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *ArtifactType) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *ArtifactType) GetVersion() string {
+ if x != nil && x.Version != nil {
+ return *x.Version
+ }
+ return ""
+}
+
+func (x *ArtifactType) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *ArtifactType) GetExternalId() string {
+ if x != nil && x.ExternalId != nil {
+ return *x.ExternalId
+ }
+ return ""
+}
+
+func (x *ArtifactType) GetProperties() map[string]PropertyType {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *ArtifactType) GetBaseType() ArtifactType_SystemDefinedBaseType {
+ if x != nil && x.BaseType != nil {
+ return *x.BaseType
+ }
+ return ArtifactType_UNSET
+}
+
+// An event represents a relationship between an artifact and an execution.
+// There are different kinds of events, relating to both input and output, as
+// well as how they are used by the mlmd powered system.
+// For example, the DECLARED_INPUT and DECLARED_OUTPUT events are part of the
+// signature of an execution. For example, consider:
+//
+// my_result = my_execution({"data":[3,7],"schema":8})
+//
+// Where 3, 7, and 8 are artifact_ids, Assuming execution_id of my_execution is
+// 12 and artifact_id of my_result is 15, the events are:
+//
+// {
+// artifact_id:3,
+// execution_id: 12,
+// type:DECLARED_INPUT,
+// path:{step:[{"key":"data"},{"index":0}]}
+// }
+// {
+// artifact_id:7,
+// execution_id: 12,
+// type:DECLARED_INPUT,
+// path:{step:[{"key":"data"},{"index":1}]}
+// }
+// {
+// artifact_id:8,
+// execution_id: 12,
+// type:DECLARED_INPUT,
+// path:{step:[{"key":"schema"}]}
+// }
+// {
+// artifact_id:15,
+// execution_id: 12,
+// type:DECLARED_OUTPUT,
+// path:{step:[{"key":"my_result"}]}
+// }
+//
+// Other event types include INPUT/OUTPUT, INTERNAL_INPUT/_OUTPUT and
+// PENDING_OUTPUT:
+//
+// - The INPUT/OUTPUT is an event that actually reads/writes an artifact by an
+// execution. The input/output artifacts may not declared in the signature,
+// For example, the trainer may output multiple caches of the parameters
+// (as an OUTPUT), then finally write the SavedModel as a DECLARED_OUTPUT.
+//
+// - The INTERNAL_INPUT/_OUTPUT are event types which are only meaningful to
+// an orchestration system to keep track of the details for later debugging.
+// For example, a fork happened conditioning on an artifact, then an execution
+// is triggered, such fork implementing may need to log the read and write
+// of artifacts and may not be worth displaying to the users.
+//
+// For instance, in the above example,
+//
+// my_result = my_execution({"data":[3,7],"schema":8})
+//
+// there is another execution (id: 15), which represents a
+// `garbage_collection` step in an orchestration system
+//
+// gc_result = garbage_collection(my_result)
+//
+// that cleans `my_result` if needed. The details should be invisible to the
+// end users and lineage tracking. The orchestrator can emit following events:
+//
+// {
+// artifact_id: 15,
+// execution_id: 15,
+// type:INTERNAL_INPUT,
+// }
+// {
+// artifact_id:16, // New artifact containing the GC job result.
+// execution_id: 15,
+// type:INTERNAL_OUTPUT,
+// path:{step:[{"key":"gc_result"}]}
+// }
+//
+// - The PENDING_OUTPUT event is used to indicate that an artifact is
+// tentatively associated with an active execution which has not yet been
+// finalized. For example, an orchestration system can register output
+// artifacts of a running execution with PENDING_OUTPUT events to indicate
+// the output artifacts the execution is expected to produce. When the
+// execution is finished, the final set of output artifacts can be associated
+// with the exeution using OUTPUT events, and any unused artifacts which were
+// previously registered with PENDING_OUTPUT events can be updated to set
+// their Artifact.State to ABANDONED.
+//
+// Events are unique of the same
+// (artifact_id, execution_id, type) combination within a metadata store.
+type Event struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The artifact id is required for an event, and should refer to an
+ // existing artifact.
+ ArtifactId *int64 `protobuf:"varint,1,opt,name=artifact_id,json=artifactId" json:"artifact_id,omitempty"`
+ // The execution_id is required for an event, and should refer to an
+ // existing execution.
+ ExecutionId *int64 `protobuf:"varint,2,opt,name=execution_id,json=executionId" json:"execution_id,omitempty"`
+ // The path in an artifact struct, or the name of an artifact.
+ Path *Event_Path `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"`
+ // The type of an event.
+ Type *Event_Type `protobuf:"varint,4,opt,name=type,enum=ml_metadata.Event_Type" json:"type,omitempty"`
+ // Time the event occurred
+ // Epoch is Jan 1, 1970, UTC
+ MillisecondsSinceEpoch *int64 `protobuf:"varint,5,opt,name=milliseconds_since_epoch,json=millisecondsSinceEpoch" json:"milliseconds_since_epoch,omitempty"`
+ // Output only.
+ SystemMetadata *anypb.Any `protobuf:"bytes,6,opt,name=system_metadata,json=systemMetadata" json:"system_metadata,omitempty"`
+}
+
+func (x *Event) Reset() {
+ *x = Event{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Event) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Event) ProtoMessage() {}
+
+func (x *Event) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Event.ProtoReflect.Descriptor instead.
+func (*Event) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *Event) GetArtifactId() int64 {
+ if x != nil && x.ArtifactId != nil {
+ return *x.ArtifactId
+ }
+ return 0
+}
+
+func (x *Event) GetExecutionId() int64 {
+ if x != nil && x.ExecutionId != nil {
+ return *x.ExecutionId
+ }
+ return 0
+}
+
+func (x *Event) GetPath() *Event_Path {
+ if x != nil {
+ return x.Path
+ }
+ return nil
+}
+
+func (x *Event) GetType() Event_Type {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return Event_UNKNOWN
+}
+
+func (x *Event) GetMillisecondsSinceEpoch() int64 {
+ if x != nil && x.MillisecondsSinceEpoch != nil {
+ return *x.MillisecondsSinceEpoch
+ }
+ return 0
+}
+
+func (x *Event) GetSystemMetadata() *anypb.Any {
+ if x != nil {
+ return x.SystemMetadata
+ }
+ return nil
+}
+
+type Execution struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Output only. The unique server generated id of the execution.
+ Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ // The client provided name of the execution. This field is optional. If set,
+ // it must be unique among all the executions of the same execution type
+ // within a database instance and cannot be changed once set.
+ Name *string `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"`
+ // The id of an ExecutionType. This needs to be specified when an execution is
+ // created, and it cannot be changed.
+ // The id of an ExecutionType.
+ TypeId *int64 `protobuf:"varint,2,opt,name=type_id,json=typeId" json:"type_id,omitempty"`
+ // Output only. The name of an ExecutionType.
+ Type *string `protobuf:"bytes,7,opt,name=type" json:"type,omitempty"`
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all executions within a database instance.
+ ExternalId *string `protobuf:"bytes,10,opt,name=external_id,json=externalId" json:"external_id,omitempty"`
+ // The last known state of an execution in the system.
+ LastKnownState *Execution_State `protobuf:"varint,3,opt,name=last_known_state,json=lastKnownState,enum=ml_metadata.Execution_State" json:"last_known_state,omitempty"`
+ // Properties of the Execution.
+ // Properties must be specified in the ExecutionType.
+ Properties map[string]*Value `protobuf:"bytes,4,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties map[string]*Value `protobuf:"bytes,5,rep,name=custom_properties,json=customProperties" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // Output only. Create time of the execution in millisecond since epoch.
+ CreateTimeSinceEpoch *int64 `protobuf:"varint,8,opt,name=create_time_since_epoch,json=createTimeSinceEpoch" json:"create_time_since_epoch,omitempty"`
+ // Output only. Last update time of the execution in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *int64 `protobuf:"varint,9,opt,name=last_update_time_since_epoch,json=lastUpdateTimeSinceEpoch" json:"last_update_time_since_epoch,omitempty"`
+ // Output only.
+ SystemMetadata *anypb.Any `protobuf:"bytes,11,opt,name=system_metadata,json=systemMetadata" json:"system_metadata,omitempty"`
+}
+
+func (x *Execution) Reset() {
+ *x = Execution{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Execution) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Execution) ProtoMessage() {}
+
+func (x *Execution) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Execution.ProtoReflect.Descriptor instead.
+func (*Execution) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *Execution) GetId() int64 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *Execution) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *Execution) GetTypeId() int64 {
+ if x != nil && x.TypeId != nil {
+ return *x.TypeId
+ }
+ return 0
+}
+
+func (x *Execution) GetType() string {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return ""
+}
+
+func (x *Execution) GetExternalId() string {
+ if x != nil && x.ExternalId != nil {
+ return *x.ExternalId
+ }
+ return ""
+}
+
+func (x *Execution) GetLastKnownState() Execution_State {
+ if x != nil && x.LastKnownState != nil {
+ return *x.LastKnownState
+ }
+ return Execution_UNKNOWN
+}
+
+func (x *Execution) GetProperties() map[string]*Value {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *Execution) GetCustomProperties() map[string]*Value {
+ if x != nil {
+ return x.CustomProperties
+ }
+ return nil
+}
+
+func (x *Execution) GetCreateTimeSinceEpoch() int64 {
+ if x != nil && x.CreateTimeSinceEpoch != nil {
+ return *x.CreateTimeSinceEpoch
+ }
+ return 0
+}
+
+func (x *Execution) GetLastUpdateTimeSinceEpoch() int64 {
+ if x != nil && x.LastUpdateTimeSinceEpoch != nil {
+ return *x.LastUpdateTimeSinceEpoch
+ }
+ return 0
+}
+
+func (x *Execution) GetSystemMetadata() *anypb.Any {
+ if x != nil {
+ return x.SystemMetadata
+ }
+ return nil
+}
+
+type ExecutionType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The id of the type. 1-1 relationship between type names and IDs.
+ Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ // The name of the type. It must be unique among ExecutionTypes within a
+ // database instance.
+ Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
+ // An optional version of the type. An empty string is treated as unset.
+ Version *string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"`
+ // An optional description about the type.
+ Description *string `protobuf:"bytes,7,opt,name=description" json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all execution types within a database
+ // instance.
+ ExternalId *string `protobuf:"bytes,9,opt,name=external_id,json=externalId" json:"external_id,omitempty"`
+ // The schema of the type.
+ // Properties are always optional in the execution.
+ Properties map[string]PropertyType `protobuf:"bytes,3,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=ml_metadata.PropertyType"`
+ // The ArtifactStructType of the input.
+ //
+ // For example: {
+ // "dict":{
+ // "properties":{
+ // "schema":{
+ // "union_type":{
+ // "none":{},
+ // "simple":{...schema type...}
+ // },
+ // },
+ // "data":{
+ // "simple":{...data_type...}
+ // }
+ // }
+ // }
+ // }
+ //
+ // That would be an optional schema field with a required data field.
+ InputType *ArtifactStructType `protobuf:"bytes,4,opt,name=input_type,json=inputType" json:"input_type,omitempty"`
+ // The ArtifactStructType of the output.
+ // For example {"simple":{...stats gen output type...}}
+ OutputType *ArtifactStructType `protobuf:"bytes,5,opt,name=output_type,json=outputType" json:"output_type,omitempty"`
+ // An optional system defined base_type expressing the intent of the current
+ // type. This field is useful for the tool builders to utilize the stored MLMD
+ // information, e.g., `MyTrainer` ExecutionType could set base_type = TRAIN.
+ BaseType *ExecutionType_SystemDefinedBaseType `protobuf:"varint,8,opt,name=base_type,json=baseType,enum=ml_metadata.ExecutionType_SystemDefinedBaseType" json:"base_type,omitempty"`
+}
+
+func (x *ExecutionType) Reset() {
+ *x = ExecutionType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExecutionType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExecutionType) ProtoMessage() {}
+
+func (x *ExecutionType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExecutionType.ProtoReflect.Descriptor instead.
+func (*ExecutionType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ExecutionType) GetId() int64 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *ExecutionType) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *ExecutionType) GetVersion() string {
+ if x != nil && x.Version != nil {
+ return *x.Version
+ }
+ return ""
+}
+
+func (x *ExecutionType) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *ExecutionType) GetExternalId() string {
+ if x != nil && x.ExternalId != nil {
+ return *x.ExternalId
+ }
+ return ""
+}
+
+func (x *ExecutionType) GetProperties() map[string]PropertyType {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *ExecutionType) GetInputType() *ArtifactStructType {
+ if x != nil {
+ return x.InputType
+ }
+ return nil
+}
+
+func (x *ExecutionType) GetOutputType() *ArtifactStructType {
+ if x != nil {
+ return x.OutputType
+ }
+ return nil
+}
+
+func (x *ExecutionType) GetBaseType() ExecutionType_SystemDefinedBaseType {
+ if x != nil && x.BaseType != nil {
+ return *x.BaseType
+ }
+ return ExecutionType_UNSET
+}
+
+type ContextType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The id of the type. 1-1 relationship between type names and IDs.
+ Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ // The name of the type, e.g., Pipeline, Task, Session, User, etc. It must be
+ // unique among ContextTypes within a database instance.
+ Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
+ // An optional version of the type. An empty string is treated as unset.
+ Version *string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
+ // An optional description about the type.
+ Description *string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all context types within a database
+ // instance.
+ ExternalId *string `protobuf:"bytes,7,opt,name=external_id,json=externalId" json:"external_id,omitempty"`
+ // The schema of the type, e.g., name: string, owner: string
+ // Properties are always optional in the context.
+ // Properties of an context type can be expanded but not contracted (i.e.,
+ // you can add columns but not remove them).
+ Properties map[string]PropertyType `protobuf:"bytes,3,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=ml_metadata.PropertyType"`
+ // An optional system defined base_type expressing the intent of the current
+ // context type.
+ // *NOTE: currently there are no system Context types defined, and the field
+ // is not used for ContextType.
+ BaseType *ContextType_SystemDefinedBaseType `protobuf:"varint,6,opt,name=base_type,json=baseType,enum=ml_metadata.ContextType_SystemDefinedBaseType" json:"base_type,omitempty"`
+}
+
+func (x *ContextType) Reset() {
+ *x = ContextType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ContextType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ContextType) ProtoMessage() {}
+
+func (x *ContextType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ContextType.ProtoReflect.Descriptor instead.
+func (*ContextType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ContextType) GetId() int64 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *ContextType) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *ContextType) GetVersion() string {
+ if x != nil && x.Version != nil {
+ return *x.Version
+ }
+ return ""
+}
+
+func (x *ContextType) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *ContextType) GetExternalId() string {
+ if x != nil && x.ExternalId != nil {
+ return *x.ExternalId
+ }
+ return ""
+}
+
+func (x *ContextType) GetProperties() map[string]PropertyType {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *ContextType) GetBaseType() ContextType_SystemDefinedBaseType {
+ if x != nil && x.BaseType != nil {
+ return *x.BaseType
+ }
+ return ContextType_UNSET
+}
+
+type Context struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Output Only. The unique server generated id of the context.
+ Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ // The client provided name of the context. It must be unique within a
+ // database instance.
+ Name *string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
+ // The id of a ContextType. This needs to be specified when a context is
+ // created, and it cannot be changed.
+ TypeId *int64 `protobuf:"varint,2,opt,name=type_id,json=typeId" json:"type_id,omitempty"`
+ // Output only. The name of a ContextType.
+ Type *string `protobuf:"bytes,6,opt,name=type" json:"type,omitempty"`
+ // The external id that come from the clients’ system. This field is optional.
+ // If set, it must be unique among all contexts within a virtual database.
+ ExternalId *string `protobuf:"bytes,9,opt,name=external_id,json=externalId" json:"external_id,omitempty"`
+ // Values of the properties, which must be specified in the ContextType.
+ Properties map[string]*Value `protobuf:"bytes,4,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties map[string]*Value `protobuf:"bytes,5,rep,name=custom_properties,json=customProperties" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // Output only. Create time of the context in millisecond since epoch.
+ CreateTimeSinceEpoch *int64 `protobuf:"varint,7,opt,name=create_time_since_epoch,json=createTimeSinceEpoch" json:"create_time_since_epoch,omitempty"`
+ // Output only. Last update time of the context in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *int64 `protobuf:"varint,8,opt,name=last_update_time_since_epoch,json=lastUpdateTimeSinceEpoch" json:"last_update_time_since_epoch,omitempty"`
+ // Output only system metadata.
+ SystemMetadata *anypb.Any `protobuf:"bytes,10,opt,name=system_metadata,json=systemMetadata" json:"system_metadata,omitempty"`
+}
+
+func (x *Context) Reset() {
+ *x = Context{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Context) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Context) ProtoMessage() {}
+
+func (x *Context) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Context.ProtoReflect.Descriptor instead.
+func (*Context) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *Context) GetId() int64 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *Context) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *Context) GetTypeId() int64 {
+ if x != nil && x.TypeId != nil {
+ return *x.TypeId
+ }
+ return 0
+}
+
+func (x *Context) GetType() string {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return ""
+}
+
+func (x *Context) GetExternalId() string {
+ if x != nil && x.ExternalId != nil {
+ return *x.ExternalId
+ }
+ return ""
+}
+
+func (x *Context) GetProperties() map[string]*Value {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *Context) GetCustomProperties() map[string]*Value {
+ if x != nil {
+ return x.CustomProperties
+ }
+ return nil
+}
+
+func (x *Context) GetCreateTimeSinceEpoch() int64 {
+ if x != nil && x.CreateTimeSinceEpoch != nil {
+ return *x.CreateTimeSinceEpoch
+ }
+ return 0
+}
+
+func (x *Context) GetLastUpdateTimeSinceEpoch() int64 {
+ if x != nil && x.LastUpdateTimeSinceEpoch != nil {
+ return *x.LastUpdateTimeSinceEpoch
+ }
+ return 0
+}
+
+func (x *Context) GetSystemMetadata() *anypb.Any {
+ if x != nil {
+ return x.SystemMetadata
+ }
+ return nil
+}
+
+// the Attribution edges between Context and Artifact instances.
+type Attribution struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ArtifactId *int64 `protobuf:"varint,1,opt,name=artifact_id,json=artifactId" json:"artifact_id,omitempty"`
+ ContextId *int64 `protobuf:"varint,2,opt,name=context_id,json=contextId" json:"context_id,omitempty"`
+}
+
+func (x *Attribution) Reset() {
+ *x = Attribution{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Attribution) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Attribution) ProtoMessage() {}
+
+func (x *Attribution) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Attribution.ProtoReflect.Descriptor instead.
+func (*Attribution) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *Attribution) GetArtifactId() int64 {
+ if x != nil && x.ArtifactId != nil {
+ return *x.ArtifactId
+ }
+ return 0
+}
+
+func (x *Attribution) GetContextId() int64 {
+ if x != nil && x.ContextId != nil {
+ return *x.ContextId
+ }
+ return 0
+}
+
+// the Association edges between Context and Execution instances.
+type Association struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExecutionId *int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId" json:"execution_id,omitempty"`
+ ContextId *int64 `protobuf:"varint,2,opt,name=context_id,json=contextId" json:"context_id,omitempty"`
+}
+
+func (x *Association) Reset() {
+ *x = Association{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Association) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Association) ProtoMessage() {}
+
+func (x *Association) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Association.ProtoReflect.Descriptor instead.
+func (*Association) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *Association) GetExecutionId() int64 {
+ if x != nil && x.ExecutionId != nil {
+ return *x.ExecutionId
+ }
+ return 0
+}
+
+func (x *Association) GetContextId() int64 {
+ if x != nil && x.ContextId != nil {
+ return *x.ContextId
+ }
+ return 0
+}
+
+// the Parental Context edges between Context and Context instances.
+type ParentContext struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ChildId *int64 `protobuf:"varint,1,opt,name=child_id,json=childId" json:"child_id,omitempty"`
+ ParentId *int64 `protobuf:"varint,2,opt,name=parent_id,json=parentId" json:"parent_id,omitempty"`
+}
+
+func (x *ParentContext) Reset() {
+ *x = ParentContext{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ParentContext) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ParentContext) ProtoMessage() {}
+
+func (x *ParentContext) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ParentContext.ProtoReflect.Descriptor instead.
+func (*ParentContext) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ParentContext) GetChildId() int64 {
+ if x != nil && x.ChildId != nil {
+ return *x.ChildId
+ }
+ return 0
+}
+
+func (x *ParentContext) GetParentId() int64 {
+ if x != nil && x.ParentId != nil {
+ return *x.ParentId
+ }
+ return 0
+}
+
+// A self-contained provenance (sub)graph representation consists of MLMD nodes
+// and their relationships. It is used to represent the query results from the
+// persistent backend (e.g., lineage about a node, reachability of two nodes).
+type LineageGraph struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // extracted types
+ ArtifactTypes []*ArtifactType `protobuf:"bytes,1,rep,name=artifact_types,json=artifactTypes" json:"artifact_types,omitempty"`
+ ExecutionTypes []*ExecutionType `protobuf:"bytes,2,rep,name=execution_types,json=executionTypes" json:"execution_types,omitempty"`
+ ContextTypes []*ContextType `protobuf:"bytes,3,rep,name=context_types,json=contextTypes" json:"context_types,omitempty"`
+ // extracted nodes
+ Artifacts []*Artifact `protobuf:"bytes,4,rep,name=artifacts" json:"artifacts,omitempty"`
+ Executions []*Execution `protobuf:"bytes,5,rep,name=executions" json:"executions,omitempty"`
+ Contexts []*Context `protobuf:"bytes,6,rep,name=contexts" json:"contexts,omitempty"`
+ // extracted edges
+ Events []*Event `protobuf:"bytes,7,rep,name=events" json:"events,omitempty"`
+ Attributions []*Attribution `protobuf:"bytes,8,rep,name=attributions" json:"attributions,omitempty"`
+ Associations []*Association `protobuf:"bytes,9,rep,name=associations" json:"associations,omitempty"`
+}
+
+func (x *LineageGraph) Reset() {
+ *x = LineageGraph{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LineageGraph) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LineageGraph) ProtoMessage() {}
+
+func (x *LineageGraph) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LineageGraph.ProtoReflect.Descriptor instead.
+func (*LineageGraph) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *LineageGraph) GetArtifactTypes() []*ArtifactType {
+ if x != nil {
+ return x.ArtifactTypes
+ }
+ return nil
+}
+
+func (x *LineageGraph) GetExecutionTypes() []*ExecutionType {
+ if x != nil {
+ return x.ExecutionTypes
+ }
+ return nil
+}
+
+func (x *LineageGraph) GetContextTypes() []*ContextType {
+ if x != nil {
+ return x.ContextTypes
+ }
+ return nil
+}
+
+func (x *LineageGraph) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+func (x *LineageGraph) GetExecutions() []*Execution {
+ if x != nil {
+ return x.Executions
+ }
+ return nil
+}
+
+func (x *LineageGraph) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+func (x *LineageGraph) GetEvents() []*Event {
+ if x != nil {
+ return x.Events
+ }
+ return nil
+}
+
+func (x *LineageGraph) GetAttributions() []*Attribution {
+ if x != nil {
+ return x.Attributions
+ }
+ return nil
+}
+
+func (x *LineageGraph) GetAssociations() []*Association {
+ if x != nil {
+ return x.Associations
+ }
+ return nil
+}
+
+// The list of ArtifactStruct is EXPERIMENTAL and not in use yet.
+// The type of an ArtifactStruct.
+// An artifact struct type represents an infinite set of artifact structs.
+// It can specify the input or output type of an ExecutionType.
+// See the more specific types referenced in the message for more details.
+type ArtifactStructType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Kind:
+ //
+ // *ArtifactStructType_Simple
+ // *ArtifactStructType_UnionType
+ // *ArtifactStructType_Intersection
+ // *ArtifactStructType_List
+ // *ArtifactStructType_None
+ // *ArtifactStructType_Any
+ // *ArtifactStructType_Tuple
+ // *ArtifactStructType_Dict
+ Kind isArtifactStructType_Kind `protobuf_oneof:"kind"`
+}
+
+func (x *ArtifactStructType) Reset() {
+ *x = ArtifactStructType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ArtifactStructType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArtifactStructType) ProtoMessage() {}
+
+func (x *ArtifactStructType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArtifactStructType.ProtoReflect.Descriptor instead.
+func (*ArtifactStructType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{13}
+}
+
+func (m *ArtifactStructType) GetKind() isArtifactStructType_Kind {
+ if m != nil {
+ return m.Kind
+ }
+ return nil
+}
+
+func (x *ArtifactStructType) GetSimple() *ArtifactType {
+ if x, ok := x.GetKind().(*ArtifactStructType_Simple); ok {
+ return x.Simple
+ }
+ return nil
+}
+
+func (x *ArtifactStructType) GetUnionType() *UnionArtifactStructType {
+ if x, ok := x.GetKind().(*ArtifactStructType_UnionType); ok {
+ return x.UnionType
+ }
+ return nil
+}
+
+func (x *ArtifactStructType) GetIntersection() *IntersectionArtifactStructType {
+ if x, ok := x.GetKind().(*ArtifactStructType_Intersection); ok {
+ return x.Intersection
+ }
+ return nil
+}
+
+func (x *ArtifactStructType) GetList() *ListArtifactStructType {
+ if x, ok := x.GetKind().(*ArtifactStructType_List); ok {
+ return x.List
+ }
+ return nil
+}
+
+func (x *ArtifactStructType) GetNone() *NoneArtifactStructType {
+ if x, ok := x.GetKind().(*ArtifactStructType_None); ok {
+ return x.None
+ }
+ return nil
+}
+
+func (x *ArtifactStructType) GetAny() *AnyArtifactStructType {
+ if x, ok := x.GetKind().(*ArtifactStructType_Any); ok {
+ return x.Any
+ }
+ return nil
+}
+
+func (x *ArtifactStructType) GetTuple() *TupleArtifactStructType {
+ if x, ok := x.GetKind().(*ArtifactStructType_Tuple); ok {
+ return x.Tuple
+ }
+ return nil
+}
+
+func (x *ArtifactStructType) GetDict() *DictArtifactStructType {
+ if x, ok := x.GetKind().(*ArtifactStructType_Dict); ok {
+ return x.Dict
+ }
+ return nil
+}
+
+type isArtifactStructType_Kind interface {
+ isArtifactStructType_Kind()
+}
+
+type ArtifactStructType_Simple struct {
+ Simple *ArtifactType `protobuf:"bytes,1,opt,name=simple,oneof"` // Matches exactly this type.
+}
+
+type ArtifactStructType_UnionType struct {
+ UnionType *UnionArtifactStructType `protobuf:"bytes,2,opt,name=union_type,json=unionType,oneof"`
+}
+
+type ArtifactStructType_Intersection struct {
+ Intersection *IntersectionArtifactStructType `protobuf:"bytes,3,opt,name=intersection,oneof"`
+}
+
+type ArtifactStructType_List struct {
+ List *ListArtifactStructType `protobuf:"bytes,4,opt,name=list,oneof"`
+}
+
+type ArtifactStructType_None struct {
+ None *NoneArtifactStructType `protobuf:"bytes,5,opt,name=none,oneof"`
+}
+
+type ArtifactStructType_Any struct {
+ Any *AnyArtifactStructType `protobuf:"bytes,6,opt,name=any,oneof"`
+}
+
+type ArtifactStructType_Tuple struct {
+ Tuple *TupleArtifactStructType `protobuf:"bytes,7,opt,name=tuple,oneof"`
+}
+
+type ArtifactStructType_Dict struct {
+ Dict *DictArtifactStructType `protobuf:"bytes,8,opt,name=dict,oneof"`
+}
+
+func (*ArtifactStructType_Simple) isArtifactStructType_Kind() {}
+
+func (*ArtifactStructType_UnionType) isArtifactStructType_Kind() {}
+
+func (*ArtifactStructType_Intersection) isArtifactStructType_Kind() {}
+
+func (*ArtifactStructType_List) isArtifactStructType_Kind() {}
+
+func (*ArtifactStructType_None) isArtifactStructType_Kind() {}
+
+func (*ArtifactStructType_Any) isArtifactStructType_Kind() {}
+
+func (*ArtifactStructType_Tuple) isArtifactStructType_Kind() {}
+
+func (*ArtifactStructType_Dict) isArtifactStructType_Kind() {}
+
+// Represents a union of types.
+type UnionArtifactStructType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // An artifact struct matches this type if it matches any of the candidates.
+ // If candidates is empty, this is a bottom type (matches no artifacts).
+ Candidates []*ArtifactStructType `protobuf:"bytes,1,rep,name=candidates" json:"candidates,omitempty"`
+}
+
+func (x *UnionArtifactStructType) Reset() {
+ *x = UnionArtifactStructType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UnionArtifactStructType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UnionArtifactStructType) ProtoMessage() {}
+
+func (x *UnionArtifactStructType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UnionArtifactStructType.ProtoReflect.Descriptor instead.
+func (*UnionArtifactStructType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *UnionArtifactStructType) GetCandidates() []*ArtifactStructType {
+ if x != nil {
+ return x.Candidates
+ }
+ return nil
+}
+
+// A member of this type must satisfy all constraints.
+// This primarily useful not as an end-user type, but something calculated
+// as an intermediate type in the system.
+//
+// For example, suppose you have a method:
+// def infer_my_input_type(a): # try to infer the input type of this method.
+//
+// use_in_method_x(a) # with input type x_input
+// use_in_method_y(a) # with input type y_input
+//
+// Given this information, you know that infer_my_input_type has
+// type {"intersection":{"constraints":[x_input, y_input]}}.
+//
+// IntersectionArtifactStructType intersection_type = {"constraints":[
+//
+// {"dict":{"properties":{"schema":{"any":{}}},
+// "extra_properties":{"any":{}}}},
+// {"dict":{"properties":{"data":{"any":{}}},
+// "extra_properties":{"any":{}}}}]}
+//
+// Since the first constraint requires the dictionary to have a schema
+// property, and the second constraint requires it to have a data property, this
+// is equivalent to:
+// ArtifactStructType other_type =
+//
+// {"dict":{"properties":{"schema":{"any":{}},"data":{"any":{}}}},
+// "extra_properties":{"any":{}}}
+type IntersectionArtifactStructType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Constraints []*ArtifactStructType `protobuf:"bytes,1,rep,name=constraints" json:"constraints,omitempty"`
+}
+
+func (x *IntersectionArtifactStructType) Reset() {
+ *x = IntersectionArtifactStructType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IntersectionArtifactStructType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IntersectionArtifactStructType) ProtoMessage() {}
+
+func (x *IntersectionArtifactStructType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[15]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IntersectionArtifactStructType.ProtoReflect.Descriptor instead.
+func (*IntersectionArtifactStructType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *IntersectionArtifactStructType) GetConstraints() []*ArtifactStructType {
+ if x != nil {
+ return x.Constraints
+ }
+ return nil
+}
+
+// Represents an ArtifactStruct list type with homogeneous elements.
+type ListArtifactStructType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Every entry in the list must be of this type.
+ // Note: if this type is Any, then the list can have arbitrary elements.
+ Element *ArtifactStructType `protobuf:"bytes,1,opt,name=element" json:"element,omitempty"`
+}
+
+func (x *ListArtifactStructType) Reset() {
+ *x = ListArtifactStructType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListArtifactStructType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListArtifactStructType) ProtoMessage() {}
+
+func (x *ListArtifactStructType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[16]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListArtifactStructType.ProtoReflect.Descriptor instead.
+func (*ListArtifactStructType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ListArtifactStructType) GetElement() *ArtifactStructType {
+ if x != nil {
+ return x.Element
+ }
+ return nil
+}
+
+// The only member of this type is a None artifact.
+// Note: ArtifactStruct{} is a None artifact.
+// This can represent an execution that has no outputs (or inputs),
+// or can be part of a UnionArtifactStructType to represent an optional
+// input.
+// For example, StatsGen has an "optional" schema input.
+// A practical example of this is:
+//
+// stats_gen_type = {
+// "dict":{
+// "properties":{
+// "schema":{
+// "union_type":{
+// "none":{},
+// "simple":{...schema type...}
+// },
+// },
+// "data":{
+// "simple":{...data_type...}
+// }
+// }
+// }
+// };
+type NoneArtifactStructType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *NoneArtifactStructType) Reset() {
+ *x = NoneArtifactStructType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NoneArtifactStructType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NoneArtifactStructType) ProtoMessage() {}
+
+func (x *NoneArtifactStructType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[17]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NoneArtifactStructType.ProtoReflect.Descriptor instead.
+func (*NoneArtifactStructType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{17}
+}
+
+// Every ArtifactStruct is a member of this type.
+type AnyArtifactStructType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *AnyArtifactStructType) Reset() {
+ *x = AnyArtifactStructType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AnyArtifactStructType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AnyArtifactStructType) ProtoMessage() {}
+
+func (x *AnyArtifactStructType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[18]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AnyArtifactStructType.ProtoReflect.Descriptor instead.
+func (*AnyArtifactStructType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{18}
+}
+
+// An ordered list of heterogeneous artifact structs.
+// The length of the list is fixed.
+// Each position in the list can have a different type.
+type TupleArtifactStructType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Elements []*ArtifactStructType `protobuf:"bytes,1,rep,name=elements" json:"elements,omitempty"`
+}
+
+func (x *TupleArtifactStructType) Reset() {
+ *x = TupleArtifactStructType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TupleArtifactStructType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TupleArtifactStructType) ProtoMessage() {}
+
+func (x *TupleArtifactStructType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[19]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TupleArtifactStructType.ProtoReflect.Descriptor instead.
+func (*TupleArtifactStructType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *TupleArtifactStructType) GetElements() []*ArtifactStructType {
+ if x != nil {
+ return x.Elements
+ }
+ return nil
+}
+
+// A artifact struct type that represents a record or struct-like dictionary.
+// ArtifactStruct would be map (i.e. ArtifactStructMap)
+type DictArtifactStructType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Underlying properties for the type.
+ Properties map[string]*ArtifactStructType `protobuf:"bytes,1,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // If true, then if properties["foo"] can be None, then that key is not
+ // required.
+ NoneTypeNotRequired *bool `protobuf:"varint,2,opt,name=none_type_not_required,json=noneTypeNotRequired" json:"none_type_not_required,omitempty"`
+ // Extra keys are allowed that are not specified in properties. These
+ // keys must have the type specified below.
+ // If this is not specified, then extra properties are not allowed.
+ ExtraPropertiesType *ArtifactStructType `protobuf:"bytes,3,opt,name=extra_properties_type,json=extraPropertiesType" json:"extra_properties_type,omitempty"`
+}
+
+func (x *DictArtifactStructType) Reset() {
+ *x = DictArtifactStructType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DictArtifactStructType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DictArtifactStructType) ProtoMessage() {}
+
+func (x *DictArtifactStructType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[20]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DictArtifactStructType.ProtoReflect.Descriptor instead.
+func (*DictArtifactStructType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *DictArtifactStructType) GetProperties() map[string]*ArtifactStructType {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *DictArtifactStructType) GetNoneTypeNotRequired() bool {
+ if x != nil && x.NoneTypeNotRequired != nil {
+ return *x.NoneTypeNotRequired
+ }
+ return false
+}
+
+func (x *DictArtifactStructType) GetExtraPropertiesType() *ArtifactStructType {
+ if x != nil {
+ return x.ExtraPropertiesType
+ }
+ return nil
+}
+
+// Configuration for a "fake" database.
+// This database is an in-memory SQLite database that lives only as
+// long as the associated object lives.
+type FakeDatabaseConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *FakeDatabaseConfig) Reset() {
+ *x = FakeDatabaseConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FakeDatabaseConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FakeDatabaseConfig) ProtoMessage() {}
+
+func (x *FakeDatabaseConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[21]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FakeDatabaseConfig.ProtoReflect.Descriptor instead.
+func (*FakeDatabaseConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{21}
+}
+
+type MySQLDatabaseConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The hostname or IP address of the MYSQL server:
+ // - If unspecified, a connection to the local host is assumed.
+ // The client connects using a Unix socket specified by `socket`.
+ // - Otherwise, TCP/IP is used.
+ //
+ // Currently a replicated MYSQL backend is not supported.
+ Host *string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
+ // The TCP Port number that the MYSQL server accepts connections on.
+ // If unspecified, the default MYSQL port (3306) is used.
+ Port *int64 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
+ // The database to connect to. Must be specified.
+ // After connecting to the MYSQL server, this database is created if not
+ // already present unless skip_db_creation is set.
+ // All queries after Connect() are assumed to be for this database.
+ Database *string `protobuf:"bytes,3,opt,name=database" json:"database,omitempty"`
+ // The MYSQL login id. If empty, the current user is assumed.
+ User *string `protobuf:"bytes,4,opt,name=user" json:"user,omitempty"`
+ // The password to use for `user`. If empty, only MYSQL user ids that don't
+ // have a password set are allowed to connect.
+ Password *string `protobuf:"bytes,5,opt,name=password" json:"password,omitempty"`
+ // The Unix socket to use to connect to the server. If unspecified, a
+ // `host` must be provided.
+ Socket *string `protobuf:"bytes,6,opt,name=socket" json:"socket,omitempty"`
+ // If the field is set, the ssl options are set in mysql_options before
+ // establishing a connection. It is ignored if the mysql server does not
+ // enable SSL.
+ SslOptions *MySQLDatabaseConfig_SSLOptions `protobuf:"bytes,7,opt,name=ssl_options,json=sslOptions" json:"ssl_options,omitempty"`
+ // A config to skip the database creation if not exist when connecting the
+ // db instance. It is useful when the db creation is handled by an admin
+ // process, while the lib user should not issue db creation clauses.
+ SkipDbCreation *bool `protobuf:"varint,8,opt,name=skip_db_creation,json=skipDbCreation" json:"skip_db_creation,omitempty"`
+}
+
+func (x *MySQLDatabaseConfig) Reset() {
+ *x = MySQLDatabaseConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MySQLDatabaseConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MySQLDatabaseConfig) ProtoMessage() {}
+
+func (x *MySQLDatabaseConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[22]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MySQLDatabaseConfig.ProtoReflect.Descriptor instead.
+func (*MySQLDatabaseConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *MySQLDatabaseConfig) GetHost() string {
+ if x != nil && x.Host != nil {
+ return *x.Host
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig) GetPort() int64 {
+ if x != nil && x.Port != nil {
+ return *x.Port
+ }
+ return 0
+}
+
+func (x *MySQLDatabaseConfig) GetDatabase() string {
+ if x != nil && x.Database != nil {
+ return *x.Database
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig) GetUser() string {
+ if x != nil && x.User != nil {
+ return *x.User
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig) GetPassword() string {
+ if x != nil && x.Password != nil {
+ return *x.Password
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig) GetSocket() string {
+ if x != nil && x.Socket != nil {
+ return *x.Socket
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig) GetSslOptions() *MySQLDatabaseConfig_SSLOptions {
+ if x != nil {
+ return x.SslOptions
+ }
+ return nil
+}
+
+func (x *MySQLDatabaseConfig) GetSkipDbCreation() bool {
+ if x != nil && x.SkipDbCreation != nil {
+ return *x.SkipDbCreation
+ }
+ return false
+}
+
+// A config contains the parameters when using with SqliteMetadatSource.
+type SqliteMetadataSourceConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A uri specifying Sqlite3 database filename, for example:
+ //
+ // file:some_sqlite3_file_in_local_dir.db
+ // file:///home/username/some_sqlite3_file.db
+ //
+ // see https://www.sqlite.org/c3ref/open.html for model details
+ //
+ // If not given, a in-memory sqlite3 database is used, and destroyed when
+ // disconnecting the metadata source.
+ FilenameUri *string `protobuf:"bytes,1,opt,name=filename_uri,json=filenameUri" json:"filename_uri,omitempty"`
+ // A flag specifying the connection mode. If not given, default connection
+ // mode is set to READWRITE_OPENCREATE.
+ ConnectionMode *SqliteMetadataSourceConfig_ConnectionMode `protobuf:"varint,2,opt,name=connection_mode,json=connectionMode,enum=ml_metadata.SqliteMetadataSourceConfig_ConnectionMode" json:"connection_mode,omitempty"`
+}
+
+func (x *SqliteMetadataSourceConfig) Reset() {
+ *x = SqliteMetadataSourceConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SqliteMetadataSourceConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SqliteMetadataSourceConfig) ProtoMessage() {}
+
+func (x *SqliteMetadataSourceConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[23]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SqliteMetadataSourceConfig.ProtoReflect.Descriptor instead.
+func (*SqliteMetadataSourceConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *SqliteMetadataSourceConfig) GetFilenameUri() string {
+ if x != nil && x.FilenameUri != nil {
+ return *x.FilenameUri
+ }
+ return ""
+}
+
+func (x *SqliteMetadataSourceConfig) GetConnectionMode() SqliteMetadataSourceConfig_ConnectionMode {
+ if x != nil && x.ConnectionMode != nil {
+ return *x.ConnectionMode
+ }
+ return SqliteMetadataSourceConfig_UNKNOWN
+}
+
+// A config contains the parameters when using with PostgreSQLMetadatSource.
+// Next index: 10
+type PostgreSQLDatabaseConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of host to connect to. If the host name starts with /, it is taken as
+ // a Unix-domain socket in the abstract namespace.
+ Host *string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
+ // Numeric IP address of host to connect to. If this field is provided, `host`
+ // field is ignored.
+ Hostaddr *string `protobuf:"bytes,2,opt,name=hostaddr" json:"hostaddr,omitempty"`
+ // Port number to connect to at the server host, or socket file name extension
+ // for Unix-domain connections.
+ Port *string `protobuf:"bytes,3,opt,name=port" json:"port,omitempty"`
+ // PostgreSQL user name to connect as. Defaults to be the same as the
+ // operating system name of the user running the application.
+ User *string `protobuf:"bytes,4,opt,name=user" json:"user,omitempty"`
+ // Password to be used if the server demands password authentication.
+ Password *string `protobuf:"bytes,5,opt,name=password" json:"password,omitempty"`
+ // Specifies the name of the file used to store passwords.
+ Passfile *string `protobuf:"bytes,6,opt,name=passfile" json:"passfile,omitempty"`
+ // The database name. Defaults to be the same as the user name.
+ Dbname *string `protobuf:"bytes,7,opt,name=dbname" json:"dbname,omitempty"`
+ // A config to skip the database creation if not exist when connecting the
+ // db instance. It is useful when the db creation is handled by an admin
+ // process, while the lib user should not issue db creation clauses.
+ SkipDbCreation *bool `protobuf:"varint,8,opt,name=skip_db_creation,json=skipDbCreation" json:"skip_db_creation,omitempty"`
+ Ssloption *PostgreSQLDatabaseConfig_SSLOptions `protobuf:"bytes,9,opt,name=ssloption" json:"ssloption,omitempty"`
+}
+
+func (x *PostgreSQLDatabaseConfig) Reset() {
+ *x = PostgreSQLDatabaseConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PostgreSQLDatabaseConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PostgreSQLDatabaseConfig) ProtoMessage() {}
+
+func (x *PostgreSQLDatabaseConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[24]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PostgreSQLDatabaseConfig.ProtoReflect.Descriptor instead.
+func (*PostgreSQLDatabaseConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *PostgreSQLDatabaseConfig) GetHost() string {
+ if x != nil && x.Host != nil {
+ return *x.Host
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig) GetHostaddr() string {
+ if x != nil && x.Hostaddr != nil {
+ return *x.Hostaddr
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig) GetPort() string {
+ if x != nil && x.Port != nil {
+ return *x.Port
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig) GetUser() string {
+ if x != nil && x.User != nil {
+ return *x.User
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig) GetPassword() string {
+ if x != nil && x.Password != nil {
+ return *x.Password
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig) GetPassfile() string {
+ if x != nil && x.Passfile != nil {
+ return *x.Passfile
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig) GetDbname() string {
+ if x != nil && x.Dbname != nil {
+ return *x.Dbname
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig) GetSkipDbCreation() bool {
+ if x != nil && x.SkipDbCreation != nil {
+ return *x.SkipDbCreation
+ }
+ return false
+}
+
+func (x *PostgreSQLDatabaseConfig) GetSsloption() *PostgreSQLDatabaseConfig_SSLOptions {
+ if x != nil {
+ return x.Ssloption
+ }
+ return nil
+}
+
+type MigrationOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // If not set, by default the upgrade migration is disabled. MLMD only
+ // compares db_v with the lib_v, and raise error if the two do not align.
+ // If the field is set to true, MLMD performs upgrade migration. It upgrades
+ // the database schema version (db_v) to align with the library schema
+ // version (lib_v) when connecting to the database.
+ // Schema migration should not be run concurrently with multiple clients to
+ // prevent data races.
+ EnableUpgradeMigration *bool `protobuf:"varint,3,opt,name=enable_upgrade_migration,json=enableUpgradeMigration" json:"enable_upgrade_migration,omitempty"`
+ // Downgrade the given database to the specified schema version.
+ // For v0.13.2 release, the schema_version is 0.
+ // For 0.14.0 and 0.15.0 release, the schema_version is 4.
+ // More details are described in g3doc/get_start.md#upgrade-mlmd-library
+ // Set this field only when a database is accidentally upgraded by a newer
+ // version library. Each library version only knows how to downgrade to
+ // previous schema versions. As downgrade migrations inevitably introduce
+ // data loss, please consider taking a backup of the database before
+ // downgrading schema.
+ // After downgrade migration, the database connection is canceled. The user
+ // needs to downgrade the library to use the database.
+ DowngradeToSchemaVersion *int64 `protobuf:"varint,2,opt,name=downgrade_to_schema_version,json=downgradeToSchemaVersion,def=-1" json:"downgrade_to_schema_version,omitempty"`
+}
+
+// Default values for MigrationOptions fields.
+const (
+ Default_MigrationOptions_DowngradeToSchemaVersion = int64(-1)
+)
+
+func (x *MigrationOptions) Reset() {
+ *x = MigrationOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MigrationOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MigrationOptions) ProtoMessage() {}
+
+func (x *MigrationOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[25]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MigrationOptions.ProtoReflect.Descriptor instead.
+func (*MigrationOptions) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *MigrationOptions) GetEnableUpgradeMigration() bool {
+ if x != nil && x.EnableUpgradeMigration != nil {
+ return *x.EnableUpgradeMigration
+ }
+ return false
+}
+
+func (x *MigrationOptions) GetDowngradeToSchemaVersion() int64 {
+ if x != nil && x.DowngradeToSchemaVersion != nil {
+ return *x.DowngradeToSchemaVersion
+ }
+ return Default_MigrationOptions_DowngradeToSchemaVersion
+}
+
+type RetryOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The max number of retries when transaction returns Aborted error.
+ MaxNumRetries *int64 `protobuf:"varint,1,opt,name=max_num_retries,json=maxNumRetries" json:"max_num_retries,omitempty"`
+}
+
+func (x *RetryOptions) Reset() {
+ *x = RetryOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RetryOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RetryOptions) ProtoMessage() {}
+
+func (x *RetryOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[26]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RetryOptions.ProtoReflect.Descriptor instead.
+func (*RetryOptions) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *RetryOptions) GetMaxNumRetries() int64 {
+ if x != nil && x.MaxNumRetries != nil {
+ return *x.MaxNumRetries
+ }
+ return 0
+}
+
+type ConnectionConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Configuration for a new connection.
+ //
+ // Types that are assignable to Config:
+ //
+ // *ConnectionConfig_FakeDatabase
+ // *ConnectionConfig_Mysql
+ // *ConnectionConfig_Sqlite
+ // *ConnectionConfig_Postgresql
+ Config isConnectionConfig_Config `protobuf_oneof:"config"`
+ // Options for overwriting the default retry setting when MLMD transactions
+ // returning Aborted error.
+ // The setting is currently available for python client library only.
+ // TODO(b/154862807) set the setting in transaction executor.
+ RetryOptions *RetryOptions `protobuf:"bytes,4,opt,name=retry_options,json=retryOptions" json:"retry_options,omitempty"`
+}
+
+func (x *ConnectionConfig) Reset() {
+ *x = ConnectionConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConnectionConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConnectionConfig) ProtoMessage() {}
+
+func (x *ConnectionConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[27]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ConnectionConfig.ProtoReflect.Descriptor instead.
+func (*ConnectionConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{27}
+}
+
+func (m *ConnectionConfig) GetConfig() isConnectionConfig_Config {
+ if m != nil {
+ return m.Config
+ }
+ return nil
+}
+
+func (x *ConnectionConfig) GetFakeDatabase() *FakeDatabaseConfig {
+ if x, ok := x.GetConfig().(*ConnectionConfig_FakeDatabase); ok {
+ return x.FakeDatabase
+ }
+ return nil
+}
+
+func (x *ConnectionConfig) GetMysql() *MySQLDatabaseConfig {
+ if x, ok := x.GetConfig().(*ConnectionConfig_Mysql); ok {
+ return x.Mysql
+ }
+ return nil
+}
+
+func (x *ConnectionConfig) GetSqlite() *SqliteMetadataSourceConfig {
+ if x, ok := x.GetConfig().(*ConnectionConfig_Sqlite); ok {
+ return x.Sqlite
+ }
+ return nil
+}
+
+func (x *ConnectionConfig) GetPostgresql() *PostgreSQLDatabaseConfig {
+ if x, ok := x.GetConfig().(*ConnectionConfig_Postgresql); ok {
+ return x.Postgresql
+ }
+ return nil
+}
+
+func (x *ConnectionConfig) GetRetryOptions() *RetryOptions {
+ if x != nil {
+ return x.RetryOptions
+ }
+ return nil
+}
+
+type isConnectionConfig_Config interface {
+ isConnectionConfig_Config()
+}
+
+type ConnectionConfig_FakeDatabase struct {
+ FakeDatabase *FakeDatabaseConfig `protobuf:"bytes,1,opt,name=fake_database,json=fakeDatabase,oneof"`
+}
+
+type ConnectionConfig_Mysql struct {
+ Mysql *MySQLDatabaseConfig `protobuf:"bytes,2,opt,name=mysql,oneof"`
+}
+
+type ConnectionConfig_Sqlite struct {
+ Sqlite *SqliteMetadataSourceConfig `protobuf:"bytes,3,opt,name=sqlite,oneof"`
+}
+
+type ConnectionConfig_Postgresql struct {
+ // PostgreSQL database connection config.
+ Postgresql *PostgreSQLDatabaseConfig `protobuf:"bytes,5,opt,name=postgresql,oneof"`
+}
+
+func (*ConnectionConfig_FakeDatabase) isConnectionConfig_Config() {}
+
+func (*ConnectionConfig_Mysql) isConnectionConfig_Config() {}
+
+func (*ConnectionConfig_Sqlite) isConnectionConfig_Config() {}
+
+func (*ConnectionConfig_Postgresql) isConnectionConfig_Config() {}
+
+// A list of supported GRPC arguments defined in:
+// https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
+type GrpcChannelArguments struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Maximum message length in bytes per response that the channel can receive.
+ MaxReceiveMessageLength *int64 `protobuf:"varint,1,opt,name=max_receive_message_length,json=maxReceiveMessageLength" json:"max_receive_message_length,omitempty"`
+ // Maximum misbehaving pings the server can bear before sending goaway and
+ // closing the transport? (0 indicates infinite number of misbehaving pings)
+ Http2MaxPingStrikes *int64 `protobuf:"varint,2,opt,name=http2_max_ping_strikes,json=http2MaxPingStrikes" json:"http2_max_ping_strikes,omitempty"`
+}
+
+func (x *GrpcChannelArguments) Reset() {
+ *x = GrpcChannelArguments{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GrpcChannelArguments) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GrpcChannelArguments) ProtoMessage() {}
+
+func (x *GrpcChannelArguments) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[28]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GrpcChannelArguments.ProtoReflect.Descriptor instead.
+func (*GrpcChannelArguments) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *GrpcChannelArguments) GetMaxReceiveMessageLength() int64 {
+ if x != nil && x.MaxReceiveMessageLength != nil {
+ return *x.MaxReceiveMessageLength
+ }
+ return 0
+}
+
+func (x *GrpcChannelArguments) GetHttp2MaxPingStrikes() int64 {
+ if x != nil && x.Http2MaxPingStrikes != nil {
+ return *x.Http2MaxPingStrikes
+ }
+ return 0
+}
+
+// Configuration for the gRPC metadata store client.
+type MetadataStoreClientConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The hostname or IP address of the gRPC server. Must be specified.
+ Host *string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
+ // The TCP Port number that the gRPC server accepts connections on.
+ // Must be specified.
+ Port *int64 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
+ // Configuration for a secure gRPC channel.
+ // If not given, insecure connection is used.
+ SslConfig *MetadataStoreClientConfig_SSLConfig `protobuf:"bytes,3,opt,name=ssl_config,json=sslConfig" json:"ssl_config,omitempty"`
+ // GRPC channel creation arguments.
+ ChannelArguments *GrpcChannelArguments `protobuf:"bytes,4,opt,name=channel_arguments,json=channelArguments" json:"channel_arguments,omitempty"`
+ // Time duration that a client is willing to wait for a reply from the server.
+ // If unset, the timeout is considered infinite. When the field is specified,
+ // Grpc APIs would return DeadlineExceededError when server does not respond
+ // within `client_timeout_sec`. Floating point valued, in seconds.
+ ClientTimeoutSec *float64 `protobuf:"fixed64,5,opt,name=client_timeout_sec,json=clientTimeoutSec" json:"client_timeout_sec,omitempty"`
+}
+
+func (x *MetadataStoreClientConfig) Reset() {
+ *x = MetadataStoreClientConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataStoreClientConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataStoreClientConfig) ProtoMessage() {}
+
+func (x *MetadataStoreClientConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[29]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataStoreClientConfig.ProtoReflect.Descriptor instead.
+func (*MetadataStoreClientConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *MetadataStoreClientConfig) GetHost() string {
+ if x != nil && x.Host != nil {
+ return *x.Host
+ }
+ return ""
+}
+
+func (x *MetadataStoreClientConfig) GetPort() int64 {
+ if x != nil && x.Port != nil {
+ return *x.Port
+ }
+ return 0
+}
+
+func (x *MetadataStoreClientConfig) GetSslConfig() *MetadataStoreClientConfig_SSLConfig {
+ if x != nil {
+ return x.SslConfig
+ }
+ return nil
+}
+
+func (x *MetadataStoreClientConfig) GetChannelArguments() *GrpcChannelArguments {
+ if x != nil {
+ return x.ChannelArguments
+ }
+ return nil
+}
+
+func (x *MetadataStoreClientConfig) GetClientTimeoutSec() float64 {
+ if x != nil && x.ClientTimeoutSec != nil {
+ return *x.ClientTimeoutSec
+ }
+ return 0
+}
+
+// Configuration for the gRPC metadata store server.
+type MetadataStoreServerConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Configuration to connect the metadata source backend.
+ ConnectionConfig *ConnectionConfig `protobuf:"bytes,1,opt,name=connection_config,json=connectionConfig" json:"connection_config,omitempty"`
+ // Configuration for upgrade and downgrade migrations the metadata source.
+ MigrationOptions *MigrationOptions `protobuf:"bytes,3,opt,name=migration_options,json=migrationOptions" json:"migration_options,omitempty"`
+ // Configuration for a secure gRPC channel.
+ // If not given, insecure connection is used.
+ SslConfig *MetadataStoreServerConfig_SSLConfig `protobuf:"bytes,2,opt,name=ssl_config,json=sslConfig" json:"ssl_config,omitempty"`
+}
+
+func (x *MetadataStoreServerConfig) Reset() {
+ *x = MetadataStoreServerConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataStoreServerConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataStoreServerConfig) ProtoMessage() {}
+
+func (x *MetadataStoreServerConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[30]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataStoreServerConfig.ProtoReflect.Descriptor instead.
+func (*MetadataStoreServerConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *MetadataStoreServerConfig) GetConnectionConfig() *ConnectionConfig {
+ if x != nil {
+ return x.ConnectionConfig
+ }
+ return nil
+}
+
+func (x *MetadataStoreServerConfig) GetMigrationOptions() *MigrationOptions {
+ if x != nil {
+ return x.MigrationOptions
+ }
+ return nil
+}
+
+func (x *MetadataStoreServerConfig) GetSslConfig() *MetadataStoreServerConfig_SSLConfig {
+ if x != nil {
+ return x.SslConfig
+ }
+ return nil
+}
+
+// ListOperationOptions represents the set of options and predicates to be
+// used for List operations on Artifacts, Executions and Contexts.
+type ListOperationOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Max number of resources to return in the result. A value of zero or less
+ // results in a InvalidArgumentError.
+ // The API implementation also enforces an upper-bound of 100, and picks the
+ // minimum between this value and the one specified here.
+ MaxResultSize *int32 `protobuf:"varint,1,opt,name=max_result_size,json=maxResultSize,def=20" json:"max_result_size,omitempty"`
+ // Ordering field.
+ OrderByField *ListOperationOptions_OrderByField `protobuf:"bytes,2,opt,name=order_by_field,json=orderByField" json:"order_by_field,omitempty"`
+ // Identifies the next page of results.
+ NextPageToken *string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+ // A boolean expression in SQL syntax that is used to specify the conditions
+ // on node attributes and directly connected assets.
+ //
+ // In the current implementation, filtering Artifact/Execution/Context with
+ // the following attributes and neighborhood is supported:
+ //
+ // Attributes:
+ //
+ // id:int64, type_id:int64, type:string,
+ // uri:string, name: string, external_id: string,
+ // create_time_since_epoch:int64, last_update_time_since_epoch:int64
+ // state:ENUM (Artifact only) last_known_state:ENUM (Execution only)
+ //
+ // Neighborhood
+ // - Properties and Custom Properties (for all node types):
+ // syntax: properties.$name ($name is the property name)
+ // custom_properties.$name ($name is the custom property name)
+ // attributes: the following attributes can be used
+ // int_value: int64, double_value: double, string_value: string
+ // bool_value: bool
+ //
+ // - Context (for Artifact and Execution):
+ // syntax: contexts_$alias ($alias can be [0-9A-Za-z_])
+ // attributes: the following attributes can be used
+ // id:int64, name:string, type:string, create_time_since_epoch:int64,
+ // last_update_time_since_epoch: int64
+ //
+ // - Parent and Child Contexts (for Contexts):
+ // syntax: parent_contexts_$alias( $alias can be [0-9A-Za-z_]
+ // child_contexts_$alias( $alias can be [0-9A-Za-z_]
+ // attributes: the following attributes can be used
+ // id:int64, name: string, type:string
+ //
+ // - Event (for Artifact and Execution)
+ // syntax: events_$alias ($alias can be [0-9A-Za-z_])
+ // attributes: the following attributes can be used
+ // artifact_id: int64(Execution only), execution_id: int64(Artifact only),
+ // type: ENUM, milliseconds_since_epoch: int64
+ //
+ // Examples:
+ // a) to filter nodes attributes:
+ // - id != 1
+ // - id IN (1, 3)
+ // - type_id = 5
+ // - type = 'my_type_name'
+ // - name = 'foo'
+ // - type = 'bar' AND name LIKE 'foo%'
+ // - external_id = 'my_external_id'
+ // - NOT(create_time_since_epoch < 1 OR last_update_time_since_epoch < 1)
+ //
+ // b) to filter artifacts' uri
+ // - uri = 'exact_path_string'
+ // - uri LIKE 'path_like_this%'
+ // - uri IS NOT NULL
+ //
+ // c) to filter artifact's state or execution's last_known_state
+ // - state = LIVE
+ // - state IS NULL
+ // - state IN (PENDING, LIVE)
+ // - last_known_state = RUNNING
+ // - last_known_state != RUNNING
+ // - last_known_state NOT IN (FAILED, CANCELED)
+ //
+ // d) to filter nodes having a specific context, artifact, or execution
+ // - contexts_a.id = 5
+ // - contexts_a.type = 'RunContext'
+ // - contexts_a.name = 'my_run'
+ // - contexts_a.create_time_since_epoch = 1626761453
+ // - contexts_a.last_update_time_since_epoch = 1626761453
+ // To filter nodes with conditions on multiple contexts:
+ // - contexts_a.name = 'my_run' AND contexts_b.name = 'my_pipeline'
+ // To filter context with artifacts:
+ // - artifacts_a.id = 5
+ // - artifacts_a.type = 'Dataset'
+ // - artifacts_a.name = 'my_dataset'
+ // - artifacts_a.uri = 'exact_path_string'
+ // - artifacts_a.state = LIVE
+ // - artifacts_a.state IN (PENDING, LIVE)
+ // - artifacts_a.external_id = "my_external_id"
+ // - artifacts_a.create_time_since_epoch = 1626761453
+ // - artifacts_a.last_update_time_since_epoch = 1626761453
+ // To filter contexts with conditions on multiple artifacts:
+ // - artifacts_a.name = 'my_run' AND artifacts_b.name = 'my_pipeline'
+ // To filter context with executions:
+ // - executions_a.id = 5
+ // - executions_a.type = 'Dataset'
+ // - executions_a.name = 'my_dataset'
+ // - executions_a.last_known_state = RUNNING
+ //
+ // . - executions_a.last_known_state IN (NEW, RUNNING)
+ // - executions_a.external_id = "my_external_id"
+ // - executions_a.create_time_since_epoch = 1626761453
+ // - executions_a.last_update_time_since_epoch = 1626761453
+ // To filter contexts with conditions on multiple executions:
+ // - executions_a.name = 'my_run' AND executions_b.name = 'my_pipeline'
+ //
+ // e) to filter nodes condition on their properties
+ // - properties.accuracy.double_value > 0.95
+ // - custom_properties.my_param.string_value = "foo"
+ // If the name of the property or custom property includes characters
+ // other than [0-9A-Za-z_], then the name need to be backquoted,
+ // e.g.,
+ // - properties.`my property`.int_value > 0
+ // - custom_properties.`my:custom.property`.bool_value = true
+ //
+ // f) complex query to filter both node attributes and neighborhood
+ // - type = 'DataSet' AND
+ // (contexts_a.type = 'RunContext' AND contexts_a.name = 'my_run') AND
+ // (properties.span = 1 OR custom_properties.span = 1)
+ //
+ // g) to filter parent/child context
+ // - parent_contexts_a.id = 5
+ // - child_contexts_a.type = 'RunContext'
+ // - parent_contexts_a.name = 'parent_context_1'
+ //
+ // h) to filter Artifacts on Events
+ // - events_0.execution_id = 1
+ // - events_0.type = INPUT
+ // - events_0.milliseconds_since_epoch = 1
+ // to filter Executions on Events
+ // - events_0.artifact_id = 1
+ // - events_0.type IN (INPUT, INTERNAL_INPUT)
+ // - events_0.milliseconds_since_epoch = 1
+ //
+ // TODO(b/145945460) Support filtering on event step fields.
+ FilterQuery *string `protobuf:"bytes,4,opt,name=filter_query,json=filterQuery" json:"filter_query,omitempty"`
+}
+
+// Default values for ListOperationOptions fields.
+const (
+ Default_ListOperationOptions_MaxResultSize = int32(20)
+)
+
+func (x *ListOperationOptions) Reset() {
+ *x = ListOperationOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOperationOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOperationOptions) ProtoMessage() {}
+
+func (x *ListOperationOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[31]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListOperationOptions.ProtoReflect.Descriptor instead.
+func (*ListOperationOptions) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *ListOperationOptions) GetMaxResultSize() int32 {
+ if x != nil && x.MaxResultSize != nil {
+ return *x.MaxResultSize
+ }
+ return Default_ListOperationOptions_MaxResultSize
+}
+
+func (x *ListOperationOptions) GetOrderByField() *ListOperationOptions_OrderByField {
+ if x != nil {
+ return x.OrderByField
+ }
+ return nil
+}
+
+func (x *ListOperationOptions) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+func (x *ListOperationOptions) GetFilterQuery() string {
+ if x != nil && x.FilterQuery != nil {
+ return *x.FilterQuery
+ }
+ return ""
+}
+
+// Encapsulates information to identify the next page of resources in
+// ListOperation.
+type ListOperationNextPageToken struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Id offset within the resultset to start next page.
+ // Id offset is returned as Id is the unique field used to break ties for
+ // fields that might have duplicate entries, e.g. there could be two
+ // resources with same create_time. In such cases to break the tie in
+ // ordering, id offset is used.
+ // This field is currently only set whe order_by field is CREATE_TIME.
+ IdOffset *int64 `protobuf:"varint,1,opt,name=id_offset,json=idOffset" json:"id_offset,omitempty"`
+ // Offset value of the order by field. If ID is used this value is same as
+ // id_offset.
+ FieldOffset *int64 `protobuf:"varint,2,opt,name=field_offset,json=fieldOffset" json:"field_offset,omitempty"`
+ // Options set in the first call to ListOperation. This ensures that if
+ // next_page_token is set by the caller then ListPipelineJobs API will always
+ // use options set in the first call.
+ SetOptions *ListOperationOptions `protobuf:"bytes,3,opt,name=set_options,json=setOptions" json:"set_options,omitempty"`
+ // List of ids that have the same order_by field values. This is used to
+ // ensure List Operation does not return duplicate entries for nodes that have
+ // the same order_by field value.
+ // This field is currently only set whe order_by field is LAST_UPDATE_TIME.
+ ListedIds []int64 `protobuf:"varint,4,rep,name=listed_ids,json=listedIds" json:"listed_ids,omitempty"`
+}
+
+func (x *ListOperationNextPageToken) Reset() {
+ *x = ListOperationNextPageToken{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOperationNextPageToken) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOperationNextPageToken) ProtoMessage() {}
+
+func (x *ListOperationNextPageToken) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[32]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListOperationNextPageToken.ProtoReflect.Descriptor instead.
+func (*ListOperationNextPageToken) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *ListOperationNextPageToken) GetIdOffset() int64 {
+ if x != nil && x.IdOffset != nil {
+ return *x.IdOffset
+ }
+ return 0
+}
+
+func (x *ListOperationNextPageToken) GetFieldOffset() int64 {
+ if x != nil && x.FieldOffset != nil {
+ return *x.FieldOffset
+ }
+ return 0
+}
+
+func (x *ListOperationNextPageToken) GetSetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.SetOptions
+ }
+ return nil
+}
+
+func (x *ListOperationNextPageToken) GetListedIds() []int64 {
+ if x != nil {
+ return x.ListedIds
+ }
+ return nil
+}
+
+// Options for transactions.
+// Note: This is under development. Clients should not use it.
+type TransactionOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+ extensionFields protoimpl.ExtensionFields
+
+ // Transaction tag for debug use only.
+ Tag *string `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
+}
+
+func (x *TransactionOptions) Reset() {
+ *x = TransactionOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TransactionOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TransactionOptions) ProtoMessage() {}
+
+func (x *TransactionOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[33]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TransactionOptions.ProtoReflect.Descriptor instead.
+func (*TransactionOptions) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *TransactionOptions) GetTag() string {
+ if x != nil && x.Tag != nil {
+ return *x.Tag
+ }
+ return ""
+}
+
+// TODO(b/283852485): Deprecate GetLineageGraph API after migration to
+// GetLineageSubgraph API.
+// The query options for `get_lineage_graph` operation.
+// `query_nodes` is a list of nodes of interest.
+// Currently only artifacts are supported as `query_nodes`.
+// `stop_conditions` defines the filtering rules when querying a lineage graph.
+// `max_node_size` defines the total number of artifacts and executions returned
+// in the subgraph.
+type LineageGraphQueryOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A query to specify the nodes of interest.
+ // `ListOperationOptions.max_result_size` sets the maximum number of nodes to
+ // begin with the graph search.
+ // TODO(b/178491112) Support query_nodes for Executions.
+ //
+ // Types that are assignable to QueryNodes:
+ //
+ // *LineageGraphQueryOptions_ArtifactsOptions
+ QueryNodes isLineageGraphQueryOptions_QueryNodes `protobuf_oneof:"query_nodes"`
+ // A constraint option to define the filtering rules when querying a lineage
+ // graph.
+ StopConditions *LineageGraphQueryOptions_BoundaryConstraint `protobuf:"bytes,2,opt,name=stop_conditions,json=stopConditions" json:"stop_conditions,omitempty"`
+ // Maximum total number of artifacts and executions in the whole returned
+ // lineage graph.
+ // If set to 0 or below, all related nodes will be returned without any
+ // number limitation.
+ // The number counts toward Artifacts and Executions. Nothing else considered.
+ //
+ // NOTE: There is no pagination supported.
+ MaxNodeSize *int64 `protobuf:"varint,3,opt,name=max_node_size,json=maxNodeSize,def=20" json:"max_node_size,omitempty"`
+}
+
+// Default values for LineageGraphQueryOptions fields.
+const (
+ Default_LineageGraphQueryOptions_MaxNodeSize = int64(20)
+)
+
+func (x *LineageGraphQueryOptions) Reset() {
+ *x = LineageGraphQueryOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LineageGraphQueryOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LineageGraphQueryOptions) ProtoMessage() {}
+
+func (x *LineageGraphQueryOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[34]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LineageGraphQueryOptions.ProtoReflect.Descriptor instead.
+func (*LineageGraphQueryOptions) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{34}
+}
+
+func (m *LineageGraphQueryOptions) GetQueryNodes() isLineageGraphQueryOptions_QueryNodes {
+ if m != nil {
+ return m.QueryNodes
+ }
+ return nil
+}
+
+func (x *LineageGraphQueryOptions) GetArtifactsOptions() *ListOperationOptions {
+ if x, ok := x.GetQueryNodes().(*LineageGraphQueryOptions_ArtifactsOptions); ok {
+ return x.ArtifactsOptions
+ }
+ return nil
+}
+
+func (x *LineageGraphQueryOptions) GetStopConditions() *LineageGraphQueryOptions_BoundaryConstraint {
+ if x != nil {
+ return x.StopConditions
+ }
+ return nil
+}
+
+func (x *LineageGraphQueryOptions) GetMaxNodeSize() int64 {
+ if x != nil && x.MaxNodeSize != nil {
+ return *x.MaxNodeSize
+ }
+ return Default_LineageGraphQueryOptions_MaxNodeSize
+}
+
+type isLineageGraphQueryOptions_QueryNodes interface {
+ isLineageGraphQueryOptions_QueryNodes()
+}
+
+type LineageGraphQueryOptions_ArtifactsOptions struct {
+ ArtifactsOptions *ListOperationOptions `protobuf:"bytes,1,opt,name=artifacts_options,json=artifactsOptions,oneof"`
+}
+
+func (*LineageGraphQueryOptions_ArtifactsOptions) isLineageGraphQueryOptions_QueryNodes() {}
+
+// The query options for lineage graph tracing from a list of interested nodes.
+type LineageSubgraphQueryOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to StartingNodes:
+ //
+ // *LineageSubgraphQueryOptions_StartingArtifacts
+ // *LineageSubgraphQueryOptions_StartingExecutions
+ StartingNodes isLineageSubgraphQueryOptions_StartingNodes `protobuf_oneof:"starting_nodes"`
+ // The maximum number of hops from the `starting_nodes` to traverse.
+ // A hop is defined as a jump to the next node following the path of
+ // node -> event -> next_node.
+ // For example, in the lineage graph a_1 -> e_1 -> a_2:
+ // a_2 is 2 hops away from a_1, and e_1 is 1 hop away from a_1.
+ // `max_num_hops` should be non-negative.
+ // When its value is set to 0, only the `starting_nodes` are returned.
+ MaxNumHops *int64 `protobuf:"varint,3,opt,name=max_num_hops,json=maxNumHops" json:"max_num_hops,omitempty"`
+ // The direction of lineage graph tracing, which means the direction of all
+ // hops in the tracing.
+ //
+ // An UPSTREAM hop means an expansion following the path of
+ // execution -> output_event -> artifact or
+ // artifact -> input_event -> execution
+ // A DOWNSTREAM hop means an expansion following the path of
+ // execution -> input_event -> artifact or
+ // artifact -> output_event -> execution
+ //
+ // Please refer to `Direction` for more details.
+ Direction *LineageSubgraphQueryOptions_Direction `protobuf:"varint,4,opt,name=direction,enum=ml_metadata.LineageSubgraphQueryOptions_Direction" json:"direction,omitempty"`
+}
+
+func (x *LineageSubgraphQueryOptions) Reset() {
+ *x = LineageSubgraphQueryOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LineageSubgraphQueryOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LineageSubgraphQueryOptions) ProtoMessage() {}
+
+func (x *LineageSubgraphQueryOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[35]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LineageSubgraphQueryOptions.ProtoReflect.Descriptor instead.
+func (*LineageSubgraphQueryOptions) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{35}
+}
+
+func (m *LineageSubgraphQueryOptions) GetStartingNodes() isLineageSubgraphQueryOptions_StartingNodes {
+ if m != nil {
+ return m.StartingNodes
+ }
+ return nil
+}
+
+func (x *LineageSubgraphQueryOptions) GetStartingArtifacts() *LineageSubgraphQueryOptions_StartingNodes {
+ if x, ok := x.GetStartingNodes().(*LineageSubgraphQueryOptions_StartingArtifacts); ok {
+ return x.StartingArtifacts
+ }
+ return nil
+}
+
+func (x *LineageSubgraphQueryOptions) GetStartingExecutions() *LineageSubgraphQueryOptions_StartingNodes {
+ if x, ok := x.GetStartingNodes().(*LineageSubgraphQueryOptions_StartingExecutions); ok {
+ return x.StartingExecutions
+ }
+ return nil
+}
+
+func (x *LineageSubgraphQueryOptions) GetMaxNumHops() int64 {
+ if x != nil && x.MaxNumHops != nil {
+ return *x.MaxNumHops
+ }
+ return 0
+}
+
+func (x *LineageSubgraphQueryOptions) GetDirection() LineageSubgraphQueryOptions_Direction {
+ if x != nil && x.Direction != nil {
+ return *x.Direction
+ }
+ return LineageSubgraphQueryOptions_DIRECTION_UNSPECIFIED
+}
+
+type isLineageSubgraphQueryOptions_StartingNodes interface {
+ isLineageSubgraphQueryOptions_StartingNodes()
+}
+
+type LineageSubgraphQueryOptions_StartingArtifacts struct {
+ StartingArtifacts *LineageSubgraphQueryOptions_StartingNodes `protobuf:"bytes,1,opt,name=starting_artifacts,json=startingArtifacts,oneof"`
+}
+
+type LineageSubgraphQueryOptions_StartingExecutions struct {
+ StartingExecutions *LineageSubgraphQueryOptions_StartingNodes `protobuf:"bytes,2,opt,name=starting_executions,json=startingExecutions,oneof"`
+}
+
+func (*LineageSubgraphQueryOptions_StartingArtifacts) isLineageSubgraphQueryOptions_StartingNodes() {}
+
+func (*LineageSubgraphQueryOptions_StartingExecutions) isLineageSubgraphQueryOptions_StartingNodes() {
+}
+
+// A simple path (e.g. {step{key:"foo"}}) can name an artifact in the context
+// of an execution.
+type Event_Path struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A simple path (e.g. {step{key:"foo"}}) can name an artifact in the
+ // context of an execution.
+ Steps []*Event_Path_Step `protobuf:"bytes,1,rep,name=steps" json:"steps,omitempty"`
+}
+
+func (x *Event_Path) Reset() {
+ *x = Event_Path{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Event_Path) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Event_Path) ProtoMessage() {}
+
+func (x *Event_Path) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[39]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Event_Path.ProtoReflect.Descriptor instead.
+func (*Event_Path) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{4, 0}
+}
+
+func (x *Event_Path) GetSteps() []*Event_Path_Step {
+ if x != nil {
+ return x.Steps
+ }
+ return nil
+}
+
+type Event_Path_Step struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Value:
+ //
+ // *Event_Path_Step_Index
+ // *Event_Path_Step_Key
+ Value isEvent_Path_Step_Value `protobuf_oneof:"value"`
+}
+
+func (x *Event_Path_Step) Reset() {
+ *x = Event_Path_Step{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Event_Path_Step) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Event_Path_Step) ProtoMessage() {}
+
+func (x *Event_Path_Step) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[40]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Event_Path_Step.ProtoReflect.Descriptor instead.
+func (*Event_Path_Step) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{4, 0, 0}
+}
+
+func (m *Event_Path_Step) GetValue() isEvent_Path_Step_Value {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (x *Event_Path_Step) GetIndex() int64 {
+ if x, ok := x.GetValue().(*Event_Path_Step_Index); ok {
+ return x.Index
+ }
+ return 0
+}
+
+func (x *Event_Path_Step) GetKey() string {
+ if x, ok := x.GetValue().(*Event_Path_Step_Key); ok {
+ return x.Key
+ }
+ return ""
+}
+
+type isEvent_Path_Step_Value interface {
+ isEvent_Path_Step_Value()
+}
+
+type Event_Path_Step_Index struct {
+ Index int64 `protobuf:"varint,1,opt,name=index,oneof"`
+}
+
+type Event_Path_Step_Key struct {
+ Key string `protobuf:"bytes,2,opt,name=key,oneof"`
+}
+
+func (*Event_Path_Step_Index) isEvent_Path_Step_Value() {}
+
+func (*Event_Path_Step_Key) isEvent_Path_Step_Value() {}
+
+// The options to establish encrypted connections to MySQL using SSL.
+type MySQLDatabaseConfig_SSLOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The path name of the client private key file.
+ Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
+ // The path name of the client public key certificate file.
+ Cert *string `protobuf:"bytes,2,opt,name=cert" json:"cert,omitempty"`
+ // The path name of the CA certificate file.
+ Ca *string `protobuf:"bytes,3,opt,name=ca" json:"ca,omitempty"`
+ // The path name of the directory that contains trusted SSL CA certificates.
+ Capath *string `protobuf:"bytes,4,opt,name=capath" json:"capath,omitempty"`
+ // The list of permissible ciphers for SSL encryption.
+ Cipher *string `protobuf:"bytes,5,opt,name=cipher" json:"cipher,omitempty"`
+ // If set, enable verification of the server certificate against the host
+ // name used when connecting to the server.
+ VerifyServerCert *bool `protobuf:"varint,6,opt,name=verify_server_cert,json=verifyServerCert" json:"verify_server_cert,omitempty"`
+}
+
+func (x *MySQLDatabaseConfig_SSLOptions) Reset() {
+ *x = MySQLDatabaseConfig_SSLOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[48]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MySQLDatabaseConfig_SSLOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MySQLDatabaseConfig_SSLOptions) ProtoMessage() {}
+
+func (x *MySQLDatabaseConfig_SSLOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[48]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MySQLDatabaseConfig_SSLOptions.ProtoReflect.Descriptor instead.
+func (*MySQLDatabaseConfig_SSLOptions) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{22, 0}
+}
+
+func (x *MySQLDatabaseConfig_SSLOptions) GetKey() string {
+ if x != nil && x.Key != nil {
+ return *x.Key
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig_SSLOptions) GetCert() string {
+ if x != nil && x.Cert != nil {
+ return *x.Cert
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig_SSLOptions) GetCa() string {
+ if x != nil && x.Ca != nil {
+ return *x.Ca
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig_SSLOptions) GetCapath() string {
+ if x != nil && x.Capath != nil {
+ return *x.Capath
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig_SSLOptions) GetCipher() string {
+ if x != nil && x.Cipher != nil {
+ return *x.Cipher
+ }
+ return ""
+}
+
+func (x *MySQLDatabaseConfig_SSLOptions) GetVerifyServerCert() bool {
+ if x != nil && x.VerifyServerCert != nil {
+ return *x.VerifyServerCert
+ }
+ return false
+}
+
+type PostgreSQLDatabaseConfig_SSLOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // disable, allow, verify-ca, verify-full, etc. Reference:
+ // https://www.postgresql.org/docs/current/libpq-connect.html
+ Sslmode *string `protobuf:"bytes,1,opt,name=sslmode" json:"sslmode,omitempty"`
+ // This parameter specifies the file name of the client SSL certificate,
+ // replacing the default ~/.postgresql/postgresql.crt. This parameter is
+ // ignored if an SSL connection is not made.
+ Sslcert *string `protobuf:"bytes,2,opt,name=sslcert" json:"sslcert,omitempty"`
+ // This parameter specifies the location for the secret key used for the
+ // client certificate. It can either specify a file name that will be used
+ // instead of the default ~/.postgresql/postgresql.key, this parameter is
+ // ignored if an SSL connection is not made.
+ Sslkey *string `protobuf:"bytes,3,opt,name=sslkey" json:"sslkey,omitempty"`
+ // This parameter specifies the password for the secret key specified in
+ // sslkey, allowing client certificate private keys to be stored in
+ // encrypted form on disk even when interactive passphrase input is not
+ // practical.
+ Sslpassword *string `protobuf:"bytes,4,opt,name=sslpassword" json:"sslpassword,omitempty"`
+ // This parameter specifies the name of a file containing SSL certificate
+ // authority (CA) certificate(s). If the file exists, the server's
+ // certificate will be verified to be signed by one of these authorities.
+ // The default is ~/.postgresql/root.crt.
+ Sslrootcert *string `protobuf:"bytes,5,opt,name=sslrootcert" json:"sslrootcert,omitempty"`
+}
+
+func (x *PostgreSQLDatabaseConfig_SSLOptions) Reset() {
+ *x = PostgreSQLDatabaseConfig_SSLOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[49]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PostgreSQLDatabaseConfig_SSLOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PostgreSQLDatabaseConfig_SSLOptions) ProtoMessage() {}
+
+func (x *PostgreSQLDatabaseConfig_SSLOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[49]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PostgreSQLDatabaseConfig_SSLOptions.ProtoReflect.Descriptor instead.
+func (*PostgreSQLDatabaseConfig_SSLOptions) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{24, 0}
+}
+
+func (x *PostgreSQLDatabaseConfig_SSLOptions) GetSslmode() string {
+ if x != nil && x.Sslmode != nil {
+ return *x.Sslmode
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig_SSLOptions) GetSslcert() string {
+ if x != nil && x.Sslcert != nil {
+ return *x.Sslcert
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig_SSLOptions) GetSslkey() string {
+ if x != nil && x.Sslkey != nil {
+ return *x.Sslkey
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig_SSLOptions) GetSslpassword() string {
+ if x != nil && x.Sslpassword != nil {
+ return *x.Sslpassword
+ }
+ return ""
+}
+
+func (x *PostgreSQLDatabaseConfig_SSLOptions) GetSslrootcert() string {
+ if x != nil && x.Sslrootcert != nil {
+ return *x.Sslrootcert
+ }
+ return ""
+}
+
+type MetadataStoreClientConfig_SSLConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The PEM-encoded private key as a byte string, or Empty if no private key
+ // should be used.
+ ClientKey *string `protobuf:"bytes,1,opt,name=client_key,json=clientKey" json:"client_key,omitempty"`
+ // The PEM-encoded certificate chain as a byte string to use or or Empty if
+ // no certificate chain should be used.
+ ServerCert *string `protobuf:"bytes,2,opt,name=server_cert,json=serverCert" json:"server_cert,omitempty"`
+ // The PEM-encoded root certificates as a byte string, or Empty to retrieve
+ // them from a default location chosen by gRPC runtime.
+ CustomCa *string `protobuf:"bytes,3,opt,name=custom_ca,json=customCa" json:"custom_ca,omitempty"`
+}
+
+func (x *MetadataStoreClientConfig_SSLConfig) Reset() {
+ *x = MetadataStoreClientConfig_SSLConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[50]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataStoreClientConfig_SSLConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataStoreClientConfig_SSLConfig) ProtoMessage() {}
+
+func (x *MetadataStoreClientConfig_SSLConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[50]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataStoreClientConfig_SSLConfig.ProtoReflect.Descriptor instead.
+func (*MetadataStoreClientConfig_SSLConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{29, 0}
+}
+
+func (x *MetadataStoreClientConfig_SSLConfig) GetClientKey() string {
+ if x != nil && x.ClientKey != nil {
+ return *x.ClientKey
+ }
+ return ""
+}
+
+func (x *MetadataStoreClientConfig_SSLConfig) GetServerCert() string {
+ if x != nil && x.ServerCert != nil {
+ return *x.ServerCert
+ }
+ return ""
+}
+
+func (x *MetadataStoreClientConfig_SSLConfig) GetCustomCa() string {
+ if x != nil && x.CustomCa != nil {
+ return *x.CustomCa
+ }
+ return ""
+}
+
+type MetadataStoreServerConfig_SSLConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Private server key for SSL
+ ServerKey *string `protobuf:"bytes,1,opt,name=server_key,json=serverKey" json:"server_key,omitempty"`
+ // Public server certificate
+ ServerCert *string `protobuf:"bytes,2,opt,name=server_cert,json=serverCert" json:"server_cert,omitempty"`
+ // Custom certificate authority
+ CustomCa *string `protobuf:"bytes,3,opt,name=custom_ca,json=customCa" json:"custom_ca,omitempty"`
+ // Valid client certificate required?
+ ClientVerify *bool `protobuf:"varint,4,opt,name=client_verify,json=clientVerify" json:"client_verify,omitempty"`
+}
+
+func (x *MetadataStoreServerConfig_SSLConfig) Reset() {
+ *x = MetadataStoreServerConfig_SSLConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[51]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataStoreServerConfig_SSLConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataStoreServerConfig_SSLConfig) ProtoMessage() {}
+
+func (x *MetadataStoreServerConfig_SSLConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[51]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataStoreServerConfig_SSLConfig.ProtoReflect.Descriptor instead.
+func (*MetadataStoreServerConfig_SSLConfig) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{30, 0}
+}
+
+func (x *MetadataStoreServerConfig_SSLConfig) GetServerKey() string {
+ if x != nil && x.ServerKey != nil {
+ return *x.ServerKey
+ }
+ return ""
+}
+
+func (x *MetadataStoreServerConfig_SSLConfig) GetServerCert() string {
+ if x != nil && x.ServerCert != nil {
+ return *x.ServerCert
+ }
+ return ""
+}
+
+func (x *MetadataStoreServerConfig_SSLConfig) GetCustomCa() string {
+ if x != nil && x.CustomCa != nil {
+ return *x.CustomCa
+ }
+ return ""
+}
+
+func (x *MetadataStoreServerConfig_SSLConfig) GetClientVerify() bool {
+ if x != nil && x.ClientVerify != nil {
+ return *x.ClientVerify
+ }
+ return false
+}
+
+type ListOperationOptions_OrderByField struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Field to order.
+ Field *ListOperationOptions_OrderByField_Field `protobuf:"varint,1,opt,name=field,enum=ml_metadata.ListOperationOptions_OrderByField_Field,def=3" json:"field,omitempty"`
+ // Direction of ordering.
+ IsAsc *bool `protobuf:"varint,2,opt,name=is_asc,json=isAsc,def=1" json:"is_asc,omitempty"`
+}
+
+// Default values for ListOperationOptions_OrderByField fields.
+const (
+ Default_ListOperationOptions_OrderByField_Field = ListOperationOptions_OrderByField_ID
+ Default_ListOperationOptions_OrderByField_IsAsc = bool(true)
+)
+
+func (x *ListOperationOptions_OrderByField) Reset() {
+ *x = ListOperationOptions_OrderByField{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[52]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOperationOptions_OrderByField) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOperationOptions_OrderByField) ProtoMessage() {}
+
+func (x *ListOperationOptions_OrderByField) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[52]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListOperationOptions_OrderByField.ProtoReflect.Descriptor instead.
+func (*ListOperationOptions_OrderByField) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{31, 0}
+}
+
+func (x *ListOperationOptions_OrderByField) GetField() ListOperationOptions_OrderByField_Field {
+ if x != nil && x.Field != nil {
+ return *x.Field
+ }
+ return Default_ListOperationOptions_OrderByField_Field
+}
+
+func (x *ListOperationOptions_OrderByField) GetIsAsc() bool {
+ if x != nil && x.IsAsc != nil {
+ return *x.IsAsc
+ }
+ return Default_ListOperationOptions_OrderByField_IsAsc
+}
+
+// Filtering conditions for retrieving the lineage graph.
+type LineageGraphQueryOptions_BoundaryConstraint struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The maximum number of hops from the `query_nodes` to traverse.
+ // A hop is defined as a jump to the next node following the path of
+ // node -> event -> next_node.
+ // For example, in the lineage graph a_1 -> e_1 -> a_2:
+ // a_2 is 2 hops away from a_1, and e_1 is 1 hop away from a_1.
+ // `max_num_hops` should be non-negative.
+ // When its value is set to 0, only the `query_nodes` are returned.
+ MaxNumHops *int64 `protobuf:"varint,1,opt,name=max_num_hops,json=maxNumHops" json:"max_num_hops,omitempty"`
+ // Filtering conditions for retrieving the lineage graph.
+ // Please refer to `ListOperationOptions.filter_query` for the syntax.
+ //
+ // If set, the `boundary_artifacts` defines which artifacts to keep in the
+ // returned lineage graph during the graph search.
+ // Artifacts that do not satisfy the `boundary_artifacts` are filtered out,
+ // and the subgraphs starting at them will be pruned.
+ // If not set, no artifacts will be filtered out.
+ // Taking the following lineage graph as example:
+ // (`a` represents an Artifact, `e` represents an Execution, each arrow
+ // represents a hop.)
+ //
+ // a_0 a_1 a_3
+ // | \ / \
+ // \/ \/ \/ \/
+ // e_0 e_1 e_3
+ // / \
+ // \/ \/
+ // a_2 a_4 a_5
+ // \ /
+ // \/ \/
+ // e_2
+ //
+ // To query all the upstream and downstream nodes 3 hops away from a_4,
+ // while excluding the upstream subgraph starting at a_3, then
+ // `stop_conditions` can be set as:
+ //
+ // {
+ // max_num_hops: 3
+ // boundary_artifacts: 'id != 3'
+ // }
+ //
+ // With the `stop_conditions`, {a_3, e_1, a_1, a_0, e_0} will be filtered
+ // out.
+ // The returned lineage graph looks like:
+ //
+ // e_3
+ // / \
+ // \/ \/
+ // a_2 a_4 a_5
+ // \ /
+ // \/ \/
+ // e_2
+ BoundaryArtifacts *string `protobuf:"bytes,2,opt,name=boundary_artifacts,json=boundaryArtifacts" json:"boundary_artifacts,omitempty"`
+ // If set, the `boundary_executions` defines which executions to keep in the
+ // returned lineage graph during the graph search.
+ // Executions that do not satisfy the `boundary_executions` are filtered out
+ // and the subgraphs starting at them will be pruned.
+ // If not set, no executions will be filtered out.
+ // In the example above, to query for all the upstream and downstream nodes
+ // 3 hops away from a_4, while excluding the upstream subgraph and the
+ // downstream subgraph starting at e_3, then `stop_conditions` can be set as
+ //
+ // {
+ // max_num_hops: 3
+ // boundary_executions: 'id != 3'
+ // }
+ //
+ // With the `stop_conditions`, {e_3, a_5, a_3, e_1, a_1, a_0, e_0} will be
+ // filtered out.
+ // The returned lineage graph looks like:
+ //
+ // a_2 a_4
+ // \ /
+ // \/ \/
+ // e_2
+ //
+ // However, for the following graph:
+ //
+ // a_0 a_1 a_3
+ // | \ / \
+ // \/ \/ \/ \/
+ // e_0 e_1 e_3
+ // \ / \
+ // \/ \/ \/
+ // a_2 a_4 a_5
+ // \ /
+ // \/ \/
+ // e_2
+ //
+ // With the same `stop_conditions`, only {e_3, a_5, a_0, e_0} will be
+ // filtered out.
+ // The returned lineage graph looks like:
+ //
+ // a_1 a_3
+ // \ /
+ // \/ \/
+ // e_1
+ // \
+ // \/
+ // a_2 a_4
+ // \ /
+ // \/ \/
+ // e_2
+ BoundaryExecutions *string `protobuf:"bytes,3,opt,name=boundary_executions,json=boundaryExecutions" json:"boundary_executions,omitempty"`
+}
+
+func (x *LineageGraphQueryOptions_BoundaryConstraint) Reset() {
+ *x = LineageGraphQueryOptions_BoundaryConstraint{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[53]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LineageGraphQueryOptions_BoundaryConstraint) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LineageGraphQueryOptions_BoundaryConstraint) ProtoMessage() {}
+
+func (x *LineageGraphQueryOptions_BoundaryConstraint) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[53]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LineageGraphQueryOptions_BoundaryConstraint.ProtoReflect.Descriptor instead.
+func (*LineageGraphQueryOptions_BoundaryConstraint) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{34, 0}
+}
+
+func (x *LineageGraphQueryOptions_BoundaryConstraint) GetMaxNumHops() int64 {
+ if x != nil && x.MaxNumHops != nil {
+ return *x.MaxNumHops
+ }
+ return 0
+}
+
+func (x *LineageGraphQueryOptions_BoundaryConstraint) GetBoundaryArtifacts() string {
+ if x != nil && x.BoundaryArtifacts != nil {
+ return *x.BoundaryArtifacts
+ }
+ return ""
+}
+
+func (x *LineageGraphQueryOptions_BoundaryConstraint) GetBoundaryExecutions() string {
+ if x != nil && x.BoundaryExecutions != nil {
+ return *x.BoundaryExecutions
+ }
+ return ""
+}
+
+// `starting_nodes` is a list of nodes of interest to start graph tracing.
+// NOTE: The maximum number of starting nodes is 100 at most.
+type LineageSubgraphQueryOptions_StartingNodes struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // `filter_query` is a boolean expression in SQL syntax that is used to
+ // specify the conditions on starting nodes.
+ // Please refer to ListOperationOptions.filter_query for more details.
+ FilterQuery *string `protobuf:"bytes,1,opt,name=filter_query,json=filterQuery" json:"filter_query,omitempty"`
+}
+
+func (x *LineageSubgraphQueryOptions_StartingNodes) Reset() {
+ *x = LineageSubgraphQueryOptions_StartingNodes{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[54]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LineageSubgraphQueryOptions_StartingNodes) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LineageSubgraphQueryOptions_StartingNodes) ProtoMessage() {}
+
+func (x *LineageSubgraphQueryOptions_StartingNodes) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_proto_msgTypes[54]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LineageSubgraphQueryOptions_StartingNodes.ProtoReflect.Descriptor instead.
+func (*LineageSubgraphQueryOptions_StartingNodes) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_proto_rawDescGZIP(), []int{35, 0}
+}
+
+func (x *LineageSubgraphQueryOptions_StartingNodes) GetFilterQuery() string {
+ if x != nil && x.FilterQuery != nil {
+ return *x.FilterQuery
+ }
+ return ""
+}
+
+var file_ml_metadata_proto_metadata_store_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
+ ExtensionType: (*SystemTypeExtension)(nil),
+ Field: 384560917,
+ Name: "ml_metadata.system_type_extension",
+ Tag: "bytes,384560917,opt,name=system_type_extension",
+ Filename: "ml_metadata/proto/metadata_store.proto",
+ },
+}
+
+// Extension fields to descriptorpb.EnumValueOptions.
+var (
+ // The system type information of each simple type enum refers to.
+ //
+ // optional ml_metadata.SystemTypeExtension system_type_extension = 384560917;
+ E_SystemTypeExtension = &file_ml_metadata_proto_metadata_store_proto_extTypes[0]
+)
+
+var File_ml_metadata_proto_metadata_store_proto protoreflect.FileDescriptor
+
+var file_ml_metadata_proto_metadata_store_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x32, 0x0a, 0x13, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65,
+ 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x91, 0x02, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d,
+ 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a,
+ 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x75, 0x63,
+ 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
+ 0x48, 0x00, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f,
+ 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42,
+ 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x06, 0x0a, 0x08, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x79, 0x70,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65,
+ 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65,
+ 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45,
+ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
+ 0x12, 0x58, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x05, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a,
+ 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x6e,
+ 0x63, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45,
+ 0x70, 0x6f, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x1c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x65,
+ 0x70, 0x6f, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x6c, 0x61, 0x73, 0x74,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45,
+ 0x70, 0x6f, 0x63, 0x68, 0x12, 0x3d, 0x0a, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x1a, 0x51, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x57, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
+ 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
+ 0x6f, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47,
+ 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13,
+ 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54,
+ 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44,
+ 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10,
+ 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x06,
+ 0x22, 0xd2, 0x04, 0x0a, 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+ 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x49, 0x64, 0x12, 0x49, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4c, 0x0a,
+ 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x53, 0x79, 0x73, 0x74,
+ 0x65, 0x6d, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x42, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70,
+ 0x65, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x58, 0x0a, 0x0f, 0x50,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
+ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
+ 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcd, 0x01, 0x0a, 0x15, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
+ 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x42, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
+ 0x26, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x1a, 0x1b, 0xaa, 0xf1, 0xfd, 0xba,
+ 0x0b, 0x15, 0x0a, 0x13, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x07, 0x44, 0x41, 0x54, 0x41, 0x53,
+ 0x45, 0x54, 0x10, 0x01, 0x1a, 0x14, 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x0e, 0x0a, 0x0c, 0x6d, 0x6c,
+ 0x6d, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x4d, 0x4f,
+ 0x44, 0x45, 0x4c, 0x10, 0x02, 0x1a, 0x12, 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x0c, 0x0a, 0x0a, 0x6d,
+ 0x6c, 0x6d, 0x64, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x07, 0x4d, 0x45, 0x54,
+ 0x52, 0x49, 0x43, 0x53, 0x10, 0x03, 0x1a, 0x14, 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x0e, 0x0a, 0x0c,
+ 0x6d, 0x6c, 0x6d, 0x64, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x0a, 0x0a,
+ 0x53, 0x54, 0x41, 0x54, 0x49, 0x53, 0x54, 0x49, 0x43, 0x53, 0x10, 0x04, 0x1a, 0x17, 0xaa, 0xf1,
+ 0xfd, 0xba, 0x0b, 0x11, 0x0a, 0x0f, 0x6d, 0x6c, 0x6d, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69,
+ 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0xaa, 0x04, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12,
+ 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64,
+ 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
+ 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a,
+ 0x18, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x69,
+ 0x6e, 0x63, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x16, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x53, 0x69, 0x6e,
+ 0x63, 0x65, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x3d, 0x0a, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65,
+ 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x77, 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x32,
+ 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e,
+ 0x74, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x52, 0x05, 0x73, 0x74, 0x65,
+ 0x70, 0x73, 0x1a, 0x3b, 0x0a, 0x04, 0x53, 0x74, 0x65, 0x70, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e,
+ 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64,
+ 0x65, 0x78, 0x12, 0x12, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48,
+ 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
+ 0x90, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x45,
+ 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45,
+ 0x43, 0x4c, 0x41, 0x52, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x10, 0x02, 0x12, 0x09,
+ 0x0a, 0x05, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x55, 0x54,
+ 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41,
+ 0x4c, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x54,
+ 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x10, 0x06, 0x12, 0x12,
+ 0x0a, 0x0e, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54,
+ 0x10, 0x07, 0x22, 0xaa, 0x06, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64,
+ 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x49, 0x64, 0x12, 0x46, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e,
+ 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74,
+ 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65,
+ 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
+ 0x65, 0x73, 0x12, 0x59, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x63, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a,
+ 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x6e,
+ 0x63, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45,
+ 0x70, 0x6f, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x1c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x65,
+ 0x70, 0x6f, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x6c, 0x61, 0x73, 0x74,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45,
+ 0x70, 0x6f, 0x63, 0x68, 0x12, 0x3d, 0x0a, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x1a, 0x51, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x57, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
+ 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
+ 0x5e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x01, 0x12, 0x0b,
+ 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43,
+ 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49,
+ 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x41, 0x43, 0x48, 0x45, 0x44, 0x10,
+ 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x22,
+ 0xf9, 0x05, 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+ 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64,
+ 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
+ 0x70, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3e,
+ 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40,
+ 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x4d, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e,
+ 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x42, 0x61, 0x73,
+ 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x1a,
+ 0x58, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xef, 0x01, 0x0a, 0x15, 0x53, 0x79,
+ 0x73, 0x74, 0x65, 0x6d, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x42, 0x61, 0x73, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x1a, 0x1c,
+ 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x16, 0x0a, 0x14, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x05,
+ 0x54, 0x52, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x1a, 0x12, 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x0c, 0x0a,
+ 0x0a, 0x6d, 0x6c, 0x6d, 0x64, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x25, 0x0a, 0x09, 0x54,
+ 0x52, 0x41, 0x4e, 0x53, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x02, 0x1a, 0x16, 0xaa, 0xf1, 0xfd, 0xba,
+ 0x0b, 0x10, 0x0a, 0x0e, 0x6d, 0x6c, 0x6d, 0x64, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f,
+ 0x72, 0x6d, 0x12, 0x21, 0x0a, 0x07, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x1a,
+ 0x14, 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x0e, 0x0a, 0x0c, 0x6d, 0x6c, 0x6d, 0x64, 0x2e, 0x50, 0x72,
+ 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x08, 0x45, 0x56, 0x41, 0x4c, 0x55, 0x41, 0x54,
+ 0x45, 0x10, 0x04, 0x1a, 0x15, 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x0f, 0x0a, 0x0d, 0x6d, 0x6c, 0x6d,
+ 0x64, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x44, 0x45,
+ 0x50, 0x4c, 0x4f, 0x59, 0x10, 0x05, 0x1a, 0x13, 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x0d, 0x0a, 0x0b,
+ 0x6d, 0x6c, 0x6d, 0x64, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x22, 0xbf, 0x03, 0x0a, 0x0b,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x65,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0a,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x28, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65,
+ 0x64, 0x42, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x1a, 0x58, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79,
+ 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3e, 0x0a,
+ 0x15, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x42, 0x61,
+ 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10,
+ 0x00, 0x1a, 0x1a, 0xaa, 0xf1, 0xfd, 0xba, 0x0b, 0x14, 0x0a, 0x12, 0x75, 0x6e, 0x73, 0x65, 0x74,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xfc, 0x04,
+ 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a,
+ 0x07, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
+ 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78,
+ 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x0a, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
+ 0x73, 0x12, 0x57, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f,
+ 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45, 0x70, 0x6f, 0x63,
+ 0x68, 0x12, 0x3e, 0x0a, 0x1c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63,
+ 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45, 0x70, 0x6f, 0x63,
+ 0x68, 0x12, 0x3d, 0x0a, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
+ 0x52, 0x0e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x1a, 0x51, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x02, 0x38, 0x01, 0x1a, 0x57, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28,
+ 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4d, 0x0a, 0x0b,
+ 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x0b, 0x41,
+ 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x0d,
+ 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x19, 0x0a,
+ 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x9b, 0x04, 0x0a, 0x0c, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67,
+ 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x65,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d, 0x0a,
+ 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x09,
+ 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x15, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x73, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x06, 0x65,
+ 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,
+ 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x22, 0x92, 0x04, 0x0a, 0x12, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x69,
+ 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12,
+ 0x45, 0x0a, 0x0a, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53,
+ 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x75, 0x6e, 0x69,
+ 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73,
+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72,
+ 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53,
+ 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x74,
+ 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x04, 0x6c, 0x69, 0x73,
+ 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04,
+ 0x6c, 0x69, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x4e, 0x6f, 0x6e, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x12,
+ 0x36, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x79, 0x41, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65,
+ 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x05,
+ 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x69, 0x63, 0x74, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x44, 0x69, 0x63, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74,
+ 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x64, 0x69, 0x63, 0x74,
+ 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x5a, 0x0a, 0x17, 0x55, 0x6e, 0x69, 0x6f,
+ 0x6e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74,
+ 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x1e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75,
+ 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72,
+ 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x53, 0x0a, 0x16, 0x4c, 0x69, 0x73,
+ 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x18,
+ 0x0a, 0x16, 0x4e, 0x6f, 0x6e, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74,
+ 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x41, 0x6e, 0x79, 0x41,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x22, 0x56, 0x0a, 0x17, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x08,
+ 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52,
+ 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd7, 0x02, 0x0a, 0x16, 0x44, 0x69,
+ 0x63, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x69, 0x63, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x6e, 0x6f, 0x6e,
+ 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69,
+ 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6e, 0x6f, 0x6e, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x53,
+ 0x0a, 0x15, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
+ 0x65, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x13,
+ 0x65, 0x78, 0x74, 0x72, 0x61, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x54,
+ 0x79, 0x70, 0x65, 0x1a, 0x5e, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74,
+ 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x02, 0x38, 0x01, 0x22, 0x14, 0x0a, 0x12, 0x46, 0x61, 0x6b, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xbc, 0x03, 0x0a, 0x13, 0x4d, 0x79,
+ 0x53, 0x51, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73,
+ 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73,
+ 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x4c, 0x0a,
+ 0x0b, 0x73, 0x73, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x53, 0x4c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
+ 0x0a, 0x73, 0x73, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x73,
+ 0x6b, 0x69, 0x70, 0x5f, 0x64, 0x62, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x44, 0x62, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xa0, 0x01, 0x0a, 0x0a, 0x53, 0x53, 0x4c, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x63, 0x61,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x63, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61,
+ 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x70, 0x61,
+ 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x06, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x76, 0x65,
+ 0x72, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x65,
+ 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x22, 0xf6, 0x01, 0x0a, 0x1a, 0x53, 0x71, 0x6c,
+ 0x69, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x6e,
+ 0x61, 0x6d, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66,
+ 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x55, 0x72, 0x69, 0x12, 0x5f, 0x0a, 0x0f, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x53, 0x71, 0x6c, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x54, 0x0a, 0x0e, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a,
+ 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45,
+ 0x41, 0x44, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44,
+ 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x41, 0x44, 0x57,
+ 0x52, 0x49, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10,
+ 0x03, 0x22, 0xdb, 0x03, 0x0a, 0x18, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c,
+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12,
+ 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f,
+ 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12,
+ 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f,
+ 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
+ 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
+ 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x16,
+ 0x0a, 0x06, 0x64, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x64, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x64,
+ 0x62, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x44, 0x62, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x4e, 0x0a, 0x09, 0x73, 0x73, 0x6c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x44, 0x61, 0x74, 0x61,
+ 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x53, 0x4c, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x73, 0x73, 0x6c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x1a, 0x9c, 0x01, 0x0a, 0x0a, 0x53, 0x53, 0x4c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
+ 0x18, 0x0a, 0x07, 0x73, 0x73, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x73, 0x73, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x73, 0x6c,
+ 0x63, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x73, 0x6c, 0x63,
+ 0x65, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x73, 0x6c, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x73, 0x6c, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x73,
+ 0x73, 0x6c, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x73, 0x73, 0x6c, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x0a,
+ 0x0b, 0x73, 0x73, 0x6c, 0x72, 0x6f, 0x6f, 0x74, 0x63, 0x65, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6c, 0x72, 0x6f, 0x6f, 0x74, 0x63, 0x65, 0x72, 0x74, 0x22,
+ 0x95, 0x01, 0x0a, 0x10, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x75,
+ 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x70,
+ 0x67, 0x72, 0x61, 0x64, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41,
+ 0x0a, 0x1b, 0x64, 0x6f, 0x77, 0x6e, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x73,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x03, 0x3a, 0x02, 0x2d, 0x31, 0x52, 0x18, 0x64, 0x6f, 0x77, 0x6e, 0x67, 0x72, 0x61,
+ 0x64, 0x65, 0x54, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x36, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x79,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x6e,
+ 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22,
+ 0xea, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x0d, 0x66, 0x61, 0x6b, 0x65, 0x5f, 0x64, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x61, 0x6b, 0x65, 0x44, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0c,
+ 0x66, 0x61, 0x6b, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05,
+ 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x44,
+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52,
+ 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x41, 0x0a, 0x06, 0x73, 0x71, 0x6c, 0x69, 0x74, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x71, 0x6c, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48,
+ 0x00, 0x52, 0x06, 0x73, 0x71, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x6f, 0x73,
+ 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x74,
+ 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73,
+ 0x71, 0x6c, 0x12, 0x3e, 0x0a, 0x0d, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x88, 0x01, 0x0a,
+ 0x14, 0x47, 0x72, 0x70, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x75,
+ 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x63,
+ 0x65, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x65, 0x6e,
+ 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x6d, 0x61, 0x78, 0x52, 0x65,
+ 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67,
+ 0x74, 0x68, 0x12, 0x33, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x6d, 0x61, 0x78, 0x5f,
+ 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, 0x32, 0x4d, 0x61, 0x78, 0x50, 0x69, 0x6e, 0x67,
+ 0x53, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x73, 0x22, 0xfc, 0x02, 0x0a, 0x19, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72,
+ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x4f, 0x0a,
+ 0x0a, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x53, 0x4c, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x52, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e,
+ 0x0a, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x43, 0x68, 0x61, 0x6e,
+ 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x10, 0x63, 0x68,
+ 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2c,
+ 0x0a, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
+ 0x5f, 0x73, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x63, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x1a, 0x68, 0x0a, 0x09,
+ 0x53, 0x53, 0x4c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
+ 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76,
+ 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,
+ 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75,
+ 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x61, 0x22, 0x94, 0x03, 0x0a, 0x19, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4a, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1d, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x12, 0x4a, 0x0a, 0x11, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x10, 0x6d, 0x69, 0x67, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4f, 0x0a, 0x0a,
+ 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76,
+ 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x53, 0x4c, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x52, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x8d, 0x01,
+ 0x0a, 0x09, 0x53, 0x53, 0x4c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73,
+ 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65,
+ 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+ 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x22, 0xb0, 0x03,
+ 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
+ 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x3a,
+ 0x02, 0x32, 0x30, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x69,
+ 0x7a, 0x65, 0x12, 0x54, 0x0a, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x5f, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x72,
+ 0x64, 0x65, 0x72, 0x42, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65,
+ 0x72, 0x42, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74,
+ 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x51, 0x75,
+ 0x65, 0x72, 0x79, 0x1a, 0xca, 0x01, 0x0a, 0x0c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x12, 0x4e, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x46, 0x69,
+ 0x65, 0x6c, 0x64, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x02, 0x49, 0x44, 0x52, 0x05, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x61, 0x73, 0x63, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x05, 0x69, 0x73, 0x41, 0x73,
+ 0x63, 0x22, 0x4d, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x49,
+ 0x45, 0x4c, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
+ 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45,
+ 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x41, 0x53, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54,
+ 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x49, 0x44, 0x10, 0x03,
+ 0x22, 0xbf, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+ 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x08, 0x69, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c,
+ 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12,
+ 0x42, 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x73, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x64,
+ 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x49,
+ 0x64, 0x73, 0x22, 0x31, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10,
+ 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9f, 0x03, 0x0a, 0x18, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67,
+ 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x11, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x5f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x48, 0x00, 0x52, 0x10, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x61, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x6e, 0x65,
+ 0x61, 0x67, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e,
+ 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x6e,
+ 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x6e,
+ 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x3a, 0x02,
+ 0x32, 0x30, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x1a,
+ 0x96, 0x01, 0x0a, 0x12, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73,
+ 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x75,
+ 0x6d, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6d, 0x61,
+ 0x78, 0x4e, 0x75, 0x6d, 0x48, 0x6f, 0x70, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x62, 0x6f, 0x75, 0x6e,
+ 0x64, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x41, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x62, 0x6f, 0x75, 0x6e, 0x64,
+ 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72,
+ 0x79, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x84, 0x04, 0x0a, 0x1b, 0x4c, 0x69, 0x6e, 0x65,
+ 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74,
+ 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70,
+ 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74,
+ 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x48, 0x00, 0x52, 0x11, 0x73,
+ 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73,
+ 0x12, 0x69, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x65,
+ 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x6e, 0x65,
+ 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67,
+ 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x48, 0x00, 0x52, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e,
+ 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x6d,
+ 0x61, 0x78, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x48, 0x6f, 0x70, 0x73, 0x12, 0x50, 0x0a,
+ 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x32, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c,
+ 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x51, 0x75,
+ 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a,
+ 0x32, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x73,
+ 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x51, 0x75,
+ 0x65, 0x72, 0x79, 0x22, 0x57, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x19, 0x0a, 0x15, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e,
+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x55,
+ 0x50, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x4f, 0x57,
+ 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x49, 0x44,
+ 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x03, 0x42, 0x10, 0x0a, 0x0e,
+ 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2a, 0x60,
+ 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b,
+ 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x49,
+ 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x02,
+ 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06,
+ 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x54,
+ 0x4f, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x06,
+ 0x3a, 0x7b, 0x0a, 0x15, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x95, 0xde, 0xaf,
+ 0xb7, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x45,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
+ 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x45, 0x5a,
+ 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
+ 0x64, 0x61, 0x74, 0x61, 0x68, 0x75, 0x62, 0x2d, 0x69, 0x6f, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
+ 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
+ 0x61, 0x6c, 0x2f, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f,
+}
+
+var (
+ file_ml_metadata_proto_metadata_store_proto_rawDescOnce sync.Once
+ file_ml_metadata_proto_metadata_store_proto_rawDescData = file_ml_metadata_proto_metadata_store_proto_rawDesc
+)
+
+func file_ml_metadata_proto_metadata_store_proto_rawDescGZIP() []byte {
+ file_ml_metadata_proto_metadata_store_proto_rawDescOnce.Do(func() {
+ file_ml_metadata_proto_metadata_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_ml_metadata_proto_metadata_store_proto_rawDescData)
+ })
+ return file_ml_metadata_proto_metadata_store_proto_rawDescData
+}
+
+var file_ml_metadata_proto_metadata_store_proto_enumTypes = make([]protoimpl.EnumInfo, 10)
+var file_ml_metadata_proto_metadata_store_proto_msgTypes = make([]protoimpl.MessageInfo, 55)
+var file_ml_metadata_proto_metadata_store_proto_goTypes = []interface{}{
+ (PropertyType)(0), // 0: ml_metadata.PropertyType
+ (Artifact_State)(0), // 1: ml_metadata.Artifact.State
+ (ArtifactType_SystemDefinedBaseType)(0), // 2: ml_metadata.ArtifactType.SystemDefinedBaseType
+ (Event_Type)(0), // 3: ml_metadata.Event.Type
+ (Execution_State)(0), // 4: ml_metadata.Execution.State
+ (ExecutionType_SystemDefinedBaseType)(0), // 5: ml_metadata.ExecutionType.SystemDefinedBaseType
+ (ContextType_SystemDefinedBaseType)(0), // 6: ml_metadata.ContextType.SystemDefinedBaseType
+ (SqliteMetadataSourceConfig_ConnectionMode)(0), // 7: ml_metadata.SqliteMetadataSourceConfig.ConnectionMode
+ (ListOperationOptions_OrderByField_Field)(0), // 8: ml_metadata.ListOperationOptions.OrderByField.Field
+ (LineageSubgraphQueryOptions_Direction)(0), // 9: ml_metadata.LineageSubgraphQueryOptions.Direction
+ (*SystemTypeExtension)(nil), // 10: ml_metadata.SystemTypeExtension
+ (*Value)(nil), // 11: ml_metadata.Value
+ (*Artifact)(nil), // 12: ml_metadata.Artifact
+ (*ArtifactType)(nil), // 13: ml_metadata.ArtifactType
+ (*Event)(nil), // 14: ml_metadata.Event
+ (*Execution)(nil), // 15: ml_metadata.Execution
+ (*ExecutionType)(nil), // 16: ml_metadata.ExecutionType
+ (*ContextType)(nil), // 17: ml_metadata.ContextType
+ (*Context)(nil), // 18: ml_metadata.Context
+ (*Attribution)(nil), // 19: ml_metadata.Attribution
+ (*Association)(nil), // 20: ml_metadata.Association
+ (*ParentContext)(nil), // 21: ml_metadata.ParentContext
+ (*LineageGraph)(nil), // 22: ml_metadata.LineageGraph
+ (*ArtifactStructType)(nil), // 23: ml_metadata.ArtifactStructType
+ (*UnionArtifactStructType)(nil), // 24: ml_metadata.UnionArtifactStructType
+ (*IntersectionArtifactStructType)(nil), // 25: ml_metadata.IntersectionArtifactStructType
+ (*ListArtifactStructType)(nil), // 26: ml_metadata.ListArtifactStructType
+ (*NoneArtifactStructType)(nil), // 27: ml_metadata.NoneArtifactStructType
+ (*AnyArtifactStructType)(nil), // 28: ml_metadata.AnyArtifactStructType
+ (*TupleArtifactStructType)(nil), // 29: ml_metadata.TupleArtifactStructType
+ (*DictArtifactStructType)(nil), // 30: ml_metadata.DictArtifactStructType
+ (*FakeDatabaseConfig)(nil), // 31: ml_metadata.FakeDatabaseConfig
+ (*MySQLDatabaseConfig)(nil), // 32: ml_metadata.MySQLDatabaseConfig
+ (*SqliteMetadataSourceConfig)(nil), // 33: ml_metadata.SqliteMetadataSourceConfig
+ (*PostgreSQLDatabaseConfig)(nil), // 34: ml_metadata.PostgreSQLDatabaseConfig
+ (*MigrationOptions)(nil), // 35: ml_metadata.MigrationOptions
+ (*RetryOptions)(nil), // 36: ml_metadata.RetryOptions
+ (*ConnectionConfig)(nil), // 37: ml_metadata.ConnectionConfig
+ (*GrpcChannelArguments)(nil), // 38: ml_metadata.GrpcChannelArguments
+ (*MetadataStoreClientConfig)(nil), // 39: ml_metadata.MetadataStoreClientConfig
+ (*MetadataStoreServerConfig)(nil), // 40: ml_metadata.MetadataStoreServerConfig
+ (*ListOperationOptions)(nil), // 41: ml_metadata.ListOperationOptions
+ (*ListOperationNextPageToken)(nil), // 42: ml_metadata.ListOperationNextPageToken
+ (*TransactionOptions)(nil), // 43: ml_metadata.TransactionOptions
+ (*LineageGraphQueryOptions)(nil), // 44: ml_metadata.LineageGraphQueryOptions
+ (*LineageSubgraphQueryOptions)(nil), // 45: ml_metadata.LineageSubgraphQueryOptions
+ nil, // 46: ml_metadata.Artifact.PropertiesEntry
+ nil, // 47: ml_metadata.Artifact.CustomPropertiesEntry
+ nil, // 48: ml_metadata.ArtifactType.PropertiesEntry
+ (*Event_Path)(nil), // 49: ml_metadata.Event.Path
+ (*Event_Path_Step)(nil), // 50: ml_metadata.Event.Path.Step
+ nil, // 51: ml_metadata.Execution.PropertiesEntry
+ nil, // 52: ml_metadata.Execution.CustomPropertiesEntry
+ nil, // 53: ml_metadata.ExecutionType.PropertiesEntry
+ nil, // 54: ml_metadata.ContextType.PropertiesEntry
+ nil, // 55: ml_metadata.Context.PropertiesEntry
+ nil, // 56: ml_metadata.Context.CustomPropertiesEntry
+ nil, // 57: ml_metadata.DictArtifactStructType.PropertiesEntry
+ (*MySQLDatabaseConfig_SSLOptions)(nil), // 58: ml_metadata.MySQLDatabaseConfig.SSLOptions
+ (*PostgreSQLDatabaseConfig_SSLOptions)(nil), // 59: ml_metadata.PostgreSQLDatabaseConfig.SSLOptions
+ (*MetadataStoreClientConfig_SSLConfig)(nil), // 60: ml_metadata.MetadataStoreClientConfig.SSLConfig
+ (*MetadataStoreServerConfig_SSLConfig)(nil), // 61: ml_metadata.MetadataStoreServerConfig.SSLConfig
+ (*ListOperationOptions_OrderByField)(nil), // 62: ml_metadata.ListOperationOptions.OrderByField
+ (*LineageGraphQueryOptions_BoundaryConstraint)(nil), // 63: ml_metadata.LineageGraphQueryOptions.BoundaryConstraint
+ (*LineageSubgraphQueryOptions_StartingNodes)(nil), // 64: ml_metadata.LineageSubgraphQueryOptions.StartingNodes
+ (*structpb.Struct)(nil), // 65: google.protobuf.Struct
+ (*anypb.Any)(nil), // 66: google.protobuf.Any
+ (*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
+}
+var file_ml_metadata_proto_metadata_store_proto_depIdxs = []int32{
+ 65, // 0: ml_metadata.Value.struct_value:type_name -> google.protobuf.Struct
+ 66, // 1: ml_metadata.Value.proto_value:type_name -> google.protobuf.Any
+ 46, // 2: ml_metadata.Artifact.properties:type_name -> ml_metadata.Artifact.PropertiesEntry
+ 47, // 3: ml_metadata.Artifact.custom_properties:type_name -> ml_metadata.Artifact.CustomPropertiesEntry
+ 1, // 4: ml_metadata.Artifact.state:type_name -> ml_metadata.Artifact.State
+ 66, // 5: ml_metadata.Artifact.system_metadata:type_name -> google.protobuf.Any
+ 48, // 6: ml_metadata.ArtifactType.properties:type_name -> ml_metadata.ArtifactType.PropertiesEntry
+ 2, // 7: ml_metadata.ArtifactType.base_type:type_name -> ml_metadata.ArtifactType.SystemDefinedBaseType
+ 49, // 8: ml_metadata.Event.path:type_name -> ml_metadata.Event.Path
+ 3, // 9: ml_metadata.Event.type:type_name -> ml_metadata.Event.Type
+ 66, // 10: ml_metadata.Event.system_metadata:type_name -> google.protobuf.Any
+ 4, // 11: ml_metadata.Execution.last_known_state:type_name -> ml_metadata.Execution.State
+ 51, // 12: ml_metadata.Execution.properties:type_name -> ml_metadata.Execution.PropertiesEntry
+ 52, // 13: ml_metadata.Execution.custom_properties:type_name -> ml_metadata.Execution.CustomPropertiesEntry
+ 66, // 14: ml_metadata.Execution.system_metadata:type_name -> google.protobuf.Any
+ 53, // 15: ml_metadata.ExecutionType.properties:type_name -> ml_metadata.ExecutionType.PropertiesEntry
+ 23, // 16: ml_metadata.ExecutionType.input_type:type_name -> ml_metadata.ArtifactStructType
+ 23, // 17: ml_metadata.ExecutionType.output_type:type_name -> ml_metadata.ArtifactStructType
+ 5, // 18: ml_metadata.ExecutionType.base_type:type_name -> ml_metadata.ExecutionType.SystemDefinedBaseType
+ 54, // 19: ml_metadata.ContextType.properties:type_name -> ml_metadata.ContextType.PropertiesEntry
+ 6, // 20: ml_metadata.ContextType.base_type:type_name -> ml_metadata.ContextType.SystemDefinedBaseType
+ 55, // 21: ml_metadata.Context.properties:type_name -> ml_metadata.Context.PropertiesEntry
+ 56, // 22: ml_metadata.Context.custom_properties:type_name -> ml_metadata.Context.CustomPropertiesEntry
+ 66, // 23: ml_metadata.Context.system_metadata:type_name -> google.protobuf.Any
+ 13, // 24: ml_metadata.LineageGraph.artifact_types:type_name -> ml_metadata.ArtifactType
+ 16, // 25: ml_metadata.LineageGraph.execution_types:type_name -> ml_metadata.ExecutionType
+ 17, // 26: ml_metadata.LineageGraph.context_types:type_name -> ml_metadata.ContextType
+ 12, // 27: ml_metadata.LineageGraph.artifacts:type_name -> ml_metadata.Artifact
+ 15, // 28: ml_metadata.LineageGraph.executions:type_name -> ml_metadata.Execution
+ 18, // 29: ml_metadata.LineageGraph.contexts:type_name -> ml_metadata.Context
+ 14, // 30: ml_metadata.LineageGraph.events:type_name -> ml_metadata.Event
+ 19, // 31: ml_metadata.LineageGraph.attributions:type_name -> ml_metadata.Attribution
+ 20, // 32: ml_metadata.LineageGraph.associations:type_name -> ml_metadata.Association
+ 13, // 33: ml_metadata.ArtifactStructType.simple:type_name -> ml_metadata.ArtifactType
+ 24, // 34: ml_metadata.ArtifactStructType.union_type:type_name -> ml_metadata.UnionArtifactStructType
+ 25, // 35: ml_metadata.ArtifactStructType.intersection:type_name -> ml_metadata.IntersectionArtifactStructType
+ 26, // 36: ml_metadata.ArtifactStructType.list:type_name -> ml_metadata.ListArtifactStructType
+ 27, // 37: ml_metadata.ArtifactStructType.none:type_name -> ml_metadata.NoneArtifactStructType
+ 28, // 38: ml_metadata.ArtifactStructType.any:type_name -> ml_metadata.AnyArtifactStructType
+ 29, // 39: ml_metadata.ArtifactStructType.tuple:type_name -> ml_metadata.TupleArtifactStructType
+ 30, // 40: ml_metadata.ArtifactStructType.dict:type_name -> ml_metadata.DictArtifactStructType
+ 23, // 41: ml_metadata.UnionArtifactStructType.candidates:type_name -> ml_metadata.ArtifactStructType
+ 23, // 42: ml_metadata.IntersectionArtifactStructType.constraints:type_name -> ml_metadata.ArtifactStructType
+ 23, // 43: ml_metadata.ListArtifactStructType.element:type_name -> ml_metadata.ArtifactStructType
+ 23, // 44: ml_metadata.TupleArtifactStructType.elements:type_name -> ml_metadata.ArtifactStructType
+ 57, // 45: ml_metadata.DictArtifactStructType.properties:type_name -> ml_metadata.DictArtifactStructType.PropertiesEntry
+ 23, // 46: ml_metadata.DictArtifactStructType.extra_properties_type:type_name -> ml_metadata.ArtifactStructType
+ 58, // 47: ml_metadata.MySQLDatabaseConfig.ssl_options:type_name -> ml_metadata.MySQLDatabaseConfig.SSLOptions
+ 7, // 48: ml_metadata.SqliteMetadataSourceConfig.connection_mode:type_name -> ml_metadata.SqliteMetadataSourceConfig.ConnectionMode
+ 59, // 49: ml_metadata.PostgreSQLDatabaseConfig.ssloption:type_name -> ml_metadata.PostgreSQLDatabaseConfig.SSLOptions
+ 31, // 50: ml_metadata.ConnectionConfig.fake_database:type_name -> ml_metadata.FakeDatabaseConfig
+ 32, // 51: ml_metadata.ConnectionConfig.mysql:type_name -> ml_metadata.MySQLDatabaseConfig
+ 33, // 52: ml_metadata.ConnectionConfig.sqlite:type_name -> ml_metadata.SqliteMetadataSourceConfig
+ 34, // 53: ml_metadata.ConnectionConfig.postgresql:type_name -> ml_metadata.PostgreSQLDatabaseConfig
+ 36, // 54: ml_metadata.ConnectionConfig.retry_options:type_name -> ml_metadata.RetryOptions
+ 60, // 55: ml_metadata.MetadataStoreClientConfig.ssl_config:type_name -> ml_metadata.MetadataStoreClientConfig.SSLConfig
+ 38, // 56: ml_metadata.MetadataStoreClientConfig.channel_arguments:type_name -> ml_metadata.GrpcChannelArguments
+ 37, // 57: ml_metadata.MetadataStoreServerConfig.connection_config:type_name -> ml_metadata.ConnectionConfig
+ 35, // 58: ml_metadata.MetadataStoreServerConfig.migration_options:type_name -> ml_metadata.MigrationOptions
+ 61, // 59: ml_metadata.MetadataStoreServerConfig.ssl_config:type_name -> ml_metadata.MetadataStoreServerConfig.SSLConfig
+ 62, // 60: ml_metadata.ListOperationOptions.order_by_field:type_name -> ml_metadata.ListOperationOptions.OrderByField
+ 41, // 61: ml_metadata.ListOperationNextPageToken.set_options:type_name -> ml_metadata.ListOperationOptions
+ 41, // 62: ml_metadata.LineageGraphQueryOptions.artifacts_options:type_name -> ml_metadata.ListOperationOptions
+ 63, // 63: ml_metadata.LineageGraphQueryOptions.stop_conditions:type_name -> ml_metadata.LineageGraphQueryOptions.BoundaryConstraint
+ 64, // 64: ml_metadata.LineageSubgraphQueryOptions.starting_artifacts:type_name -> ml_metadata.LineageSubgraphQueryOptions.StartingNodes
+ 64, // 65: ml_metadata.LineageSubgraphQueryOptions.starting_executions:type_name -> ml_metadata.LineageSubgraphQueryOptions.StartingNodes
+ 9, // 66: ml_metadata.LineageSubgraphQueryOptions.direction:type_name -> ml_metadata.LineageSubgraphQueryOptions.Direction
+ 11, // 67: ml_metadata.Artifact.PropertiesEntry.value:type_name -> ml_metadata.Value
+ 11, // 68: ml_metadata.Artifact.CustomPropertiesEntry.value:type_name -> ml_metadata.Value
+ 0, // 69: ml_metadata.ArtifactType.PropertiesEntry.value:type_name -> ml_metadata.PropertyType
+ 50, // 70: ml_metadata.Event.Path.steps:type_name -> ml_metadata.Event.Path.Step
+ 11, // 71: ml_metadata.Execution.PropertiesEntry.value:type_name -> ml_metadata.Value
+ 11, // 72: ml_metadata.Execution.CustomPropertiesEntry.value:type_name -> ml_metadata.Value
+ 0, // 73: ml_metadata.ExecutionType.PropertiesEntry.value:type_name -> ml_metadata.PropertyType
+ 0, // 74: ml_metadata.ContextType.PropertiesEntry.value:type_name -> ml_metadata.PropertyType
+ 11, // 75: ml_metadata.Context.PropertiesEntry.value:type_name -> ml_metadata.Value
+ 11, // 76: ml_metadata.Context.CustomPropertiesEntry.value:type_name -> ml_metadata.Value
+ 23, // 77: ml_metadata.DictArtifactStructType.PropertiesEntry.value:type_name -> ml_metadata.ArtifactStructType
+ 8, // 78: ml_metadata.ListOperationOptions.OrderByField.field:type_name -> ml_metadata.ListOperationOptions.OrderByField.Field
+ 67, // 79: ml_metadata.system_type_extension:extendee -> google.protobuf.EnumValueOptions
+ 10, // 80: ml_metadata.system_type_extension:type_name -> ml_metadata.SystemTypeExtension
+ 81, // [81:81] is the sub-list for method output_type
+ 81, // [81:81] is the sub-list for method input_type
+ 80, // [80:81] is the sub-list for extension type_name
+ 79, // [79:80] is the sub-list for extension extendee
+ 0, // [0:79] is the sub-list for field type_name
+}
+
+func init() { file_ml_metadata_proto_metadata_store_proto_init() }
+func file_ml_metadata_proto_metadata_store_proto_init() {
+ if File_ml_metadata_proto_metadata_store_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SystemTypeExtension); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Value); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Artifact); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ArtifactType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Event); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Execution); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExecutionType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ContextType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Context); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Attribution); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Association); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ParentContext); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LineageGraph); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ArtifactStructType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UnionArtifactStructType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IntersectionArtifactStructType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListArtifactStructType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NoneArtifactStructType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AnyArtifactStructType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TupleArtifactStructType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DictArtifactStructType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FakeDatabaseConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MySQLDatabaseConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SqliteMetadataSourceConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PostgreSQLDatabaseConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MigrationOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RetryOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConnectionConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GrpcChannelArguments); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataStoreClientConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataStoreServerConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOperationOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOperationNextPageToken); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TransactionOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ case 3:
+ return &v.extensionFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LineageGraphQueryOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LineageSubgraphQueryOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Event_Path); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Event_Path_Step); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MySQLDatabaseConfig_SSLOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PostgreSQLDatabaseConfig_SSLOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataStoreClientConfig_SSLConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataStoreServerConfig_SSLConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOperationOptions_OrderByField); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LineageGraphQueryOptions_BoundaryConstraint); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LineageSubgraphQueryOptions_StartingNodes); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*Value_IntValue)(nil),
+ (*Value_DoubleValue)(nil),
+ (*Value_StringValue)(nil),
+ (*Value_StructValue)(nil),
+ (*Value_ProtoValue)(nil),
+ (*Value_BoolValue)(nil),
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[13].OneofWrappers = []interface{}{
+ (*ArtifactStructType_Simple)(nil),
+ (*ArtifactStructType_UnionType)(nil),
+ (*ArtifactStructType_Intersection)(nil),
+ (*ArtifactStructType_List)(nil),
+ (*ArtifactStructType_None)(nil),
+ (*ArtifactStructType_Any)(nil),
+ (*ArtifactStructType_Tuple)(nil),
+ (*ArtifactStructType_Dict)(nil),
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[27].OneofWrappers = []interface{}{
+ (*ConnectionConfig_FakeDatabase)(nil),
+ (*ConnectionConfig_Mysql)(nil),
+ (*ConnectionConfig_Sqlite)(nil),
+ (*ConnectionConfig_Postgresql)(nil),
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[34].OneofWrappers = []interface{}{
+ (*LineageGraphQueryOptions_ArtifactsOptions)(nil),
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[35].OneofWrappers = []interface{}{
+ (*LineageSubgraphQueryOptions_StartingArtifacts)(nil),
+ (*LineageSubgraphQueryOptions_StartingExecutions)(nil),
+ }
+ file_ml_metadata_proto_metadata_store_proto_msgTypes[40].OneofWrappers = []interface{}{
+ (*Event_Path_Step_Index)(nil),
+ (*Event_Path_Step_Key)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ml_metadata_proto_metadata_store_proto_rawDesc,
+ NumEnums: 10,
+ NumMessages: 55,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_ml_metadata_proto_metadata_store_proto_goTypes,
+ DependencyIndexes: file_ml_metadata_proto_metadata_store_proto_depIdxs,
+ EnumInfos: file_ml_metadata_proto_metadata_store_proto_enumTypes,
+ MessageInfos: file_ml_metadata_proto_metadata_store_proto_msgTypes,
+ ExtensionInfos: file_ml_metadata_proto_metadata_store_proto_extTypes,
+ }.Build()
+ File_ml_metadata_proto_metadata_store_proto = out.File
+ file_ml_metadata_proto_metadata_store_proto_rawDesc = nil
+ file_ml_metadata_proto_metadata_store_proto_goTypes = nil
+ file_ml_metadata_proto_metadata_store_proto_depIdxs = nil
+}
diff --git a/internal/ml_metadata/proto/metadata_store_service.pb.go b/internal/ml_metadata/proto/metadata_store_service.pb.go
new file mode 100644
index 000000000..7a88900c2
--- /dev/null
+++ b/internal/ml_metadata/proto/metadata_store_service.pb.go
@@ -0,0 +1,10227 @@
+// Copyright 2019 Google LLC
+//
+//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
+//
+//https://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.
+//==============================================================================
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.31.0
+// protoc v4.24.3
+// source: ml_metadata/proto/metadata_store_service.proto
+
+package proto
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// An artifact and type pair. Part of an artifact struct.
+type ArtifactAndType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Artifact *Artifact `protobuf:"bytes,1,opt,name=artifact" json:"artifact,omitempty"`
+ Type *ArtifactType `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
+}
+
+func (x *ArtifactAndType) Reset() {
+ *x = ArtifactAndType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ArtifactAndType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArtifactAndType) ProtoMessage() {}
+
+func (x *ArtifactAndType) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArtifactAndType.ProtoReflect.Descriptor instead.
+func (*ArtifactAndType) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ArtifactAndType) GetArtifact() *Artifact {
+ if x != nil {
+ return x.Artifact
+ }
+ return nil
+}
+
+func (x *ArtifactAndType) GetType() *ArtifactType {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+// A dictionary of artifact structs. Can represent a dictionary.
+type ArtifactStructMap struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // An artifact struct that is a dictionary.
+ // Can be represented as a JSON dictionary of artifact structs.
+ Properties map[string]*ArtifactStruct `protobuf:"bytes,1,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+}
+
+func (x *ArtifactStructMap) Reset() {
+ *x = ArtifactStructMap{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ArtifactStructMap) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArtifactStructMap) ProtoMessage() {}
+
+func (x *ArtifactStructMap) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArtifactStructMap.ProtoReflect.Descriptor instead.
+func (*ArtifactStructMap) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ArtifactStructMap) GetProperties() map[string]*ArtifactStruct {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+// An artifact struct that is a list.
+type ArtifactStructList struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Can be represented as a JSON list of artifact structs.
+ Elements []*ArtifactStruct `protobuf:"bytes,1,rep,name=elements" json:"elements,omitempty"`
+}
+
+func (x *ArtifactStructList) Reset() {
+ *x = ArtifactStructList{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ArtifactStructList) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArtifactStructList) ProtoMessage() {}
+
+func (x *ArtifactStructList) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArtifactStructList.ProtoReflect.Descriptor instead.
+func (*ArtifactStructList) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ArtifactStructList) GetElements() []*ArtifactStruct {
+ if x != nil {
+ return x.Elements
+ }
+ return nil
+}
+
+// An artifact struct represents the input or output of an Execution.
+// See the more specific types referenced in the message for more details.
+type ArtifactStruct struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Note: an artifact struct may be empty to indicate "None" or null.
+ //
+ // Types that are assignable to Value:
+ //
+ // *ArtifactStruct_Artifact
+ // *ArtifactStruct_Map
+ // *ArtifactStruct_List
+ Value isArtifactStruct_Value `protobuf_oneof:"value"`
+}
+
+func (x *ArtifactStruct) Reset() {
+ *x = ArtifactStruct{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ArtifactStruct) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArtifactStruct) ProtoMessage() {}
+
+func (x *ArtifactStruct) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArtifactStruct.ProtoReflect.Descriptor instead.
+func (*ArtifactStruct) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (m *ArtifactStruct) GetValue() isArtifactStruct_Value {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (x *ArtifactStruct) GetArtifact() *ArtifactAndType {
+ if x, ok := x.GetValue().(*ArtifactStruct_Artifact); ok {
+ return x.Artifact
+ }
+ return nil
+}
+
+func (x *ArtifactStruct) GetMap() *ArtifactStructMap {
+ if x, ok := x.GetValue().(*ArtifactStruct_Map); ok {
+ return x.Map
+ }
+ return nil
+}
+
+func (x *ArtifactStruct) GetList() *ArtifactStructList {
+ if x, ok := x.GetValue().(*ArtifactStruct_List); ok {
+ return x.List
+ }
+ return nil
+}
+
+type isArtifactStruct_Value interface {
+ isArtifactStruct_Value()
+}
+
+type ArtifactStruct_Artifact struct {
+ Artifact *ArtifactAndType `protobuf:"bytes,1,opt,name=artifact,oneof"`
+}
+
+type ArtifactStruct_Map struct {
+ Map *ArtifactStructMap `protobuf:"bytes,2,opt,name=map,oneof"`
+}
+
+type ArtifactStruct_List struct {
+ List *ArtifactStructList `protobuf:"bytes,3,opt,name=list,oneof"`
+}
+
+func (*ArtifactStruct_Artifact) isArtifactStruct_Value() {}
+
+func (*ArtifactStruct_Map) isArtifactStruct_Value() {}
+
+func (*ArtifactStruct_List) isArtifactStruct_Value() {}
+
+type PutArtifactsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Artifacts []*Artifact `protobuf:"bytes,1,rep,name=artifacts" json:"artifacts,omitempty"`
+ // Additional options to change the behavior of the method.
+ Options *PutArtifactsRequest_Options `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+ // FieldMask for artifacts in the PUT update
+ // If `artifact.id` is not specified, it means a new artifact will be created
+ // and `update_mask` will not be applied to the creation.
+ // If `update_mask` is empty, update the artifacts as a whole.
+ // If `update_mask` is not empty, only update fields or properties specified
+ // in `update_mask`.
+ // Example request protos:
+ // 1. Examples that update `properties` / `custom_properties`:
+ // 1.1 Add a <'key', 'val'> pair into `custom_properties`:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {
+ // key: "key"
+ // value: {
+ // string_value: "val"
+ // }
+ // }
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 1.2 Set `custom_properties['key'].bool_value` to true:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {
+ // key: "key"
+ // value: {
+ // bool_value: true
+ // }
+ // }
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 1.3 Delete the complete <'key', 'val'> pair from `custom_properties`:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {}
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 2. Examples that update fields such as `uri`, `external_id`, etc:
+ // 2.1 Update `external_id` field:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // external_id: "new_value"
+ // }
+ // update_mask {
+ // paths: "external_id"
+ // }
+ // }
+ // 2.2 Set `uri` field:
+ // {
+ // artifacts {
+ // id: 1234
+ // type_id: 5678
+ // uri: "set_value"
+ // }
+ // update_mask {
+ // paths: "uri"
+ // }
+ // }
+ //
+ // If `paths: "properties"` or `paths: "custom_properties"` are added to
+ // `update_mask`, the key-level updates will be ignored and we only perform
+ // field-level updates on the all `properties`/`custom_properties`.
+ // For example:
+ //
+ // If the mask is: {"properties", "properties.key1"}, the field path
+ // "properties.key1" will be ignored and all `properties` will be updated.
+ // (Do not suggest)
+ // If the mask is {"properties", "external_id"}, all
+ // `properties` and field `external_id` will be updated. (Do not suggest)
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,4,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
+}
+
+func (x *PutArtifactsRequest) Reset() {
+ *x = PutArtifactsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutArtifactsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutArtifactsRequest) ProtoMessage() {}
+
+func (x *PutArtifactsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutArtifactsRequest.ProtoReflect.Descriptor instead.
+func (*PutArtifactsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *PutArtifactsRequest) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+func (x *PutArtifactsRequest) GetOptions() *PutArtifactsRequest_Options {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *PutArtifactsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+func (x *PutArtifactsRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type PutArtifactsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of artifact ids index-aligned with PutArtifactsRequest.
+ ArtifactIds []int64 `protobuf:"varint,1,rep,name=artifact_ids,json=artifactIds" json:"artifact_ids,omitempty"`
+}
+
+func (x *PutArtifactsResponse) Reset() {
+ *x = PutArtifactsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutArtifactsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutArtifactsResponse) ProtoMessage() {}
+
+func (x *PutArtifactsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutArtifactsResponse.ProtoReflect.Descriptor instead.
+func (*PutArtifactsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *PutArtifactsResponse) GetArtifactIds() []int64 {
+ if x != nil {
+ return x.ArtifactIds
+ }
+ return nil
+}
+
+type PutArtifactTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The field is required in any request. Stored types in MLMD can be updated
+ // by introducing new properties and remain backward compatible. If a type
+ // with the same name exists in the database, it updates the existing type,
+ // otherwise it creates a new type.
+ ArtifactType *ArtifactType `protobuf:"bytes,1,opt,name=artifact_type,json=artifactType" json:"artifact_type,omitempty"`
+ // If true then allows adding properties to an existing stored type.
+ // If false, then type update is not allowed and it raises AlreadyExists
+ // error if the given type has any new property that is not defined in the
+ // stored type.
+ CanAddFields *bool `protobuf:"varint,2,opt,name=can_add_fields,json=canAddFields" json:"can_add_fields,omitempty"`
+ // If true then allows omitting properties of an existing stored type.
+ // If false, then no properties of the stored type can be omitted in the
+ // given type, otherwise it raises AlreadyExists error.
+ CanOmitFields *bool `protobuf:"varint,5,opt,name=can_omit_fields,json=canOmitFields" json:"can_omit_fields,omitempty"`
+ // Deprecated fields.
+ //
+ // Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+ CanDeleteFields *bool `protobuf:"varint,3,opt,name=can_delete_fields,json=canDeleteFields" json:"can_delete_fields,omitempty"`
+ // Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+ AllFieldsMatch *bool `protobuf:"varint,4,opt,name=all_fields_match,json=allFieldsMatch,def=1" json:"all_fields_match,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,6,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+// Default values for PutArtifactTypeRequest fields.
+const (
+ Default_PutArtifactTypeRequest_AllFieldsMatch = bool(true)
+)
+
+func (x *PutArtifactTypeRequest) Reset() {
+ *x = PutArtifactTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutArtifactTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutArtifactTypeRequest) ProtoMessage() {}
+
+func (x *PutArtifactTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutArtifactTypeRequest.ProtoReflect.Descriptor instead.
+func (*PutArtifactTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *PutArtifactTypeRequest) GetArtifactType() *ArtifactType {
+ if x != nil {
+ return x.ArtifactType
+ }
+ return nil
+}
+
+func (x *PutArtifactTypeRequest) GetCanAddFields() bool {
+ if x != nil && x.CanAddFields != nil {
+ return *x.CanAddFields
+ }
+ return false
+}
+
+func (x *PutArtifactTypeRequest) GetCanOmitFields() bool {
+ if x != nil && x.CanOmitFields != nil {
+ return *x.CanOmitFields
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+func (x *PutArtifactTypeRequest) GetCanDeleteFields() bool {
+ if x != nil && x.CanDeleteFields != nil {
+ return *x.CanDeleteFields
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+func (x *PutArtifactTypeRequest) GetAllFieldsMatch() bool {
+ if x != nil && x.AllFieldsMatch != nil {
+ return *x.AllFieldsMatch
+ }
+ return Default_PutArtifactTypeRequest_AllFieldsMatch
+}
+
+func (x *PutArtifactTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutArtifactTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The type ID of the artifact type.
+ TypeId *int64 `protobuf:"varint,1,opt,name=type_id,json=typeId" json:"type_id,omitempty"`
+}
+
+func (x *PutArtifactTypeResponse) Reset() {
+ *x = PutArtifactTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutArtifactTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutArtifactTypeResponse) ProtoMessage() {}
+
+func (x *PutArtifactTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutArtifactTypeResponse.ProtoReflect.Descriptor instead.
+func (*PutArtifactTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *PutArtifactTypeResponse) GetTypeId() int64 {
+ if x != nil && x.TypeId != nil {
+ return *x.TypeId
+ }
+ return 0
+}
+
+type PutExecutionsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Executions []*Execution `protobuf:"bytes,1,rep,name=executions" json:"executions,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+ // FieldMask for executions in the PUT update
+ // If `execution.id` is not specified, it means a new execution will be
+ // created and `update_mask` will not be applied to the creation.
+ // If `update_mask` is empty, update the executions as a whole.
+ // If `update_mask` is not empty, only update fields or properties specified
+ // in `update_mask`.
+ // Example request protos:
+ // 1. Add a <'key', 'val'> pair into `custom_properties`:
+ // {
+ // executions {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {
+ // key: "key"
+ // value: {
+ // string_value: "val"
+ // }
+ // }
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 2. Set `last_known_state` field:
+ // {
+ // executions {
+ // id: 1234
+ // type_id: 5678
+ // last_known_state: CACHED
+ // }
+ // update_mask {
+ // paths: "last_known_state"
+ // }
+ // }
+ //
+ // Please refer to `PutArtifactsRequest` for more details.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
+}
+
+func (x *PutExecutionsRequest) Reset() {
+ *x = PutExecutionsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutExecutionsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutExecutionsRequest) ProtoMessage() {}
+
+func (x *PutExecutionsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutExecutionsRequest.ProtoReflect.Descriptor instead.
+func (*PutExecutionsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *PutExecutionsRequest) GetExecutions() []*Execution {
+ if x != nil {
+ return x.Executions
+ }
+ return nil
+}
+
+func (x *PutExecutionsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+func (x *PutExecutionsRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type PutExecutionsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of execution ids index-aligned with PutExecutionsRequest.
+ ExecutionIds []int64 `protobuf:"varint,1,rep,name=execution_ids,json=executionIds" json:"execution_ids,omitempty"`
+}
+
+func (x *PutExecutionsResponse) Reset() {
+ *x = PutExecutionsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutExecutionsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutExecutionsResponse) ProtoMessage() {}
+
+func (x *PutExecutionsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutExecutionsResponse.ProtoReflect.Descriptor instead.
+func (*PutExecutionsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *PutExecutionsResponse) GetExecutionIds() []int64 {
+ if x != nil {
+ return x.ExecutionIds
+ }
+ return nil
+}
+
+type PutExecutionTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The field is required in any request. Stored types in MLMD can be updated
+ // by introducing new properties and remain backward compatible. If a type
+ // with the same name exists in the database, it updates the existing type,
+ // otherwise it creates a new type.
+ ExecutionType *ExecutionType `protobuf:"bytes,1,opt,name=execution_type,json=executionType" json:"execution_type,omitempty"`
+ // If true then allows adding properties to an existing stored type.
+ // If false, then type update is not allowed and it raises AlreadyExists
+ // error if the given type has any new property that is not defined in the
+ // stored type.
+ CanAddFields *bool `protobuf:"varint,2,opt,name=can_add_fields,json=canAddFields" json:"can_add_fields,omitempty"`
+ // If true then allows omitting properties of an existing stored type.
+ // If false, then no properties of the stored type can be omitted in the
+ // given type, otherwise it raises AlreadyExists error.
+ CanOmitFields *bool `protobuf:"varint,5,opt,name=can_omit_fields,json=canOmitFields" json:"can_omit_fields,omitempty"`
+ // Deprecated fields.
+ //
+ // Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+ CanDeleteFields *bool `protobuf:"varint,3,opt,name=can_delete_fields,json=canDeleteFields" json:"can_delete_fields,omitempty"`
+ // Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+ AllFieldsMatch *bool `protobuf:"varint,4,opt,name=all_fields_match,json=allFieldsMatch,def=1" json:"all_fields_match,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,6,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+// Default values for PutExecutionTypeRequest fields.
+const (
+ Default_PutExecutionTypeRequest_AllFieldsMatch = bool(true)
+)
+
+func (x *PutExecutionTypeRequest) Reset() {
+ *x = PutExecutionTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutExecutionTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutExecutionTypeRequest) ProtoMessage() {}
+
+func (x *PutExecutionTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutExecutionTypeRequest.ProtoReflect.Descriptor instead.
+func (*PutExecutionTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *PutExecutionTypeRequest) GetExecutionType() *ExecutionType {
+ if x != nil {
+ return x.ExecutionType
+ }
+ return nil
+}
+
+func (x *PutExecutionTypeRequest) GetCanAddFields() bool {
+ if x != nil && x.CanAddFields != nil {
+ return *x.CanAddFields
+ }
+ return false
+}
+
+func (x *PutExecutionTypeRequest) GetCanOmitFields() bool {
+ if x != nil && x.CanOmitFields != nil {
+ return *x.CanOmitFields
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+func (x *PutExecutionTypeRequest) GetCanDeleteFields() bool {
+ if x != nil && x.CanDeleteFields != nil {
+ return *x.CanDeleteFields
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+func (x *PutExecutionTypeRequest) GetAllFieldsMatch() bool {
+ if x != nil && x.AllFieldsMatch != nil {
+ return *x.AllFieldsMatch
+ }
+ return Default_PutExecutionTypeRequest_AllFieldsMatch
+}
+
+func (x *PutExecutionTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutExecutionTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The type ID of the execution type.
+ TypeId *int64 `protobuf:"varint,1,opt,name=type_id,json=typeId" json:"type_id,omitempty"`
+}
+
+func (x *PutExecutionTypeResponse) Reset() {
+ *x = PutExecutionTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutExecutionTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutExecutionTypeResponse) ProtoMessage() {}
+
+func (x *PutExecutionTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutExecutionTypeResponse.ProtoReflect.Descriptor instead.
+func (*PutExecutionTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *PutExecutionTypeResponse) GetTypeId() int64 {
+ if x != nil && x.TypeId != nil {
+ return *x.TypeId
+ }
+ return 0
+}
+
+type PutEventsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Events []*Event `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *PutEventsRequest) Reset() {
+ *x = PutEventsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutEventsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutEventsRequest) ProtoMessage() {}
+
+func (x *PutEventsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutEventsRequest.ProtoReflect.Descriptor instead.
+func (*PutEventsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *PutEventsRequest) GetEvents() []*Event {
+ if x != nil {
+ return x.Events
+ }
+ return nil
+}
+
+func (x *PutEventsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutEventsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *PutEventsResponse) Reset() {
+ *x = PutEventsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutEventsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutEventsResponse) ProtoMessage() {}
+
+func (x *PutEventsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutEventsResponse.ProtoReflect.Descriptor instead.
+func (*PutEventsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{13}
+}
+
+type PutExecutionRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The execution that produces many artifact and event pairs.
+ Execution *Execution `protobuf:"bytes,1,opt,name=execution" json:"execution,omitempty"`
+ // The list of artifact and event pairs.
+ ArtifactEventPairs []*PutExecutionRequest_ArtifactAndEvent `protobuf:"bytes,2,rep,name=artifact_event_pairs,json=artifactEventPairs" json:"artifact_event_pairs,omitempty"`
+ // A list of contexts associated with the execution and artifacts. For each
+ // given context without a context.id, it inserts the context, otherwise it
+ // updates the stored context with the same id.
+ // Associations between each pair of contexts and the execution, and
+ // attributions between each pair of contexts and artifacts are created if
+ // they do not already exist.
+ Contexts []*Context `protobuf:"bytes,3,rep,name=contexts" json:"contexts,omitempty"`
+ // Additional options to change the behavior of the method.
+ Options *PutExecutionRequest_Options `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,5,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *PutExecutionRequest) Reset() {
+ *x = PutExecutionRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutExecutionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutExecutionRequest) ProtoMessage() {}
+
+func (x *PutExecutionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutExecutionRequest.ProtoReflect.Descriptor instead.
+func (*PutExecutionRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *PutExecutionRequest) GetExecution() *Execution {
+ if x != nil {
+ return x.Execution
+ }
+ return nil
+}
+
+func (x *PutExecutionRequest) GetArtifactEventPairs() []*PutExecutionRequest_ArtifactAndEvent {
+ if x != nil {
+ return x.ArtifactEventPairs
+ }
+ return nil
+}
+
+func (x *PutExecutionRequest) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+func (x *PutExecutionRequest) GetOptions() *PutExecutionRequest_Options {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *PutExecutionRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutExecutionResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // An execution id of the `execution` in PutExecutionRequest.
+ ExecutionId *int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId" json:"execution_id,omitempty"`
+ // A list of artifact ids index-aligned with `artifact_event_pairs` in the
+ // PutExecutionRequest.
+ ArtifactIds []int64 `protobuf:"varint,2,rep,name=artifact_ids,json=artifactIds" json:"artifact_ids,omitempty"`
+ // A list of context ids index-aligned with `contexts` in the
+ // PutExecutionRequest.
+ ContextIds []int64 `protobuf:"varint,3,rep,name=context_ids,json=contextIds" json:"context_ids,omitempty"`
+}
+
+func (x *PutExecutionResponse) Reset() {
+ *x = PutExecutionResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutExecutionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutExecutionResponse) ProtoMessage() {}
+
+func (x *PutExecutionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[15]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutExecutionResponse.ProtoReflect.Descriptor instead.
+func (*PutExecutionResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *PutExecutionResponse) GetExecutionId() int64 {
+ if x != nil && x.ExecutionId != nil {
+ return *x.ExecutionId
+ }
+ return 0
+}
+
+func (x *PutExecutionResponse) GetArtifactIds() []int64 {
+ if x != nil {
+ return x.ArtifactIds
+ }
+ return nil
+}
+
+func (x *PutExecutionResponse) GetContextIds() []int64 {
+ if x != nil {
+ return x.ContextIds
+ }
+ return nil
+}
+
+type PutLineageSubgraphRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Executions []*Execution `protobuf:"bytes,1,rep,name=executions" json:"executions,omitempty"`
+ Artifacts []*Artifact `protobuf:"bytes,2,rep,name=artifacts" json:"artifacts,omitempty"`
+ Contexts []*Context `protobuf:"bytes,3,rep,name=contexts" json:"contexts,omitempty"`
+ EventEdges []*PutLineageSubgraphRequest_EventEdge `protobuf:"bytes,4,rep,name=event_edges,json=eventEdges" json:"event_edges,omitempty"`
+ Options *PutLineageSubgraphRequest_Options `protobuf:"bytes,5,opt,name=options" json:"options,omitempty"`
+ TransactionOptions *TransactionOptions `protobuf:"bytes,6,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *PutLineageSubgraphRequest) Reset() {
+ *x = PutLineageSubgraphRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutLineageSubgraphRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutLineageSubgraphRequest) ProtoMessage() {}
+
+func (x *PutLineageSubgraphRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[16]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutLineageSubgraphRequest.ProtoReflect.Descriptor instead.
+func (*PutLineageSubgraphRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *PutLineageSubgraphRequest) GetExecutions() []*Execution {
+ if x != nil {
+ return x.Executions
+ }
+ return nil
+}
+
+func (x *PutLineageSubgraphRequest) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+func (x *PutLineageSubgraphRequest) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+func (x *PutLineageSubgraphRequest) GetEventEdges() []*PutLineageSubgraphRequest_EventEdge {
+ if x != nil {
+ return x.EventEdges
+ }
+ return nil
+}
+
+func (x *PutLineageSubgraphRequest) GetOptions() *PutLineageSubgraphRequest_Options {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *PutLineageSubgraphRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutLineageSubgraphResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of execution ids index-aligned with `executions` in the request
+ ExecutionIds []int64 `protobuf:"varint,1,rep,packed,name=execution_ids,json=executionIds" json:"execution_ids,omitempty"`
+ // A list of artifact ids index-aligned with `artifacts` in the request
+ ArtifactIds []int64 `protobuf:"varint,2,rep,packed,name=artifact_ids,json=artifactIds" json:"artifact_ids,omitempty"`
+ // A list of context ids index-aligned with `contexts` in the request
+ ContextIds []int64 `protobuf:"varint,3,rep,packed,name=context_ids,json=contextIds" json:"context_ids,omitempty"`
+}
+
+func (x *PutLineageSubgraphResponse) Reset() {
+ *x = PutLineageSubgraphResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutLineageSubgraphResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutLineageSubgraphResponse) ProtoMessage() {}
+
+func (x *PutLineageSubgraphResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[17]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutLineageSubgraphResponse.ProtoReflect.Descriptor instead.
+func (*PutLineageSubgraphResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *PutLineageSubgraphResponse) GetExecutionIds() []int64 {
+ if x != nil {
+ return x.ExecutionIds
+ }
+ return nil
+}
+
+func (x *PutLineageSubgraphResponse) GetArtifactIds() []int64 {
+ if x != nil {
+ return x.ArtifactIds
+ }
+ return nil
+}
+
+func (x *PutLineageSubgraphResponse) GetContextIds() []int64 {
+ if x != nil {
+ return x.ContextIds
+ }
+ return nil
+}
+
+type PutTypesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ArtifactTypes []*ArtifactType `protobuf:"bytes,1,rep,name=artifact_types,json=artifactTypes" json:"artifact_types,omitempty"`
+ ExecutionTypes []*ExecutionType `protobuf:"bytes,2,rep,name=execution_types,json=executionTypes" json:"execution_types,omitempty"`
+ ContextTypes []*ContextType `protobuf:"bytes,3,rep,name=context_types,json=contextTypes" json:"context_types,omitempty"`
+ // If true then allows adding properties to an existing stored type.
+ // If false, then type update is not allowed and it raises AlreadyExists
+ // error if the given type has any new property that is not defined in the
+ // stored type.
+ CanAddFields *bool `protobuf:"varint,4,opt,name=can_add_fields,json=canAddFields" json:"can_add_fields,omitempty"`
+ // If true then allows omitting properties of an existing stored type.
+ // If false, then no properties of the stored type can be omitted in the
+ // given type, otherwise it raises AlreadyExists error.
+ CanOmitFields *bool `protobuf:"varint,7,opt,name=can_omit_fields,json=canOmitFields" json:"can_omit_fields,omitempty"`
+ // Deprecated fields.
+ //
+ // Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+ CanDeleteFields *bool `protobuf:"varint,5,opt,name=can_delete_fields,json=canDeleteFields" json:"can_delete_fields,omitempty"`
+ // Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+ AllFieldsMatch *bool `protobuf:"varint,6,opt,name=all_fields_match,json=allFieldsMatch,def=1" json:"all_fields_match,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,8,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+// Default values for PutTypesRequest fields.
+const (
+ Default_PutTypesRequest_AllFieldsMatch = bool(true)
+)
+
+func (x *PutTypesRequest) Reset() {
+ *x = PutTypesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutTypesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutTypesRequest) ProtoMessage() {}
+
+func (x *PutTypesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[18]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutTypesRequest.ProtoReflect.Descriptor instead.
+func (*PutTypesRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *PutTypesRequest) GetArtifactTypes() []*ArtifactType {
+ if x != nil {
+ return x.ArtifactTypes
+ }
+ return nil
+}
+
+func (x *PutTypesRequest) GetExecutionTypes() []*ExecutionType {
+ if x != nil {
+ return x.ExecutionTypes
+ }
+ return nil
+}
+
+func (x *PutTypesRequest) GetContextTypes() []*ContextType {
+ if x != nil {
+ return x.ContextTypes
+ }
+ return nil
+}
+
+func (x *PutTypesRequest) GetCanAddFields() bool {
+ if x != nil && x.CanAddFields != nil {
+ return *x.CanAddFields
+ }
+ return false
+}
+
+func (x *PutTypesRequest) GetCanOmitFields() bool {
+ if x != nil && x.CanOmitFields != nil {
+ return *x.CanOmitFields
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+func (x *PutTypesRequest) GetCanDeleteFields() bool {
+ if x != nil && x.CanDeleteFields != nil {
+ return *x.CanDeleteFields
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+func (x *PutTypesRequest) GetAllFieldsMatch() bool {
+ if x != nil && x.AllFieldsMatch != nil {
+ return *x.AllFieldsMatch
+ }
+ return Default_PutTypesRequest_AllFieldsMatch
+}
+
+func (x *PutTypesRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutTypesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The type ids of the artifact type.
+ ArtifactTypeIds []int64 `protobuf:"varint,1,rep,name=artifact_type_ids,json=artifactTypeIds" json:"artifact_type_ids,omitempty"`
+ // The type ids of the execution type.
+ ExecutionTypeIds []int64 `protobuf:"varint,2,rep,name=execution_type_ids,json=executionTypeIds" json:"execution_type_ids,omitempty"`
+ // The type ids of the context type.
+ ContextTypeIds []int64 `protobuf:"varint,3,rep,name=context_type_ids,json=contextTypeIds" json:"context_type_ids,omitempty"`
+}
+
+func (x *PutTypesResponse) Reset() {
+ *x = PutTypesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutTypesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutTypesResponse) ProtoMessage() {}
+
+func (x *PutTypesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[19]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutTypesResponse.ProtoReflect.Descriptor instead.
+func (*PutTypesResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *PutTypesResponse) GetArtifactTypeIds() []int64 {
+ if x != nil {
+ return x.ArtifactTypeIds
+ }
+ return nil
+}
+
+func (x *PutTypesResponse) GetExecutionTypeIds() []int64 {
+ if x != nil {
+ return x.ExecutionTypeIds
+ }
+ return nil
+}
+
+func (x *PutTypesResponse) GetContextTypeIds() []int64 {
+ if x != nil {
+ return x.ContextTypeIds
+ }
+ return nil
+}
+
+type PutContextTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The field is required in any request. Stored types in MLMD can be updated
+ // by introducing new properties and remain backward compatible. If a type
+ // with the same name exists in the database, it updates the existing type,
+ // otherwise it creates a new type.
+ ContextType *ContextType `protobuf:"bytes,1,opt,name=context_type,json=contextType" json:"context_type,omitempty"`
+ // If true then allows adding properties to an existing stored type.
+ // If false, then type update is not allowed and it raises AlreadyExists
+ // error if the given type has any new property that is not defined in the
+ // stored type.
+ CanAddFields *bool `protobuf:"varint,2,opt,name=can_add_fields,json=canAddFields" json:"can_add_fields,omitempty"`
+ // If true then allows omitting properties of an existing stored type.
+ // If false, then no properties of the stored type can be omitted in the
+ // given type, otherwise it raises AlreadyExists error.
+ CanOmitFields *bool `protobuf:"varint,5,opt,name=can_omit_fields,json=canOmitFields" json:"can_omit_fields,omitempty"`
+ // Deprecated fields.
+ //
+ // Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+ CanDeleteFields *bool `protobuf:"varint,3,opt,name=can_delete_fields,json=canDeleteFields" json:"can_delete_fields,omitempty"`
+ // Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+ AllFieldsMatch *bool `protobuf:"varint,4,opt,name=all_fields_match,json=allFieldsMatch,def=1" json:"all_fields_match,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,6,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+// Default values for PutContextTypeRequest fields.
+const (
+ Default_PutContextTypeRequest_AllFieldsMatch = bool(true)
+)
+
+func (x *PutContextTypeRequest) Reset() {
+ *x = PutContextTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutContextTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutContextTypeRequest) ProtoMessage() {}
+
+func (x *PutContextTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[20]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutContextTypeRequest.ProtoReflect.Descriptor instead.
+func (*PutContextTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *PutContextTypeRequest) GetContextType() *ContextType {
+ if x != nil {
+ return x.ContextType
+ }
+ return nil
+}
+
+func (x *PutContextTypeRequest) GetCanAddFields() bool {
+ if x != nil && x.CanAddFields != nil {
+ return *x.CanAddFields
+ }
+ return false
+}
+
+func (x *PutContextTypeRequest) GetCanOmitFields() bool {
+ if x != nil && x.CanOmitFields != nil {
+ return *x.CanOmitFields
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+func (x *PutContextTypeRequest) GetCanDeleteFields() bool {
+ if x != nil && x.CanDeleteFields != nil {
+ return *x.CanDeleteFields
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in ml_metadata/proto/metadata_store_service.proto.
+func (x *PutContextTypeRequest) GetAllFieldsMatch() bool {
+ if x != nil && x.AllFieldsMatch != nil {
+ return *x.AllFieldsMatch
+ }
+ return Default_PutContextTypeRequest_AllFieldsMatch
+}
+
+func (x *PutContextTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutContextTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The type ID of the context type.
+ TypeId *int64 `protobuf:"varint,1,opt,name=type_id,json=typeId" json:"type_id,omitempty"`
+}
+
+func (x *PutContextTypeResponse) Reset() {
+ *x = PutContextTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutContextTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutContextTypeResponse) ProtoMessage() {}
+
+func (x *PutContextTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[21]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutContextTypeResponse.ProtoReflect.Descriptor instead.
+func (*PutContextTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *PutContextTypeResponse) GetTypeId() int64 {
+ if x != nil && x.TypeId != nil {
+ return *x.TypeId
+ }
+ return 0
+}
+
+type PutContextsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+ // FieldMask for contexts in the PUT update
+ // If `context.id` is not specified, it means a new context will be
+ // created and `update_mask` will not be applied to the creation.
+ // If `update_mask` is empty, update the contexts as a whole.
+ // If `update_mask` is not empty, only update fields or properties specified
+ // in `update_mask`.
+ // Example request protos:
+ // 1. Add a <'key', 'val'> pair into `custom_properties`:
+ // {
+ // contexts {
+ // id: 1234
+ // type_id: 5678
+ // custom_properties {
+ // key: "key"
+ // value: {
+ // string_value: "val"
+ // }
+ // }
+ // }
+ // update_mask {
+ // paths: "custom_properties.key"
+ // }
+ // }
+ // 2. Set `name` field:
+ // {
+ // contexts {
+ // id: 1234
+ // type_id: 5678
+ // name: "set_name"
+ // }
+ // update_mask {
+ // paths: "name"
+ // }
+ // }
+ //
+ // Please refer to `PutArtifactsRequest` for more details.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
+}
+
+func (x *PutContextsRequest) Reset() {
+ *x = PutContextsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutContextsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutContextsRequest) ProtoMessage() {}
+
+func (x *PutContextsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[22]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutContextsRequest.ProtoReflect.Descriptor instead.
+func (*PutContextsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *PutContextsRequest) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+func (x *PutContextsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+func (x *PutContextsRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type PutContextsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of context ids index-aligned with PutContextsRequest.
+ ContextIds []int64 `protobuf:"varint,1,rep,name=context_ids,json=contextIds" json:"context_ids,omitempty"`
+}
+
+func (x *PutContextsResponse) Reset() {
+ *x = PutContextsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutContextsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutContextsResponse) ProtoMessage() {}
+
+func (x *PutContextsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[23]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutContextsResponse.ProtoReflect.Descriptor instead.
+func (*PutContextsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *PutContextsResponse) GetContextIds() []int64 {
+ if x != nil {
+ return x.ContextIds
+ }
+ return nil
+}
+
+type PutAttributionsAndAssociationsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Attributions []*Attribution `protobuf:"bytes,1,rep,name=attributions" json:"attributions,omitempty"`
+ Associations []*Association `protobuf:"bytes,2,rep,name=associations" json:"associations,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *PutAttributionsAndAssociationsRequest) Reset() {
+ *x = PutAttributionsAndAssociationsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutAttributionsAndAssociationsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutAttributionsAndAssociationsRequest) ProtoMessage() {}
+
+func (x *PutAttributionsAndAssociationsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[24]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutAttributionsAndAssociationsRequest.ProtoReflect.Descriptor instead.
+func (*PutAttributionsAndAssociationsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *PutAttributionsAndAssociationsRequest) GetAttributions() []*Attribution {
+ if x != nil {
+ return x.Attributions
+ }
+ return nil
+}
+
+func (x *PutAttributionsAndAssociationsRequest) GetAssociations() []*Association {
+ if x != nil {
+ return x.Associations
+ }
+ return nil
+}
+
+func (x *PutAttributionsAndAssociationsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutAttributionsAndAssociationsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *PutAttributionsAndAssociationsResponse) Reset() {
+ *x = PutAttributionsAndAssociationsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutAttributionsAndAssociationsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutAttributionsAndAssociationsResponse) ProtoMessage() {}
+
+func (x *PutAttributionsAndAssociationsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[25]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutAttributionsAndAssociationsResponse.ProtoReflect.Descriptor instead.
+func (*PutAttributionsAndAssociationsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{25}
+}
+
+type PutParentContextsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ParentContexts []*ParentContext `protobuf:"bytes,1,rep,name=parent_contexts,json=parentContexts" json:"parent_contexts,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *PutParentContextsRequest) Reset() {
+ *x = PutParentContextsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutParentContextsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutParentContextsRequest) ProtoMessage() {}
+
+func (x *PutParentContextsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[26]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutParentContextsRequest.ProtoReflect.Descriptor instead.
+func (*PutParentContextsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *PutParentContextsRequest) GetParentContexts() []*ParentContext {
+ if x != nil {
+ return x.ParentContexts
+ }
+ return nil
+}
+
+func (x *PutParentContextsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type PutParentContextsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *PutParentContextsResponse) Reset() {
+ *x = PutParentContextsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutParentContextsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutParentContextsResponse) ProtoMessage() {}
+
+func (x *PutParentContextsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[27]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutParentContextsResponse.ProtoReflect.Descriptor instead.
+func (*PutParentContextsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{27}
+}
+
+type GetArtifactsByTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // If not set, it looks for the type with type_name with default type_version.
+ TypeVersion *string `protobuf:"bytes,2,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ // Specify List options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ //
+ // If set, the request will
+ //
+ // first fetch all artifacts with specified `type_name` and `type_version`,
+ // then order by a specifield field
+ // finally find the correct page and return #Artifacts of the page size.
+ //
+ // Higher-level APIs may only use the functionalies partially.
+ // Please reference the API documentation for the API behaviors.
+ Options *ListOperationOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,4,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactsByTypeRequest) Reset() {
+ *x = GetArtifactsByTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByTypeRequest) ProtoMessage() {}
+
+func (x *GetArtifactsByTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[28]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByTypeRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *GetArtifactsByTypeRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetArtifactsByTypeRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetArtifactsByTypeRequest) GetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetArtifactsByTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactsByTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Artifacts []*Artifact `protobuf:"bytes,1,rep,name=artifacts" json:"artifacts,omitempty"`
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+}
+
+func (x *GetArtifactsByTypeResponse) Reset() {
+ *x = GetArtifactsByTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByTypeResponse) ProtoMessage() {}
+
+func (x *GetArtifactsByTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[29]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByTypeResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *GetArtifactsByTypeResponse) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+func (x *GetArtifactsByTypeResponse) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+type GetArtifactByTypeAndNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // If not set, it looks for the type with type_name and artifact_name with
+ // default type_version.
+ TypeVersion *string `protobuf:"bytes,3,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ ArtifactName *string `protobuf:"bytes,2,opt,name=artifact_name,json=artifactName" json:"artifact_name,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,4,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactByTypeAndNameRequest) Reset() {
+ *x = GetArtifactByTypeAndNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactByTypeAndNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactByTypeAndNameRequest) ProtoMessage() {}
+
+func (x *GetArtifactByTypeAndNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[30]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactByTypeAndNameRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactByTypeAndNameRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *GetArtifactByTypeAndNameRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetArtifactByTypeAndNameRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetArtifactByTypeAndNameRequest) GetArtifactName() string {
+ if x != nil && x.ArtifactName != nil {
+ return *x.ArtifactName
+ }
+ return ""
+}
+
+func (x *GetArtifactByTypeAndNameRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactByTypeAndNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Artifact *Artifact `protobuf:"bytes,1,opt,name=artifact" json:"artifact,omitempty"`
+}
+
+func (x *GetArtifactByTypeAndNameResponse) Reset() {
+ *x = GetArtifactByTypeAndNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactByTypeAndNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactByTypeAndNameResponse) ProtoMessage() {}
+
+func (x *GetArtifactByTypeAndNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[31]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactByTypeAndNameResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactByTypeAndNameResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *GetArtifactByTypeAndNameResponse) GetArtifact() *Artifact {
+ if x != nil {
+ return x.Artifact
+ }
+ return nil
+}
+
+type GetArtifactsByIDRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of artifact ids to retrieve.
+ ArtifactIds []int64 `protobuf:"varint,1,rep,name=artifact_ids,json=artifactIds" json:"artifact_ids,omitempty"`
+ // An option to populate all the ArtifactTypes in the response.
+ // If true, returns retrieved Artifacts and their artifact types, which can be
+ // matched by type_ids.
+ // If false, returns only the retrieved Artifacts.
+ // Example request proto:
+ //
+ // {
+ // artifact_ids: 101,
+ // populate_artifact_types: true,
+ // }
+ // The response will contain an artifact with id = 101 and an artifact type
+ // with id = artifact.type_id().
+ PopulateArtifactTypes *bool `protobuf:"varint,3,opt,name=populate_artifact_types,json=populateArtifactTypes,def=0" json:"populate_artifact_types,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+// Default values for GetArtifactsByIDRequest fields.
+const (
+ Default_GetArtifactsByIDRequest_PopulateArtifactTypes = bool(false)
+)
+
+func (x *GetArtifactsByIDRequest) Reset() {
+ *x = GetArtifactsByIDRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByIDRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByIDRequest) ProtoMessage() {}
+
+func (x *GetArtifactsByIDRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[32]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByIDRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByIDRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *GetArtifactsByIDRequest) GetArtifactIds() []int64 {
+ if x != nil {
+ return x.ArtifactIds
+ }
+ return nil
+}
+
+func (x *GetArtifactsByIDRequest) GetPopulateArtifactTypes() bool {
+ if x != nil && x.PopulateArtifactTypes != nil {
+ return *x.PopulateArtifactTypes
+ }
+ return Default_GetArtifactsByIDRequest_PopulateArtifactTypes
+}
+
+func (x *GetArtifactsByIDRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactsByIDResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Artifacts with matching ids.
+ // This is not index-aligned: if an id is not found, it is not returned.
+ Artifacts []*Artifact `protobuf:"bytes,1,rep,name=artifacts" json:"artifacts,omitempty"`
+ // ArtifactTypes populated with matching type_ids owned by `artifacts`.
+ // This is not index-aligned: if a type_id is not found, it is not returned.
+ ArtifactTypes []*ArtifactType `protobuf:"bytes,2,rep,name=artifact_types,json=artifactTypes" json:"artifact_types,omitempty"`
+}
+
+func (x *GetArtifactsByIDResponse) Reset() {
+ *x = GetArtifactsByIDResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByIDResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByIDResponse) ProtoMessage() {}
+
+func (x *GetArtifactsByIDResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[33]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByIDResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByIDResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *GetArtifactsByIDResponse) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+func (x *GetArtifactsByIDResponse) GetArtifactTypes() []*ArtifactType {
+ if x != nil {
+ return x.ArtifactTypes
+ }
+ return nil
+}
+
+// Request to retrieve Artifacts using List options.
+// If option is not specified then all Artifacts are returned.
+type GetArtifactsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Specify options.
+ // Please refer to the documentation of ListOperationOptions for the supported
+ // functionalities.
+ Options *ListOperationOptions `protobuf:"bytes,1,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactsRequest) Reset() {
+ *x = GetArtifactsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsRequest) ProtoMessage() {}
+
+func (x *GetArtifactsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[34]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{34}
+}
+
+func (x *GetArtifactsRequest) GetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetArtifactsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Returned artifacts.
+ Artifacts []*Artifact `protobuf:"bytes,1,rep,name=artifacts" json:"artifacts,omitempty"`
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+}
+
+func (x *GetArtifactsResponse) Reset() {
+ *x = GetArtifactsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsResponse) ProtoMessage() {}
+
+func (x *GetArtifactsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[35]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *GetArtifactsResponse) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+func (x *GetArtifactsResponse) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+type GetArtifactsByURIRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of artifact uris to retrieve.
+ Uris []string `protobuf:"bytes,2,rep,name=uris" json:"uris,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactsByURIRequest) Reset() {
+ *x = GetArtifactsByURIRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByURIRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByURIRequest) ProtoMessage() {}
+
+func (x *GetArtifactsByURIRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[36]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByURIRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByURIRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{36}
+}
+
+func (x *GetArtifactsByURIRequest) GetUris() []string {
+ if x != nil {
+ return x.Uris
+ }
+ return nil
+}
+
+func (x *GetArtifactsByURIRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactsByURIResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Artifacts []*Artifact `protobuf:"bytes,1,rep,name=artifacts" json:"artifacts,omitempty"`
+}
+
+func (x *GetArtifactsByURIResponse) Reset() {
+ *x = GetArtifactsByURIResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByURIResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByURIResponse) ProtoMessage() {}
+
+func (x *GetArtifactsByURIResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[37]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByURIResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByURIResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{37}
+}
+
+func (x *GetArtifactsByURIResponse) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+// Request to retrieve Executions using List options.
+// If option is not specified then all Executions are returned.
+type GetExecutionsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Specify options.
+ // Please refer to the documentation of ListOperationOptions for the supported
+ // functionalities.
+ Options *ListOperationOptions `protobuf:"bytes,1,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionsRequest) Reset() {
+ *x = GetExecutionsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsRequest) ProtoMessage() {}
+
+func (x *GetExecutionsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[38]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{38}
+}
+
+func (x *GetExecutionsRequest) GetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetExecutionsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Returned executions.
+ Executions []*Execution `protobuf:"bytes,1,rep,name=executions" json:"executions,omitempty"`
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+}
+
+func (x *GetExecutionsResponse) Reset() {
+ *x = GetExecutionsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsResponse) ProtoMessage() {}
+
+func (x *GetExecutionsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[39]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *GetExecutionsResponse) GetExecutions() []*Execution {
+ if x != nil {
+ return x.Executions
+ }
+ return nil
+}
+
+func (x *GetExecutionsResponse) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+type GetArtifactTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // If not set, it looks for the type with type_name with default type_version.
+ TypeVersion *string `protobuf:"bytes,2,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactTypeRequest) Reset() {
+ *x = GetArtifactTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactTypeRequest) ProtoMessage() {}
+
+func (x *GetArtifactTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[40]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactTypeRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{40}
+}
+
+func (x *GetArtifactTypeRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetArtifactTypeRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetArtifactTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Gets an artifact type, or clear if it does not exist.
+ ArtifactType *ArtifactType `protobuf:"bytes,1,opt,name=artifact_type,json=artifactType" json:"artifact_type,omitempty"`
+}
+
+func (x *GetArtifactTypeResponse) Reset() {
+ *x = GetArtifactTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactTypeResponse) ProtoMessage() {}
+
+func (x *GetArtifactTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[41]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactTypeResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *GetArtifactTypeResponse) GetArtifactType() *ArtifactType {
+ if x != nil {
+ return x.ArtifactType
+ }
+ return nil
+}
+
+type GetArtifactTypesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,1,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactTypesRequest) Reset() {
+ *x = GetArtifactTypesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactTypesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactTypesRequest) ProtoMessage() {}
+
+func (x *GetArtifactTypesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[42]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactTypesRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactTypesRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{42}
+}
+
+func (x *GetArtifactTypesRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactTypesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ArtifactTypes []*ArtifactType `protobuf:"bytes,1,rep,name=artifact_types,json=artifactTypes" json:"artifact_types,omitempty"`
+}
+
+func (x *GetArtifactTypesResponse) Reset() {
+ *x = GetArtifactTypesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactTypesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactTypesResponse) ProtoMessage() {}
+
+func (x *GetArtifactTypesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[43]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactTypesResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactTypesResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{43}
+}
+
+func (x *GetArtifactTypesResponse) GetArtifactTypes() []*ArtifactType {
+ if x != nil {
+ return x.ArtifactTypes
+ }
+ return nil
+}
+
+type GetExecutionTypesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,1,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionTypesRequest) Reset() {
+ *x = GetExecutionTypesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionTypesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionTypesRequest) ProtoMessage() {}
+
+func (x *GetExecutionTypesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[44]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionTypesRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionTypesRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{44}
+}
+
+func (x *GetExecutionTypesRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionTypesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExecutionTypes []*ExecutionType `protobuf:"bytes,1,rep,name=execution_types,json=executionTypes" json:"execution_types,omitempty"`
+}
+
+func (x *GetExecutionTypesResponse) Reset() {
+ *x = GetExecutionTypesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionTypesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionTypesResponse) ProtoMessage() {}
+
+func (x *GetExecutionTypesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[45]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionTypesResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionTypesResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{45}
+}
+
+func (x *GetExecutionTypesResponse) GetExecutionTypes() []*ExecutionType {
+ if x != nil {
+ return x.ExecutionTypes
+ }
+ return nil
+}
+
+type GetContextTypesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,1,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextTypesRequest) Reset() {
+ *x = GetContextTypesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[46]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextTypesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextTypesRequest) ProtoMessage() {}
+
+func (x *GetContextTypesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[46]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextTypesRequest.ProtoReflect.Descriptor instead.
+func (*GetContextTypesRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{46}
+}
+
+func (x *GetContextTypesRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextTypesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextTypes []*ContextType `protobuf:"bytes,1,rep,name=context_types,json=contextTypes" json:"context_types,omitempty"`
+}
+
+func (x *GetContextTypesResponse) Reset() {
+ *x = GetContextTypesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[47]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextTypesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextTypesResponse) ProtoMessage() {}
+
+func (x *GetContextTypesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[47]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextTypesResponse.ProtoReflect.Descriptor instead.
+func (*GetContextTypesResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{47}
+}
+
+func (x *GetContextTypesResponse) GetContextTypes() []*ContextType {
+ if x != nil {
+ return x.ContextTypes
+ }
+ return nil
+}
+
+type GetArtifactsByExternalIdsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExternalIds []string `protobuf:"bytes,1,rep,name=external_ids,json=externalIds" json:"external_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactsByExternalIdsRequest) Reset() {
+ *x = GetArtifactsByExternalIdsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[48]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByExternalIdsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByExternalIdsRequest) ProtoMessage() {}
+
+func (x *GetArtifactsByExternalIdsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[48]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByExternalIdsRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByExternalIdsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{48}
+}
+
+func (x *GetArtifactsByExternalIdsRequest) GetExternalIds() []string {
+ if x != nil {
+ return x.ExternalIds
+ }
+ return nil
+}
+
+func (x *GetArtifactsByExternalIdsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactsByExternalIdsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Artifacts []*Artifact `protobuf:"bytes,1,rep,name=artifacts" json:"artifacts,omitempty"`
+}
+
+func (x *GetArtifactsByExternalIdsResponse) Reset() {
+ *x = GetArtifactsByExternalIdsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[49]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByExternalIdsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByExternalIdsResponse) ProtoMessage() {}
+
+func (x *GetArtifactsByExternalIdsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[49]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByExternalIdsResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByExternalIdsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{49}
+}
+
+func (x *GetArtifactsByExternalIdsResponse) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+type GetExecutionsByExternalIdsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExternalIds []string `protobuf:"bytes,1,rep,name=external_ids,json=externalIds" json:"external_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionsByExternalIdsRequest) Reset() {
+ *x = GetExecutionsByExternalIdsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[50]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsByExternalIdsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsByExternalIdsRequest) ProtoMessage() {}
+
+func (x *GetExecutionsByExternalIdsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[50]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsByExternalIdsRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionsByExternalIdsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{50}
+}
+
+func (x *GetExecutionsByExternalIdsRequest) GetExternalIds() []string {
+ if x != nil {
+ return x.ExternalIds
+ }
+ return nil
+}
+
+func (x *GetExecutionsByExternalIdsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionsByExternalIdsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Executions []*Execution `protobuf:"bytes,1,rep,name=executions" json:"executions,omitempty"`
+}
+
+func (x *GetExecutionsByExternalIdsResponse) Reset() {
+ *x = GetExecutionsByExternalIdsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[51]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsByExternalIdsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsByExternalIdsResponse) ProtoMessage() {}
+
+func (x *GetExecutionsByExternalIdsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[51]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsByExternalIdsResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionsByExternalIdsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{51}
+}
+
+func (x *GetExecutionsByExternalIdsResponse) GetExecutions() []*Execution {
+ if x != nil {
+ return x.Executions
+ }
+ return nil
+}
+
+type GetContextsByExternalIdsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExternalIds []string `protobuf:"bytes,1,rep,name=external_ids,json=externalIds" json:"external_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextsByExternalIdsRequest) Reset() {
+ *x = GetContextsByExternalIdsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[52]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByExternalIdsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByExternalIdsRequest) ProtoMessage() {}
+
+func (x *GetContextsByExternalIdsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[52]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByExternalIdsRequest.ProtoReflect.Descriptor instead.
+func (*GetContextsByExternalIdsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{52}
+}
+
+func (x *GetContextsByExternalIdsRequest) GetExternalIds() []string {
+ if x != nil {
+ return x.ExternalIds
+ }
+ return nil
+}
+
+func (x *GetContextsByExternalIdsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextsByExternalIdsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+}
+
+func (x *GetContextsByExternalIdsResponse) Reset() {
+ *x = GetContextsByExternalIdsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[53]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByExternalIdsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByExternalIdsResponse) ProtoMessage() {}
+
+func (x *GetContextsByExternalIdsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[53]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByExternalIdsResponse.ProtoReflect.Descriptor instead.
+func (*GetContextsByExternalIdsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{53}
+}
+
+func (x *GetContextsByExternalIdsResponse) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+type GetArtifactTypesByExternalIdsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExternalIds []string `protobuf:"bytes,1,rep,name=external_ids,json=externalIds" json:"external_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactTypesByExternalIdsRequest) Reset() {
+ *x = GetArtifactTypesByExternalIdsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[54]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactTypesByExternalIdsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactTypesByExternalIdsRequest) ProtoMessage() {}
+
+func (x *GetArtifactTypesByExternalIdsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[54]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactTypesByExternalIdsRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactTypesByExternalIdsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{54}
+}
+
+func (x *GetArtifactTypesByExternalIdsRequest) GetExternalIds() []string {
+ if x != nil {
+ return x.ExternalIds
+ }
+ return nil
+}
+
+func (x *GetArtifactTypesByExternalIdsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactTypesByExternalIdsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ArtifactTypes []*ArtifactType `protobuf:"bytes,1,rep,name=artifact_types,json=artifactTypes" json:"artifact_types,omitempty"`
+}
+
+func (x *GetArtifactTypesByExternalIdsResponse) Reset() {
+ *x = GetArtifactTypesByExternalIdsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[55]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactTypesByExternalIdsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactTypesByExternalIdsResponse) ProtoMessage() {}
+
+func (x *GetArtifactTypesByExternalIdsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[55]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactTypesByExternalIdsResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactTypesByExternalIdsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{55}
+}
+
+func (x *GetArtifactTypesByExternalIdsResponse) GetArtifactTypes() []*ArtifactType {
+ if x != nil {
+ return x.ArtifactTypes
+ }
+ return nil
+}
+
+type GetExecutionTypesByExternalIdsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExternalIds []string `protobuf:"bytes,1,rep,name=external_ids,json=externalIds" json:"external_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionTypesByExternalIdsRequest) Reset() {
+ *x = GetExecutionTypesByExternalIdsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[56]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionTypesByExternalIdsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionTypesByExternalIdsRequest) ProtoMessage() {}
+
+func (x *GetExecutionTypesByExternalIdsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[56]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionTypesByExternalIdsRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionTypesByExternalIdsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{56}
+}
+
+func (x *GetExecutionTypesByExternalIdsRequest) GetExternalIds() []string {
+ if x != nil {
+ return x.ExternalIds
+ }
+ return nil
+}
+
+func (x *GetExecutionTypesByExternalIdsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionTypesByExternalIdsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExecutionTypes []*ExecutionType `protobuf:"bytes,1,rep,name=execution_types,json=executionTypes" json:"execution_types,omitempty"`
+}
+
+func (x *GetExecutionTypesByExternalIdsResponse) Reset() {
+ *x = GetExecutionTypesByExternalIdsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[57]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionTypesByExternalIdsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionTypesByExternalIdsResponse) ProtoMessage() {}
+
+func (x *GetExecutionTypesByExternalIdsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[57]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionTypesByExternalIdsResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionTypesByExternalIdsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{57}
+}
+
+func (x *GetExecutionTypesByExternalIdsResponse) GetExecutionTypes() []*ExecutionType {
+ if x != nil {
+ return x.ExecutionTypes
+ }
+ return nil
+}
+
+type GetContextTypesByExternalIdsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExternalIds []string `protobuf:"bytes,1,rep,name=external_ids,json=externalIds" json:"external_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextTypesByExternalIdsRequest) Reset() {
+ *x = GetContextTypesByExternalIdsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[58]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextTypesByExternalIdsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextTypesByExternalIdsRequest) ProtoMessage() {}
+
+func (x *GetContextTypesByExternalIdsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[58]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextTypesByExternalIdsRequest.ProtoReflect.Descriptor instead.
+func (*GetContextTypesByExternalIdsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{58}
+}
+
+func (x *GetContextTypesByExternalIdsRequest) GetExternalIds() []string {
+ if x != nil {
+ return x.ExternalIds
+ }
+ return nil
+}
+
+func (x *GetContextTypesByExternalIdsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextTypesByExternalIdsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextTypes []*ContextType `protobuf:"bytes,1,rep,name=context_types,json=contextTypes" json:"context_types,omitempty"`
+}
+
+func (x *GetContextTypesByExternalIdsResponse) Reset() {
+ *x = GetContextTypesByExternalIdsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[59]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextTypesByExternalIdsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextTypesByExternalIdsResponse) ProtoMessage() {}
+
+func (x *GetContextTypesByExternalIdsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[59]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextTypesByExternalIdsResponse.ProtoReflect.Descriptor instead.
+func (*GetContextTypesByExternalIdsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{59}
+}
+
+func (x *GetContextTypesByExternalIdsResponse) GetContextTypes() []*ContextType {
+ if x != nil {
+ return x.ContextTypes
+ }
+ return nil
+}
+
+type GetExecutionsByTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // If not set, it looks for the type with type_name with default type_version.
+ TypeVersion *string `protobuf:"bytes,2,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ // Specify List options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ //
+ // If set, the request will
+ //
+ // first fetch all executions with specified `type_name` and `type_version`,
+ // then order by a specifield field
+ // finally find the correct page and return #Executions of the page size.
+ //
+ // Higher-level APIs may only use the functionalies partially.
+ // Please reference the API documentation for the API behaviors.
+ Options *ListOperationOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,4,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionsByTypeRequest) Reset() {
+ *x = GetExecutionsByTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[60]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsByTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsByTypeRequest) ProtoMessage() {}
+
+func (x *GetExecutionsByTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[60]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsByTypeRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionsByTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{60}
+}
+
+func (x *GetExecutionsByTypeRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetExecutionsByTypeRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetExecutionsByTypeRequest) GetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetExecutionsByTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionsByTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Executions []*Execution `protobuf:"bytes,1,rep,name=executions" json:"executions,omitempty"`
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+}
+
+func (x *GetExecutionsByTypeResponse) Reset() {
+ *x = GetExecutionsByTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[61]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsByTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsByTypeResponse) ProtoMessage() {}
+
+func (x *GetExecutionsByTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[61]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsByTypeResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionsByTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{61}
+}
+
+func (x *GetExecutionsByTypeResponse) GetExecutions() []*Execution {
+ if x != nil {
+ return x.Executions
+ }
+ return nil
+}
+
+func (x *GetExecutionsByTypeResponse) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+type GetExecutionByTypeAndNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // If not set, it looks for the type with type_name and execution_name with
+ // default type_version.
+ TypeVersion *string `protobuf:"bytes,3,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ ExecutionName *string `protobuf:"bytes,2,opt,name=execution_name,json=executionName" json:"execution_name,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,4,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionByTypeAndNameRequest) Reset() {
+ *x = GetExecutionByTypeAndNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[62]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionByTypeAndNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionByTypeAndNameRequest) ProtoMessage() {}
+
+func (x *GetExecutionByTypeAndNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[62]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionByTypeAndNameRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionByTypeAndNameRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{62}
+}
+
+func (x *GetExecutionByTypeAndNameRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetExecutionByTypeAndNameRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetExecutionByTypeAndNameRequest) GetExecutionName() string {
+ if x != nil && x.ExecutionName != nil {
+ return *x.ExecutionName
+ }
+ return ""
+}
+
+func (x *GetExecutionByTypeAndNameRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionByTypeAndNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Execution *Execution `protobuf:"bytes,1,opt,name=execution" json:"execution,omitempty"`
+}
+
+func (x *GetExecutionByTypeAndNameResponse) Reset() {
+ *x = GetExecutionByTypeAndNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[63]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionByTypeAndNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionByTypeAndNameResponse) ProtoMessage() {}
+
+func (x *GetExecutionByTypeAndNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[63]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionByTypeAndNameResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionByTypeAndNameResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{63}
+}
+
+func (x *GetExecutionByTypeAndNameResponse) GetExecution() *Execution {
+ if x != nil {
+ return x.Execution
+ }
+ return nil
+}
+
+type GetExecutionsByIDRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of execution ids to retrieve.
+ ExecutionIds []int64 `protobuf:"varint,1,rep,name=execution_ids,json=executionIds" json:"execution_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionsByIDRequest) Reset() {
+ *x = GetExecutionsByIDRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[64]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsByIDRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsByIDRequest) ProtoMessage() {}
+
+func (x *GetExecutionsByIDRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[64]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsByIDRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionsByIDRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{64}
+}
+
+func (x *GetExecutionsByIDRequest) GetExecutionIds() []int64 {
+ if x != nil {
+ return x.ExecutionIds
+ }
+ return nil
+}
+
+func (x *GetExecutionsByIDRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionsByIDResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ Executions []*Execution `protobuf:"bytes,1,rep,name=executions" json:"executions,omitempty"`
+}
+
+func (x *GetExecutionsByIDResponse) Reset() {
+ *x = GetExecutionsByIDResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[65]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsByIDResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsByIDResponse) ProtoMessage() {}
+
+func (x *GetExecutionsByIDResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[65]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsByIDResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionsByIDResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{65}
+}
+
+func (x *GetExecutionsByIDResponse) GetExecutions() []*Execution {
+ if x != nil {
+ return x.Executions
+ }
+ return nil
+}
+
+type GetExecutionTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // If not set, it looks for the type with type_name with default type_version.
+ TypeVersion *string `protobuf:"bytes,2,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionTypeRequest) Reset() {
+ *x = GetExecutionTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[66]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionTypeRequest) ProtoMessage() {}
+
+func (x *GetExecutionTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[66]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionTypeRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{66}
+}
+
+func (x *GetExecutionTypeRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetExecutionTypeRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetExecutionTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Gets an execution type, or clear if it does not exist.
+ ExecutionType *ExecutionType `protobuf:"bytes,1,opt,name=execution_type,json=executionType" json:"execution_type,omitempty"`
+}
+
+func (x *GetExecutionTypeResponse) Reset() {
+ *x = GetExecutionTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[67]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionTypeResponse) ProtoMessage() {}
+
+func (x *GetExecutionTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[67]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionTypeResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{67}
+}
+
+func (x *GetExecutionTypeResponse) GetExecutionType() *ExecutionType {
+ if x != nil {
+ return x.ExecutionType
+ }
+ return nil
+}
+
+// Gets all events with matching execution ids.
+type GetEventsByExecutionIDsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExecutionIds []int64 `protobuf:"varint,1,rep,name=execution_ids,json=executionIds" json:"execution_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetEventsByExecutionIDsRequest) Reset() {
+ *x = GetEventsByExecutionIDsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[68]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetEventsByExecutionIDsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetEventsByExecutionIDsRequest) ProtoMessage() {}
+
+func (x *GetEventsByExecutionIDsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[68]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetEventsByExecutionIDsRequest.ProtoReflect.Descriptor instead.
+func (*GetEventsByExecutionIDsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{68}
+}
+
+func (x *GetEventsByExecutionIDsRequest) GetExecutionIds() []int64 {
+ if x != nil {
+ return x.ExecutionIds
+ }
+ return nil
+}
+
+func (x *GetEventsByExecutionIDsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetEventsByExecutionIDsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Events []*Event `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
+}
+
+func (x *GetEventsByExecutionIDsResponse) Reset() {
+ *x = GetEventsByExecutionIDsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[69]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetEventsByExecutionIDsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetEventsByExecutionIDsResponse) ProtoMessage() {}
+
+func (x *GetEventsByExecutionIDsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[69]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetEventsByExecutionIDsResponse.ProtoReflect.Descriptor instead.
+func (*GetEventsByExecutionIDsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{69}
+}
+
+func (x *GetEventsByExecutionIDsResponse) GetEvents() []*Event {
+ if x != nil {
+ return x.Events
+ }
+ return nil
+}
+
+type GetEventsByArtifactIDsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ArtifactIds []int64 `protobuf:"varint,1,rep,name=artifact_ids,json=artifactIds" json:"artifact_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetEventsByArtifactIDsRequest) Reset() {
+ *x = GetEventsByArtifactIDsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[70]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetEventsByArtifactIDsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetEventsByArtifactIDsRequest) ProtoMessage() {}
+
+func (x *GetEventsByArtifactIDsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[70]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetEventsByArtifactIDsRequest.ProtoReflect.Descriptor instead.
+func (*GetEventsByArtifactIDsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{70}
+}
+
+func (x *GetEventsByArtifactIDsRequest) GetArtifactIds() []int64 {
+ if x != nil {
+ return x.ArtifactIds
+ }
+ return nil
+}
+
+func (x *GetEventsByArtifactIDsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetEventsByArtifactIDsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Events []*Event `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
+}
+
+func (x *GetEventsByArtifactIDsResponse) Reset() {
+ *x = GetEventsByArtifactIDsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[71]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetEventsByArtifactIDsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetEventsByArtifactIDsResponse) ProtoMessage() {}
+
+func (x *GetEventsByArtifactIDsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[71]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetEventsByArtifactIDsResponse.ProtoReflect.Descriptor instead.
+func (*GetEventsByArtifactIDsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{71}
+}
+
+func (x *GetEventsByArtifactIDsResponse) GetEvents() []*Event {
+ if x != nil {
+ return x.Events
+ }
+ return nil
+}
+
+type GetArtifactTypesByIDRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeIds []int64 `protobuf:"varint,1,rep,name=type_ids,json=typeIds" json:"type_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactTypesByIDRequest) Reset() {
+ *x = GetArtifactTypesByIDRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[72]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactTypesByIDRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactTypesByIDRequest) ProtoMessage() {}
+
+func (x *GetArtifactTypesByIDRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[72]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactTypesByIDRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactTypesByIDRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{72}
+}
+
+func (x *GetArtifactTypesByIDRequest) GetTypeIds() []int64 {
+ if x != nil {
+ return x.TypeIds
+ }
+ return nil
+}
+
+func (x *GetArtifactTypesByIDRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactTypesByIDResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ ArtifactTypes []*ArtifactType `protobuf:"bytes,1,rep,name=artifact_types,json=artifactTypes" json:"artifact_types,omitempty"`
+}
+
+func (x *GetArtifactTypesByIDResponse) Reset() {
+ *x = GetArtifactTypesByIDResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[73]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactTypesByIDResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactTypesByIDResponse) ProtoMessage() {}
+
+func (x *GetArtifactTypesByIDResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[73]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactTypesByIDResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactTypesByIDResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{73}
+}
+
+func (x *GetArtifactTypesByIDResponse) GetArtifactTypes() []*ArtifactType {
+ if x != nil {
+ return x.ArtifactTypes
+ }
+ return nil
+}
+
+type GetExecutionTypesByIDRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeIds []int64 `protobuf:"varint,1,rep,name=type_ids,json=typeIds" json:"type_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionTypesByIDRequest) Reset() {
+ *x = GetExecutionTypesByIDRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[74]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionTypesByIDRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionTypesByIDRequest) ProtoMessage() {}
+
+func (x *GetExecutionTypesByIDRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[74]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionTypesByIDRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionTypesByIDRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{74}
+}
+
+func (x *GetExecutionTypesByIDRequest) GetTypeIds() []int64 {
+ if x != nil {
+ return x.TypeIds
+ }
+ return nil
+}
+
+func (x *GetExecutionTypesByIDRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionTypesByIDResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ ExecutionTypes []*ExecutionType `protobuf:"bytes,1,rep,name=execution_types,json=executionTypes" json:"execution_types,omitempty"`
+}
+
+func (x *GetExecutionTypesByIDResponse) Reset() {
+ *x = GetExecutionTypesByIDResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[75]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionTypesByIDResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionTypesByIDResponse) ProtoMessage() {}
+
+func (x *GetExecutionTypesByIDResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[75]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionTypesByIDResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionTypesByIDResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{75}
+}
+
+func (x *GetExecutionTypesByIDResponse) GetExecutionTypes() []*ExecutionType {
+ if x != nil {
+ return x.ExecutionTypes
+ }
+ return nil
+}
+
+type GetContextTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // If not set, it looks for the type with type_name with default type_version.
+ TypeVersion *string `protobuf:"bytes,2,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextTypeRequest) Reset() {
+ *x = GetContextTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[76]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextTypeRequest) ProtoMessage() {}
+
+func (x *GetContextTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[76]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextTypeRequest.ProtoReflect.Descriptor instead.
+func (*GetContextTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{76}
+}
+
+func (x *GetContextTypeRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetContextTypeRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetContextTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Gets a context type, or clear if it does not exist.
+ ContextType *ContextType `protobuf:"bytes,1,opt,name=context_type,json=contextType" json:"context_type,omitempty"`
+}
+
+func (x *GetContextTypeResponse) Reset() {
+ *x = GetContextTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[77]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextTypeResponse) ProtoMessage() {}
+
+func (x *GetContextTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[77]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextTypeResponse.ProtoReflect.Descriptor instead.
+func (*GetContextTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{77}
+}
+
+func (x *GetContextTypeResponse) GetContextType() *ContextType {
+ if x != nil {
+ return x.ContextType
+ }
+ return nil
+}
+
+type GetContextTypesByIDRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeIds []int64 `protobuf:"varint,1,rep,name=type_ids,json=typeIds" json:"type_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextTypesByIDRequest) Reset() {
+ *x = GetContextTypesByIDRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[78]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextTypesByIDRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextTypesByIDRequest) ProtoMessage() {}
+
+func (x *GetContextTypesByIDRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[78]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextTypesByIDRequest.ProtoReflect.Descriptor instead.
+func (*GetContextTypesByIDRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{78}
+}
+
+func (x *GetContextTypesByIDRequest) GetTypeIds() []int64 {
+ if x != nil {
+ return x.TypeIds
+ }
+ return nil
+}
+
+func (x *GetContextTypesByIDRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextTypesByIDResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ ContextTypes []*ContextType `protobuf:"bytes,1,rep,name=context_types,json=contextTypes" json:"context_types,omitempty"`
+}
+
+func (x *GetContextTypesByIDResponse) Reset() {
+ *x = GetContextTypesByIDResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[79]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextTypesByIDResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextTypesByIDResponse) ProtoMessage() {}
+
+func (x *GetContextTypesByIDResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[79]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextTypesByIDResponse.ProtoReflect.Descriptor instead.
+func (*GetContextTypesByIDResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{79}
+}
+
+func (x *GetContextTypesByIDResponse) GetContextTypes() []*ContextType {
+ if x != nil {
+ return x.ContextTypes
+ }
+ return nil
+}
+
+// Request to retrieve Contexts using List options.
+// If option is not specified then all Contexts are returned.
+type GetContextsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Specify options.
+ // Please refer to the documentation of ListOperationOptions for the supported
+ // functionalities.
+ Options *ListOperationOptions `protobuf:"bytes,1,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextsRequest) Reset() {
+ *x = GetContextsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[80]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsRequest) ProtoMessage() {}
+
+func (x *GetContextsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[80]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsRequest.ProtoReflect.Descriptor instead.
+func (*GetContextsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{80}
+}
+
+func (x *GetContextsRequest) GetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetContextsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Returned contexts.
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+}
+
+func (x *GetContextsResponse) Reset() {
+ *x = GetContextsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[81]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsResponse) ProtoMessage() {}
+
+func (x *GetContextsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[81]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsResponse.ProtoReflect.Descriptor instead.
+func (*GetContextsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{81}
+}
+
+func (x *GetContextsResponse) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+func (x *GetContextsResponse) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+type GetContextsByTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // Specify options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ //
+ // If set, the request will
+ //
+ // first fetch all contexts with specified `type_name` and `type_version`,
+ // then order by a specifield field
+ // finally find the correct page and return #Contexts of the page size.
+ //
+ // Higher-level APIs may only use the functionalies partially.
+ // Please reference the API documentation for the API behaviors.
+ Options *ListOperationOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+ // If not set, it looks for the type with type_name and options with default
+ // type_version.
+ TypeVersion *string `protobuf:"bytes,3,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,4,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextsByTypeRequest) Reset() {
+ *x = GetContextsByTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[82]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByTypeRequest) ProtoMessage() {}
+
+func (x *GetContextsByTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[82]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByTypeRequest.ProtoReflect.Descriptor instead.
+func (*GetContextsByTypeRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{82}
+}
+
+func (x *GetContextsByTypeRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetContextsByTypeRequest) GetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetContextsByTypeRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetContextsByTypeRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextsByTypeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+}
+
+func (x *GetContextsByTypeResponse) Reset() {
+ *x = GetContextsByTypeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[83]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByTypeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByTypeResponse) ProtoMessage() {}
+
+func (x *GetContextsByTypeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[83]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByTypeResponse.ProtoReflect.Descriptor instead.
+func (*GetContextsByTypeResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{83}
+}
+
+func (x *GetContextsByTypeResponse) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+func (x *GetContextsByTypeResponse) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+type GetContextByTypeAndNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeName *string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
+ // If not set, it looks for the type with type_name and context_name with
+ // default type_version.
+ TypeVersion *string `protobuf:"bytes,3,opt,name=type_version,json=typeVersion" json:"type_version,omitempty"`
+ ContextName *string `protobuf:"bytes,2,opt,name=context_name,json=contextName" json:"context_name,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,4,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextByTypeAndNameRequest) Reset() {
+ *x = GetContextByTypeAndNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[84]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextByTypeAndNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextByTypeAndNameRequest) ProtoMessage() {}
+
+func (x *GetContextByTypeAndNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[84]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextByTypeAndNameRequest.ProtoReflect.Descriptor instead.
+func (*GetContextByTypeAndNameRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{84}
+}
+
+func (x *GetContextByTypeAndNameRequest) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
+ }
+ return ""
+}
+
+func (x *GetContextByTypeAndNameRequest) GetTypeVersion() string {
+ if x != nil && x.TypeVersion != nil {
+ return *x.TypeVersion
+ }
+ return ""
+}
+
+func (x *GetContextByTypeAndNameRequest) GetContextName() string {
+ if x != nil && x.ContextName != nil {
+ return *x.ContextName
+ }
+ return ""
+}
+
+func (x *GetContextByTypeAndNameRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextByTypeAndNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Context *Context `protobuf:"bytes,1,opt,name=context" json:"context,omitempty"`
+}
+
+func (x *GetContextByTypeAndNameResponse) Reset() {
+ *x = GetContextByTypeAndNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[85]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextByTypeAndNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextByTypeAndNameResponse) ProtoMessage() {}
+
+func (x *GetContextByTypeAndNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[85]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextByTypeAndNameResponse.ProtoReflect.Descriptor instead.
+func (*GetContextByTypeAndNameResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{85}
+}
+
+func (x *GetContextByTypeAndNameResponse) GetContext() *Context {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+type GetContextsByIDRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of context ids to retrieve.
+ ContextIds []int64 `protobuf:"varint,1,rep,name=context_ids,json=contextIds" json:"context_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextsByIDRequest) Reset() {
+ *x = GetContextsByIDRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[86]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByIDRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByIDRequest) ProtoMessage() {}
+
+func (x *GetContextsByIDRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[86]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByIDRequest.ProtoReflect.Descriptor instead.
+func (*GetContextsByIDRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{86}
+}
+
+func (x *GetContextsByIDRequest) GetContextIds() []int64 {
+ if x != nil {
+ return x.ContextIds
+ }
+ return nil
+}
+
+func (x *GetContextsByIDRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextsByIDResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The result is not index-aligned: if an id is not found, it is not
+ // returned.
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+}
+
+func (x *GetContextsByIDResponse) Reset() {
+ *x = GetContextsByIDResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[87]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByIDResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByIDResponse) ProtoMessage() {}
+
+func (x *GetContextsByIDResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[87]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByIDResponse.ProtoReflect.Descriptor instead.
+func (*GetContextsByIDResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{87}
+}
+
+func (x *GetContextsByIDResponse) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+type GetContextsByArtifactRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ArtifactId *int64 `protobuf:"varint,1,opt,name=artifact_id,json=artifactId" json:"artifact_id,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextsByArtifactRequest) Reset() {
+ *x = GetContextsByArtifactRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[88]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByArtifactRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByArtifactRequest) ProtoMessage() {}
+
+func (x *GetContextsByArtifactRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[88]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByArtifactRequest.ProtoReflect.Descriptor instead.
+func (*GetContextsByArtifactRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{88}
+}
+
+func (x *GetContextsByArtifactRequest) GetArtifactId() int64 {
+ if x != nil && x.ArtifactId != nil {
+ return *x.ArtifactId
+ }
+ return 0
+}
+
+func (x *GetContextsByArtifactRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextsByArtifactResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+}
+
+func (x *GetContextsByArtifactResponse) Reset() {
+ *x = GetContextsByArtifactResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[89]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByArtifactResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByArtifactResponse) ProtoMessage() {}
+
+func (x *GetContextsByArtifactResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[89]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByArtifactResponse.ProtoReflect.Descriptor instead.
+func (*GetContextsByArtifactResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{89}
+}
+
+func (x *GetContextsByArtifactResponse) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+type GetContextsByExecutionRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExecutionId *int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId" json:"execution_id,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetContextsByExecutionRequest) Reset() {
+ *x = GetContextsByExecutionRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[90]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByExecutionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByExecutionRequest) ProtoMessage() {}
+
+func (x *GetContextsByExecutionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[90]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByExecutionRequest.ProtoReflect.Descriptor instead.
+func (*GetContextsByExecutionRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{90}
+}
+
+func (x *GetContextsByExecutionRequest) GetExecutionId() int64 {
+ if x != nil && x.ExecutionId != nil {
+ return *x.ExecutionId
+ }
+ return 0
+}
+
+func (x *GetContextsByExecutionRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetContextsByExecutionResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+}
+
+func (x *GetContextsByExecutionResponse) Reset() {
+ *x = GetContextsByExecutionResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[91]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetContextsByExecutionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetContextsByExecutionResponse) ProtoMessage() {}
+
+func (x *GetContextsByExecutionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[91]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetContextsByExecutionResponse.ProtoReflect.Descriptor instead.
+func (*GetContextsByExecutionResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{91}
+}
+
+func (x *GetContextsByExecutionResponse) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+type GetParentContextsByContextRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextId *int64 `protobuf:"varint,1,opt,name=context_id,json=contextId" json:"context_id,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetParentContextsByContextRequest) Reset() {
+ *x = GetParentContextsByContextRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[92]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetParentContextsByContextRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetParentContextsByContextRequest) ProtoMessage() {}
+
+func (x *GetParentContextsByContextRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[92]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetParentContextsByContextRequest.ProtoReflect.Descriptor instead.
+func (*GetParentContextsByContextRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{92}
+}
+
+func (x *GetParentContextsByContextRequest) GetContextId() int64 {
+ if x != nil && x.ContextId != nil {
+ return *x.ContextId
+ }
+ return 0
+}
+
+func (x *GetParentContextsByContextRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetParentContextsByContextResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+}
+
+func (x *GetParentContextsByContextResponse) Reset() {
+ *x = GetParentContextsByContextResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[93]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetParentContextsByContextResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetParentContextsByContextResponse) ProtoMessage() {}
+
+func (x *GetParentContextsByContextResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[93]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetParentContextsByContextResponse.ProtoReflect.Descriptor instead.
+func (*GetParentContextsByContextResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{93}
+}
+
+func (x *GetParentContextsByContextResponse) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+type GetChildrenContextsByContextRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextId *int64 `protobuf:"varint,1,opt,name=context_id,json=contextId" json:"context_id,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetChildrenContextsByContextRequest) Reset() {
+ *x = GetChildrenContextsByContextRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[94]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetChildrenContextsByContextRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetChildrenContextsByContextRequest) ProtoMessage() {}
+
+func (x *GetChildrenContextsByContextRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[94]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetChildrenContextsByContextRequest.ProtoReflect.Descriptor instead.
+func (*GetChildrenContextsByContextRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{94}
+}
+
+func (x *GetChildrenContextsByContextRequest) GetContextId() int64 {
+ if x != nil && x.ContextId != nil {
+ return *x.ContextId
+ }
+ return 0
+}
+
+func (x *GetChildrenContextsByContextRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetChildrenContextsByContextResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts []*Context `protobuf:"bytes,1,rep,name=contexts" json:"contexts,omitempty"`
+}
+
+func (x *GetChildrenContextsByContextResponse) Reset() {
+ *x = GetChildrenContextsByContextResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[95]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetChildrenContextsByContextResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetChildrenContextsByContextResponse) ProtoMessage() {}
+
+func (x *GetChildrenContextsByContextResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[95]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetChildrenContextsByContextResponse.ProtoReflect.Descriptor instead.
+func (*GetChildrenContextsByContextResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{95}
+}
+
+func (x *GetChildrenContextsByContextResponse) GetContexts() []*Context {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+type GetParentContextsByContextsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextIds []int64 `protobuf:"varint,1,rep,packed,name=context_ids,json=contextIds" json:"context_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetParentContextsByContextsRequest) Reset() {
+ *x = GetParentContextsByContextsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[96]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetParentContextsByContextsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetParentContextsByContextsRequest) ProtoMessage() {}
+
+func (x *GetParentContextsByContextsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[96]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetParentContextsByContextsRequest.ProtoReflect.Descriptor instead.
+func (*GetParentContextsByContextsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{96}
+}
+
+func (x *GetParentContextsByContextsRequest) GetContextIds() []int64 {
+ if x != nil {
+ return x.ContextIds
+ }
+ return nil
+}
+
+func (x *GetParentContextsByContextsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetParentContextsByContextsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts map[int64]*GetParentContextsByContextsResponse_ParentContextsPerChild `protobuf:"bytes,2,rep,name=contexts" json:"contexts,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+}
+
+func (x *GetParentContextsByContextsResponse) Reset() {
+ *x = GetParentContextsByContextsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[97]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetParentContextsByContextsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetParentContextsByContextsResponse) ProtoMessage() {}
+
+func (x *GetParentContextsByContextsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[97]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetParentContextsByContextsResponse.ProtoReflect.Descriptor instead.
+func (*GetParentContextsByContextsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{97}
+}
+
+func (x *GetParentContextsByContextsResponse) GetContexts() map[int64]*GetParentContextsByContextsResponse_ParentContextsPerChild {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+type GetChildrenContextsByContextsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextIds []int64 `protobuf:"varint,1,rep,packed,name=context_ids,json=contextIds" json:"context_ids,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetChildrenContextsByContextsRequest) Reset() {
+ *x = GetChildrenContextsByContextsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[98]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetChildrenContextsByContextsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetChildrenContextsByContextsRequest) ProtoMessage() {}
+
+func (x *GetChildrenContextsByContextsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[98]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetChildrenContextsByContextsRequest.ProtoReflect.Descriptor instead.
+func (*GetChildrenContextsByContextsRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{98}
+}
+
+func (x *GetChildrenContextsByContextsRequest) GetContextIds() []int64 {
+ if x != nil {
+ return x.ContextIds
+ }
+ return nil
+}
+
+func (x *GetChildrenContextsByContextsRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetChildrenContextsByContextsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Contexts map[int64]*GetChildrenContextsByContextsResponse_ChildrenContextsPerParent `protobuf:"bytes,2,rep,name=contexts" json:"contexts,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+}
+
+func (x *GetChildrenContextsByContextsResponse) Reset() {
+ *x = GetChildrenContextsByContextsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[99]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetChildrenContextsByContextsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetChildrenContextsByContextsResponse) ProtoMessage() {}
+
+func (x *GetChildrenContextsByContextsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[99]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetChildrenContextsByContextsResponse.ProtoReflect.Descriptor instead.
+func (*GetChildrenContextsByContextsResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{99}
+}
+
+func (x *GetChildrenContextsByContextsResponse) GetContexts() map[int64]*GetChildrenContextsByContextsResponse_ChildrenContextsPerParent {
+ if x != nil {
+ return x.Contexts
+ }
+ return nil
+}
+
+type GetArtifactsByContextRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextId *int64 `protobuf:"varint,1,opt,name=context_id,json=contextId" json:"context_id,omitempty"`
+ // Specify List options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ Options *ListOperationOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetArtifactsByContextRequest) Reset() {
+ *x = GetArtifactsByContextRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[100]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByContextRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByContextRequest) ProtoMessage() {}
+
+func (x *GetArtifactsByContextRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[100]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByContextRequest.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByContextRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{100}
+}
+
+func (x *GetArtifactsByContextRequest) GetContextId() int64 {
+ if x != nil && x.ContextId != nil {
+ return *x.ContextId
+ }
+ return 0
+}
+
+func (x *GetArtifactsByContextRequest) GetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetArtifactsByContextRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetArtifactsByContextResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Artifacts []*Artifact `protobuf:"bytes,1,rep,name=artifacts" json:"artifacts,omitempty"`
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+}
+
+func (x *GetArtifactsByContextResponse) Reset() {
+ *x = GetArtifactsByContextResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[101]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetArtifactsByContextResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetArtifactsByContextResponse) ProtoMessage() {}
+
+func (x *GetArtifactsByContextResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[101]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetArtifactsByContextResponse.ProtoReflect.Descriptor instead.
+func (*GetArtifactsByContextResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{101}
+}
+
+func (x *GetArtifactsByContextResponse) GetArtifacts() []*Artifact {
+ if x != nil {
+ return x.Artifacts
+ }
+ return nil
+}
+
+func (x *GetArtifactsByContextResponse) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+type GetExecutionsByContextRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextId *int64 `protobuf:"varint,1,opt,name=context_id,json=contextId" json:"context_id,omitempty"`
+ // Specify List options.
+ // Currently supports:
+ // 1. Field to order the results.
+ // 2. Page size.
+ Options *ListOperationOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionsByContextRequest) Reset() {
+ *x = GetExecutionsByContextRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[102]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsByContextRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsByContextRequest) ProtoMessage() {}
+
+func (x *GetExecutionsByContextRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[102]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsByContextRequest.ProtoReflect.Descriptor instead.
+func (*GetExecutionsByContextRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{102}
+}
+
+func (x *GetExecutionsByContextRequest) GetContextId() int64 {
+ if x != nil && x.ContextId != nil {
+ return *x.ContextId
+ }
+ return 0
+}
+
+func (x *GetExecutionsByContextRequest) GetOptions() *ListOperationOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetExecutionsByContextRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetExecutionsByContextResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Executions []*Execution `protobuf:"bytes,1,rep,name=executions" json:"executions,omitempty"`
+ // Token to use to retrieve next page of results if list options are used in
+ // the request.
+ NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,3,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetExecutionsByContextResponse) Reset() {
+ *x = GetExecutionsByContextResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[103]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetExecutionsByContextResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetExecutionsByContextResponse) ProtoMessage() {}
+
+func (x *GetExecutionsByContextResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[103]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetExecutionsByContextResponse.ProtoReflect.Descriptor instead.
+func (*GetExecutionsByContextResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{103}
+}
+
+func (x *GetExecutionsByContextResponse) GetExecutions() []*Execution {
+ if x != nil {
+ return x.Executions
+ }
+ return nil
+}
+
+func (x *GetExecutionsByContextResponse) GetNextPageToken() string {
+ if x != nil && x.NextPageToken != nil {
+ return *x.NextPageToken
+ }
+ return ""
+}
+
+func (x *GetExecutionsByContextResponse) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+// TODO(b/283852485): Deprecate GetLineageGraph API after migration to
+// GetLineageSubgraph API.
+// A lineage query request to specify the query nodes of interest and the
+// boundary conditions for pruning the returned graph.
+type GetLineageGraphRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Options *LineageGraphQueryOptions `protobuf:"bytes,1,opt,name=options" json:"options,omitempty"`
+ // Options regarding transactions.
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetLineageGraphRequest) Reset() {
+ *x = GetLineageGraphRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[104]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetLineageGraphRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetLineageGraphRequest) ProtoMessage() {}
+
+func (x *GetLineageGraphRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[104]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetLineageGraphRequest.ProtoReflect.Descriptor instead.
+func (*GetLineageGraphRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{104}
+}
+
+func (x *GetLineageGraphRequest) GetOptions() *LineageGraphQueryOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *GetLineageGraphRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+// A connected lineage `subgraph` about the MLMD nodes derived from
+// LineageGraphRequest.query_conditions.
+type GetLineageGraphResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Subgraph *LineageGraph `protobuf:"bytes,1,opt,name=subgraph" json:"subgraph,omitempty"`
+}
+
+func (x *GetLineageGraphResponse) Reset() {
+ *x = GetLineageGraphResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[105]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetLineageGraphResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetLineageGraphResponse) ProtoMessage() {}
+
+func (x *GetLineageGraphResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[105]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetLineageGraphResponse.ProtoReflect.Descriptor instead.
+func (*GetLineageGraphResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{105}
+}
+
+func (x *GetLineageGraphResponse) GetSubgraph() *LineageGraph {
+ if x != nil {
+ return x.Subgraph
+ }
+ return nil
+}
+
+type GetLineageSubgraphRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Query options for lineage graph tracing from a list of interested
+ // nodes.
+ // A lineage subgraph without node details (e.g., external_id, properties)
+ // will be returned. Please refer to `LineageSubgraphQueryOptions` for more
+ // details.
+ LineageSubgraphQueryOptions *LineageSubgraphQueryOptions `protobuf:"bytes,1,opt,name=lineage_subgraph_query_options,json=lineageSubgraphQueryOptions" json:"lineage_subgraph_query_options,omitempty"`
+ // `read_mask` contains user specified paths of fields that should be included
+ // in the returned lineage subgraph.
+ //
+ // Supported field paths are: 'artifacts', 'executions', 'contexts',
+ // 'artifact_types', 'execution_types', 'context_types', and 'events'.
+ // TODO(b/283852485): Include 'associations' or 'attributions' in the
+ // returned graph.
+ // If 'artifacts', 'executions', or 'contexts' is specified in `read_mask`,
+ // the dehydrated nodes will be included.
+ // Note: A dehydrated node means a node containing only its id and no
+ // other information. User should call GetNodesByID or other APIs to get
+ // node details later on.
+ // If 'artifact_types', 'execution_types', or 'context_types' is specified
+ // in `read_mask`, all the node types will be included.
+ // If 'events' is specified in `read_mask`, the events will be included.
+ // If `read_mask` is not set, the API will return all the fields in
+ // the returned graph.
+ // Note: Only paths of fields in LineageGraph message are supported. Paths
+ // of fields in the submessage, such as "artifacts.id", "contexts.name" are
+ // not acknowledged.
+ ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=read_mask,json=readMask" json:"read_mask,omitempty"`
+ TransactionOptions *TransactionOptions `protobuf:"bytes,2,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
+}
+
+func (x *GetLineageSubgraphRequest) Reset() {
+ *x = GetLineageSubgraphRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[106]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetLineageSubgraphRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetLineageSubgraphRequest) ProtoMessage() {}
+
+func (x *GetLineageSubgraphRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[106]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetLineageSubgraphRequest.ProtoReflect.Descriptor instead.
+func (*GetLineageSubgraphRequest) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{106}
+}
+
+func (x *GetLineageSubgraphRequest) GetLineageSubgraphQueryOptions() *LineageSubgraphQueryOptions {
+ if x != nil {
+ return x.LineageSubgraphQueryOptions
+ }
+ return nil
+}
+
+func (x *GetLineageSubgraphRequest) GetReadMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.ReadMask
+ }
+ return nil
+}
+
+func (x *GetLineageSubgraphRequest) GetTransactionOptions() *TransactionOptions {
+ if x != nil {
+ return x.TransactionOptions
+ }
+ return nil
+}
+
+type GetLineageSubgraphResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A lineage subgraph of MLMD nodes and relations retrieved from lineage
+ // graph tracing.
+ LineageSubgraph *LineageGraph `protobuf:"bytes,1,opt,name=lineage_subgraph,json=lineageSubgraph" json:"lineage_subgraph,omitempty"`
+}
+
+func (x *GetLineageSubgraphResponse) Reset() {
+ *x = GetLineageSubgraphResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[107]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetLineageSubgraphResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetLineageSubgraphResponse) ProtoMessage() {}
+
+func (x *GetLineageSubgraphResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[107]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetLineageSubgraphResponse.ProtoReflect.Descriptor instead.
+func (*GetLineageSubgraphResponse) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{107}
+}
+
+func (x *GetLineageSubgraphResponse) GetLineageSubgraph() *LineageGraph {
+ if x != nil {
+ return x.LineageSubgraph
+ }
+ return nil
+}
+
+type PutArtifactsRequest_Options struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // When there are multiple writers to update an existing node to
+ // different states, there may be a race and the end result of the
+ // concurrent update is nondeterministic. If the field is set, then an
+ // optimistic concurrency control (OCC) scheme is used during update:
+ // it compares the `artifact`.`last_update_time_since_epoch` in the request
+ // with the stored `last_update_time_since_epoch` having the same
+ // `artifact`.`id`. If they are different, the request fails, and the user
+ // can read the stored node and retry node update.
+ // When the option is set, the timestamp after update is guaranteed to be
+ // increased and different from the input artifact.
+ // When set the option, the caller should set it for all concurrent writers.
+ AbortIfLatestUpdatedTimeChanged *bool `protobuf:"varint,1,opt,name=abort_if_latest_updated_time_changed,json=abortIfLatestUpdatedTimeChanged" json:"abort_if_latest_updated_time_changed,omitempty"`
+}
+
+func (x *PutArtifactsRequest_Options) Reset() {
+ *x = PutArtifactsRequest_Options{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[109]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutArtifactsRequest_Options) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutArtifactsRequest_Options) ProtoMessage() {}
+
+func (x *PutArtifactsRequest_Options) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[109]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutArtifactsRequest_Options.ProtoReflect.Descriptor instead.
+func (*PutArtifactsRequest_Options) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{4, 0}
+}
+
+func (x *PutArtifactsRequest_Options) GetAbortIfLatestUpdatedTimeChanged() bool {
+ if x != nil && x.AbortIfLatestUpdatedTimeChanged != nil {
+ return *x.AbortIfLatestUpdatedTimeChanged
+ }
+ return false
+}
+
+// A pair of an artifact and an event used or generated by an execution, e.g.,
+// during the execution run, it uses none or many artifacts as input, and
+// generate none or many artifacts as output.
+type PutExecutionRequest_ArtifactAndEvent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The pair may have an artifact. If present and no artifact.id is given,
+ // then it inserts the artifact, otherwise it updates the artifact.
+ Artifact *Artifact `protobuf:"bytes,1,opt,name=artifact" json:"artifact,omitempty"`
+ // The pair may have an event. Providing event.artifact_id or
+ // event.execution_id is optional. If the ids are given, it must align with
+ // the `artifact`.id / `execution`.id respectively. If artifact is not
+ // given and event.artifact_id is set, it must exist in the backend.
+ Event *Event `protobuf:"bytes,2,opt,name=event" json:"event,omitempty"`
+}
+
+func (x *PutExecutionRequest_ArtifactAndEvent) Reset() {
+ *x = PutExecutionRequest_ArtifactAndEvent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[110]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutExecutionRequest_ArtifactAndEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutExecutionRequest_ArtifactAndEvent) ProtoMessage() {}
+
+func (x *PutExecutionRequest_ArtifactAndEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[110]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutExecutionRequest_ArtifactAndEvent.ProtoReflect.Descriptor instead.
+func (*PutExecutionRequest_ArtifactAndEvent) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{14, 0}
+}
+
+func (x *PutExecutionRequest_ArtifactAndEvent) GetArtifact() *Artifact {
+ if x != nil {
+ return x.Artifact
+ }
+ return nil
+}
+
+func (x *PutExecutionRequest_ArtifactAndEvent) GetEvent() *Event {
+ if x != nil {
+ return x.Event
+ }
+ return nil
+}
+
+type PutExecutionRequest_Options struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // When there's a race to publish executions with a new context with the
+ // same context.name, by default there'll be one writer succeeds and
+ // the rest of the writers returning AlreadyExists errors. If set to true,
+ // the API will reuse the stored context in the transaction and perform
+ // an update.
+ ReuseContextIfAlreadyExist *bool `protobuf:"varint,1,opt,name=reuse_context_if_already_exist,json=reuseContextIfAlreadyExist" json:"reuse_context_if_already_exist,omitempty"`
+ // When there's a race to publish executions with a new artifact with the
+ // same artifact.external_id, by default there'll be one writer succeeds and
+ // the rest of the writers returning AlreadyExists errors.
+ // If set to true and an Artifact has non-empty external_id,
+ // the API will reuse the stored artifact in the transaction and
+ // perform an update. Otherwise, it will fall back to relying on `id` field
+ // to decide if it's update (if `id` exists) or insert (if `id` is empty).
+ ReuseArtifactIfAlreadyExistByExternalId *bool `protobuf:"varint,2,opt,name=reuse_artifact_if_already_exist_by_external_id,json=reuseArtifactIfAlreadyExistByExternalId" json:"reuse_artifact_if_already_exist_by_external_id,omitempty"`
+}
+
+func (x *PutExecutionRequest_Options) Reset() {
+ *x = PutExecutionRequest_Options{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[111]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutExecutionRequest_Options) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutExecutionRequest_Options) ProtoMessage() {}
+
+func (x *PutExecutionRequest_Options) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[111]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutExecutionRequest_Options.ProtoReflect.Descriptor instead.
+func (*PutExecutionRequest_Options) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{14, 1}
+}
+
+func (x *PutExecutionRequest_Options) GetReuseContextIfAlreadyExist() bool {
+ if x != nil && x.ReuseContextIfAlreadyExist != nil {
+ return *x.ReuseContextIfAlreadyExist
+ }
+ return false
+}
+
+func (x *PutExecutionRequest_Options) GetReuseArtifactIfAlreadyExistByExternalId() bool {
+ if x != nil && x.ReuseArtifactIfAlreadyExistByExternalId != nil {
+ return *x.ReuseArtifactIfAlreadyExistByExternalId
+ }
+ return false
+}
+
+type PutLineageSubgraphRequest_EventEdge struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Index in the array of executions.
+ ExecutionIndex *int32 `protobuf:"varint,1,opt,name=execution_index,json=executionIndex" json:"execution_index,omitempty"`
+ // Index in the array of artifacts.
+ ArtifactIndex *int32 `protobuf:"varint,2,opt,name=artifact_index,json=artifactIndex" json:"artifact_index,omitempty"`
+ Event *Event `protobuf:"bytes,3,opt,name=event" json:"event,omitempty"`
+}
+
+func (x *PutLineageSubgraphRequest_EventEdge) Reset() {
+ *x = PutLineageSubgraphRequest_EventEdge{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[112]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutLineageSubgraphRequest_EventEdge) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutLineageSubgraphRequest_EventEdge) ProtoMessage() {}
+
+func (x *PutLineageSubgraphRequest_EventEdge) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[112]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutLineageSubgraphRequest_EventEdge.ProtoReflect.Descriptor instead.
+func (*PutLineageSubgraphRequest_EventEdge) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{16, 0}
+}
+
+func (x *PutLineageSubgraphRequest_EventEdge) GetExecutionIndex() int32 {
+ if x != nil && x.ExecutionIndex != nil {
+ return *x.ExecutionIndex
+ }
+ return 0
+}
+
+func (x *PutLineageSubgraphRequest_EventEdge) GetArtifactIndex() int32 {
+ if x != nil && x.ArtifactIndex != nil {
+ return *x.ArtifactIndex
+ }
+ return 0
+}
+
+func (x *PutLineageSubgraphRequest_EventEdge) GetEvent() *Event {
+ if x != nil {
+ return x.Event
+ }
+ return nil
+}
+
+type PutLineageSubgraphRequest_Options struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // When there's a race to publish executions with a new context with the
+ // same context.name, by default there'll be one writer succeeds and
+ // the rest of the writers returning AlreadyExists errors. If set to true,
+ // the API will reuse the stored context in the transaction and perform
+ // an update.
+ ReuseContextIfAlreadyExist *bool `protobuf:"varint,1,opt,name=reuse_context_if_already_exist,json=reuseContextIfAlreadyExist" json:"reuse_context_if_already_exist,omitempty"`
+ // When there's a race to publish executions with a new artifact with the
+ // same artifact.external_id, by default there'll be one writer succeeds and
+ // the rest of the writers returning AlreadyExists errors.
+ // If set to true and an Artifact has non-empty external_id,
+ // the API will reuse the stored artifact in the transaction and
+ // perform an update. Otherwise, it will fall back to relying on `id` field
+ // to decide if it's update (if `id` exists) or insert (if `id` is empty).
+ ReuseArtifactIfAlreadyExistByExternalId *bool `protobuf:"varint,2,opt,name=reuse_artifact_if_already_exist_by_external_id,json=reuseArtifactIfAlreadyExistByExternalId" json:"reuse_artifact_if_already_exist_by_external_id,omitempty"`
+}
+
+func (x *PutLineageSubgraphRequest_Options) Reset() {
+ *x = PutLineageSubgraphRequest_Options{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[113]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PutLineageSubgraphRequest_Options) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PutLineageSubgraphRequest_Options) ProtoMessage() {}
+
+func (x *PutLineageSubgraphRequest_Options) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[113]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PutLineageSubgraphRequest_Options.ProtoReflect.Descriptor instead.
+func (*PutLineageSubgraphRequest_Options) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{16, 1}
+}
+
+func (x *PutLineageSubgraphRequest_Options) GetReuseContextIfAlreadyExist() bool {
+ if x != nil && x.ReuseContextIfAlreadyExist != nil {
+ return *x.ReuseContextIfAlreadyExist
+ }
+ return false
+}
+
+func (x *PutLineageSubgraphRequest_Options) GetReuseArtifactIfAlreadyExistByExternalId() bool {
+ if x != nil && x.ReuseArtifactIfAlreadyExistByExternalId != nil {
+ return *x.ReuseArtifactIfAlreadyExistByExternalId
+ }
+ return false
+}
+
+type GetParentContextsByContextsResponse_ParentContextsPerChild struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ParentContexts []*Context `protobuf:"bytes,1,rep,name=parent_contexts,json=parentContexts" json:"parent_contexts,omitempty"`
+}
+
+func (x *GetParentContextsByContextsResponse_ParentContextsPerChild) Reset() {
+ *x = GetParentContextsByContextsResponse_ParentContextsPerChild{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[114]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetParentContextsByContextsResponse_ParentContextsPerChild) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetParentContextsByContextsResponse_ParentContextsPerChild) ProtoMessage() {}
+
+func (x *GetParentContextsByContextsResponse_ParentContextsPerChild) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[114]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetParentContextsByContextsResponse_ParentContextsPerChild.ProtoReflect.Descriptor instead.
+func (*GetParentContextsByContextsResponse_ParentContextsPerChild) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{97, 0}
+}
+
+func (x *GetParentContextsByContextsResponse_ParentContextsPerChild) GetParentContexts() []*Context {
+ if x != nil {
+ return x.ParentContexts
+ }
+ return nil
+}
+
+type GetChildrenContextsByContextsResponse_ChildrenContextsPerParent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ChildrenContexts []*Context `protobuf:"bytes,1,rep,name=children_contexts,json=childrenContexts" json:"children_contexts,omitempty"`
+}
+
+func (x *GetChildrenContextsByContextsResponse_ChildrenContextsPerParent) Reset() {
+ *x = GetChildrenContextsByContextsResponse_ChildrenContextsPerParent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[116]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetChildrenContextsByContextsResponse_ChildrenContextsPerParent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetChildrenContextsByContextsResponse_ChildrenContextsPerParent) ProtoMessage() {}
+
+func (x *GetChildrenContextsByContextsResponse_ChildrenContextsPerParent) ProtoReflect() protoreflect.Message {
+ mi := &file_ml_metadata_proto_metadata_store_service_proto_msgTypes[116]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetChildrenContextsByContextsResponse_ChildrenContextsPerParent.ProtoReflect.Descriptor instead.
+func (*GetChildrenContextsByContextsResponse_ChildrenContextsPerParent) Descriptor() ([]byte, []int) {
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP(), []int{99, 0}
+}
+
+func (x *GetChildrenContextsByContextsResponse_ChildrenContextsPerParent) GetChildrenContexts() []*Context {
+ if x != nil {
+ return x.ChildrenContexts
+ }
+ return nil
+}
+
+var File_ml_metadata_proto_metadata_store_service_proto protoreflect.FileDescriptor
+
+var file_ml_metadata_proto_metadata_store_service_proto_rawDesc = []byte{
+ 0x0a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x0b, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x20, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x26, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x6f, 0x72,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x0f, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x2d, 0x0a,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xbf, 0x01, 0x0a,
+ 0x11, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d,
+ 0x61, 0x70, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
+ 0x65, 0x73, 0x1a, 0x5a, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4d,
+ 0x0a, 0x12, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
+ 0x4c, 0x69, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xc0, 0x01,
+ 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
+ 0x12, 0x3a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65,
+ 0x48, 0x00, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x03,
+ 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70,
+ 0x12, 0x35, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x48,
+ 0x00, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0xf7, 0x02, 0x0a, 0x13, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x42, 0x0a,
+ 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74,
+ 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61,
+ 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
+ 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,
+ 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
+ 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b,
+ 0x1a, 0x58, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x24, 0x61,
+ 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x66, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e,
+ 0x67, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x61, 0x62, 0x6f, 0x72, 0x74,
+ 0x49, 0x66, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54,
+ 0x69, 0x6d, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x39, 0x0a, 0x14, 0x50, 0x75,
+ 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69,
+ 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x49, 0x64, 0x73, 0x22, 0xdc, 0x02, 0x0a, 0x16, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79,
+ 0x70, 0x65, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x61, 0x6e, 0x41, 0x64, 0x64,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x5f, 0x6f, 0x6d,
+ 0x69, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0d, 0x63, 0x61, 0x6e, 0x4f, 0x6d, 0x69, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x2e,
+ 0x0a, 0x11, 0x63, 0x61, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65,
+ 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x63,
+ 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x32,
+ 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x42, 0x02,
+ 0x18, 0x01, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x32, 0x0a, 0x17, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x17, 0x0a, 0x07, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x14, 0x50, 0x75, 0x74,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3c, 0x0a, 0x15, 0x50, 0x75, 0x74, 0x45,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
+ 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x22, 0xe0, 0x02, 0x0a, 0x17, 0x50, 0x75, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x5f, 0x61, 0x64, 0x64,
+ 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63,
+ 0x61, 0x6e, 0x41, 0x64, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x63,
+ 0x61, 0x6e, 0x5f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x4f, 0x6d, 0x69, 0x74, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x11, 0x63, 0x61, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02,
+ 0x18, 0x01, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74,
+ 0x72, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x46, 0x69, 0x65, 0x6c,
+ 0x64, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x33, 0x0a, 0x18, 0x50, 0x75, 0x74,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0x90,
+ 0x01, 0x0a, 0x10, 0x50, 0x75, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12,
+ 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0x13, 0x0a, 0x11, 0x50, 0x75, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x05, 0x0a, 0x13, 0x50, 0x75, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34,
+ 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x14, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x50, 0x75, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x6e, 0x64,
+ 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x45,
+ 0x76, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x42, 0x0a, 0x07, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
+ 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x1a, 0x6f, 0x0a, 0x10, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x6e, 0x64,
+ 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x08,
+ 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e,
+ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65,
+ 0x6e, 0x74, 0x1a, 0xae, 0x01, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42,
+ 0x0a, 0x1e, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f,
+ 0x69, 0x66, 0x5f, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x49, 0x66, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69,
+ 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x2e, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x61, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x66, 0x5f, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f,
+ 0x65, 0x78, 0x69, 0x73, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x27, 0x72, 0x65, 0x75, 0x73,
+ 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x66, 0x41, 0x6c, 0x72, 0x65, 0x61,
+ 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x49, 0x64, 0x22, 0x7d, 0x0a, 0x14, 0x50, 0x75, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21,
+ 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64,
+ 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x73,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49,
+ 0x64, 0x73, 0x22, 0xe2, 0x05, 0x0a, 0x19, 0x50, 0x75, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67,
+ 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x30, 0x0a,
+ 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12,
+ 0x51, 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x04,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62,
+ 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x67,
+ 0x65, 0x73, 0x12, 0x48, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x50, 0x75, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67,
+ 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x85,
+ 0x01, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f,
+ 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x28, 0x0a, 0x05,
+ 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,
+ 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0xae, 0x01, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x1e, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x5f, 0x69, 0x66, 0x5f, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x65,
+ 0x78, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x75, 0x73,
+ 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x66, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64,
+ 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x2e, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f,
+ 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x66, 0x5f, 0x61, 0x6c, 0x72, 0x65,
+ 0x61, 0x64, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x65, 0x78, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x27,
+ 0x72, 0x65, 0x75, 0x73, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x66, 0x41,
+ 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x42, 0x79, 0x45, 0x78, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x1a, 0x50, 0x75, 0x74, 0x4c,
+ 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10,
+ 0x01, 0x52, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12,
+ 0x25, 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x01, 0x52,
+ 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x73, 0x22, 0xdb, 0x03, 0x0a, 0x0f,
+ 0x50, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x40, 0x0a, 0x0e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79,
+ 0x70, 0x65, 0x52, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65,
+ 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x5f, 0x61, 0x64, 0x64,
+ 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63,
+ 0x61, 0x6e, 0x41, 0x64, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x63,
+ 0x61, 0x6e, 0x5f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x4f, 0x6d, 0x69, 0x74, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x11, 0x63, 0x61, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02,
+ 0x18, 0x01, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74,
+ 0x72, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x46, 0x69, 0x65, 0x6c,
+ 0x64, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x10, 0x50, 0x75,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a,
+ 0x0a, 0x11, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
+ 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0f, 0x61, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x73,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03,
+ 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x49,
+ 0x64, 0x73, 0x22, 0xd8, 0x02, 0x0a, 0x15, 0x50, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x0c,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x61, 0x6e,
+ 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0c, 0x63, 0x61, 0x6e, 0x41, 0x64, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12,
+ 0x26, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x5f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x4f, 0x6d, 0x69,
+ 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x11, 0x63, 0x61, 0x6e, 0x5f, 0x64,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x5f, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x61, 0x6c, 0x6c,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x13, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x31, 0x0a,
+ 0x16, 0x50, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x79, 0x70, 0x65, 0x5f,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64,
+ 0x22, 0xd5, 0x01, 0x0a, 0x12, 0x50, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52,
+ 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x36, 0x0a, 0x13, 0x50, 0x75, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x73,
+ 0x22, 0xf5, 0x01, 0x0a, 0x25, 0x50, 0x75, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x41, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x61, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x18, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x6f,
+ 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x73,
+ 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x28, 0x0a, 0x26, 0x50, 0x75, 0x74, 0x41,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x41, 0x6e, 0x64, 0x41, 0x73,
+ 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x18, 0x50, 0x75, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x43, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x50, 0x75, 0x74, 0x50, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21,
+ 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50,
+ 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x22, 0x79, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73,
+ 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33,
+ 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65,
+ 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65,
+ 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd8, 0x01, 0x0a, 0x1f,
+ 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x54, 0x79, 0x70,
+ 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c,
+ 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+ 0x23, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x55, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61,
+ 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x22, 0xcd, 0x01,
+ 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79,
+ 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52,
+ 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x3d, 0x0a, 0x17,
+ 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66,
+ 0x61, 0x6c, 0x73, 0x65, 0x52, 0x15, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x41, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x91, 0x01,
+ 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79,
+ 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12,
+ 0x40, 0x0a, 0x0e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79,
+ 0x70, 0x65, 0x52, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65,
+ 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x73, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x33, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
+ 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x86, 0x01,
+ 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79,
+ 0x55, 0x52, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72,
+ 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x69, 0x73, 0x12, 0x50,
+ 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x50, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x55, 0x52, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50,
+ 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x22, 0x77, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x65,
+ 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74,
+ 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xaa, 0x01, 0x0a, 0x16, 0x47, 0x65,
+ 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x59, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79,
+ 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x22, 0x6b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x13,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5c,
+ 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x61,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x6c, 0x0a, 0x18,
+ 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x60, 0x0a, 0x19, 0x47, 0x65,
+ 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x65, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x6a, 0x0a, 0x16,
+ 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x58, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x58, 0x0a, 0x21,
+ 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78,
+ 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e,
+ 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c,
+ 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12,
+ 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0x5c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
+ 0x96, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42,
+ 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f,
+ 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x54, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x22, 0x9b,
+ 0x01, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79,
+ 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x69, 0x0a, 0x25,
+ 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73,
+ 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x45,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6d, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65,
+ 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79,
+ 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a,
+ 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73,
+ 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e,
+ 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x22, 0x65, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49,
+ 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xeb, 0x01, 0x0a, 0x1a, 0x47, 0x65,
+ 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65,
+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70,
+ 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x79, 0x70,
+ 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26,
+ 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67,
+ 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xdb, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64,
+ 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74,
+ 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+ 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65,
+ 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+ 0x74, 0x79, 0x70, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x65,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61,
+ 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x59, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x65, 0x78, 0x65,
+ 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22,
+ 0x91, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d,
+ 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64,
+ 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61,
+ 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
+ 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x22, 0x53, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65,
+ 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x65, 0x63,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52,
+ 0x0c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a,
+ 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
+ 0x4d, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x94,
+ 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x41, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4c, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e,
+ 0x74, 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x44, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65,
+ 0x6e, 0x74, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x73, 0x12, 0x50,
+ 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x22, 0x60, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x52, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x73, 0x12, 0x50,
+ 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x22, 0x64, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a,
+ 0x0c, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e,
+ 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x22, 0x55, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0c,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1a, 0x47, 0x65,
+ 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49,
+ 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65,
+ 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65,
+ 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5c, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79,
+ 0x70, 0x65, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6f, 0x0a, 0x13, 0x47, 0x65, 0x74,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78,
+ 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xe9, 0x01, 0x0a, 0x18, 0x47,
+ 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x75, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
+ 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd5, 0x01,
+ 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x79, 0x54, 0x79,
+ 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a,
+ 0x0c, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4e,
+ 0x61, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x51, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52,
+ 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69,
+ 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x51, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x1d, 0x47,
+ 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x65, 0x63,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c,
+ 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
+ 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0x52, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
+ 0x42, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x56, 0x0a, 0x22,
+ 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c,
+ 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x13, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x58, 0x0a,
+ 0x24, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23,
+ 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe1, 0x02, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a,
+ 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x3e, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65,
+ 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42,
+ 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x1a, 0x57, 0x0a, 0x16, 0x50, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x50, 0x65, 0x72, 0x43, 0x68,
+ 0x69, 0x6c, 0x64, 0x12, 0x3d, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x73, 0x1a, 0x84, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x45,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x5d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x50, 0x65, 0x72, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9d, 0x01, 0x0a, 0x24, 0x47, 0x65,
+ 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf1, 0x02, 0x0a, 0x25, 0x47, 0x65,
+ 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x1a, 0x5e, 0x0a, 0x19, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x50, 0x65, 0x72, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x41,
+ 0x0a, 0x11, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52,
+ 0x10, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x1a, 0x89, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x62, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x50, 0x65, 0x72, 0x50, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcc, 0x01,
+ 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d,
+ 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a,
+ 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7c, 0x0a, 0x1d,
+ 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a,
+ 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x15, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78,
+ 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xcd, 0x01, 0x0a, 0x1d, 0x47,
+ 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f,
+ 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
+ 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x1e, 0x47,
+ 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a,
+ 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
+ 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x50, 0x0a,
+ 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
+ 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x47, 0x72,
+ 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x07, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67,
+ 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x13, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x50, 0x0a,
+ 0x17, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x67,
+ 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65,
+ 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x08, 0x73, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x22,
+ 0x95, 0x02, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75,
+ 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6d, 0x0a,
+ 0x1e, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70,
+ 0x68, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72,
+ 0x61, 0x70, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
+ 0x1b, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68,
+ 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x09,
+ 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x72, 0x65, 0x61,
+ 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x50, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x62, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4c, 0x69,
+ 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x10, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65,
+ 0x5f, 0x73, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69,
+ 0x6e, 0x65, 0x61, 0x67, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x0f, 0x6c, 0x69, 0x6e, 0x65,
+ 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x32, 0x96, 0x2c, 0x0a, 0x14,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0f, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x41, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x10, 0x50, 0x75, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x08, 0x50, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73,
+ 0x12, 0x1c, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50,
+ 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+ 0x55, 0x0a, 0x0c, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12,
+ 0x20, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75,
+ 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x50, 0x75, 0x74, 0x45, 0x78, 0x65,
+ 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x45, 0x78, 0x65, 0x63,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
+ 0x12, 0x4c, 0x0a, 0x09, 0x50, 0x75, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x45,
+ 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x45, 0x76,
+ 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55,
+ 0x0a, 0x0c, 0x50, 0x75, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50,
+ 0x75, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x12, 0x50, 0x75, 0x74, 0x4c, 0x69, 0x6e, 0x65,
+ 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x26, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x4c, 0x69, 0x6e,
+ 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x50, 0x75, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67,
+ 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52,
+ 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x1f, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x00, 0x12, 0x8b, 0x01, 0x0a, 0x1e, 0x50, 0x75, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x41, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x41, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x41, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
+ 0x12, 0x64, 0x0a, 0x11, 0x50, 0x75, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74,
+ 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x28,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74,
+ 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49,
+ 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65,
+ 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x15, 0x47,
+ 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73,
+ 0x42, 0x79, 0x49, 0x44, 0x12, 0x29, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54,
+ 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x2a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65,
+ 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42,
+ 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a,
+ 0x11, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
+ 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
+ 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79,
+ 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
+ 0x12, 0x6a, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79,
+ 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x27, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x28, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47,
+ 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79,
+ 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0f,
+ 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12,
+ 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65,
+ 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0c,
+ 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72,
+ 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74,
+ 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a,
+ 0x0b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x00, 0x12, 0x61, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73,
+ 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x26, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47,
+ 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x44,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0f, 0x47, 0x65,
+ 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x23, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x49, 0x44,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x12, 0x47, 0x65,
+ 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x26, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47,
+ 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42,
+ 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+ 0x64, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79,
+ 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79,
+ 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69,
+ 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x2c, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x54, 0x79, 0x70,
+ 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65,
+ 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41,
+ 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
+ 0x12, 0x7c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45,
+ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e,
+ 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64,
+ 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76,
+ 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x79, 0x54, 0x79,
+ 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42,
+ 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x55, 0x52, 0x49, 0x12, 0x25, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x55, 0x52, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x55,
+ 0x52, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x17,
+ 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75,
+ 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42,
+ 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74,
+ 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2a,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74,
+ 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x6c, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e,
+ 0x74, 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x44, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x19, 0x47, 0x65, 0x74,
+ 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73,
+ 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e,
+ 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x2e, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x49, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79,
+ 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78,
+ 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x00, 0x12, 0x88, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e,
+ 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x31, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54,
+ 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8b,
+ 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54,
+ 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64,
+ 0x73, 0x12, 0x32, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
+ 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49,
+ 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x85, 0x01, 0x0a,
+ 0x1c, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73,
+ 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x30, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45, 0x78, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x31, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65,
+ 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x45,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x29, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x73, 0x42, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x2a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47,
+ 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x65, 0x63,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x1a, 0x47,
+ 0x65, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
+ 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2e, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x85, 0x01, 0x0a,
+ 0x1c, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x30, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43,
+ 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42,
+ 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x31, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65,
+ 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x88, 0x01, 0x0a, 0x1d, 0x47, 0x65,
+ 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x6d, 0x6c,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69,
+ 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x79, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74,
+ 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
+ 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x29, 0x2e,
+ 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41,
+ 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
+ 0x63, 0x74, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65,
+ 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x12, 0x2a, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47,
+ 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d,
+ 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78,
+ 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0f, 0x47,
+ 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x23,
+ 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74,
+ 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x47, 0x72, 0x61, 0x70,
+ 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x12, 0x47,
+ 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70,
+ 0x68, 0x12, 0x26, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61,
+ 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x6c, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61,
+ 0x67, 0x65, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x68, 0x75, 0x62, 0x2d, 0x69,
+ 0x6f, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6d, 0x6c, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+}
+
+var (
+ file_ml_metadata_proto_metadata_store_service_proto_rawDescOnce sync.Once
+ file_ml_metadata_proto_metadata_store_service_proto_rawDescData = file_ml_metadata_proto_metadata_store_service_proto_rawDesc
+)
+
+func file_ml_metadata_proto_metadata_store_service_proto_rawDescGZIP() []byte {
+ file_ml_metadata_proto_metadata_store_service_proto_rawDescOnce.Do(func() {
+ file_ml_metadata_proto_metadata_store_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_ml_metadata_proto_metadata_store_service_proto_rawDescData)
+ })
+ return file_ml_metadata_proto_metadata_store_service_proto_rawDescData
+}
+
+var file_ml_metadata_proto_metadata_store_service_proto_msgTypes = make([]protoimpl.MessageInfo, 118)
+var file_ml_metadata_proto_metadata_store_service_proto_goTypes = []interface{}{
+ (*ArtifactAndType)(nil), // 0: ml_metadata.ArtifactAndType
+ (*ArtifactStructMap)(nil), // 1: ml_metadata.ArtifactStructMap
+ (*ArtifactStructList)(nil), // 2: ml_metadata.ArtifactStructList
+ (*ArtifactStruct)(nil), // 3: ml_metadata.ArtifactStruct
+ (*PutArtifactsRequest)(nil), // 4: ml_metadata.PutArtifactsRequest
+ (*PutArtifactsResponse)(nil), // 5: ml_metadata.PutArtifactsResponse
+ (*PutArtifactTypeRequest)(nil), // 6: ml_metadata.PutArtifactTypeRequest
+ (*PutArtifactTypeResponse)(nil), // 7: ml_metadata.PutArtifactTypeResponse
+ (*PutExecutionsRequest)(nil), // 8: ml_metadata.PutExecutionsRequest
+ (*PutExecutionsResponse)(nil), // 9: ml_metadata.PutExecutionsResponse
+ (*PutExecutionTypeRequest)(nil), // 10: ml_metadata.PutExecutionTypeRequest
+ (*PutExecutionTypeResponse)(nil), // 11: ml_metadata.PutExecutionTypeResponse
+ (*PutEventsRequest)(nil), // 12: ml_metadata.PutEventsRequest
+ (*PutEventsResponse)(nil), // 13: ml_metadata.PutEventsResponse
+ (*PutExecutionRequest)(nil), // 14: ml_metadata.PutExecutionRequest
+ (*PutExecutionResponse)(nil), // 15: ml_metadata.PutExecutionResponse
+ (*PutLineageSubgraphRequest)(nil), // 16: ml_metadata.PutLineageSubgraphRequest
+ (*PutLineageSubgraphResponse)(nil), // 17: ml_metadata.PutLineageSubgraphResponse
+ (*PutTypesRequest)(nil), // 18: ml_metadata.PutTypesRequest
+ (*PutTypesResponse)(nil), // 19: ml_metadata.PutTypesResponse
+ (*PutContextTypeRequest)(nil), // 20: ml_metadata.PutContextTypeRequest
+ (*PutContextTypeResponse)(nil), // 21: ml_metadata.PutContextTypeResponse
+ (*PutContextsRequest)(nil), // 22: ml_metadata.PutContextsRequest
+ (*PutContextsResponse)(nil), // 23: ml_metadata.PutContextsResponse
+ (*PutAttributionsAndAssociationsRequest)(nil), // 24: ml_metadata.PutAttributionsAndAssociationsRequest
+ (*PutAttributionsAndAssociationsResponse)(nil), // 25: ml_metadata.PutAttributionsAndAssociationsResponse
+ (*PutParentContextsRequest)(nil), // 26: ml_metadata.PutParentContextsRequest
+ (*PutParentContextsResponse)(nil), // 27: ml_metadata.PutParentContextsResponse
+ (*GetArtifactsByTypeRequest)(nil), // 28: ml_metadata.GetArtifactsByTypeRequest
+ (*GetArtifactsByTypeResponse)(nil), // 29: ml_metadata.GetArtifactsByTypeResponse
+ (*GetArtifactByTypeAndNameRequest)(nil), // 30: ml_metadata.GetArtifactByTypeAndNameRequest
+ (*GetArtifactByTypeAndNameResponse)(nil), // 31: ml_metadata.GetArtifactByTypeAndNameResponse
+ (*GetArtifactsByIDRequest)(nil), // 32: ml_metadata.GetArtifactsByIDRequest
+ (*GetArtifactsByIDResponse)(nil), // 33: ml_metadata.GetArtifactsByIDResponse
+ (*GetArtifactsRequest)(nil), // 34: ml_metadata.GetArtifactsRequest
+ (*GetArtifactsResponse)(nil), // 35: ml_metadata.GetArtifactsResponse
+ (*GetArtifactsByURIRequest)(nil), // 36: ml_metadata.GetArtifactsByURIRequest
+ (*GetArtifactsByURIResponse)(nil), // 37: ml_metadata.GetArtifactsByURIResponse
+ (*GetExecutionsRequest)(nil), // 38: ml_metadata.GetExecutionsRequest
+ (*GetExecutionsResponse)(nil), // 39: ml_metadata.GetExecutionsResponse
+ (*GetArtifactTypeRequest)(nil), // 40: ml_metadata.GetArtifactTypeRequest
+ (*GetArtifactTypeResponse)(nil), // 41: ml_metadata.GetArtifactTypeResponse
+ (*GetArtifactTypesRequest)(nil), // 42: ml_metadata.GetArtifactTypesRequest
+ (*GetArtifactTypesResponse)(nil), // 43: ml_metadata.GetArtifactTypesResponse
+ (*GetExecutionTypesRequest)(nil), // 44: ml_metadata.GetExecutionTypesRequest
+ (*GetExecutionTypesResponse)(nil), // 45: ml_metadata.GetExecutionTypesResponse
+ (*GetContextTypesRequest)(nil), // 46: ml_metadata.GetContextTypesRequest
+ (*GetContextTypesResponse)(nil), // 47: ml_metadata.GetContextTypesResponse
+ (*GetArtifactsByExternalIdsRequest)(nil), // 48: ml_metadata.GetArtifactsByExternalIdsRequest
+ (*GetArtifactsByExternalIdsResponse)(nil), // 49: ml_metadata.GetArtifactsByExternalIdsResponse
+ (*GetExecutionsByExternalIdsRequest)(nil), // 50: ml_metadata.GetExecutionsByExternalIdsRequest
+ (*GetExecutionsByExternalIdsResponse)(nil), // 51: ml_metadata.GetExecutionsByExternalIdsResponse
+ (*GetContextsByExternalIdsRequest)(nil), // 52: ml_metadata.GetContextsByExternalIdsRequest
+ (*GetContextsByExternalIdsResponse)(nil), // 53: ml_metadata.GetContextsByExternalIdsResponse
+ (*GetArtifactTypesByExternalIdsRequest)(nil), // 54: ml_metadata.GetArtifactTypesByExternalIdsRequest
+ (*GetArtifactTypesByExternalIdsResponse)(nil), // 55: ml_metadata.GetArtifactTypesByExternalIdsResponse
+ (*GetExecutionTypesByExternalIdsRequest)(nil), // 56: ml_metadata.GetExecutionTypesByExternalIdsRequest
+ (*GetExecutionTypesByExternalIdsResponse)(nil), // 57: ml_metadata.GetExecutionTypesByExternalIdsResponse
+ (*GetContextTypesByExternalIdsRequest)(nil), // 58: ml_metadata.GetContextTypesByExternalIdsRequest
+ (*GetContextTypesByExternalIdsResponse)(nil), // 59: ml_metadata.GetContextTypesByExternalIdsResponse
+ (*GetExecutionsByTypeRequest)(nil), // 60: ml_metadata.GetExecutionsByTypeRequest
+ (*GetExecutionsByTypeResponse)(nil), // 61: ml_metadata.GetExecutionsByTypeResponse
+ (*GetExecutionByTypeAndNameRequest)(nil), // 62: ml_metadata.GetExecutionByTypeAndNameRequest
+ (*GetExecutionByTypeAndNameResponse)(nil), // 63: ml_metadata.GetExecutionByTypeAndNameResponse
+ (*GetExecutionsByIDRequest)(nil), // 64: ml_metadata.GetExecutionsByIDRequest
+ (*GetExecutionsByIDResponse)(nil), // 65: ml_metadata.GetExecutionsByIDResponse
+ (*GetExecutionTypeRequest)(nil), // 66: ml_metadata.GetExecutionTypeRequest
+ (*GetExecutionTypeResponse)(nil), // 67: ml_metadata.GetExecutionTypeResponse
+ (*GetEventsByExecutionIDsRequest)(nil), // 68: ml_metadata.GetEventsByExecutionIDsRequest
+ (*GetEventsByExecutionIDsResponse)(nil), // 69: ml_metadata.GetEventsByExecutionIDsResponse
+ (*GetEventsByArtifactIDsRequest)(nil), // 70: ml_metadata.GetEventsByArtifactIDsRequest
+ (*GetEventsByArtifactIDsResponse)(nil), // 71: ml_metadata.GetEventsByArtifactIDsResponse
+ (*GetArtifactTypesByIDRequest)(nil), // 72: ml_metadata.GetArtifactTypesByIDRequest
+ (*GetArtifactTypesByIDResponse)(nil), // 73: ml_metadata.GetArtifactTypesByIDResponse
+ (*GetExecutionTypesByIDRequest)(nil), // 74: ml_metadata.GetExecutionTypesByIDRequest
+ (*GetExecutionTypesByIDResponse)(nil), // 75: ml_metadata.GetExecutionTypesByIDResponse
+ (*GetContextTypeRequest)(nil), // 76: ml_metadata.GetContextTypeRequest
+ (*GetContextTypeResponse)(nil), // 77: ml_metadata.GetContextTypeResponse
+ (*GetContextTypesByIDRequest)(nil), // 78: ml_metadata.GetContextTypesByIDRequest
+ (*GetContextTypesByIDResponse)(nil), // 79: ml_metadata.GetContextTypesByIDResponse
+ (*GetContextsRequest)(nil), // 80: ml_metadata.GetContextsRequest
+ (*GetContextsResponse)(nil), // 81: ml_metadata.GetContextsResponse
+ (*GetContextsByTypeRequest)(nil), // 82: ml_metadata.GetContextsByTypeRequest
+ (*GetContextsByTypeResponse)(nil), // 83: ml_metadata.GetContextsByTypeResponse
+ (*GetContextByTypeAndNameRequest)(nil), // 84: ml_metadata.GetContextByTypeAndNameRequest
+ (*GetContextByTypeAndNameResponse)(nil), // 85: ml_metadata.GetContextByTypeAndNameResponse
+ (*GetContextsByIDRequest)(nil), // 86: ml_metadata.GetContextsByIDRequest
+ (*GetContextsByIDResponse)(nil), // 87: ml_metadata.GetContextsByIDResponse
+ (*GetContextsByArtifactRequest)(nil), // 88: ml_metadata.GetContextsByArtifactRequest
+ (*GetContextsByArtifactResponse)(nil), // 89: ml_metadata.GetContextsByArtifactResponse
+ (*GetContextsByExecutionRequest)(nil), // 90: ml_metadata.GetContextsByExecutionRequest
+ (*GetContextsByExecutionResponse)(nil), // 91: ml_metadata.GetContextsByExecutionResponse
+ (*GetParentContextsByContextRequest)(nil), // 92: ml_metadata.GetParentContextsByContextRequest
+ (*GetParentContextsByContextResponse)(nil), // 93: ml_metadata.GetParentContextsByContextResponse
+ (*GetChildrenContextsByContextRequest)(nil), // 94: ml_metadata.GetChildrenContextsByContextRequest
+ (*GetChildrenContextsByContextResponse)(nil), // 95: ml_metadata.GetChildrenContextsByContextResponse
+ (*GetParentContextsByContextsRequest)(nil), // 96: ml_metadata.GetParentContextsByContextsRequest
+ (*GetParentContextsByContextsResponse)(nil), // 97: ml_metadata.GetParentContextsByContextsResponse
+ (*GetChildrenContextsByContextsRequest)(nil), // 98: ml_metadata.GetChildrenContextsByContextsRequest
+ (*GetChildrenContextsByContextsResponse)(nil), // 99: ml_metadata.GetChildrenContextsByContextsResponse
+ (*GetArtifactsByContextRequest)(nil), // 100: ml_metadata.GetArtifactsByContextRequest
+ (*GetArtifactsByContextResponse)(nil), // 101: ml_metadata.GetArtifactsByContextResponse
+ (*GetExecutionsByContextRequest)(nil), // 102: ml_metadata.GetExecutionsByContextRequest
+ (*GetExecutionsByContextResponse)(nil), // 103: ml_metadata.GetExecutionsByContextResponse
+ (*GetLineageGraphRequest)(nil), // 104: ml_metadata.GetLineageGraphRequest
+ (*GetLineageGraphResponse)(nil), // 105: ml_metadata.GetLineageGraphResponse
+ (*GetLineageSubgraphRequest)(nil), // 106: ml_metadata.GetLineageSubgraphRequest
+ (*GetLineageSubgraphResponse)(nil), // 107: ml_metadata.GetLineageSubgraphResponse
+ nil, // 108: ml_metadata.ArtifactStructMap.PropertiesEntry
+ (*PutArtifactsRequest_Options)(nil), // 109: ml_metadata.PutArtifactsRequest.Options
+ (*PutExecutionRequest_ArtifactAndEvent)(nil), // 110: ml_metadata.PutExecutionRequest.ArtifactAndEvent
+ (*PutExecutionRequest_Options)(nil), // 111: ml_metadata.PutExecutionRequest.Options
+ (*PutLineageSubgraphRequest_EventEdge)(nil), // 112: ml_metadata.PutLineageSubgraphRequest.EventEdge
+ (*PutLineageSubgraphRequest_Options)(nil), // 113: ml_metadata.PutLineageSubgraphRequest.Options
+ (*GetParentContextsByContextsResponse_ParentContextsPerChild)(nil), // 114: ml_metadata.GetParentContextsByContextsResponse.ParentContextsPerChild
+ nil, // 115: ml_metadata.GetParentContextsByContextsResponse.ContextsEntry
+ (*GetChildrenContextsByContextsResponse_ChildrenContextsPerParent)(nil), // 116: ml_metadata.GetChildrenContextsByContextsResponse.ChildrenContextsPerParent
+ nil, // 117: ml_metadata.GetChildrenContextsByContextsResponse.ContextsEntry
+ (*Artifact)(nil), // 118: ml_metadata.Artifact
+ (*ArtifactType)(nil), // 119: ml_metadata.ArtifactType
+ (*TransactionOptions)(nil), // 120: ml_metadata.TransactionOptions
+ (*fieldmaskpb.FieldMask)(nil), // 121: google.protobuf.FieldMask
+ (*Execution)(nil), // 122: ml_metadata.Execution
+ (*ExecutionType)(nil), // 123: ml_metadata.ExecutionType
+ (*Event)(nil), // 124: ml_metadata.Event
+ (*Context)(nil), // 125: ml_metadata.Context
+ (*ContextType)(nil), // 126: ml_metadata.ContextType
+ (*Attribution)(nil), // 127: ml_metadata.Attribution
+ (*Association)(nil), // 128: ml_metadata.Association
+ (*ParentContext)(nil), // 129: ml_metadata.ParentContext
+ (*ListOperationOptions)(nil), // 130: ml_metadata.ListOperationOptions
+ (*LineageGraphQueryOptions)(nil), // 131: ml_metadata.LineageGraphQueryOptions
+ (*LineageGraph)(nil), // 132: ml_metadata.LineageGraph
+ (*LineageSubgraphQueryOptions)(nil), // 133: ml_metadata.LineageSubgraphQueryOptions
+}
+var file_ml_metadata_proto_metadata_store_service_proto_depIdxs = []int32{
+ 118, // 0: ml_metadata.ArtifactAndType.artifact:type_name -> ml_metadata.Artifact
+ 119, // 1: ml_metadata.ArtifactAndType.type:type_name -> ml_metadata.ArtifactType
+ 108, // 2: ml_metadata.ArtifactStructMap.properties:type_name -> ml_metadata.ArtifactStructMap.PropertiesEntry
+ 3, // 3: ml_metadata.ArtifactStructList.elements:type_name -> ml_metadata.ArtifactStruct
+ 0, // 4: ml_metadata.ArtifactStruct.artifact:type_name -> ml_metadata.ArtifactAndType
+ 1, // 5: ml_metadata.ArtifactStruct.map:type_name -> ml_metadata.ArtifactStructMap
+ 2, // 6: ml_metadata.ArtifactStruct.list:type_name -> ml_metadata.ArtifactStructList
+ 118, // 7: ml_metadata.PutArtifactsRequest.artifacts:type_name -> ml_metadata.Artifact
+ 109, // 8: ml_metadata.PutArtifactsRequest.options:type_name -> ml_metadata.PutArtifactsRequest.Options
+ 120, // 9: ml_metadata.PutArtifactsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 121, // 10: ml_metadata.PutArtifactsRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 119, // 11: ml_metadata.PutArtifactTypeRequest.artifact_type:type_name -> ml_metadata.ArtifactType
+ 120, // 12: ml_metadata.PutArtifactTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 13: ml_metadata.PutExecutionsRequest.executions:type_name -> ml_metadata.Execution
+ 120, // 14: ml_metadata.PutExecutionsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 121, // 15: ml_metadata.PutExecutionsRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 123, // 16: ml_metadata.PutExecutionTypeRequest.execution_type:type_name -> ml_metadata.ExecutionType
+ 120, // 17: ml_metadata.PutExecutionTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 124, // 18: ml_metadata.PutEventsRequest.events:type_name -> ml_metadata.Event
+ 120, // 19: ml_metadata.PutEventsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 20: ml_metadata.PutExecutionRequest.execution:type_name -> ml_metadata.Execution
+ 110, // 21: ml_metadata.PutExecutionRequest.artifact_event_pairs:type_name -> ml_metadata.PutExecutionRequest.ArtifactAndEvent
+ 125, // 22: ml_metadata.PutExecutionRequest.contexts:type_name -> ml_metadata.Context
+ 111, // 23: ml_metadata.PutExecutionRequest.options:type_name -> ml_metadata.PutExecutionRequest.Options
+ 120, // 24: ml_metadata.PutExecutionRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 25: ml_metadata.PutLineageSubgraphRequest.executions:type_name -> ml_metadata.Execution
+ 118, // 26: ml_metadata.PutLineageSubgraphRequest.artifacts:type_name -> ml_metadata.Artifact
+ 125, // 27: ml_metadata.PutLineageSubgraphRequest.contexts:type_name -> ml_metadata.Context
+ 112, // 28: ml_metadata.PutLineageSubgraphRequest.event_edges:type_name -> ml_metadata.PutLineageSubgraphRequest.EventEdge
+ 113, // 29: ml_metadata.PutLineageSubgraphRequest.options:type_name -> ml_metadata.PutLineageSubgraphRequest.Options
+ 120, // 30: ml_metadata.PutLineageSubgraphRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 119, // 31: ml_metadata.PutTypesRequest.artifact_types:type_name -> ml_metadata.ArtifactType
+ 123, // 32: ml_metadata.PutTypesRequest.execution_types:type_name -> ml_metadata.ExecutionType
+ 126, // 33: ml_metadata.PutTypesRequest.context_types:type_name -> ml_metadata.ContextType
+ 120, // 34: ml_metadata.PutTypesRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 126, // 35: ml_metadata.PutContextTypeRequest.context_type:type_name -> ml_metadata.ContextType
+ 120, // 36: ml_metadata.PutContextTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 37: ml_metadata.PutContextsRequest.contexts:type_name -> ml_metadata.Context
+ 120, // 38: ml_metadata.PutContextsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 121, // 39: ml_metadata.PutContextsRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 127, // 40: ml_metadata.PutAttributionsAndAssociationsRequest.attributions:type_name -> ml_metadata.Attribution
+ 128, // 41: ml_metadata.PutAttributionsAndAssociationsRequest.associations:type_name -> ml_metadata.Association
+ 120, // 42: ml_metadata.PutAttributionsAndAssociationsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 129, // 43: ml_metadata.PutParentContextsRequest.parent_contexts:type_name -> ml_metadata.ParentContext
+ 120, // 44: ml_metadata.PutParentContextsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 130, // 45: ml_metadata.GetArtifactsByTypeRequest.options:type_name -> ml_metadata.ListOperationOptions
+ 120, // 46: ml_metadata.GetArtifactsByTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 118, // 47: ml_metadata.GetArtifactsByTypeResponse.artifacts:type_name -> ml_metadata.Artifact
+ 120, // 48: ml_metadata.GetArtifactByTypeAndNameRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 118, // 49: ml_metadata.GetArtifactByTypeAndNameResponse.artifact:type_name -> ml_metadata.Artifact
+ 120, // 50: ml_metadata.GetArtifactsByIDRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 118, // 51: ml_metadata.GetArtifactsByIDResponse.artifacts:type_name -> ml_metadata.Artifact
+ 119, // 52: ml_metadata.GetArtifactsByIDResponse.artifact_types:type_name -> ml_metadata.ArtifactType
+ 130, // 53: ml_metadata.GetArtifactsRequest.options:type_name -> ml_metadata.ListOperationOptions
+ 120, // 54: ml_metadata.GetArtifactsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 118, // 55: ml_metadata.GetArtifactsResponse.artifacts:type_name -> ml_metadata.Artifact
+ 120, // 56: ml_metadata.GetArtifactsByURIRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 118, // 57: ml_metadata.GetArtifactsByURIResponse.artifacts:type_name -> ml_metadata.Artifact
+ 130, // 58: ml_metadata.GetExecutionsRequest.options:type_name -> ml_metadata.ListOperationOptions
+ 120, // 59: ml_metadata.GetExecutionsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 60: ml_metadata.GetExecutionsResponse.executions:type_name -> ml_metadata.Execution
+ 120, // 61: ml_metadata.GetArtifactTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 119, // 62: ml_metadata.GetArtifactTypeResponse.artifact_type:type_name -> ml_metadata.ArtifactType
+ 120, // 63: ml_metadata.GetArtifactTypesRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 119, // 64: ml_metadata.GetArtifactTypesResponse.artifact_types:type_name -> ml_metadata.ArtifactType
+ 120, // 65: ml_metadata.GetExecutionTypesRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 123, // 66: ml_metadata.GetExecutionTypesResponse.execution_types:type_name -> ml_metadata.ExecutionType
+ 120, // 67: ml_metadata.GetContextTypesRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 126, // 68: ml_metadata.GetContextTypesResponse.context_types:type_name -> ml_metadata.ContextType
+ 120, // 69: ml_metadata.GetArtifactsByExternalIdsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 118, // 70: ml_metadata.GetArtifactsByExternalIdsResponse.artifacts:type_name -> ml_metadata.Artifact
+ 120, // 71: ml_metadata.GetExecutionsByExternalIdsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 72: ml_metadata.GetExecutionsByExternalIdsResponse.executions:type_name -> ml_metadata.Execution
+ 120, // 73: ml_metadata.GetContextsByExternalIdsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 74: ml_metadata.GetContextsByExternalIdsResponse.contexts:type_name -> ml_metadata.Context
+ 120, // 75: ml_metadata.GetArtifactTypesByExternalIdsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 119, // 76: ml_metadata.GetArtifactTypesByExternalIdsResponse.artifact_types:type_name -> ml_metadata.ArtifactType
+ 120, // 77: ml_metadata.GetExecutionTypesByExternalIdsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 123, // 78: ml_metadata.GetExecutionTypesByExternalIdsResponse.execution_types:type_name -> ml_metadata.ExecutionType
+ 120, // 79: ml_metadata.GetContextTypesByExternalIdsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 126, // 80: ml_metadata.GetContextTypesByExternalIdsResponse.context_types:type_name -> ml_metadata.ContextType
+ 130, // 81: ml_metadata.GetExecutionsByTypeRequest.options:type_name -> ml_metadata.ListOperationOptions
+ 120, // 82: ml_metadata.GetExecutionsByTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 83: ml_metadata.GetExecutionsByTypeResponse.executions:type_name -> ml_metadata.Execution
+ 120, // 84: ml_metadata.GetExecutionByTypeAndNameRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 85: ml_metadata.GetExecutionByTypeAndNameResponse.execution:type_name -> ml_metadata.Execution
+ 120, // 86: ml_metadata.GetExecutionsByIDRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 87: ml_metadata.GetExecutionsByIDResponse.executions:type_name -> ml_metadata.Execution
+ 120, // 88: ml_metadata.GetExecutionTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 123, // 89: ml_metadata.GetExecutionTypeResponse.execution_type:type_name -> ml_metadata.ExecutionType
+ 120, // 90: ml_metadata.GetEventsByExecutionIDsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 124, // 91: ml_metadata.GetEventsByExecutionIDsResponse.events:type_name -> ml_metadata.Event
+ 120, // 92: ml_metadata.GetEventsByArtifactIDsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 124, // 93: ml_metadata.GetEventsByArtifactIDsResponse.events:type_name -> ml_metadata.Event
+ 120, // 94: ml_metadata.GetArtifactTypesByIDRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 119, // 95: ml_metadata.GetArtifactTypesByIDResponse.artifact_types:type_name -> ml_metadata.ArtifactType
+ 120, // 96: ml_metadata.GetExecutionTypesByIDRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 123, // 97: ml_metadata.GetExecutionTypesByIDResponse.execution_types:type_name -> ml_metadata.ExecutionType
+ 120, // 98: ml_metadata.GetContextTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 126, // 99: ml_metadata.GetContextTypeResponse.context_type:type_name -> ml_metadata.ContextType
+ 120, // 100: ml_metadata.GetContextTypesByIDRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 126, // 101: ml_metadata.GetContextTypesByIDResponse.context_types:type_name -> ml_metadata.ContextType
+ 130, // 102: ml_metadata.GetContextsRequest.options:type_name -> ml_metadata.ListOperationOptions
+ 120, // 103: ml_metadata.GetContextsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 104: ml_metadata.GetContextsResponse.contexts:type_name -> ml_metadata.Context
+ 130, // 105: ml_metadata.GetContextsByTypeRequest.options:type_name -> ml_metadata.ListOperationOptions
+ 120, // 106: ml_metadata.GetContextsByTypeRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 107: ml_metadata.GetContextsByTypeResponse.contexts:type_name -> ml_metadata.Context
+ 120, // 108: ml_metadata.GetContextByTypeAndNameRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 109: ml_metadata.GetContextByTypeAndNameResponse.context:type_name -> ml_metadata.Context
+ 120, // 110: ml_metadata.GetContextsByIDRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 111: ml_metadata.GetContextsByIDResponse.contexts:type_name -> ml_metadata.Context
+ 120, // 112: ml_metadata.GetContextsByArtifactRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 113: ml_metadata.GetContextsByArtifactResponse.contexts:type_name -> ml_metadata.Context
+ 120, // 114: ml_metadata.GetContextsByExecutionRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 115: ml_metadata.GetContextsByExecutionResponse.contexts:type_name -> ml_metadata.Context
+ 120, // 116: ml_metadata.GetParentContextsByContextRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 117: ml_metadata.GetParentContextsByContextResponse.contexts:type_name -> ml_metadata.Context
+ 120, // 118: ml_metadata.GetChildrenContextsByContextRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 125, // 119: ml_metadata.GetChildrenContextsByContextResponse.contexts:type_name -> ml_metadata.Context
+ 120, // 120: ml_metadata.GetParentContextsByContextsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 115, // 121: ml_metadata.GetParentContextsByContextsResponse.contexts:type_name -> ml_metadata.GetParentContextsByContextsResponse.ContextsEntry
+ 120, // 122: ml_metadata.GetChildrenContextsByContextsRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 117, // 123: ml_metadata.GetChildrenContextsByContextsResponse.contexts:type_name -> ml_metadata.GetChildrenContextsByContextsResponse.ContextsEntry
+ 130, // 124: ml_metadata.GetArtifactsByContextRequest.options:type_name -> ml_metadata.ListOperationOptions
+ 120, // 125: ml_metadata.GetArtifactsByContextRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 118, // 126: ml_metadata.GetArtifactsByContextResponse.artifacts:type_name -> ml_metadata.Artifact
+ 130, // 127: ml_metadata.GetExecutionsByContextRequest.options:type_name -> ml_metadata.ListOperationOptions
+ 120, // 128: ml_metadata.GetExecutionsByContextRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 122, // 129: ml_metadata.GetExecutionsByContextResponse.executions:type_name -> ml_metadata.Execution
+ 120, // 130: ml_metadata.GetExecutionsByContextResponse.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 131, // 131: ml_metadata.GetLineageGraphRequest.options:type_name -> ml_metadata.LineageGraphQueryOptions
+ 120, // 132: ml_metadata.GetLineageGraphRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 132, // 133: ml_metadata.GetLineageGraphResponse.subgraph:type_name -> ml_metadata.LineageGraph
+ 133, // 134: ml_metadata.GetLineageSubgraphRequest.lineage_subgraph_query_options:type_name -> ml_metadata.LineageSubgraphQueryOptions
+ 121, // 135: ml_metadata.GetLineageSubgraphRequest.read_mask:type_name -> google.protobuf.FieldMask
+ 120, // 136: ml_metadata.GetLineageSubgraphRequest.transaction_options:type_name -> ml_metadata.TransactionOptions
+ 132, // 137: ml_metadata.GetLineageSubgraphResponse.lineage_subgraph:type_name -> ml_metadata.LineageGraph
+ 3, // 138: ml_metadata.ArtifactStructMap.PropertiesEntry.value:type_name -> ml_metadata.ArtifactStruct
+ 118, // 139: ml_metadata.PutExecutionRequest.ArtifactAndEvent.artifact:type_name -> ml_metadata.Artifact
+ 124, // 140: ml_metadata.PutExecutionRequest.ArtifactAndEvent.event:type_name -> ml_metadata.Event
+ 124, // 141: ml_metadata.PutLineageSubgraphRequest.EventEdge.event:type_name -> ml_metadata.Event
+ 125, // 142: ml_metadata.GetParentContextsByContextsResponse.ParentContextsPerChild.parent_contexts:type_name -> ml_metadata.Context
+ 114, // 143: ml_metadata.GetParentContextsByContextsResponse.ContextsEntry.value:type_name -> ml_metadata.GetParentContextsByContextsResponse.ParentContextsPerChild
+ 125, // 144: ml_metadata.GetChildrenContextsByContextsResponse.ChildrenContextsPerParent.children_contexts:type_name -> ml_metadata.Context
+ 116, // 145: ml_metadata.GetChildrenContextsByContextsResponse.ContextsEntry.value:type_name -> ml_metadata.GetChildrenContextsByContextsResponse.ChildrenContextsPerParent
+ 6, // 146: ml_metadata.MetadataStoreService.PutArtifactType:input_type -> ml_metadata.PutArtifactTypeRequest
+ 10, // 147: ml_metadata.MetadataStoreService.PutExecutionType:input_type -> ml_metadata.PutExecutionTypeRequest
+ 20, // 148: ml_metadata.MetadataStoreService.PutContextType:input_type -> ml_metadata.PutContextTypeRequest
+ 18, // 149: ml_metadata.MetadataStoreService.PutTypes:input_type -> ml_metadata.PutTypesRequest
+ 4, // 150: ml_metadata.MetadataStoreService.PutArtifacts:input_type -> ml_metadata.PutArtifactsRequest
+ 8, // 151: ml_metadata.MetadataStoreService.PutExecutions:input_type -> ml_metadata.PutExecutionsRequest
+ 12, // 152: ml_metadata.MetadataStoreService.PutEvents:input_type -> ml_metadata.PutEventsRequest
+ 14, // 153: ml_metadata.MetadataStoreService.PutExecution:input_type -> ml_metadata.PutExecutionRequest
+ 16, // 154: ml_metadata.MetadataStoreService.PutLineageSubgraph:input_type -> ml_metadata.PutLineageSubgraphRequest
+ 22, // 155: ml_metadata.MetadataStoreService.PutContexts:input_type -> ml_metadata.PutContextsRequest
+ 24, // 156: ml_metadata.MetadataStoreService.PutAttributionsAndAssociations:input_type -> ml_metadata.PutAttributionsAndAssociationsRequest
+ 26, // 157: ml_metadata.MetadataStoreService.PutParentContexts:input_type -> ml_metadata.PutParentContextsRequest
+ 40, // 158: ml_metadata.MetadataStoreService.GetArtifactType:input_type -> ml_metadata.GetArtifactTypeRequest
+ 72, // 159: ml_metadata.MetadataStoreService.GetArtifactTypesByID:input_type -> ml_metadata.GetArtifactTypesByIDRequest
+ 42, // 160: ml_metadata.MetadataStoreService.GetArtifactTypes:input_type -> ml_metadata.GetArtifactTypesRequest
+ 66, // 161: ml_metadata.MetadataStoreService.GetExecutionType:input_type -> ml_metadata.GetExecutionTypeRequest
+ 74, // 162: ml_metadata.MetadataStoreService.GetExecutionTypesByID:input_type -> ml_metadata.GetExecutionTypesByIDRequest
+ 44, // 163: ml_metadata.MetadataStoreService.GetExecutionTypes:input_type -> ml_metadata.GetExecutionTypesRequest
+ 76, // 164: ml_metadata.MetadataStoreService.GetContextType:input_type -> ml_metadata.GetContextTypeRequest
+ 78, // 165: ml_metadata.MetadataStoreService.GetContextTypesByID:input_type -> ml_metadata.GetContextTypesByIDRequest
+ 46, // 166: ml_metadata.MetadataStoreService.GetContextTypes:input_type -> ml_metadata.GetContextTypesRequest
+ 34, // 167: ml_metadata.MetadataStoreService.GetArtifacts:input_type -> ml_metadata.GetArtifactsRequest
+ 38, // 168: ml_metadata.MetadataStoreService.GetExecutions:input_type -> ml_metadata.GetExecutionsRequest
+ 80, // 169: ml_metadata.MetadataStoreService.GetContexts:input_type -> ml_metadata.GetContextsRequest
+ 32, // 170: ml_metadata.MetadataStoreService.GetArtifactsByID:input_type -> ml_metadata.GetArtifactsByIDRequest
+ 64, // 171: ml_metadata.MetadataStoreService.GetExecutionsByID:input_type -> ml_metadata.GetExecutionsByIDRequest
+ 86, // 172: ml_metadata.MetadataStoreService.GetContextsByID:input_type -> ml_metadata.GetContextsByIDRequest
+ 28, // 173: ml_metadata.MetadataStoreService.GetArtifactsByType:input_type -> ml_metadata.GetArtifactsByTypeRequest
+ 60, // 174: ml_metadata.MetadataStoreService.GetExecutionsByType:input_type -> ml_metadata.GetExecutionsByTypeRequest
+ 82, // 175: ml_metadata.MetadataStoreService.GetContextsByType:input_type -> ml_metadata.GetContextsByTypeRequest
+ 30, // 176: ml_metadata.MetadataStoreService.GetArtifactByTypeAndName:input_type -> ml_metadata.GetArtifactByTypeAndNameRequest
+ 62, // 177: ml_metadata.MetadataStoreService.GetExecutionByTypeAndName:input_type -> ml_metadata.GetExecutionByTypeAndNameRequest
+ 84, // 178: ml_metadata.MetadataStoreService.GetContextByTypeAndName:input_type -> ml_metadata.GetContextByTypeAndNameRequest
+ 36, // 179: ml_metadata.MetadataStoreService.GetArtifactsByURI:input_type -> ml_metadata.GetArtifactsByURIRequest
+ 68, // 180: ml_metadata.MetadataStoreService.GetEventsByExecutionIDs:input_type -> ml_metadata.GetEventsByExecutionIDsRequest
+ 70, // 181: ml_metadata.MetadataStoreService.GetEventsByArtifactIDs:input_type -> ml_metadata.GetEventsByArtifactIDsRequest
+ 48, // 182: ml_metadata.MetadataStoreService.GetArtifactsByExternalIds:input_type -> ml_metadata.GetArtifactsByExternalIdsRequest
+ 50, // 183: ml_metadata.MetadataStoreService.GetExecutionsByExternalIds:input_type -> ml_metadata.GetExecutionsByExternalIdsRequest
+ 52, // 184: ml_metadata.MetadataStoreService.GetContextsByExternalIds:input_type -> ml_metadata.GetContextsByExternalIdsRequest
+ 54, // 185: ml_metadata.MetadataStoreService.GetArtifactTypesByExternalIds:input_type -> ml_metadata.GetArtifactTypesByExternalIdsRequest
+ 56, // 186: ml_metadata.MetadataStoreService.GetExecutionTypesByExternalIds:input_type -> ml_metadata.GetExecutionTypesByExternalIdsRequest
+ 58, // 187: ml_metadata.MetadataStoreService.GetContextTypesByExternalIds:input_type -> ml_metadata.GetContextTypesByExternalIdsRequest
+ 88, // 188: ml_metadata.MetadataStoreService.GetContextsByArtifact:input_type -> ml_metadata.GetContextsByArtifactRequest
+ 90, // 189: ml_metadata.MetadataStoreService.GetContextsByExecution:input_type -> ml_metadata.GetContextsByExecutionRequest
+ 92, // 190: ml_metadata.MetadataStoreService.GetParentContextsByContext:input_type -> ml_metadata.GetParentContextsByContextRequest
+ 94, // 191: ml_metadata.MetadataStoreService.GetChildrenContextsByContext:input_type -> ml_metadata.GetChildrenContextsByContextRequest
+ 96, // 192: ml_metadata.MetadataStoreService.GetParentContextsByContexts:input_type -> ml_metadata.GetParentContextsByContextsRequest
+ 98, // 193: ml_metadata.MetadataStoreService.GetChildrenContextsByContexts:input_type -> ml_metadata.GetChildrenContextsByContextsRequest
+ 100, // 194: ml_metadata.MetadataStoreService.GetArtifactsByContext:input_type -> ml_metadata.GetArtifactsByContextRequest
+ 102, // 195: ml_metadata.MetadataStoreService.GetExecutionsByContext:input_type -> ml_metadata.GetExecutionsByContextRequest
+ 104, // 196: ml_metadata.MetadataStoreService.GetLineageGraph:input_type -> ml_metadata.GetLineageGraphRequest
+ 106, // 197: ml_metadata.MetadataStoreService.GetLineageSubgraph:input_type -> ml_metadata.GetLineageSubgraphRequest
+ 7, // 198: ml_metadata.MetadataStoreService.PutArtifactType:output_type -> ml_metadata.PutArtifactTypeResponse
+ 11, // 199: ml_metadata.MetadataStoreService.PutExecutionType:output_type -> ml_metadata.PutExecutionTypeResponse
+ 21, // 200: ml_metadata.MetadataStoreService.PutContextType:output_type -> ml_metadata.PutContextTypeResponse
+ 19, // 201: ml_metadata.MetadataStoreService.PutTypes:output_type -> ml_metadata.PutTypesResponse
+ 5, // 202: ml_metadata.MetadataStoreService.PutArtifacts:output_type -> ml_metadata.PutArtifactsResponse
+ 9, // 203: ml_metadata.MetadataStoreService.PutExecutions:output_type -> ml_metadata.PutExecutionsResponse
+ 13, // 204: ml_metadata.MetadataStoreService.PutEvents:output_type -> ml_metadata.PutEventsResponse
+ 15, // 205: ml_metadata.MetadataStoreService.PutExecution:output_type -> ml_metadata.PutExecutionResponse
+ 17, // 206: ml_metadata.MetadataStoreService.PutLineageSubgraph:output_type -> ml_metadata.PutLineageSubgraphResponse
+ 23, // 207: ml_metadata.MetadataStoreService.PutContexts:output_type -> ml_metadata.PutContextsResponse
+ 25, // 208: ml_metadata.MetadataStoreService.PutAttributionsAndAssociations:output_type -> ml_metadata.PutAttributionsAndAssociationsResponse
+ 27, // 209: ml_metadata.MetadataStoreService.PutParentContexts:output_type -> ml_metadata.PutParentContextsResponse
+ 41, // 210: ml_metadata.MetadataStoreService.GetArtifactType:output_type -> ml_metadata.GetArtifactTypeResponse
+ 73, // 211: ml_metadata.MetadataStoreService.GetArtifactTypesByID:output_type -> ml_metadata.GetArtifactTypesByIDResponse
+ 43, // 212: ml_metadata.MetadataStoreService.GetArtifactTypes:output_type -> ml_metadata.GetArtifactTypesResponse
+ 67, // 213: ml_metadata.MetadataStoreService.GetExecutionType:output_type -> ml_metadata.GetExecutionTypeResponse
+ 75, // 214: ml_metadata.MetadataStoreService.GetExecutionTypesByID:output_type -> ml_metadata.GetExecutionTypesByIDResponse
+ 45, // 215: ml_metadata.MetadataStoreService.GetExecutionTypes:output_type -> ml_metadata.GetExecutionTypesResponse
+ 77, // 216: ml_metadata.MetadataStoreService.GetContextType:output_type -> ml_metadata.GetContextTypeResponse
+ 79, // 217: ml_metadata.MetadataStoreService.GetContextTypesByID:output_type -> ml_metadata.GetContextTypesByIDResponse
+ 47, // 218: ml_metadata.MetadataStoreService.GetContextTypes:output_type -> ml_metadata.GetContextTypesResponse
+ 35, // 219: ml_metadata.MetadataStoreService.GetArtifacts:output_type -> ml_metadata.GetArtifactsResponse
+ 39, // 220: ml_metadata.MetadataStoreService.GetExecutions:output_type -> ml_metadata.GetExecutionsResponse
+ 81, // 221: ml_metadata.MetadataStoreService.GetContexts:output_type -> ml_metadata.GetContextsResponse
+ 33, // 222: ml_metadata.MetadataStoreService.GetArtifactsByID:output_type -> ml_metadata.GetArtifactsByIDResponse
+ 65, // 223: ml_metadata.MetadataStoreService.GetExecutionsByID:output_type -> ml_metadata.GetExecutionsByIDResponse
+ 87, // 224: ml_metadata.MetadataStoreService.GetContextsByID:output_type -> ml_metadata.GetContextsByIDResponse
+ 29, // 225: ml_metadata.MetadataStoreService.GetArtifactsByType:output_type -> ml_metadata.GetArtifactsByTypeResponse
+ 61, // 226: ml_metadata.MetadataStoreService.GetExecutionsByType:output_type -> ml_metadata.GetExecutionsByTypeResponse
+ 83, // 227: ml_metadata.MetadataStoreService.GetContextsByType:output_type -> ml_metadata.GetContextsByTypeResponse
+ 31, // 228: ml_metadata.MetadataStoreService.GetArtifactByTypeAndName:output_type -> ml_metadata.GetArtifactByTypeAndNameResponse
+ 63, // 229: ml_metadata.MetadataStoreService.GetExecutionByTypeAndName:output_type -> ml_metadata.GetExecutionByTypeAndNameResponse
+ 85, // 230: ml_metadata.MetadataStoreService.GetContextByTypeAndName:output_type -> ml_metadata.GetContextByTypeAndNameResponse
+ 37, // 231: ml_metadata.MetadataStoreService.GetArtifactsByURI:output_type -> ml_metadata.GetArtifactsByURIResponse
+ 69, // 232: ml_metadata.MetadataStoreService.GetEventsByExecutionIDs:output_type -> ml_metadata.GetEventsByExecutionIDsResponse
+ 71, // 233: ml_metadata.MetadataStoreService.GetEventsByArtifactIDs:output_type -> ml_metadata.GetEventsByArtifactIDsResponse
+ 49, // 234: ml_metadata.MetadataStoreService.GetArtifactsByExternalIds:output_type -> ml_metadata.GetArtifactsByExternalIdsResponse
+ 51, // 235: ml_metadata.MetadataStoreService.GetExecutionsByExternalIds:output_type -> ml_metadata.GetExecutionsByExternalIdsResponse
+ 53, // 236: ml_metadata.MetadataStoreService.GetContextsByExternalIds:output_type -> ml_metadata.GetContextsByExternalIdsResponse
+ 55, // 237: ml_metadata.MetadataStoreService.GetArtifactTypesByExternalIds:output_type -> ml_metadata.GetArtifactTypesByExternalIdsResponse
+ 57, // 238: ml_metadata.MetadataStoreService.GetExecutionTypesByExternalIds:output_type -> ml_metadata.GetExecutionTypesByExternalIdsResponse
+ 59, // 239: ml_metadata.MetadataStoreService.GetContextTypesByExternalIds:output_type -> ml_metadata.GetContextTypesByExternalIdsResponse
+ 89, // 240: ml_metadata.MetadataStoreService.GetContextsByArtifact:output_type -> ml_metadata.GetContextsByArtifactResponse
+ 91, // 241: ml_metadata.MetadataStoreService.GetContextsByExecution:output_type -> ml_metadata.GetContextsByExecutionResponse
+ 93, // 242: ml_metadata.MetadataStoreService.GetParentContextsByContext:output_type -> ml_metadata.GetParentContextsByContextResponse
+ 95, // 243: ml_metadata.MetadataStoreService.GetChildrenContextsByContext:output_type -> ml_metadata.GetChildrenContextsByContextResponse
+ 97, // 244: ml_metadata.MetadataStoreService.GetParentContextsByContexts:output_type -> ml_metadata.GetParentContextsByContextsResponse
+ 99, // 245: ml_metadata.MetadataStoreService.GetChildrenContextsByContexts:output_type -> ml_metadata.GetChildrenContextsByContextsResponse
+ 101, // 246: ml_metadata.MetadataStoreService.GetArtifactsByContext:output_type -> ml_metadata.GetArtifactsByContextResponse
+ 103, // 247: ml_metadata.MetadataStoreService.GetExecutionsByContext:output_type -> ml_metadata.GetExecutionsByContextResponse
+ 105, // 248: ml_metadata.MetadataStoreService.GetLineageGraph:output_type -> ml_metadata.GetLineageGraphResponse
+ 107, // 249: ml_metadata.MetadataStoreService.GetLineageSubgraph:output_type -> ml_metadata.GetLineageSubgraphResponse
+ 198, // [198:250] is the sub-list for method output_type
+ 146, // [146:198] is the sub-list for method input_type
+ 146, // [146:146] is the sub-list for extension type_name
+ 146, // [146:146] is the sub-list for extension extendee
+ 0, // [0:146] is the sub-list for field type_name
+}
+
+func init() { file_ml_metadata_proto_metadata_store_service_proto_init() }
+func file_ml_metadata_proto_metadata_store_service_proto_init() {
+ if File_ml_metadata_proto_metadata_store_service_proto != nil {
+ return
+ }
+ file_ml_metadata_proto_metadata_store_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ArtifactAndType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ArtifactStructMap); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ArtifactStructList); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ArtifactStruct); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutArtifactsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutArtifactsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutArtifactTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutArtifactTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutExecutionsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutExecutionsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutExecutionTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutExecutionTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutEventsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutEventsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutExecutionRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutExecutionResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutLineageSubgraphRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutLineageSubgraphResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutTypesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutTypesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutContextTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutContextTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutContextsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutContextsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutAttributionsAndAssociationsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutAttributionsAndAssociationsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutParentContextsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutParentContextsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactByTypeAndNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactByTypeAndNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByIDRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByIDResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByURIRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByURIResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactTypesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactTypesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionTypesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionTypesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextTypesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextTypesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByExternalIdsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByExternalIdsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsByExternalIdsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsByExternalIdsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByExternalIdsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByExternalIdsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactTypesByExternalIdsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactTypesByExternalIdsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionTypesByExternalIdsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionTypesByExternalIdsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextTypesByExternalIdsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextTypesByExternalIdsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsByTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsByTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionByTypeAndNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionByTypeAndNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsByIDRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsByIDResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetEventsByExecutionIDsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetEventsByExecutionIDsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetEventsByArtifactIDsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetEventsByArtifactIDsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactTypesByIDRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactTypesByIDResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionTypesByIDRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionTypesByIDResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextTypesByIDRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextTypesByIDResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByTypeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextByTypeAndNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextByTypeAndNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByIDRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByIDResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByArtifactRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByArtifactResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByExecutionRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetContextsByExecutionResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetParentContextsByContextRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetParentContextsByContextResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetChildrenContextsByContextRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetChildrenContextsByContextResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetParentContextsByContextsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetParentContextsByContextsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetChildrenContextsByContextsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetChildrenContextsByContextsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByContextRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetArtifactsByContextResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsByContextRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetExecutionsByContextResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetLineageGraphRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetLineageGraphResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetLineageSubgraphRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetLineageSubgraphResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutArtifactsRequest_Options); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutExecutionRequest_ArtifactAndEvent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutExecutionRequest_Options); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutLineageSubgraphRequest_EventEdge); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PutLineageSubgraphRequest_Options); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetParentContextsByContextsResponse_ParentContextsPerChild); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetChildrenContextsByContextsResponse_ChildrenContextsPerParent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_ml_metadata_proto_metadata_store_service_proto_msgTypes[3].OneofWrappers = []interface{}{
+ (*ArtifactStruct_Artifact)(nil),
+ (*ArtifactStruct_Map)(nil),
+ (*ArtifactStruct_List)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ml_metadata_proto_metadata_store_service_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 118,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_ml_metadata_proto_metadata_store_service_proto_goTypes,
+ DependencyIndexes: file_ml_metadata_proto_metadata_store_service_proto_depIdxs,
+ MessageInfos: file_ml_metadata_proto_metadata_store_service_proto_msgTypes,
+ }.Build()
+ File_ml_metadata_proto_metadata_store_service_proto = out.File
+ file_ml_metadata_proto_metadata_store_service_proto_rawDesc = nil
+ file_ml_metadata_proto_metadata_store_service_proto_goTypes = nil
+ file_ml_metadata_proto_metadata_store_service_proto_depIdxs = nil
+}
diff --git a/internal/ml_metadata/proto/metadata_store_service_grpc.pb.go b/internal/ml_metadata/proto/metadata_store_service_grpc.pb.go
new file mode 100644
index 000000000..237d9a028
--- /dev/null
+++ b/internal/ml_metadata/proto/metadata_store_service_grpc.pb.go
@@ -0,0 +1,2553 @@
+// Copyright 2019 Google LLC
+//
+//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
+//
+//https://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.
+//==============================================================================
+
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc v4.24.3
+// source: ml_metadata/proto/metadata_store_service.proto
+
+package proto
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ MetadataStoreService_PutArtifactType_FullMethodName = "/ml_metadata.MetadataStoreService/PutArtifactType"
+ MetadataStoreService_PutExecutionType_FullMethodName = "/ml_metadata.MetadataStoreService/PutExecutionType"
+ MetadataStoreService_PutContextType_FullMethodName = "/ml_metadata.MetadataStoreService/PutContextType"
+ MetadataStoreService_PutTypes_FullMethodName = "/ml_metadata.MetadataStoreService/PutTypes"
+ MetadataStoreService_PutArtifacts_FullMethodName = "/ml_metadata.MetadataStoreService/PutArtifacts"
+ MetadataStoreService_PutExecutions_FullMethodName = "/ml_metadata.MetadataStoreService/PutExecutions"
+ MetadataStoreService_PutEvents_FullMethodName = "/ml_metadata.MetadataStoreService/PutEvents"
+ MetadataStoreService_PutExecution_FullMethodName = "/ml_metadata.MetadataStoreService/PutExecution"
+ MetadataStoreService_PutLineageSubgraph_FullMethodName = "/ml_metadata.MetadataStoreService/PutLineageSubgraph"
+ MetadataStoreService_PutContexts_FullMethodName = "/ml_metadata.MetadataStoreService/PutContexts"
+ MetadataStoreService_PutAttributionsAndAssociations_FullMethodName = "/ml_metadata.MetadataStoreService/PutAttributionsAndAssociations"
+ MetadataStoreService_PutParentContexts_FullMethodName = "/ml_metadata.MetadataStoreService/PutParentContexts"
+ MetadataStoreService_GetArtifactType_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactType"
+ MetadataStoreService_GetArtifactTypesByID_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactTypesByID"
+ MetadataStoreService_GetArtifactTypes_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactTypes"
+ MetadataStoreService_GetExecutionType_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionType"
+ MetadataStoreService_GetExecutionTypesByID_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionTypesByID"
+ MetadataStoreService_GetExecutionTypes_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionTypes"
+ MetadataStoreService_GetContextType_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextType"
+ MetadataStoreService_GetContextTypesByID_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextTypesByID"
+ MetadataStoreService_GetContextTypes_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextTypes"
+ MetadataStoreService_GetArtifacts_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifacts"
+ MetadataStoreService_GetExecutions_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutions"
+ MetadataStoreService_GetContexts_FullMethodName = "/ml_metadata.MetadataStoreService/GetContexts"
+ MetadataStoreService_GetArtifactsByID_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactsByID"
+ MetadataStoreService_GetExecutionsByID_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionsByID"
+ MetadataStoreService_GetContextsByID_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextsByID"
+ MetadataStoreService_GetArtifactsByType_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactsByType"
+ MetadataStoreService_GetExecutionsByType_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionsByType"
+ MetadataStoreService_GetContextsByType_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextsByType"
+ MetadataStoreService_GetArtifactByTypeAndName_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactByTypeAndName"
+ MetadataStoreService_GetExecutionByTypeAndName_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionByTypeAndName"
+ MetadataStoreService_GetContextByTypeAndName_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextByTypeAndName"
+ MetadataStoreService_GetArtifactsByURI_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactsByURI"
+ MetadataStoreService_GetEventsByExecutionIDs_FullMethodName = "/ml_metadata.MetadataStoreService/GetEventsByExecutionIDs"
+ MetadataStoreService_GetEventsByArtifactIDs_FullMethodName = "/ml_metadata.MetadataStoreService/GetEventsByArtifactIDs"
+ MetadataStoreService_GetArtifactsByExternalIds_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactsByExternalIds"
+ MetadataStoreService_GetExecutionsByExternalIds_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionsByExternalIds"
+ MetadataStoreService_GetContextsByExternalIds_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextsByExternalIds"
+ MetadataStoreService_GetArtifactTypesByExternalIds_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactTypesByExternalIds"
+ MetadataStoreService_GetExecutionTypesByExternalIds_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionTypesByExternalIds"
+ MetadataStoreService_GetContextTypesByExternalIds_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextTypesByExternalIds"
+ MetadataStoreService_GetContextsByArtifact_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextsByArtifact"
+ MetadataStoreService_GetContextsByExecution_FullMethodName = "/ml_metadata.MetadataStoreService/GetContextsByExecution"
+ MetadataStoreService_GetParentContextsByContext_FullMethodName = "/ml_metadata.MetadataStoreService/GetParentContextsByContext"
+ MetadataStoreService_GetChildrenContextsByContext_FullMethodName = "/ml_metadata.MetadataStoreService/GetChildrenContextsByContext"
+ MetadataStoreService_GetParentContextsByContexts_FullMethodName = "/ml_metadata.MetadataStoreService/GetParentContextsByContexts"
+ MetadataStoreService_GetChildrenContextsByContexts_FullMethodName = "/ml_metadata.MetadataStoreService/GetChildrenContextsByContexts"
+ MetadataStoreService_GetArtifactsByContext_FullMethodName = "/ml_metadata.MetadataStoreService/GetArtifactsByContext"
+ MetadataStoreService_GetExecutionsByContext_FullMethodName = "/ml_metadata.MetadataStoreService/GetExecutionsByContext"
+ MetadataStoreService_GetLineageGraph_FullMethodName = "/ml_metadata.MetadataStoreService/GetLineageGraph"
+ MetadataStoreService_GetLineageSubgraph_FullMethodName = "/ml_metadata.MetadataStoreService/GetLineageSubgraph"
+)
+
+// MetadataStoreServiceClient is the client API for MetadataStoreService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type MetadataStoreServiceClient interface {
+ // Inserts or updates an ArtifactType.
+ //
+ // A type has a set of strong typed properties describing the schema of any
+ // stored instance associated with that type. A type is identified by a name
+ // and an optional version.
+ //
+ // Type Creation:
+ // If no type exists in the database with the given identifier
+ // (name, version), it creates a new type and returns the type_id.
+ //
+ // Type Evolution:
+ // If the request type with the same (name, version) already exists
+ // (let's call it stored_type), the method enforces the stored_type can be
+ // updated only when the request type is backward compatible for the already
+ // stored instances.
+ //
+ // Backwards compatibility is violated iff:
+ //
+ // a) there is a property where the request type and stored_type have
+ // different value type (e.g., int vs. string)
+ // b) `can_add_fields = false` and the request type has a new property that
+ // is not stored.
+ // c) `can_omit_fields = false` and stored_type has an existing property
+ // that is not provided in the request type.
+ //
+ // If non-backward type change is required in the application, e.g.,
+ // deprecate properties, re-purpose property name, change value types,
+ // a new type can be created with a different (name, version) identifier.
+ // Note the type version is optional, and a version value with empty string
+ // is treated as unset.
+ //
+ // Args:
+ //
+ // artifact_type: the type to be inserted or updated.
+ // can_add_fields:
+ // when set to true, new properties can be added;
+ // when set to false, returns ALREADY_EXISTS if the request type has
+ // properties that are not in stored_type.
+ // can_omit_fields:
+ // when set to true, stored properties can be omitted in the request type;
+ // when set to false, returns ALREADY_EXISTS if the stored_type has
+ // properties not in the request type.
+ //
+ // Returns:
+ //
+ // The type_id of the stored type.
+ //
+ // Raises:
+ //
+ // ALREADY_EXISTS error in the case listed above.
+ // INVALID_ARGUMENT error, if the given type has no name, or any
+ // property value type is unknown.
+ PutArtifactType(ctx context.Context, in *PutArtifactTypeRequest, opts ...grpc.CallOption) (*PutArtifactTypeResponse, error)
+ // Inserts or updates an ExecutionType. Please refer to PutArtifactType for
+ // type upsert API description.
+ PutExecutionType(ctx context.Context, in *PutExecutionTypeRequest, opts ...grpc.CallOption) (*PutExecutionTypeResponse, error)
+ // Inserts or updates an ContextType. Please refer to PutArtifactType for
+ // type upsert API description.
+ PutContextType(ctx context.Context, in *PutContextTypeRequest, opts ...grpc.CallOption) (*PutContextTypeResponse, error)
+ // Bulk inserts types atomically.
+ PutTypes(ctx context.Context, in *PutTypesRequest, opts ...grpc.CallOption) (*PutTypesResponse, error)
+ // Inserts or updates artifacts in the database.
+ //
+ // If an artifact_id is specified for an artifact, it is an update.
+ // If an artifact_id is unspecified, it will insert a new artifact.
+ // For new artifacts, type must be specified.
+ // For old artifacts, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated artifacts will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ //
+ // artifacts: A list of artifacts to insert or update.
+ //
+ // Returns:
+ //
+ // A list of artifact ids index-aligned with the input.
+ PutArtifacts(ctx context.Context, in *PutArtifactsRequest, opts ...grpc.CallOption) (*PutArtifactsResponse, error)
+ // Inserts or updates executions in the database.
+ //
+ // If an execution_id is specified for an execution, it is an update.
+ // If an execution_id is unspecified, it will insert a new execution.
+ // For new executions, type must be specified.
+ // For old executions, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated executions will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ //
+ // executions: A list of executions to insert or update.
+ //
+ // Returns:
+ //
+ // A list of execution ids index-aligned with the input.
+ PutExecutions(ctx context.Context, in *PutExecutionsRequest, opts ...grpc.CallOption) (*PutExecutionsResponse, error)
+ // Inserts events in the database.
+ //
+ // The execution_id and artifact_id must already exist.
+ // Once created, events cannot be modified.
+ // AlreadyExists error will be raised if duplicated events are found.
+ //
+ // It is not guaranteed that the created or updated events will share the
+ // same `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ //
+ // events: A list of events to insert or update.
+ PutEvents(ctx context.Context, in *PutEventsRequest, opts ...grpc.CallOption) (*PutEventsResponse, error)
+ // Inserts or updates an Execution and its input and output artifacts and
+ // related contexts atomically. The `artifact_event_pairs` include the state
+ // changes of the Artifacts used or generated by the Execution, as well as the
+ // input/output Event. The `contexts` describe the associations of the
+ // execution and the attributions of the artifacts.
+ //
+ // If an execution_id is specified, it is an update on the corresponding
+ // execution, otherwise it does an insertion.
+ // For insertion, type must be specified. Same rule applies to artifacts
+ // and contexts in the request. Corresponding errors may raised. For example:
+ // AlreadyExists error will be raised if duplicated executions, artifacts
+ // or events are found.
+ //
+ // It is not guaranteed that the created or updated executions, artifacts,
+ // contexts and events will share the same `create_time_since_epoch`,
+ // `last_update_time_since_epoch`, or `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ //
+ // execution: An execution to insert or update.
+ // artifact_event_pairs: Artifacts to insert or update and events to insert.
+ // contexts: The contexts that the execution and the artifacts belong to.
+ //
+ // Returns:
+ //
+ // An execution id and a list of artifacts and contexts ids index-aligned
+ // with the input.
+ PutExecution(ctx context.Context, in *PutExecutionRequest, opts ...grpc.CallOption) (*PutExecutionResponse, error)
+ // Inserts or updates a lineage subgraph (i.e. a collection of event edges
+ // and its executions, artifacts, and related contexts) atomically. The
+ // `event_edges` include an Event and the indices of the corresponding
+ // execution and artifact from the input list of executions and artifacts. The
+ // `contexts` describe the associations of the Execution and the attributions
+ // of the Artifact.
+ //
+ // If an execution_id is specified, it is an update on the corresponding
+ // Execution, otherwise it does an insertion. For insertion, type must be
+ // specified. These rules apply to Artifacts and Contexts as well.
+ // Corresponding errors may be raised. For example: AlreadyExists error will
+ // be raised if duplicated executions, artifacts, or events are found.
+ //
+ // It is not guaranteed that the created or updated executions, artifacts,
+ // contexts and events will share the same `create_time_since_epoch`,
+ // `last_update_time_since_epoch`, or `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ //
+ // executions: A list of executions to insert or update.
+ // artifacts: A list of artifacts to insert or update.
+ // contexts: A list of contexts to insert and/or create associations and
+ // attributions with.
+ // event_edges: A list of events to insert with the indices of the
+ // corresponding execution and artifact from the input lists of
+ // executions and artifacts.
+ //
+ // Returns:
+ //
+ // Lists of execution, artifact, and context ids index-aligned with the
+ // inputs.
+ PutLineageSubgraph(ctx context.Context, in *PutLineageSubgraphRequest, opts ...grpc.CallOption) (*PutLineageSubgraphResponse, error)
+ // Inserts or updates contexts in database and returns a list of context ids.
+ //
+ // If an context_id is specified for a context, it is an update.
+ // If an context_id is unspecified, it will insert a new context.
+ // For new contexts, type must be specified.
+ // For old contexts, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated contexts will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ //
+ // contexts: A list of contexts to insert or update.
+ //
+ // Returns:
+ //
+ // A list of context ids index-aligned with the input.
+ PutContexts(ctx context.Context, in *PutContextsRequest, opts ...grpc.CallOption) (*PutContextsResponse, error)
+ // Inserts attribution and association relationships in the database.
+ // The context_id, artifact_id, and execution_id must already exist.
+ // If the relationship exists, this call does nothing. Once added, the
+ // relationships cannot be modified.
+ //
+ // Args:
+ //
+ // attributions: A list of attributions to insert.
+ // associations: A list of associations to insert.
+ PutAttributionsAndAssociations(ctx context.Context, in *PutAttributionsAndAssociationsRequest, opts ...grpc.CallOption) (*PutAttributionsAndAssociationsResponse, error)
+ // Inserts parental context relationships in the database.
+ // The ParentContext relationship has direction. The call fails if cycles are
+ // detected.
+ //
+ // Args:
+ //
+ // parent_contexts: A list of parent contexts to insert.
+ PutParentContexts(ctx context.Context, in *PutParentContextsRequest, opts ...grpc.CallOption) (*PutParentContextsResponse, error)
+ // Gets an artifact type. Returns a NOT_FOUND error if the type does not
+ // exist.
+ GetArtifactType(ctx context.Context, in *GetArtifactTypeRequest, opts ...grpc.CallOption) (*GetArtifactTypeResponse, error)
+ // Gets a list of artifact types by ID.
+ // If no artifact types with an ID exists, the artifact type is skipped.
+ GetArtifactTypesByID(ctx context.Context, in *GetArtifactTypesByIDRequest, opts ...grpc.CallOption) (*GetArtifactTypesByIDResponse, error)
+ // Gets a list of all artifact types.
+ GetArtifactTypes(ctx context.Context, in *GetArtifactTypesRequest, opts ...grpc.CallOption) (*GetArtifactTypesResponse, error)
+ // Gets an execution type, or None if it does not exist.
+ GetExecutionType(ctx context.Context, in *GetExecutionTypeRequest, opts ...grpc.CallOption) (*GetExecutionTypeResponse, error)
+ // Gets a list of execution types by ID.
+ // If no execution types with an ID exists, the execution type is skipped.
+ GetExecutionTypesByID(ctx context.Context, in *GetExecutionTypesByIDRequest, opts ...grpc.CallOption) (*GetExecutionTypesByIDResponse, error)
+ // Gets a list of all execution types.
+ GetExecutionTypes(ctx context.Context, in *GetExecutionTypesRequest, opts ...grpc.CallOption) (*GetExecutionTypesResponse, error)
+ // Gets a context type. Returns a NOT_FOUND error if the type does not exist.
+ GetContextType(ctx context.Context, in *GetContextTypeRequest, opts ...grpc.CallOption) (*GetContextTypeResponse, error)
+ // Gets a list of context types by ID.
+ // If no context types with an ID exists, the context type is skipped.
+ GetContextTypesByID(ctx context.Context, in *GetContextTypesByIDRequest, opts ...grpc.CallOption) (*GetContextTypesByIDResponse, error)
+ // Gets a list of all context types.
+ GetContextTypes(ctx context.Context, in *GetContextTypesRequest, opts ...grpc.CallOption) (*GetContextTypesResponse, error)
+ // Gets all the artifacts.
+ GetArtifacts(ctx context.Context, in *GetArtifactsRequest, opts ...grpc.CallOption) (*GetArtifactsResponse, error)
+ // Gets all the executions.
+ GetExecutions(ctx context.Context, in *GetExecutionsRequest, opts ...grpc.CallOption) (*GetExecutionsResponse, error)
+ // Gets all the contexts.
+ GetContexts(ctx context.Context, in *GetContextsRequest, opts ...grpc.CallOption) (*GetContextsResponse, error)
+ // Gets all artifacts with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ //
+ // artifact_ids: A list of artifact ids to retrieve.
+ //
+ // Returns:
+ //
+ // Artifacts with matching ids.
+ GetArtifactsByID(ctx context.Context, in *GetArtifactsByIDRequest, opts ...grpc.CallOption) (*GetArtifactsByIDResponse, error)
+ // Gets all executions with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ //
+ // execution_ids: A list of execution ids to retrieve.
+ GetExecutionsByID(ctx context.Context, in *GetExecutionsByIDRequest, opts ...grpc.CallOption) (*GetExecutionsByIDResponse, error)
+ // Gets all contexts with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ //
+ // context_ids: A list of context ids to retrieve.
+ GetContextsByID(ctx context.Context, in *GetContextsByIDRequest, opts ...grpc.CallOption) (*GetContextsByIDResponse, error)
+ // Gets all the artifacts of a given type.
+ GetArtifactsByType(ctx context.Context, in *GetArtifactsByTypeRequest, opts ...grpc.CallOption) (*GetArtifactsByTypeResponse, error)
+ // Gets all the executions of a given type.
+ GetExecutionsByType(ctx context.Context, in *GetExecutionsByTypeRequest, opts ...grpc.CallOption) (*GetExecutionsByTypeResponse, error)
+ // Gets all the contexts of a given type.
+ GetContextsByType(ctx context.Context, in *GetContextsByTypeRequest, opts ...grpc.CallOption) (*GetContextsByTypeResponse, error)
+ // Gets the artifact of the given type and artifact name.
+ GetArtifactByTypeAndName(ctx context.Context, in *GetArtifactByTypeAndNameRequest, opts ...grpc.CallOption) (*GetArtifactByTypeAndNameResponse, error)
+ // Gets the execution of the given type and execution name.
+ GetExecutionByTypeAndName(ctx context.Context, in *GetExecutionByTypeAndNameRequest, opts ...grpc.CallOption) (*GetExecutionByTypeAndNameResponse, error)
+ // Gets the context of the given type and context name.
+ GetContextByTypeAndName(ctx context.Context, in *GetContextByTypeAndNameRequest, opts ...grpc.CallOption) (*GetContextByTypeAndNameResponse, error)
+ // Gets all the artifacts with matching uris.
+ GetArtifactsByURI(ctx context.Context, in *GetArtifactsByURIRequest, opts ...grpc.CallOption) (*GetArtifactsByURIResponse, error)
+ // Gets all events with matching execution ids.
+ GetEventsByExecutionIDs(ctx context.Context, in *GetEventsByExecutionIDsRequest, opts ...grpc.CallOption) (*GetEventsByExecutionIDsResponse, error)
+ // Gets all events with matching artifact ids.
+ GetEventsByArtifactIDs(ctx context.Context, in *GetEventsByArtifactIDsRequest, opts ...grpc.CallOption) (*GetEventsByArtifactIDsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetArtifactsByExternalIds(ctx context.Context, in *GetArtifactsByExternalIdsRequest, opts ...grpc.CallOption) (*GetArtifactsByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetExecutionsByExternalIds(ctx context.Context, in *GetExecutionsByExternalIdsRequest, opts ...grpc.CallOption) (*GetExecutionsByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetContextsByExternalIds(ctx context.Context, in *GetContextsByExternalIdsRequest, opts ...grpc.CallOption) (*GetContextsByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetArtifactTypesByExternalIds(ctx context.Context, in *GetArtifactTypesByExternalIdsRequest, opts ...grpc.CallOption) (*GetArtifactTypesByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetExecutionTypesByExternalIds(ctx context.Context, in *GetExecutionTypesByExternalIdsRequest, opts ...grpc.CallOption) (*GetExecutionTypesByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetContextTypesByExternalIds(ctx context.Context, in *GetContextTypesByExternalIdsRequest, opts ...grpc.CallOption) (*GetContextTypesByExternalIdsResponse, error)
+ // Gets all context that an artifact is attributed to.
+ GetContextsByArtifact(ctx context.Context, in *GetContextsByArtifactRequest, opts ...grpc.CallOption) (*GetContextsByArtifactResponse, error)
+ // Gets all context that an execution is associated with.
+ GetContextsByExecution(ctx context.Context, in *GetContextsByExecutionRequest, opts ...grpc.CallOption) (*GetContextsByExecutionResponse, error)
+ // Gets all parent contexts that a context is related.
+ GetParentContextsByContext(ctx context.Context, in *GetParentContextsByContextRequest, opts ...grpc.CallOption) (*GetParentContextsByContextResponse, error)
+ // Gets all children contexts that a context is related.
+ GetChildrenContextsByContext(ctx context.Context, in *GetChildrenContextsByContextRequest, opts ...grpc.CallOption) (*GetChildrenContextsByContextResponse, error)
+ // Batch getting all the parent contexts that a list of contexts are related.
+ GetParentContextsByContexts(ctx context.Context, in *GetParentContextsByContextsRequest, opts ...grpc.CallOption) (*GetParentContextsByContextsResponse, error)
+ // Batch getting all the children contexts that a list of contexts are
+ // related.
+ GetChildrenContextsByContexts(ctx context.Context, in *GetChildrenContextsByContextsRequest, opts ...grpc.CallOption) (*GetChildrenContextsByContextsResponse, error)
+ // Gets all direct artifacts that a context attributes to.
+ GetArtifactsByContext(ctx context.Context, in *GetArtifactsByContextRequest, opts ...grpc.CallOption) (*GetArtifactsByContextResponse, error)
+ // Gets all direct executions that a context associates with.
+ GetExecutionsByContext(ctx context.Context, in *GetExecutionsByContextRequest, opts ...grpc.CallOption) (*GetExecutionsByContextResponse, error)
+ // TODO(b/283852485): Deprecate GetLineageGraph API after migration to
+ // GetLineageSubgraph API.
+ // The transaction performs a constrained transitive closure and returns a
+ // lineage subgraph satisfying the conditions and constraints specified in
+ // the GetLineageGraphRequest.
+ GetLineageGraph(ctx context.Context, in *GetLineageGraphRequest, opts ...grpc.CallOption) (*GetLineageGraphResponse, error)
+ // Gets a lineage subgraph by performing graph traversal from a list of
+ // interested nodes.
+ // A lineage subgraph without node details (e.g., external_id, properties)
+ // will be returned.
+ GetLineageSubgraph(ctx context.Context, in *GetLineageSubgraphRequest, opts ...grpc.CallOption) (*GetLineageSubgraphResponse, error)
+}
+
+type metadataStoreServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewMetadataStoreServiceClient(cc grpc.ClientConnInterface) MetadataStoreServiceClient {
+ return &metadataStoreServiceClient{cc}
+}
+
+func (c *metadataStoreServiceClient) PutArtifactType(ctx context.Context, in *PutArtifactTypeRequest, opts ...grpc.CallOption) (*PutArtifactTypeResponse, error) {
+ out := new(PutArtifactTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutArtifactType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutExecutionType(ctx context.Context, in *PutExecutionTypeRequest, opts ...grpc.CallOption) (*PutExecutionTypeResponse, error) {
+ out := new(PutExecutionTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutExecutionType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutContextType(ctx context.Context, in *PutContextTypeRequest, opts ...grpc.CallOption) (*PutContextTypeResponse, error) {
+ out := new(PutContextTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutContextType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutTypes(ctx context.Context, in *PutTypesRequest, opts ...grpc.CallOption) (*PutTypesResponse, error) {
+ out := new(PutTypesResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutTypes_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutArtifacts(ctx context.Context, in *PutArtifactsRequest, opts ...grpc.CallOption) (*PutArtifactsResponse, error) {
+ out := new(PutArtifactsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutArtifacts_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutExecutions(ctx context.Context, in *PutExecutionsRequest, opts ...grpc.CallOption) (*PutExecutionsResponse, error) {
+ out := new(PutExecutionsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutExecutions_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutEvents(ctx context.Context, in *PutEventsRequest, opts ...grpc.CallOption) (*PutEventsResponse, error) {
+ out := new(PutEventsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutEvents_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutExecution(ctx context.Context, in *PutExecutionRequest, opts ...grpc.CallOption) (*PutExecutionResponse, error) {
+ out := new(PutExecutionResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutExecution_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutLineageSubgraph(ctx context.Context, in *PutLineageSubgraphRequest, opts ...grpc.CallOption) (*PutLineageSubgraphResponse, error) {
+ out := new(PutLineageSubgraphResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutLineageSubgraph_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutContexts(ctx context.Context, in *PutContextsRequest, opts ...grpc.CallOption) (*PutContextsResponse, error) {
+ out := new(PutContextsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutContexts_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutAttributionsAndAssociations(ctx context.Context, in *PutAttributionsAndAssociationsRequest, opts ...grpc.CallOption) (*PutAttributionsAndAssociationsResponse, error) {
+ out := new(PutAttributionsAndAssociationsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutAttributionsAndAssociations_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) PutParentContexts(ctx context.Context, in *PutParentContextsRequest, opts ...grpc.CallOption) (*PutParentContextsResponse, error) {
+ out := new(PutParentContextsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_PutParentContexts_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactType(ctx context.Context, in *GetArtifactTypeRequest, opts ...grpc.CallOption) (*GetArtifactTypeResponse, error) {
+ out := new(GetArtifactTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactTypesByID(ctx context.Context, in *GetArtifactTypesByIDRequest, opts ...grpc.CallOption) (*GetArtifactTypesByIDResponse, error) {
+ out := new(GetArtifactTypesByIDResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactTypesByID_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactTypes(ctx context.Context, in *GetArtifactTypesRequest, opts ...grpc.CallOption) (*GetArtifactTypesResponse, error) {
+ out := new(GetArtifactTypesResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactTypes_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionType(ctx context.Context, in *GetExecutionTypeRequest, opts ...grpc.CallOption) (*GetExecutionTypeResponse, error) {
+ out := new(GetExecutionTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionTypesByID(ctx context.Context, in *GetExecutionTypesByIDRequest, opts ...grpc.CallOption) (*GetExecutionTypesByIDResponse, error) {
+ out := new(GetExecutionTypesByIDResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionTypesByID_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionTypes(ctx context.Context, in *GetExecutionTypesRequest, opts ...grpc.CallOption) (*GetExecutionTypesResponse, error) {
+ out := new(GetExecutionTypesResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionTypes_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextType(ctx context.Context, in *GetContextTypeRequest, opts ...grpc.CallOption) (*GetContextTypeResponse, error) {
+ out := new(GetContextTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextTypesByID(ctx context.Context, in *GetContextTypesByIDRequest, opts ...grpc.CallOption) (*GetContextTypesByIDResponse, error) {
+ out := new(GetContextTypesByIDResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextTypesByID_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextTypes(ctx context.Context, in *GetContextTypesRequest, opts ...grpc.CallOption) (*GetContextTypesResponse, error) {
+ out := new(GetContextTypesResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextTypes_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifacts(ctx context.Context, in *GetArtifactsRequest, opts ...grpc.CallOption) (*GetArtifactsResponse, error) {
+ out := new(GetArtifactsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifacts_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutions(ctx context.Context, in *GetExecutionsRequest, opts ...grpc.CallOption) (*GetExecutionsResponse, error) {
+ out := new(GetExecutionsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutions_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContexts(ctx context.Context, in *GetContextsRequest, opts ...grpc.CallOption) (*GetContextsResponse, error) {
+ out := new(GetContextsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContexts_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactsByID(ctx context.Context, in *GetArtifactsByIDRequest, opts ...grpc.CallOption) (*GetArtifactsByIDResponse, error) {
+ out := new(GetArtifactsByIDResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactsByID_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionsByID(ctx context.Context, in *GetExecutionsByIDRequest, opts ...grpc.CallOption) (*GetExecutionsByIDResponse, error) {
+ out := new(GetExecutionsByIDResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionsByID_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextsByID(ctx context.Context, in *GetContextsByIDRequest, opts ...grpc.CallOption) (*GetContextsByIDResponse, error) {
+ out := new(GetContextsByIDResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextsByID_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactsByType(ctx context.Context, in *GetArtifactsByTypeRequest, opts ...grpc.CallOption) (*GetArtifactsByTypeResponse, error) {
+ out := new(GetArtifactsByTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactsByType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionsByType(ctx context.Context, in *GetExecutionsByTypeRequest, opts ...grpc.CallOption) (*GetExecutionsByTypeResponse, error) {
+ out := new(GetExecutionsByTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionsByType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextsByType(ctx context.Context, in *GetContextsByTypeRequest, opts ...grpc.CallOption) (*GetContextsByTypeResponse, error) {
+ out := new(GetContextsByTypeResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextsByType_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactByTypeAndName(ctx context.Context, in *GetArtifactByTypeAndNameRequest, opts ...grpc.CallOption) (*GetArtifactByTypeAndNameResponse, error) {
+ out := new(GetArtifactByTypeAndNameResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactByTypeAndName_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionByTypeAndName(ctx context.Context, in *GetExecutionByTypeAndNameRequest, opts ...grpc.CallOption) (*GetExecutionByTypeAndNameResponse, error) {
+ out := new(GetExecutionByTypeAndNameResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionByTypeAndName_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextByTypeAndName(ctx context.Context, in *GetContextByTypeAndNameRequest, opts ...grpc.CallOption) (*GetContextByTypeAndNameResponse, error) {
+ out := new(GetContextByTypeAndNameResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextByTypeAndName_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactsByURI(ctx context.Context, in *GetArtifactsByURIRequest, opts ...grpc.CallOption) (*GetArtifactsByURIResponse, error) {
+ out := new(GetArtifactsByURIResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactsByURI_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetEventsByExecutionIDs(ctx context.Context, in *GetEventsByExecutionIDsRequest, opts ...grpc.CallOption) (*GetEventsByExecutionIDsResponse, error) {
+ out := new(GetEventsByExecutionIDsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetEventsByExecutionIDs_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetEventsByArtifactIDs(ctx context.Context, in *GetEventsByArtifactIDsRequest, opts ...grpc.CallOption) (*GetEventsByArtifactIDsResponse, error) {
+ out := new(GetEventsByArtifactIDsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetEventsByArtifactIDs_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactsByExternalIds(ctx context.Context, in *GetArtifactsByExternalIdsRequest, opts ...grpc.CallOption) (*GetArtifactsByExternalIdsResponse, error) {
+ out := new(GetArtifactsByExternalIdsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactsByExternalIds_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionsByExternalIds(ctx context.Context, in *GetExecutionsByExternalIdsRequest, opts ...grpc.CallOption) (*GetExecutionsByExternalIdsResponse, error) {
+ out := new(GetExecutionsByExternalIdsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionsByExternalIds_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextsByExternalIds(ctx context.Context, in *GetContextsByExternalIdsRequest, opts ...grpc.CallOption) (*GetContextsByExternalIdsResponse, error) {
+ out := new(GetContextsByExternalIdsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextsByExternalIds_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactTypesByExternalIds(ctx context.Context, in *GetArtifactTypesByExternalIdsRequest, opts ...grpc.CallOption) (*GetArtifactTypesByExternalIdsResponse, error) {
+ out := new(GetArtifactTypesByExternalIdsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactTypesByExternalIds_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionTypesByExternalIds(ctx context.Context, in *GetExecutionTypesByExternalIdsRequest, opts ...grpc.CallOption) (*GetExecutionTypesByExternalIdsResponse, error) {
+ out := new(GetExecutionTypesByExternalIdsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionTypesByExternalIds_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextTypesByExternalIds(ctx context.Context, in *GetContextTypesByExternalIdsRequest, opts ...grpc.CallOption) (*GetContextTypesByExternalIdsResponse, error) {
+ out := new(GetContextTypesByExternalIdsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextTypesByExternalIds_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextsByArtifact(ctx context.Context, in *GetContextsByArtifactRequest, opts ...grpc.CallOption) (*GetContextsByArtifactResponse, error) {
+ out := new(GetContextsByArtifactResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextsByArtifact_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetContextsByExecution(ctx context.Context, in *GetContextsByExecutionRequest, opts ...grpc.CallOption) (*GetContextsByExecutionResponse, error) {
+ out := new(GetContextsByExecutionResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetContextsByExecution_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetParentContextsByContext(ctx context.Context, in *GetParentContextsByContextRequest, opts ...grpc.CallOption) (*GetParentContextsByContextResponse, error) {
+ out := new(GetParentContextsByContextResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetParentContextsByContext_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetChildrenContextsByContext(ctx context.Context, in *GetChildrenContextsByContextRequest, opts ...grpc.CallOption) (*GetChildrenContextsByContextResponse, error) {
+ out := new(GetChildrenContextsByContextResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetChildrenContextsByContext_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetParentContextsByContexts(ctx context.Context, in *GetParentContextsByContextsRequest, opts ...grpc.CallOption) (*GetParentContextsByContextsResponse, error) {
+ out := new(GetParentContextsByContextsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetParentContextsByContexts_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetChildrenContextsByContexts(ctx context.Context, in *GetChildrenContextsByContextsRequest, opts ...grpc.CallOption) (*GetChildrenContextsByContextsResponse, error) {
+ out := new(GetChildrenContextsByContextsResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetChildrenContextsByContexts_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetArtifactsByContext(ctx context.Context, in *GetArtifactsByContextRequest, opts ...grpc.CallOption) (*GetArtifactsByContextResponse, error) {
+ out := new(GetArtifactsByContextResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetArtifactsByContext_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetExecutionsByContext(ctx context.Context, in *GetExecutionsByContextRequest, opts ...grpc.CallOption) (*GetExecutionsByContextResponse, error) {
+ out := new(GetExecutionsByContextResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetExecutionsByContext_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetLineageGraph(ctx context.Context, in *GetLineageGraphRequest, opts ...grpc.CallOption) (*GetLineageGraphResponse, error) {
+ out := new(GetLineageGraphResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetLineageGraph_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *metadataStoreServiceClient) GetLineageSubgraph(ctx context.Context, in *GetLineageSubgraphRequest, opts ...grpc.CallOption) (*GetLineageSubgraphResponse, error) {
+ out := new(GetLineageSubgraphResponse)
+ err := c.cc.Invoke(ctx, MetadataStoreService_GetLineageSubgraph_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// MetadataStoreServiceServer is the server API for MetadataStoreService service.
+// All implementations must embed UnimplementedMetadataStoreServiceServer
+// for forward compatibility
+type MetadataStoreServiceServer interface {
+ // Inserts or updates an ArtifactType.
+ //
+ // A type has a set of strong typed properties describing the schema of any
+ // stored instance associated with that type. A type is identified by a name
+ // and an optional version.
+ //
+ // Type Creation:
+ // If no type exists in the database with the given identifier
+ // (name, version), it creates a new type and returns the type_id.
+ //
+ // Type Evolution:
+ // If the request type with the same (name, version) already exists
+ // (let's call it stored_type), the method enforces the stored_type can be
+ // updated only when the request type is backward compatible for the already
+ // stored instances.
+ //
+ // Backwards compatibility is violated iff:
+ //
+ // a) there is a property where the request type and stored_type have
+ // different value type (e.g., int vs. string)
+ // b) `can_add_fields = false` and the request type has a new property that
+ // is not stored.
+ // c) `can_omit_fields = false` and stored_type has an existing property
+ // that is not provided in the request type.
+ //
+ // If non-backward type change is required in the application, e.g.,
+ // deprecate properties, re-purpose property name, change value types,
+ // a new type can be created with a different (name, version) identifier.
+ // Note the type version is optional, and a version value with empty string
+ // is treated as unset.
+ //
+ // Args:
+ //
+ // artifact_type: the type to be inserted or updated.
+ // can_add_fields:
+ // when set to true, new properties can be added;
+ // when set to false, returns ALREADY_EXISTS if the request type has
+ // properties that are not in stored_type.
+ // can_omit_fields:
+ // when set to true, stored properties can be omitted in the request type;
+ // when set to false, returns ALREADY_EXISTS if the stored_type has
+ // properties not in the request type.
+ //
+ // Returns:
+ //
+ // The type_id of the stored type.
+ //
+ // Raises:
+ //
+ // ALREADY_EXISTS error in the case listed above.
+ // INVALID_ARGUMENT error, if the given type has no name, or any
+ // property value type is unknown.
+ PutArtifactType(context.Context, *PutArtifactTypeRequest) (*PutArtifactTypeResponse, error)
+ // Inserts or updates an ExecutionType. Please refer to PutArtifactType for
+ // type upsert API description.
+ PutExecutionType(context.Context, *PutExecutionTypeRequest) (*PutExecutionTypeResponse, error)
+ // Inserts or updates an ContextType. Please refer to PutArtifactType for
+ // type upsert API description.
+ PutContextType(context.Context, *PutContextTypeRequest) (*PutContextTypeResponse, error)
+ // Bulk inserts types atomically.
+ PutTypes(context.Context, *PutTypesRequest) (*PutTypesResponse, error)
+ // Inserts or updates artifacts in the database.
+ //
+ // If an artifact_id is specified for an artifact, it is an update.
+ // If an artifact_id is unspecified, it will insert a new artifact.
+ // For new artifacts, type must be specified.
+ // For old artifacts, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated artifacts will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ //
+ // artifacts: A list of artifacts to insert or update.
+ //
+ // Returns:
+ //
+ // A list of artifact ids index-aligned with the input.
+ PutArtifacts(context.Context, *PutArtifactsRequest) (*PutArtifactsResponse, error)
+ // Inserts or updates executions in the database.
+ //
+ // If an execution_id is specified for an execution, it is an update.
+ // If an execution_id is unspecified, it will insert a new execution.
+ // For new executions, type must be specified.
+ // For old executions, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated executions will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ //
+ // executions: A list of executions to insert or update.
+ //
+ // Returns:
+ //
+ // A list of execution ids index-aligned with the input.
+ PutExecutions(context.Context, *PutExecutionsRequest) (*PutExecutionsResponse, error)
+ // Inserts events in the database.
+ //
+ // The execution_id and artifact_id must already exist.
+ // Once created, events cannot be modified.
+ // AlreadyExists error will be raised if duplicated events are found.
+ //
+ // It is not guaranteed that the created or updated events will share the
+ // same `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ //
+ // events: A list of events to insert or update.
+ PutEvents(context.Context, *PutEventsRequest) (*PutEventsResponse, error)
+ // Inserts or updates an Execution and its input and output artifacts and
+ // related contexts atomically. The `artifact_event_pairs` include the state
+ // changes of the Artifacts used or generated by the Execution, as well as the
+ // input/output Event. The `contexts` describe the associations of the
+ // execution and the attributions of the artifacts.
+ //
+ // If an execution_id is specified, it is an update on the corresponding
+ // execution, otherwise it does an insertion.
+ // For insertion, type must be specified. Same rule applies to artifacts
+ // and contexts in the request. Corresponding errors may raised. For example:
+ // AlreadyExists error will be raised if duplicated executions, artifacts
+ // or events are found.
+ //
+ // It is not guaranteed that the created or updated executions, artifacts,
+ // contexts and events will share the same `create_time_since_epoch`,
+ // `last_update_time_since_epoch`, or `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ //
+ // execution: An execution to insert or update.
+ // artifact_event_pairs: Artifacts to insert or update and events to insert.
+ // contexts: The contexts that the execution and the artifacts belong to.
+ //
+ // Returns:
+ //
+ // An execution id and a list of artifacts and contexts ids index-aligned
+ // with the input.
+ PutExecution(context.Context, *PutExecutionRequest) (*PutExecutionResponse, error)
+ // Inserts or updates a lineage subgraph (i.e. a collection of event edges
+ // and its executions, artifacts, and related contexts) atomically. The
+ // `event_edges` include an Event and the indices of the corresponding
+ // execution and artifact from the input list of executions and artifacts. The
+ // `contexts` describe the associations of the Execution and the attributions
+ // of the Artifact.
+ //
+ // If an execution_id is specified, it is an update on the corresponding
+ // Execution, otherwise it does an insertion. For insertion, type must be
+ // specified. These rules apply to Artifacts and Contexts as well.
+ // Corresponding errors may be raised. For example: AlreadyExists error will
+ // be raised if duplicated executions, artifacts, or events are found.
+ //
+ // It is not guaranteed that the created or updated executions, artifacts,
+ // contexts and events will share the same `create_time_since_epoch`,
+ // `last_update_time_since_epoch`, or `milliseconds_since_epoch` timestamps.
+ //
+ // Args:
+ //
+ // executions: A list of executions to insert or update.
+ // artifacts: A list of artifacts to insert or update.
+ // contexts: A list of contexts to insert and/or create associations and
+ // attributions with.
+ // event_edges: A list of events to insert with the indices of the
+ // corresponding execution and artifact from the input lists of
+ // executions and artifacts.
+ //
+ // Returns:
+ //
+ // Lists of execution, artifact, and context ids index-aligned with the
+ // inputs.
+ PutLineageSubgraph(context.Context, *PutLineageSubgraphRequest) (*PutLineageSubgraphResponse, error)
+ // Inserts or updates contexts in database and returns a list of context ids.
+ //
+ // If an context_id is specified for a context, it is an update.
+ // If an context_id is unspecified, it will insert a new context.
+ // For new contexts, type must be specified.
+ // For old contexts, type must be unchanged or unspecified.
+ //
+ // It is not guaranteed that the created or updated contexts will share the
+ // same `create_time_since_epoch` or `last_update_time_since_epoch`
+ // timestamps.
+ //
+ // Args:
+ //
+ // contexts: A list of contexts to insert or update.
+ //
+ // Returns:
+ //
+ // A list of context ids index-aligned with the input.
+ PutContexts(context.Context, *PutContextsRequest) (*PutContextsResponse, error)
+ // Inserts attribution and association relationships in the database.
+ // The context_id, artifact_id, and execution_id must already exist.
+ // If the relationship exists, this call does nothing. Once added, the
+ // relationships cannot be modified.
+ //
+ // Args:
+ //
+ // attributions: A list of attributions to insert.
+ // associations: A list of associations to insert.
+ PutAttributionsAndAssociations(context.Context, *PutAttributionsAndAssociationsRequest) (*PutAttributionsAndAssociationsResponse, error)
+ // Inserts parental context relationships in the database.
+ // The ParentContext relationship has direction. The call fails if cycles are
+ // detected.
+ //
+ // Args:
+ //
+ // parent_contexts: A list of parent contexts to insert.
+ PutParentContexts(context.Context, *PutParentContextsRequest) (*PutParentContextsResponse, error)
+ // Gets an artifact type. Returns a NOT_FOUND error if the type does not
+ // exist.
+ GetArtifactType(context.Context, *GetArtifactTypeRequest) (*GetArtifactTypeResponse, error)
+ // Gets a list of artifact types by ID.
+ // If no artifact types with an ID exists, the artifact type is skipped.
+ GetArtifactTypesByID(context.Context, *GetArtifactTypesByIDRequest) (*GetArtifactTypesByIDResponse, error)
+ // Gets a list of all artifact types.
+ GetArtifactTypes(context.Context, *GetArtifactTypesRequest) (*GetArtifactTypesResponse, error)
+ // Gets an execution type, or None if it does not exist.
+ GetExecutionType(context.Context, *GetExecutionTypeRequest) (*GetExecutionTypeResponse, error)
+ // Gets a list of execution types by ID.
+ // If no execution types with an ID exists, the execution type is skipped.
+ GetExecutionTypesByID(context.Context, *GetExecutionTypesByIDRequest) (*GetExecutionTypesByIDResponse, error)
+ // Gets a list of all execution types.
+ GetExecutionTypes(context.Context, *GetExecutionTypesRequest) (*GetExecutionTypesResponse, error)
+ // Gets a context type. Returns a NOT_FOUND error if the type does not exist.
+ GetContextType(context.Context, *GetContextTypeRequest) (*GetContextTypeResponse, error)
+ // Gets a list of context types by ID.
+ // If no context types with an ID exists, the context type is skipped.
+ GetContextTypesByID(context.Context, *GetContextTypesByIDRequest) (*GetContextTypesByIDResponse, error)
+ // Gets a list of all context types.
+ GetContextTypes(context.Context, *GetContextTypesRequest) (*GetContextTypesResponse, error)
+ // Gets all the artifacts.
+ GetArtifacts(context.Context, *GetArtifactsRequest) (*GetArtifactsResponse, error)
+ // Gets all the executions.
+ GetExecutions(context.Context, *GetExecutionsRequest) (*GetExecutionsResponse, error)
+ // Gets all the contexts.
+ GetContexts(context.Context, *GetContextsRequest) (*GetContextsResponse, error)
+ // Gets all artifacts with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ //
+ // artifact_ids: A list of artifact ids to retrieve.
+ //
+ // Returns:
+ //
+ // Artifacts with matching ids.
+ GetArtifactsByID(context.Context, *GetArtifactsByIDRequest) (*GetArtifactsByIDResponse, error)
+ // Gets all executions with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ //
+ // execution_ids: A list of execution ids to retrieve.
+ GetExecutionsByID(context.Context, *GetExecutionsByIDRequest) (*GetExecutionsByIDResponse, error)
+ // Gets all contexts with matching ids.
+ //
+ // The result is not index-aligned: if an id is not found, it is not returned.
+ //
+ // Args:
+ //
+ // context_ids: A list of context ids to retrieve.
+ GetContextsByID(context.Context, *GetContextsByIDRequest) (*GetContextsByIDResponse, error)
+ // Gets all the artifacts of a given type.
+ GetArtifactsByType(context.Context, *GetArtifactsByTypeRequest) (*GetArtifactsByTypeResponse, error)
+ // Gets all the executions of a given type.
+ GetExecutionsByType(context.Context, *GetExecutionsByTypeRequest) (*GetExecutionsByTypeResponse, error)
+ // Gets all the contexts of a given type.
+ GetContextsByType(context.Context, *GetContextsByTypeRequest) (*GetContextsByTypeResponse, error)
+ // Gets the artifact of the given type and artifact name.
+ GetArtifactByTypeAndName(context.Context, *GetArtifactByTypeAndNameRequest) (*GetArtifactByTypeAndNameResponse, error)
+ // Gets the execution of the given type and execution name.
+ GetExecutionByTypeAndName(context.Context, *GetExecutionByTypeAndNameRequest) (*GetExecutionByTypeAndNameResponse, error)
+ // Gets the context of the given type and context name.
+ GetContextByTypeAndName(context.Context, *GetContextByTypeAndNameRequest) (*GetContextByTypeAndNameResponse, error)
+ // Gets all the artifacts with matching uris.
+ GetArtifactsByURI(context.Context, *GetArtifactsByURIRequest) (*GetArtifactsByURIResponse, error)
+ // Gets all events with matching execution ids.
+ GetEventsByExecutionIDs(context.Context, *GetEventsByExecutionIDsRequest) (*GetEventsByExecutionIDsResponse, error)
+ // Gets all events with matching artifact ids.
+ GetEventsByArtifactIDs(context.Context, *GetEventsByArtifactIDsRequest) (*GetEventsByArtifactIDsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetArtifactsByExternalIds(context.Context, *GetArtifactsByExternalIdsRequest) (*GetArtifactsByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetExecutionsByExternalIds(context.Context, *GetExecutionsByExternalIdsRequest) (*GetExecutionsByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetContextsByExternalIds(context.Context, *GetContextsByExternalIdsRequest) (*GetContextsByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetArtifactTypesByExternalIds(context.Context, *GetArtifactTypesByExternalIdsRequest) (*GetArtifactTypesByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetExecutionTypesByExternalIds(context.Context, *GetExecutionTypesByExternalIdsRequest) (*GetExecutionTypesByExternalIdsResponse, error)
+ // Gets all the artifacts with matching external ids.
+ GetContextTypesByExternalIds(context.Context, *GetContextTypesByExternalIdsRequest) (*GetContextTypesByExternalIdsResponse, error)
+ // Gets all context that an artifact is attributed to.
+ GetContextsByArtifact(context.Context, *GetContextsByArtifactRequest) (*GetContextsByArtifactResponse, error)
+ // Gets all context that an execution is associated with.
+ GetContextsByExecution(context.Context, *GetContextsByExecutionRequest) (*GetContextsByExecutionResponse, error)
+ // Gets all parent contexts that a context is related.
+ GetParentContextsByContext(context.Context, *GetParentContextsByContextRequest) (*GetParentContextsByContextResponse, error)
+ // Gets all children contexts that a context is related.
+ GetChildrenContextsByContext(context.Context, *GetChildrenContextsByContextRequest) (*GetChildrenContextsByContextResponse, error)
+ // Batch getting all the parent contexts that a list of contexts are related.
+ GetParentContextsByContexts(context.Context, *GetParentContextsByContextsRequest) (*GetParentContextsByContextsResponse, error)
+ // Batch getting all the children contexts that a list of contexts are
+ // related.
+ GetChildrenContextsByContexts(context.Context, *GetChildrenContextsByContextsRequest) (*GetChildrenContextsByContextsResponse, error)
+ // Gets all direct artifacts that a context attributes to.
+ GetArtifactsByContext(context.Context, *GetArtifactsByContextRequest) (*GetArtifactsByContextResponse, error)
+ // Gets all direct executions that a context associates with.
+ GetExecutionsByContext(context.Context, *GetExecutionsByContextRequest) (*GetExecutionsByContextResponse, error)
+ // TODO(b/283852485): Deprecate GetLineageGraph API after migration to
+ // GetLineageSubgraph API.
+ // The transaction performs a constrained transitive closure and returns a
+ // lineage subgraph satisfying the conditions and constraints specified in
+ // the GetLineageGraphRequest.
+ GetLineageGraph(context.Context, *GetLineageGraphRequest) (*GetLineageGraphResponse, error)
+ // Gets a lineage subgraph by performing graph traversal from a list of
+ // interested nodes.
+ // A lineage subgraph without node details (e.g., external_id, properties)
+ // will be returned.
+ GetLineageSubgraph(context.Context, *GetLineageSubgraphRequest) (*GetLineageSubgraphResponse, error)
+ mustEmbedUnimplementedMetadataStoreServiceServer()
+}
+
+// UnimplementedMetadataStoreServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedMetadataStoreServiceServer struct {
+}
+
+func (UnimplementedMetadataStoreServiceServer) PutArtifactType(context.Context, *PutArtifactTypeRequest) (*PutArtifactTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutArtifactType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutExecutionType(context.Context, *PutExecutionTypeRequest) (*PutExecutionTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutExecutionType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutContextType(context.Context, *PutContextTypeRequest) (*PutContextTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutContextType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutTypes(context.Context, *PutTypesRequest) (*PutTypesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutTypes not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutArtifacts(context.Context, *PutArtifactsRequest) (*PutArtifactsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutArtifacts not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutExecutions(context.Context, *PutExecutionsRequest) (*PutExecutionsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutExecutions not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutEvents(context.Context, *PutEventsRequest) (*PutEventsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutEvents not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutExecution(context.Context, *PutExecutionRequest) (*PutExecutionResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutExecution not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutLineageSubgraph(context.Context, *PutLineageSubgraphRequest) (*PutLineageSubgraphResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutLineageSubgraph not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutContexts(context.Context, *PutContextsRequest) (*PutContextsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutContexts not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutAttributionsAndAssociations(context.Context, *PutAttributionsAndAssociationsRequest) (*PutAttributionsAndAssociationsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutAttributionsAndAssociations not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) PutParentContexts(context.Context, *PutParentContextsRequest) (*PutParentContextsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PutParentContexts not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactType(context.Context, *GetArtifactTypeRequest) (*GetArtifactTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactTypesByID(context.Context, *GetArtifactTypesByIDRequest) (*GetArtifactTypesByIDResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactTypesByID not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactTypes(context.Context, *GetArtifactTypesRequest) (*GetArtifactTypesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactTypes not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionType(context.Context, *GetExecutionTypeRequest) (*GetExecutionTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionTypesByID(context.Context, *GetExecutionTypesByIDRequest) (*GetExecutionTypesByIDResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionTypesByID not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionTypes(context.Context, *GetExecutionTypesRequest) (*GetExecutionTypesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionTypes not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextType(context.Context, *GetContextTypeRequest) (*GetContextTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextTypesByID(context.Context, *GetContextTypesByIDRequest) (*GetContextTypesByIDResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextTypesByID not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextTypes(context.Context, *GetContextTypesRequest) (*GetContextTypesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextTypes not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifacts(context.Context, *GetArtifactsRequest) (*GetArtifactsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifacts not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutions(context.Context, *GetExecutionsRequest) (*GetExecutionsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutions not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContexts(context.Context, *GetContextsRequest) (*GetContextsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContexts not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactsByID(context.Context, *GetArtifactsByIDRequest) (*GetArtifactsByIDResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactsByID not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionsByID(context.Context, *GetExecutionsByIDRequest) (*GetExecutionsByIDResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionsByID not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextsByID(context.Context, *GetContextsByIDRequest) (*GetContextsByIDResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextsByID not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactsByType(context.Context, *GetArtifactsByTypeRequest) (*GetArtifactsByTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactsByType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionsByType(context.Context, *GetExecutionsByTypeRequest) (*GetExecutionsByTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionsByType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextsByType(context.Context, *GetContextsByTypeRequest) (*GetContextsByTypeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextsByType not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactByTypeAndName(context.Context, *GetArtifactByTypeAndNameRequest) (*GetArtifactByTypeAndNameResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactByTypeAndName not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionByTypeAndName(context.Context, *GetExecutionByTypeAndNameRequest) (*GetExecutionByTypeAndNameResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionByTypeAndName not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextByTypeAndName(context.Context, *GetContextByTypeAndNameRequest) (*GetContextByTypeAndNameResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextByTypeAndName not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactsByURI(context.Context, *GetArtifactsByURIRequest) (*GetArtifactsByURIResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactsByURI not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetEventsByExecutionIDs(context.Context, *GetEventsByExecutionIDsRequest) (*GetEventsByExecutionIDsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetEventsByExecutionIDs not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetEventsByArtifactIDs(context.Context, *GetEventsByArtifactIDsRequest) (*GetEventsByArtifactIDsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetEventsByArtifactIDs not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactsByExternalIds(context.Context, *GetArtifactsByExternalIdsRequest) (*GetArtifactsByExternalIdsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactsByExternalIds not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionsByExternalIds(context.Context, *GetExecutionsByExternalIdsRequest) (*GetExecutionsByExternalIdsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionsByExternalIds not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextsByExternalIds(context.Context, *GetContextsByExternalIdsRequest) (*GetContextsByExternalIdsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextsByExternalIds not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactTypesByExternalIds(context.Context, *GetArtifactTypesByExternalIdsRequest) (*GetArtifactTypesByExternalIdsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactTypesByExternalIds not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionTypesByExternalIds(context.Context, *GetExecutionTypesByExternalIdsRequest) (*GetExecutionTypesByExternalIdsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionTypesByExternalIds not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextTypesByExternalIds(context.Context, *GetContextTypesByExternalIdsRequest) (*GetContextTypesByExternalIdsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextTypesByExternalIds not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextsByArtifact(context.Context, *GetContextsByArtifactRequest) (*GetContextsByArtifactResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextsByArtifact not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetContextsByExecution(context.Context, *GetContextsByExecutionRequest) (*GetContextsByExecutionResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetContextsByExecution not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetParentContextsByContext(context.Context, *GetParentContextsByContextRequest) (*GetParentContextsByContextResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetParentContextsByContext not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetChildrenContextsByContext(context.Context, *GetChildrenContextsByContextRequest) (*GetChildrenContextsByContextResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetChildrenContextsByContext not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetParentContextsByContexts(context.Context, *GetParentContextsByContextsRequest) (*GetParentContextsByContextsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetParentContextsByContexts not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetChildrenContextsByContexts(context.Context, *GetChildrenContextsByContextsRequest) (*GetChildrenContextsByContextsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetChildrenContextsByContexts not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetArtifactsByContext(context.Context, *GetArtifactsByContextRequest) (*GetArtifactsByContextResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetArtifactsByContext not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetExecutionsByContext(context.Context, *GetExecutionsByContextRequest) (*GetExecutionsByContextResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetExecutionsByContext not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetLineageGraph(context.Context, *GetLineageGraphRequest) (*GetLineageGraphResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetLineageGraph not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) GetLineageSubgraph(context.Context, *GetLineageSubgraphRequest) (*GetLineageSubgraphResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetLineageSubgraph not implemented")
+}
+func (UnimplementedMetadataStoreServiceServer) mustEmbedUnimplementedMetadataStoreServiceServer() {}
+
+// UnsafeMetadataStoreServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to MetadataStoreServiceServer will
+// result in compilation errors.
+type UnsafeMetadataStoreServiceServer interface {
+ mustEmbedUnimplementedMetadataStoreServiceServer()
+}
+
+func RegisterMetadataStoreServiceServer(s grpc.ServiceRegistrar, srv MetadataStoreServiceServer) {
+ s.RegisterService(&MetadataStoreService_ServiceDesc, srv)
+}
+
+func _MetadataStoreService_PutArtifactType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutArtifactTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutArtifactType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutArtifactType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutArtifactType(ctx, req.(*PutArtifactTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutExecutionType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutExecutionTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutExecutionType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutExecutionType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutExecutionType(ctx, req.(*PutExecutionTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutContextType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutContextTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutContextType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutContextType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutContextType(ctx, req.(*PutContextTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutTypesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutTypes(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutTypes_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutTypes(ctx, req.(*PutTypesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutArtifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutArtifactsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutArtifacts(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutArtifacts_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutArtifacts(ctx, req.(*PutArtifactsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutExecutions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutExecutionsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutExecutions(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutExecutions_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutExecutions(ctx, req.(*PutExecutionsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutEventsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutEvents(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutEvents_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutEvents(ctx, req.(*PutEventsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutExecutionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutExecution(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutExecution_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutExecution(ctx, req.(*PutExecutionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutLineageSubgraph_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutLineageSubgraphRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutLineageSubgraph(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutLineageSubgraph_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutLineageSubgraph(ctx, req.(*PutLineageSubgraphRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutContextsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutContexts(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutContexts_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutContexts(ctx, req.(*PutContextsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutAttributionsAndAssociations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutAttributionsAndAssociationsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutAttributionsAndAssociations(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutAttributionsAndAssociations_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutAttributionsAndAssociations(ctx, req.(*PutAttributionsAndAssociationsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_PutParentContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PutParentContextsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).PutParentContexts(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_PutParentContexts_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).PutParentContexts(ctx, req.(*PutParentContextsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactType(ctx, req.(*GetArtifactTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactTypesByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactTypesByIDRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactTypesByID(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactTypesByID_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactTypesByID(ctx, req.(*GetArtifactTypesByIDRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactTypesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactTypes(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactTypes_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactTypes(ctx, req.(*GetArtifactTypesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionType(ctx, req.(*GetExecutionTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionTypesByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionTypesByIDRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionTypesByID(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionTypesByID_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionTypesByID(ctx, req.(*GetExecutionTypesByIDRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionTypesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionTypes(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionTypes_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionTypes(ctx, req.(*GetExecutionTypesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextType(ctx, req.(*GetContextTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextTypesByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextTypesByIDRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextTypesByID(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextTypesByID_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextTypesByID(ctx, req.(*GetContextTypesByIDRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextTypesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextTypes(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextTypes_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextTypes(ctx, req.(*GetContextTypesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifacts(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifacts_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifacts(ctx, req.(*GetArtifactsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutions(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutions_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutions(ctx, req.(*GetExecutionsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContexts(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContexts_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContexts(ctx, req.(*GetContextsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactsByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactsByIDRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByID(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactsByID_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByID(ctx, req.(*GetArtifactsByIDRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionsByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionsByIDRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionsByID(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionsByID_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionsByID(ctx, req.(*GetExecutionsByIDRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextsByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextsByIDRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextsByID(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextsByID_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextsByID(ctx, req.(*GetContextsByIDRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactsByType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactsByTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactsByType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByType(ctx, req.(*GetArtifactsByTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionsByType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionsByTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionsByType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionsByType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionsByType(ctx, req.(*GetExecutionsByTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextsByType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextsByTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextsByType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextsByType_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextsByType(ctx, req.(*GetContextsByTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactByTypeAndName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactByTypeAndNameRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactByTypeAndName(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactByTypeAndName_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactByTypeAndName(ctx, req.(*GetArtifactByTypeAndNameRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionByTypeAndName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionByTypeAndNameRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionByTypeAndName(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionByTypeAndName_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionByTypeAndName(ctx, req.(*GetExecutionByTypeAndNameRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextByTypeAndName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextByTypeAndNameRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextByTypeAndName(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextByTypeAndName_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextByTypeAndName(ctx, req.(*GetContextByTypeAndNameRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactsByURI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactsByURIRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByURI(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactsByURI_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByURI(ctx, req.(*GetArtifactsByURIRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetEventsByExecutionIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetEventsByExecutionIDsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetEventsByExecutionIDs(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetEventsByExecutionIDs_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetEventsByExecutionIDs(ctx, req.(*GetEventsByExecutionIDsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetEventsByArtifactIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetEventsByArtifactIDsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetEventsByArtifactIDs(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetEventsByArtifactIDs_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetEventsByArtifactIDs(ctx, req.(*GetEventsByArtifactIDsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactsByExternalIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactsByExternalIdsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByExternalIds(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactsByExternalIds_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByExternalIds(ctx, req.(*GetArtifactsByExternalIdsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionsByExternalIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionsByExternalIdsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionsByExternalIds(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionsByExternalIds_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionsByExternalIds(ctx, req.(*GetExecutionsByExternalIdsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextsByExternalIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextsByExternalIdsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextsByExternalIds(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextsByExternalIds_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextsByExternalIds(ctx, req.(*GetContextsByExternalIdsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactTypesByExternalIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactTypesByExternalIdsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactTypesByExternalIds(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactTypesByExternalIds_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactTypesByExternalIds(ctx, req.(*GetArtifactTypesByExternalIdsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionTypesByExternalIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionTypesByExternalIdsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionTypesByExternalIds(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionTypesByExternalIds_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionTypesByExternalIds(ctx, req.(*GetExecutionTypesByExternalIdsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextTypesByExternalIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextTypesByExternalIdsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextTypesByExternalIds(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextTypesByExternalIds_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextTypesByExternalIds(ctx, req.(*GetContextTypesByExternalIdsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextsByArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextsByArtifactRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextsByArtifact(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextsByArtifact_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextsByArtifact(ctx, req.(*GetContextsByArtifactRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetContextsByExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetContextsByExecutionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetContextsByExecution(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetContextsByExecution_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetContextsByExecution(ctx, req.(*GetContextsByExecutionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetParentContextsByContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetParentContextsByContextRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetParentContextsByContext(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetParentContextsByContext_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetParentContextsByContext(ctx, req.(*GetParentContextsByContextRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetChildrenContextsByContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetChildrenContextsByContextRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetChildrenContextsByContext(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetChildrenContextsByContext_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetChildrenContextsByContext(ctx, req.(*GetChildrenContextsByContextRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetParentContextsByContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetParentContextsByContextsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetParentContextsByContexts(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetParentContextsByContexts_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetParentContextsByContexts(ctx, req.(*GetParentContextsByContextsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetChildrenContextsByContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetChildrenContextsByContextsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetChildrenContextsByContexts(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetChildrenContextsByContexts_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetChildrenContextsByContexts(ctx, req.(*GetChildrenContextsByContextsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetArtifactsByContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetArtifactsByContextRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByContext(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetArtifactsByContext_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetArtifactsByContext(ctx, req.(*GetArtifactsByContextRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetExecutionsByContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetExecutionsByContextRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetExecutionsByContext(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetExecutionsByContext_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetExecutionsByContext(ctx, req.(*GetExecutionsByContextRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetLineageGraph_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetLineageGraphRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetLineageGraph(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetLineageGraph_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetLineageGraph(ctx, req.(*GetLineageGraphRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MetadataStoreService_GetLineageSubgraph_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetLineageSubgraphRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MetadataStoreServiceServer).GetLineageSubgraph(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MetadataStoreService_GetLineageSubgraph_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MetadataStoreServiceServer).GetLineageSubgraph(ctx, req.(*GetLineageSubgraphRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// MetadataStoreService_ServiceDesc is the grpc.ServiceDesc for MetadataStoreService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var MetadataStoreService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "ml_metadata.MetadataStoreService",
+ HandlerType: (*MetadataStoreServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "PutArtifactType",
+ Handler: _MetadataStoreService_PutArtifactType_Handler,
+ },
+ {
+ MethodName: "PutExecutionType",
+ Handler: _MetadataStoreService_PutExecutionType_Handler,
+ },
+ {
+ MethodName: "PutContextType",
+ Handler: _MetadataStoreService_PutContextType_Handler,
+ },
+ {
+ MethodName: "PutTypes",
+ Handler: _MetadataStoreService_PutTypes_Handler,
+ },
+ {
+ MethodName: "PutArtifacts",
+ Handler: _MetadataStoreService_PutArtifacts_Handler,
+ },
+ {
+ MethodName: "PutExecutions",
+ Handler: _MetadataStoreService_PutExecutions_Handler,
+ },
+ {
+ MethodName: "PutEvents",
+ Handler: _MetadataStoreService_PutEvents_Handler,
+ },
+ {
+ MethodName: "PutExecution",
+ Handler: _MetadataStoreService_PutExecution_Handler,
+ },
+ {
+ MethodName: "PutLineageSubgraph",
+ Handler: _MetadataStoreService_PutLineageSubgraph_Handler,
+ },
+ {
+ MethodName: "PutContexts",
+ Handler: _MetadataStoreService_PutContexts_Handler,
+ },
+ {
+ MethodName: "PutAttributionsAndAssociations",
+ Handler: _MetadataStoreService_PutAttributionsAndAssociations_Handler,
+ },
+ {
+ MethodName: "PutParentContexts",
+ Handler: _MetadataStoreService_PutParentContexts_Handler,
+ },
+ {
+ MethodName: "GetArtifactType",
+ Handler: _MetadataStoreService_GetArtifactType_Handler,
+ },
+ {
+ MethodName: "GetArtifactTypesByID",
+ Handler: _MetadataStoreService_GetArtifactTypesByID_Handler,
+ },
+ {
+ MethodName: "GetArtifactTypes",
+ Handler: _MetadataStoreService_GetArtifactTypes_Handler,
+ },
+ {
+ MethodName: "GetExecutionType",
+ Handler: _MetadataStoreService_GetExecutionType_Handler,
+ },
+ {
+ MethodName: "GetExecutionTypesByID",
+ Handler: _MetadataStoreService_GetExecutionTypesByID_Handler,
+ },
+ {
+ MethodName: "GetExecutionTypes",
+ Handler: _MetadataStoreService_GetExecutionTypes_Handler,
+ },
+ {
+ MethodName: "GetContextType",
+ Handler: _MetadataStoreService_GetContextType_Handler,
+ },
+ {
+ MethodName: "GetContextTypesByID",
+ Handler: _MetadataStoreService_GetContextTypesByID_Handler,
+ },
+ {
+ MethodName: "GetContextTypes",
+ Handler: _MetadataStoreService_GetContextTypes_Handler,
+ },
+ {
+ MethodName: "GetArtifacts",
+ Handler: _MetadataStoreService_GetArtifacts_Handler,
+ },
+ {
+ MethodName: "GetExecutions",
+ Handler: _MetadataStoreService_GetExecutions_Handler,
+ },
+ {
+ MethodName: "GetContexts",
+ Handler: _MetadataStoreService_GetContexts_Handler,
+ },
+ {
+ MethodName: "GetArtifactsByID",
+ Handler: _MetadataStoreService_GetArtifactsByID_Handler,
+ },
+ {
+ MethodName: "GetExecutionsByID",
+ Handler: _MetadataStoreService_GetExecutionsByID_Handler,
+ },
+ {
+ MethodName: "GetContextsByID",
+ Handler: _MetadataStoreService_GetContextsByID_Handler,
+ },
+ {
+ MethodName: "GetArtifactsByType",
+ Handler: _MetadataStoreService_GetArtifactsByType_Handler,
+ },
+ {
+ MethodName: "GetExecutionsByType",
+ Handler: _MetadataStoreService_GetExecutionsByType_Handler,
+ },
+ {
+ MethodName: "GetContextsByType",
+ Handler: _MetadataStoreService_GetContextsByType_Handler,
+ },
+ {
+ MethodName: "GetArtifactByTypeAndName",
+ Handler: _MetadataStoreService_GetArtifactByTypeAndName_Handler,
+ },
+ {
+ MethodName: "GetExecutionByTypeAndName",
+ Handler: _MetadataStoreService_GetExecutionByTypeAndName_Handler,
+ },
+ {
+ MethodName: "GetContextByTypeAndName",
+ Handler: _MetadataStoreService_GetContextByTypeAndName_Handler,
+ },
+ {
+ MethodName: "GetArtifactsByURI",
+ Handler: _MetadataStoreService_GetArtifactsByURI_Handler,
+ },
+ {
+ MethodName: "GetEventsByExecutionIDs",
+ Handler: _MetadataStoreService_GetEventsByExecutionIDs_Handler,
+ },
+ {
+ MethodName: "GetEventsByArtifactIDs",
+ Handler: _MetadataStoreService_GetEventsByArtifactIDs_Handler,
+ },
+ {
+ MethodName: "GetArtifactsByExternalIds",
+ Handler: _MetadataStoreService_GetArtifactsByExternalIds_Handler,
+ },
+ {
+ MethodName: "GetExecutionsByExternalIds",
+ Handler: _MetadataStoreService_GetExecutionsByExternalIds_Handler,
+ },
+ {
+ MethodName: "GetContextsByExternalIds",
+ Handler: _MetadataStoreService_GetContextsByExternalIds_Handler,
+ },
+ {
+ MethodName: "GetArtifactTypesByExternalIds",
+ Handler: _MetadataStoreService_GetArtifactTypesByExternalIds_Handler,
+ },
+ {
+ MethodName: "GetExecutionTypesByExternalIds",
+ Handler: _MetadataStoreService_GetExecutionTypesByExternalIds_Handler,
+ },
+ {
+ MethodName: "GetContextTypesByExternalIds",
+ Handler: _MetadataStoreService_GetContextTypesByExternalIds_Handler,
+ },
+ {
+ MethodName: "GetContextsByArtifact",
+ Handler: _MetadataStoreService_GetContextsByArtifact_Handler,
+ },
+ {
+ MethodName: "GetContextsByExecution",
+ Handler: _MetadataStoreService_GetContextsByExecution_Handler,
+ },
+ {
+ MethodName: "GetParentContextsByContext",
+ Handler: _MetadataStoreService_GetParentContextsByContext_Handler,
+ },
+ {
+ MethodName: "GetChildrenContextsByContext",
+ Handler: _MetadataStoreService_GetChildrenContextsByContext_Handler,
+ },
+ {
+ MethodName: "GetParentContextsByContexts",
+ Handler: _MetadataStoreService_GetParentContextsByContexts_Handler,
+ },
+ {
+ MethodName: "GetChildrenContextsByContexts",
+ Handler: _MetadataStoreService_GetChildrenContextsByContexts_Handler,
+ },
+ {
+ MethodName: "GetArtifactsByContext",
+ Handler: _MetadataStoreService_GetArtifactsByContext_Handler,
+ },
+ {
+ MethodName: "GetExecutionsByContext",
+ Handler: _MetadataStoreService_GetExecutionsByContext_Handler,
+ },
+ {
+ MethodName: "GetLineageGraph",
+ Handler: _MetadataStoreService_GetLineageGraph_Handler,
+ },
+ {
+ MethodName: "GetLineageSubgraph",
+ Handler: _MetadataStoreService_GetLineageSubgraph_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "ml_metadata/proto/metadata_store_service.proto",
+}
diff --git a/internal/mlmdtypes/mlmdtypes.go b/internal/mlmdtypes/mlmdtypes.go
new file mode 100644
index 000000000..f8ab687db
--- /dev/null
+++ b/internal/mlmdtypes/mlmdtypes.go
@@ -0,0 +1,144 @@
+package mlmdtypes
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/opendatahub-io/model-registry/internal/apiutils"
+ "github.com/opendatahub-io/model-registry/internal/constants"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "google.golang.org/grpc"
+)
+
+var (
+ registeredModelTypeName = apiutils.Of(constants.RegisteredModelTypeName)
+ modelVersionTypeName = apiutils.Of(constants.ModelVersionTypeName)
+ modelArtifactTypeName = apiutils.Of(constants.ModelArtifactTypeName)
+ servingEnvironmentTypeName = apiutils.Of(constants.ServingEnvironmentTypeName)
+ inferenceServiceTypeName = apiutils.Of(constants.InferenceServiceTypeName)
+ serveModelTypeName = apiutils.Of(constants.ServeModelTypeName)
+ canAddFields = apiutils.Of(true)
+)
+
+// Utility method that created the necessary Model Registry's logical-model types
+// as the necessary MLMD's Context, Artifact, Execution types etc. in the underlying MLMD service
+func CreateMLMDTypes(cc grpc.ClientConnInterface) (map[string]int64, error) {
+ client := proto.NewMetadataStoreServiceClient(cc)
+
+ registeredModelReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: registeredModelTypeName,
+ Properties: map[string]proto.PropertyType{
+ "description": proto.PropertyType_STRING,
+ "state": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ modelVersionReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: modelVersionTypeName,
+ Properties: map[string]proto.PropertyType{
+ "description": proto.PropertyType_STRING,
+ "model_name": proto.PropertyType_STRING,
+ "version": proto.PropertyType_STRING,
+ "author": proto.PropertyType_STRING,
+ "state": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ modelArtifactReq := proto.PutArtifactTypeRequest{
+ CanAddFields: canAddFields,
+ ArtifactType: &proto.ArtifactType{
+ Name: modelArtifactTypeName,
+ Properties: map[string]proto.PropertyType{
+ "description": proto.PropertyType_STRING,
+ "model_format_name": proto.PropertyType_STRING,
+ "model_format_version": proto.PropertyType_STRING,
+ "storage_key": proto.PropertyType_STRING,
+ "storage_path": proto.PropertyType_STRING,
+ "service_account_name": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ servingEnvironmentReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: servingEnvironmentTypeName,
+ Properties: map[string]proto.PropertyType{
+ "description": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ inferenceServiceReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: inferenceServiceTypeName,
+ Properties: map[string]proto.PropertyType{
+ "description": proto.PropertyType_STRING,
+ "model_version_id": proto.PropertyType_INT,
+ "registered_model_id": proto.PropertyType_INT,
+ // same information tracked using ParentContext association
+ "serving_environment_id": proto.PropertyType_INT,
+ "runtime": proto.PropertyType_STRING,
+ "desired_state": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ serveModelReq := proto.PutExecutionTypeRequest{
+ CanAddFields: canAddFields,
+ ExecutionType: &proto.ExecutionType{
+ Name: serveModelTypeName,
+ Properties: map[string]proto.PropertyType{
+ "description": proto.PropertyType_STRING,
+ "model_version_id": proto.PropertyType_INT,
+ },
+ },
+ }
+
+ registeredModelResp, err := client.PutContextType(context.Background(), ®isteredModelReq)
+ if err != nil {
+ return nil, fmt.Errorf("error setting up context type %s: %v", *registeredModelTypeName, err)
+ }
+
+ modelVersionResp, err := client.PutContextType(context.Background(), &modelVersionReq)
+ if err != nil {
+ return nil, fmt.Errorf("error setting up context type %s: %v", *modelVersionTypeName, err)
+ }
+
+ modelArtifactResp, err := client.PutArtifactType(context.Background(), &modelArtifactReq)
+ if err != nil {
+ return nil, fmt.Errorf("error setting up artifact type %s: %v", *modelArtifactTypeName, err)
+ }
+
+ servingEnvironmentResp, err := client.PutContextType(context.Background(), &servingEnvironmentReq)
+ if err != nil {
+ return nil, fmt.Errorf("error setting up context type %s: %v", *servingEnvironmentTypeName, err)
+ }
+
+ inferenceServiceResp, err := client.PutContextType(context.Background(), &inferenceServiceReq)
+ if err != nil {
+ return nil, fmt.Errorf("error setting up context type %s: %v", *inferenceServiceTypeName, err)
+ }
+
+ serveModelResp, err := client.PutExecutionType(context.Background(), &serveModelReq)
+ if err != nil {
+ return nil, fmt.Errorf("error setting up execution type %s: %v", *serveModelTypeName, err)
+ }
+
+ typesMap := map[string]int64{
+ constants.RegisteredModelTypeName: registeredModelResp.GetTypeId(),
+ constants.ModelVersionTypeName: modelVersionResp.GetTypeId(),
+ constants.ModelArtifactTypeName: modelArtifactResp.GetTypeId(),
+ constants.ServingEnvironmentTypeName: servingEnvironmentResp.GetTypeId(),
+ constants.InferenceServiceTypeName: inferenceServiceResp.GetTypeId(),
+ constants.ServeModelTypeName: serveModelResp.GetTypeId(),
+ }
+ return typesMap, nil
+}
diff --git a/internal/server/openapi/.openapi-generator/FILES b/internal/server/openapi/.openapi-generator/FILES
new file mode 100644
index 000000000..0e1bc12cb
--- /dev/null
+++ b/internal/server/openapi/.openapi-generator/FILES
@@ -0,0 +1,7 @@
+api.go
+api_model_registry_service.go
+error.go
+helpers.go
+impl.go
+logger.go
+routers.go
diff --git a/internal/server/openapi/.openapi-generator/VERSION b/internal/server/openapi/.openapi-generator/VERSION
new file mode 100644
index 000000000..9fe9ff9d9
--- /dev/null
+++ b/internal/server/openapi/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.0.1
diff --git a/internal/server/openapi/api.go b/internal/server/openapi/api.go
new file mode 100644
index 000000000..d4a7584e7
--- /dev/null
+++ b/internal/server/openapi/api.go
@@ -0,0 +1,100 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package openapi
+
+import (
+ "context"
+ "net/http"
+
+ model "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+// ModelRegistryServiceAPIRouter defines the required methods for binding the api requests to a responses for the ModelRegistryServiceAPI
+// The ModelRegistryServiceAPIRouter implementation should parse necessary information from the http request,
+// pass the data to a ModelRegistryServiceAPIServicer to perform the required actions, then write the service results to the http response.
+type ModelRegistryServiceAPIRouter interface {
+ CreateEnvironmentInferenceService(http.ResponseWriter, *http.Request)
+ CreateInferenceService(http.ResponseWriter, *http.Request)
+ CreateInferenceServiceServe(http.ResponseWriter, *http.Request)
+ CreateModelArtifact(http.ResponseWriter, *http.Request)
+ CreateModelVersion(http.ResponseWriter, *http.Request)
+ CreateModelVersionArtifact(http.ResponseWriter, *http.Request)
+ CreateRegisteredModel(http.ResponseWriter, *http.Request)
+ CreateRegisteredModelVersion(http.ResponseWriter, *http.Request)
+ CreateServingEnvironment(http.ResponseWriter, *http.Request)
+ FindInferenceService(http.ResponseWriter, *http.Request)
+ FindModelArtifact(http.ResponseWriter, *http.Request)
+ FindModelVersion(http.ResponseWriter, *http.Request)
+ FindRegisteredModel(http.ResponseWriter, *http.Request)
+ FindServingEnvironment(http.ResponseWriter, *http.Request)
+ GetEnvironmentInferenceServices(http.ResponseWriter, *http.Request)
+ GetInferenceService(http.ResponseWriter, *http.Request)
+ GetInferenceServiceModel(http.ResponseWriter, *http.Request)
+ GetInferenceServiceServes(http.ResponseWriter, *http.Request)
+ GetInferenceServiceVersion(http.ResponseWriter, *http.Request)
+ GetInferenceServices(http.ResponseWriter, *http.Request)
+ GetModelArtifact(http.ResponseWriter, *http.Request)
+ GetModelArtifacts(http.ResponseWriter, *http.Request)
+ GetModelVersion(http.ResponseWriter, *http.Request)
+ GetModelVersionArtifacts(http.ResponseWriter, *http.Request)
+ GetModelVersions(http.ResponseWriter, *http.Request)
+ GetRegisteredModel(http.ResponseWriter, *http.Request)
+ GetRegisteredModelVersions(http.ResponseWriter, *http.Request)
+ GetRegisteredModels(http.ResponseWriter, *http.Request)
+ GetServingEnvironment(http.ResponseWriter, *http.Request)
+ GetServingEnvironments(http.ResponseWriter, *http.Request)
+ UpdateInferenceService(http.ResponseWriter, *http.Request)
+ UpdateModelArtifact(http.ResponseWriter, *http.Request)
+ UpdateModelVersion(http.ResponseWriter, *http.Request)
+ UpdateRegisteredModel(http.ResponseWriter, *http.Request)
+ UpdateServingEnvironment(http.ResponseWriter, *http.Request)
+}
+
+// ModelRegistryServiceAPIServicer defines the api actions for the ModelRegistryServiceAPI service
+// This interface intended to stay up to date with the openapi yaml used to generate it,
+// while the service implementation can be ignored with the .openapi-generator-ignore file
+// and updated with the logic required for the API.
+type ModelRegistryServiceAPIServicer interface {
+ CreateEnvironmentInferenceService(context.Context, string, model.InferenceServiceCreate) (ImplResponse, error)
+ CreateInferenceService(context.Context, model.InferenceServiceCreate) (ImplResponse, error)
+ CreateInferenceServiceServe(context.Context, string, model.ServeModelCreate) (ImplResponse, error)
+ CreateModelArtifact(context.Context, model.ModelArtifactCreate) (ImplResponse, error)
+ CreateModelVersion(context.Context, model.ModelVersionCreate) (ImplResponse, error)
+ CreateModelVersionArtifact(context.Context, string, model.Artifact) (ImplResponse, error)
+ CreateRegisteredModel(context.Context, model.RegisteredModelCreate) (ImplResponse, error)
+ CreateRegisteredModelVersion(context.Context, string, model.ModelVersion) (ImplResponse, error)
+ CreateServingEnvironment(context.Context, model.ServingEnvironmentCreate) (ImplResponse, error)
+ FindInferenceService(context.Context, string, string) (ImplResponse, error)
+ FindModelArtifact(context.Context, string, string, string) (ImplResponse, error)
+ FindModelVersion(context.Context, string, string, string) (ImplResponse, error)
+ FindRegisteredModel(context.Context, string, string) (ImplResponse, error)
+ FindServingEnvironment(context.Context, string, string) (ImplResponse, error)
+ GetEnvironmentInferenceServices(context.Context, string, string, string, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ GetInferenceService(context.Context, string) (ImplResponse, error)
+ GetInferenceServiceModel(context.Context, string) (ImplResponse, error)
+ GetInferenceServiceServes(context.Context, string, string, string, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ GetInferenceServiceVersion(context.Context, string) (ImplResponse, error)
+ GetInferenceServices(context.Context, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ GetModelArtifact(context.Context, string) (ImplResponse, error)
+ GetModelArtifacts(context.Context, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ GetModelVersion(context.Context, string) (ImplResponse, error)
+ GetModelVersionArtifacts(context.Context, string, string, string, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ GetModelVersions(context.Context, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ GetRegisteredModel(context.Context, string) (ImplResponse, error)
+ GetRegisteredModelVersions(context.Context, string, string, string, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ GetRegisteredModels(context.Context, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ GetServingEnvironment(context.Context, string) (ImplResponse, error)
+ GetServingEnvironments(context.Context, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
+ UpdateInferenceService(context.Context, string, model.InferenceServiceUpdate) (ImplResponse, error)
+ UpdateModelArtifact(context.Context, string, model.ModelArtifactUpdate) (ImplResponse, error)
+ UpdateModelVersion(context.Context, string, model.ModelVersion) (ImplResponse, error)
+ UpdateRegisteredModel(context.Context, string, model.RegisteredModelUpdate) (ImplResponse, error)
+ UpdateServingEnvironment(context.Context, string, model.ServingEnvironmentUpdate) (ImplResponse, error)
+}
diff --git a/internal/server/openapi/api_model_registry_service.go b/internal/server/openapi/api_model_registry_service.go
new file mode 100644
index 000000000..e079b0902
--- /dev/null
+++ b/internal/server/openapi/api_model_registry_service.go
@@ -0,0 +1,950 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package openapi
+
+import (
+ "encoding/json"
+ "net/http"
+ "strings"
+
+ "github.com/go-chi/chi/v5"
+ model "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+// ModelRegistryServiceAPIController binds http requests to an api service and writes the service results to the http response
+type ModelRegistryServiceAPIController struct {
+ service ModelRegistryServiceAPIServicer
+ errorHandler ErrorHandler
+}
+
+// ModelRegistryServiceAPIOption for how the controller is set up.
+type ModelRegistryServiceAPIOption func(*ModelRegistryServiceAPIController)
+
+// WithModelRegistryServiceAPIErrorHandler inject ErrorHandler into controller
+func WithModelRegistryServiceAPIErrorHandler(h ErrorHandler) ModelRegistryServiceAPIOption {
+ return func(c *ModelRegistryServiceAPIController) {
+ c.errorHandler = h
+ }
+}
+
+// NewModelRegistryServiceAPIController creates a default api controller
+func NewModelRegistryServiceAPIController(s ModelRegistryServiceAPIServicer, opts ...ModelRegistryServiceAPIOption) Router {
+ controller := &ModelRegistryServiceAPIController{
+ service: s,
+ errorHandler: DefaultErrorHandler,
+ }
+
+ for _, opt := range opts {
+ opt(controller)
+ }
+
+ return controller
+}
+
+// Routes returns all the api routes for the ModelRegistryServiceAPIController
+func (c *ModelRegistryServiceAPIController) Routes() Routes {
+ return Routes{
+ "CreateEnvironmentInferenceService": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}/inference_services",
+ c.CreateEnvironmentInferenceService,
+ },
+ "CreateInferenceService": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/inference_services",
+ c.CreateInferenceService,
+ },
+ "CreateInferenceServiceServe": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/serves",
+ c.CreateInferenceServiceServe,
+ },
+ "CreateModelArtifact": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/model_artifacts",
+ c.CreateModelArtifact,
+ },
+ "CreateModelVersion": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/model_versions",
+ c.CreateModelVersion,
+ },
+ "CreateModelVersionArtifact": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/model_versions/{modelversionId}/artifacts",
+ c.CreateModelVersionArtifact,
+ },
+ "CreateRegisteredModel": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/registered_models",
+ c.CreateRegisteredModel,
+ },
+ "CreateRegisteredModelVersion": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}/versions",
+ c.CreateRegisteredModelVersion,
+ },
+ "CreateServingEnvironment": Route{
+ strings.ToUpper("Post"),
+ "/api/model_registry/v1alpha1/serving_environments",
+ c.CreateServingEnvironment,
+ },
+ "FindInferenceService": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/inference_service",
+ c.FindInferenceService,
+ },
+ "FindModelArtifact": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/model_artifact",
+ c.FindModelArtifact,
+ },
+ "FindModelVersion": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/model_version",
+ c.FindModelVersion,
+ },
+ "FindRegisteredModel": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/registered_model",
+ c.FindRegisteredModel,
+ },
+ "FindServingEnvironment": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/serving_environment",
+ c.FindServingEnvironment,
+ },
+ "GetEnvironmentInferenceServices": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}/inference_services",
+ c.GetEnvironmentInferenceServices,
+ },
+ "GetInferenceService": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}",
+ c.GetInferenceService,
+ },
+ "GetInferenceServiceModel": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/model",
+ c.GetInferenceServiceModel,
+ },
+ "GetInferenceServiceServes": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/serves",
+ c.GetInferenceServiceServes,
+ },
+ "GetInferenceServiceVersion": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/version",
+ c.GetInferenceServiceVersion,
+ },
+ "GetInferenceServices": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/inference_services",
+ c.GetInferenceServices,
+ },
+ "GetModelArtifact": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/model_artifacts/{modelartifactId}",
+ c.GetModelArtifact,
+ },
+ "GetModelArtifacts": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/model_artifacts",
+ c.GetModelArtifacts,
+ },
+ "GetModelVersion": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/model_versions/{modelversionId}",
+ c.GetModelVersion,
+ },
+ "GetModelVersionArtifacts": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/model_versions/{modelversionId}/artifacts",
+ c.GetModelVersionArtifacts,
+ },
+ "GetModelVersions": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/model_versions",
+ c.GetModelVersions,
+ },
+ "GetRegisteredModel": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}",
+ c.GetRegisteredModel,
+ },
+ "GetRegisteredModelVersions": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}/versions",
+ c.GetRegisteredModelVersions,
+ },
+ "GetRegisteredModels": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/registered_models",
+ c.GetRegisteredModels,
+ },
+ "GetServingEnvironment": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}",
+ c.GetServingEnvironment,
+ },
+ "GetServingEnvironments": Route{
+ strings.ToUpper("Get"),
+ "/api/model_registry/v1alpha1/serving_environments",
+ c.GetServingEnvironments,
+ },
+ "UpdateInferenceService": Route{
+ strings.ToUpper("Patch"),
+ "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}",
+ c.UpdateInferenceService,
+ },
+ "UpdateModelArtifact": Route{
+ strings.ToUpper("Patch"),
+ "/api/model_registry/v1alpha1/model_artifacts/{modelartifactId}",
+ c.UpdateModelArtifact,
+ },
+ "UpdateModelVersion": Route{
+ strings.ToUpper("Patch"),
+ "/api/model_registry/v1alpha1/model_versions/{modelversionId}",
+ c.UpdateModelVersion,
+ },
+ "UpdateRegisteredModel": Route{
+ strings.ToUpper("Patch"),
+ "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}",
+ c.UpdateRegisteredModel,
+ },
+ "UpdateServingEnvironment": Route{
+ strings.ToUpper("Patch"),
+ "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}",
+ c.UpdateServingEnvironment,
+ },
+ }
+}
+
+// CreateEnvironmentInferenceService - Create a InferenceService in ServingEnvironment
+func (c *ModelRegistryServiceAPIController) CreateEnvironmentInferenceService(w http.ResponseWriter, r *http.Request) {
+ servingenvironmentIdParam := chi.URLParam(r, "servingenvironmentId")
+ inferenceServiceCreateParam := model.InferenceServiceCreate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&inferenceServiceCreateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertInferenceServiceCreateRequired(inferenceServiceCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertInferenceServiceCreateConstraints(inferenceServiceCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateEnvironmentInferenceService(r.Context(), servingenvironmentIdParam, inferenceServiceCreateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// CreateInferenceService - Create a InferenceService
+func (c *ModelRegistryServiceAPIController) CreateInferenceService(w http.ResponseWriter, r *http.Request) {
+ inferenceServiceCreateParam := model.InferenceServiceCreate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&inferenceServiceCreateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertInferenceServiceCreateRequired(inferenceServiceCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertInferenceServiceCreateConstraints(inferenceServiceCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateInferenceService(r.Context(), inferenceServiceCreateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// CreateInferenceServiceServe - Create a ServeModel action in a InferenceService
+func (c *ModelRegistryServiceAPIController) CreateInferenceServiceServe(w http.ResponseWriter, r *http.Request) {
+ inferenceserviceIdParam := chi.URLParam(r, "inferenceserviceId")
+ serveModelCreateParam := model.ServeModelCreate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&serveModelCreateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertServeModelCreateRequired(serveModelCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertServeModelCreateConstraints(serveModelCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateInferenceServiceServe(r.Context(), inferenceserviceIdParam, serveModelCreateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// CreateModelArtifact - Create a ModelArtifact
+func (c *ModelRegistryServiceAPIController) CreateModelArtifact(w http.ResponseWriter, r *http.Request) {
+ modelArtifactCreateParam := model.ModelArtifactCreate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&modelArtifactCreateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertModelArtifactCreateRequired(modelArtifactCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertModelArtifactCreateConstraints(modelArtifactCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateModelArtifact(r.Context(), modelArtifactCreateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// CreateModelVersion - Create a ModelVersion
+func (c *ModelRegistryServiceAPIController) CreateModelVersion(w http.ResponseWriter, r *http.Request) {
+ modelVersionCreateParam := model.ModelVersionCreate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&modelVersionCreateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertModelVersionCreateRequired(modelVersionCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertModelVersionCreateConstraints(modelVersionCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateModelVersion(r.Context(), modelVersionCreateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// CreateModelVersionArtifact - Create an Artifact in a ModelVersion
+func (c *ModelRegistryServiceAPIController) CreateModelVersionArtifact(w http.ResponseWriter, r *http.Request) {
+ modelversionIdParam := chi.URLParam(r, "modelversionId")
+ artifactParam := model.Artifact{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&artifactParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertArtifactRequired(artifactParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertArtifactConstraints(artifactParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateModelVersionArtifact(r.Context(), modelversionIdParam, artifactParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// CreateRegisteredModel - Create a RegisteredModel
+func (c *ModelRegistryServiceAPIController) CreateRegisteredModel(w http.ResponseWriter, r *http.Request) {
+ registeredModelCreateParam := model.RegisteredModelCreate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(®isteredModelCreateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertRegisteredModelCreateRequired(registeredModelCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertRegisteredModelCreateConstraints(registeredModelCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateRegisteredModel(r.Context(), registeredModelCreateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// CreateRegisteredModelVersion - Create a ModelVersion in RegisteredModel
+func (c *ModelRegistryServiceAPIController) CreateRegisteredModelVersion(w http.ResponseWriter, r *http.Request) {
+ registeredmodelIdParam := chi.URLParam(r, "registeredmodelId")
+ modelVersionParam := model.ModelVersion{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&modelVersionParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertModelVersionRequired(modelVersionParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertModelVersionConstraints(modelVersionParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateRegisteredModelVersion(r.Context(), registeredmodelIdParam, modelVersionParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// CreateServingEnvironment - Create a ServingEnvironment
+func (c *ModelRegistryServiceAPIController) CreateServingEnvironment(w http.ResponseWriter, r *http.Request) {
+ servingEnvironmentCreateParam := model.ServingEnvironmentCreate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&servingEnvironmentCreateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertServingEnvironmentCreateRequired(servingEnvironmentCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertServingEnvironmentCreateConstraints(servingEnvironmentCreateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.CreateServingEnvironment(r.Context(), servingEnvironmentCreateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// FindInferenceService - Get an InferenceServices that matches search parameters.
+func (c *ModelRegistryServiceAPIController) FindInferenceService(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ result, err := c.service.FindInferenceService(r.Context(), nameParam, externalIDParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// FindModelArtifact - Get a ModelArtifact that matches search parameters.
+func (c *ModelRegistryServiceAPIController) FindModelArtifact(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ parentResourceIDParam := query.Get("parentResourceID")
+ result, err := c.service.FindModelArtifact(r.Context(), nameParam, externalIDParam, parentResourceIDParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// FindModelVersion - Get a ModelVersion that matches search parameters.
+func (c *ModelRegistryServiceAPIController) FindModelVersion(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ parentResourceIDParam := query.Get("parentResourceID")
+ result, err := c.service.FindModelVersion(r.Context(), nameParam, externalIDParam, parentResourceIDParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// FindRegisteredModel - Get a RegisteredModel that matches search parameters.
+func (c *ModelRegistryServiceAPIController) FindRegisteredModel(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ result, err := c.service.FindRegisteredModel(r.Context(), nameParam, externalIDParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// FindServingEnvironment - Find ServingEnvironment
+func (c *ModelRegistryServiceAPIController) FindServingEnvironment(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ result, err := c.service.FindServingEnvironment(r.Context(), nameParam, externalIDParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetEnvironmentInferenceServices - List All ServingEnvironment's InferenceServices
+func (c *ModelRegistryServiceAPIController) GetEnvironmentInferenceServices(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ servingenvironmentIdParam := chi.URLParam(r, "servingenvironmentId")
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetEnvironmentInferenceServices(r.Context(), servingenvironmentIdParam, nameParam, externalIDParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetInferenceService - Get a InferenceService
+func (c *ModelRegistryServiceAPIController) GetInferenceService(w http.ResponseWriter, r *http.Request) {
+ inferenceserviceIdParam := chi.URLParam(r, "inferenceserviceId")
+ result, err := c.service.GetInferenceService(r.Context(), inferenceserviceIdParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetInferenceServiceModel - Get InferenceService's RegisteredModel
+func (c *ModelRegistryServiceAPIController) GetInferenceServiceModel(w http.ResponseWriter, r *http.Request) {
+ inferenceserviceIdParam := chi.URLParam(r, "inferenceserviceId")
+ result, err := c.service.GetInferenceServiceModel(r.Context(), inferenceserviceIdParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetInferenceServiceServes - List All InferenceService's ServeModel actions
+func (c *ModelRegistryServiceAPIController) GetInferenceServiceServes(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ inferenceserviceIdParam := chi.URLParam(r, "inferenceserviceId")
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetInferenceServiceServes(r.Context(), inferenceserviceIdParam, nameParam, externalIDParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetInferenceServiceVersion - Get InferenceService's ModelVersion
+func (c *ModelRegistryServiceAPIController) GetInferenceServiceVersion(w http.ResponseWriter, r *http.Request) {
+ inferenceserviceIdParam := chi.URLParam(r, "inferenceserviceId")
+ result, err := c.service.GetInferenceServiceVersion(r.Context(), inferenceserviceIdParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetInferenceServices - List All InferenceServices
+func (c *ModelRegistryServiceAPIController) GetInferenceServices(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetInferenceServices(r.Context(), pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetModelArtifact - Get a ModelArtifact
+func (c *ModelRegistryServiceAPIController) GetModelArtifact(w http.ResponseWriter, r *http.Request) {
+ modelartifactIdParam := chi.URLParam(r, "modelartifactId")
+ result, err := c.service.GetModelArtifact(r.Context(), modelartifactIdParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetModelArtifacts - List All ModelArtifacts
+func (c *ModelRegistryServiceAPIController) GetModelArtifacts(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetModelArtifacts(r.Context(), pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetModelVersion - Get a ModelVersion
+func (c *ModelRegistryServiceAPIController) GetModelVersion(w http.ResponseWriter, r *http.Request) {
+ modelversionIdParam := chi.URLParam(r, "modelversionId")
+ result, err := c.service.GetModelVersion(r.Context(), modelversionIdParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetModelVersionArtifacts - List All ModelVersion's artifacts
+func (c *ModelRegistryServiceAPIController) GetModelVersionArtifacts(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ modelversionIdParam := chi.URLParam(r, "modelversionId")
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetModelVersionArtifacts(r.Context(), modelversionIdParam, nameParam, externalIDParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetModelVersions - List All ModelVersions
+func (c *ModelRegistryServiceAPIController) GetModelVersions(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetModelVersions(r.Context(), pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetRegisteredModel - Get a RegisteredModel
+func (c *ModelRegistryServiceAPIController) GetRegisteredModel(w http.ResponseWriter, r *http.Request) {
+ registeredmodelIdParam := chi.URLParam(r, "registeredmodelId")
+ result, err := c.service.GetRegisteredModel(r.Context(), registeredmodelIdParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetRegisteredModelVersions - List All RegisteredModel's ModelVersions
+func (c *ModelRegistryServiceAPIController) GetRegisteredModelVersions(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ registeredmodelIdParam := chi.URLParam(r, "registeredmodelId")
+ nameParam := query.Get("name")
+ externalIDParam := query.Get("externalID")
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetRegisteredModelVersions(r.Context(), registeredmodelIdParam, nameParam, externalIDParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetRegisteredModels - List All RegisteredModels
+func (c *ModelRegistryServiceAPIController) GetRegisteredModels(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetRegisteredModels(r.Context(), pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetServingEnvironment - Get a ServingEnvironment
+func (c *ModelRegistryServiceAPIController) GetServingEnvironment(w http.ResponseWriter, r *http.Request) {
+ servingenvironmentIdParam := chi.URLParam(r, "servingenvironmentId")
+ result, err := c.service.GetServingEnvironment(r.Context(), servingenvironmentIdParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// GetServingEnvironments - List All ServingEnvironments
+func (c *ModelRegistryServiceAPIController) GetServingEnvironments(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ pageSizeParam := query.Get("pageSize")
+ orderByParam := query.Get("orderBy")
+ sortOrderParam := query.Get("sortOrder")
+ nextPageTokenParam := query.Get("nextPageToken")
+ result, err := c.service.GetServingEnvironments(r.Context(), pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// UpdateInferenceService - Update a InferenceService
+func (c *ModelRegistryServiceAPIController) UpdateInferenceService(w http.ResponseWriter, r *http.Request) {
+ inferenceserviceIdParam := chi.URLParam(r, "inferenceserviceId")
+ inferenceServiceUpdateParam := model.InferenceServiceUpdate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&inferenceServiceUpdateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertInferenceServiceUpdateRequired(inferenceServiceUpdateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertInferenceServiceUpdateConstraints(inferenceServiceUpdateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.UpdateInferenceService(r.Context(), inferenceserviceIdParam, inferenceServiceUpdateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// UpdateModelArtifact - Update a ModelArtifact
+func (c *ModelRegistryServiceAPIController) UpdateModelArtifact(w http.ResponseWriter, r *http.Request) {
+ modelartifactIdParam := chi.URLParam(r, "modelartifactId")
+ modelArtifactUpdateParam := model.ModelArtifactUpdate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&modelArtifactUpdateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertModelArtifactUpdateRequired(modelArtifactUpdateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertModelArtifactUpdateConstraints(modelArtifactUpdateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.UpdateModelArtifact(r.Context(), modelartifactIdParam, modelArtifactUpdateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// UpdateModelVersion - Update a ModelVersion
+func (c *ModelRegistryServiceAPIController) UpdateModelVersion(w http.ResponseWriter, r *http.Request) {
+ modelversionIdParam := chi.URLParam(r, "modelversionId")
+ modelVersionParam := model.ModelVersion{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&modelVersionParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertModelVersionRequired(modelVersionParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertModelVersionConstraints(modelVersionParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.UpdateModelVersion(r.Context(), modelversionIdParam, modelVersionParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// UpdateRegisteredModel - Update a RegisteredModel
+func (c *ModelRegistryServiceAPIController) UpdateRegisteredModel(w http.ResponseWriter, r *http.Request) {
+ registeredmodelIdParam := chi.URLParam(r, "registeredmodelId")
+ registeredModelUpdateParam := model.RegisteredModelUpdate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(®isteredModelUpdateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertRegisteredModelUpdateRequired(registeredModelUpdateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertRegisteredModelUpdateConstraints(registeredModelUpdateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.UpdateRegisteredModel(r.Context(), registeredmodelIdParam, registeredModelUpdateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
+
+// UpdateServingEnvironment - Update a ServingEnvironment
+func (c *ModelRegistryServiceAPIController) UpdateServingEnvironment(w http.ResponseWriter, r *http.Request) {
+ servingenvironmentIdParam := chi.URLParam(r, "servingenvironmentId")
+ servingEnvironmentUpdateParam := model.ServingEnvironmentUpdate{}
+ d := json.NewDecoder(r.Body)
+ d.DisallowUnknownFields()
+ if err := d.Decode(&servingEnvironmentUpdateParam); err != nil {
+ c.errorHandler(w, r, &ParsingError{Err: err}, nil)
+ return
+ }
+ if err := AssertServingEnvironmentUpdateRequired(servingEnvironmentUpdateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ if err := AssertServingEnvironmentUpdateConstraints(servingEnvironmentUpdateParam); err != nil {
+ c.errorHandler(w, r, err, nil)
+ return
+ }
+ result, err := c.service.UpdateServingEnvironment(r.Context(), servingenvironmentIdParam, servingEnvironmentUpdateParam)
+ // If an error occurred, encode the error with the status code
+ if err != nil {
+ c.errorHandler(w, r, err, &result)
+ return
+ }
+ // If no error, encode the body and the result code
+ EncodeJSONResponse(result.Body, &result.Code, w)
+}
diff --git a/internal/server/openapi/api_model_registry_service_service.go b/internal/server/openapi/api_model_registry_service_service.go
new file mode 100644
index 000000000..4d617174d
--- /dev/null
+++ b/internal/server/openapi/api_model_registry_service_service.go
@@ -0,0 +1,535 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package openapi
+
+import (
+ "context"
+ "errors"
+ "net/http"
+
+ "github.com/opendatahub-io/model-registry/internal/apiutils"
+ "github.com/opendatahub-io/model-registry/internal/converter"
+ "github.com/opendatahub-io/model-registry/internal/converter/generated"
+ "github.com/opendatahub-io/model-registry/pkg/api"
+ model "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+// ModelRegistryServiceAPIService is a service that implements the logic for the ModelRegistryServiceAPIServicer
+// This service should implement the business logic for every endpoint for the ModelRegistryServiceAPI s.coreApi.
+// Include any external packages or services that will be required by this service.
+type ModelRegistryServiceAPIService struct {
+ coreApi api.ModelRegistryApi
+ converter converter.OpenAPIConverter
+}
+
+// NewModelRegistryServiceAPIService creates a default api service
+func NewModelRegistryServiceAPIService(coreApi api.ModelRegistryApi) ModelRegistryServiceAPIServicer {
+ return &ModelRegistryServiceAPIService{
+ coreApi: coreApi,
+ converter: &generated.OpenAPIConverterImpl{},
+ }
+}
+
+// CreateEnvironmentInferenceService - Create a InferenceService in ServingEnvironment
+func (s *ModelRegistryServiceAPIService) CreateEnvironmentInferenceService(ctx context.Context, servingenvironmentId string, inferenceServiceCreate model.InferenceServiceCreate) (ImplResponse, error) {
+ inferenceServiceCreate.ServingEnvironmentId = servingenvironmentId
+ return s.CreateInferenceService(ctx, inferenceServiceCreate)
+ // TODO: return Response(404, Error{}), nil
+}
+
+// CreateInferenceService - Create a InferenceService
+func (s *ModelRegistryServiceAPIService) CreateInferenceService(ctx context.Context, inferenceServiceCreate model.InferenceServiceCreate) (ImplResponse, error) {
+ entity, err := s.converter.ConvertInferenceServiceCreate(&inferenceServiceCreate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+
+ result, err := s.coreApi.UpsertInferenceService(entity)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(201, result), nil
+ // TODO: return Response(400, Error{}), nil
+ // TODO: return Response(401, Error{}), nil
+}
+
+// CreateInferenceServiceServe - Create a ServeModel action in a InferenceService
+func (s *ModelRegistryServiceAPIService) CreateInferenceServiceServe(ctx context.Context, inferenceserviceId string, serveModelCreate model.ServeModelCreate) (ImplResponse, error) {
+ entity, err := s.converter.ConvertServeModelCreate(&serveModelCreate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+
+ result, err := s.coreApi.UpsertServeModel(entity, &inferenceserviceId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(201, result), nil
+ // TODO: return Response(400, Error{}), nil
+ // TODO: return Response(401, Error{}), nil
+ // TODO: return Response(404, Error{}), nil
+}
+
+// CreateModelArtifact - Create a ModelArtifact
+func (s *ModelRegistryServiceAPIService) CreateModelArtifact(ctx context.Context, modelArtifactCreate model.ModelArtifactCreate) (ImplResponse, error) {
+ entity, err := s.converter.ConvertModelArtifactCreate(&modelArtifactCreate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+
+ result, err := s.coreApi.UpsertModelArtifact(entity, nil)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(201, result), nil
+ // TODO: return Response(400, Error{}), nil
+ // TODO: return Response(401, Error{}), nil
+}
+
+// CreateModelVersion - Create a ModelVersion
+func (s *ModelRegistryServiceAPIService) CreateModelVersion(ctx context.Context, modelVersionCreate model.ModelVersionCreate) (ImplResponse, error) {
+ modelVersion, err := s.converter.ConvertModelVersionCreate(&modelVersionCreate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+
+ result, err := s.coreApi.UpsertModelVersion(modelVersion, &modelVersionCreate.RegisteredModelID)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(201, result), nil
+ // TODO: return Response(400, Error{}), nil
+ // TODO: return Response(401, Error{}), nil
+}
+
+// CreateModelVersionArtifact - Create an Artifact in a ModelVersion
+func (s *ModelRegistryServiceAPIService) CreateModelVersionArtifact(ctx context.Context, modelversionId string, artifact model.Artifact) (ImplResponse, error) {
+ if artifact.ModelArtifact == nil {
+ return Response(http.StatusNotImplemented, nil), errors.New("unsupported artifactType")
+ }
+ result, err := s.coreApi.UpsertModelArtifact(artifact.ModelArtifact, &modelversionId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ artifactResult := model.Artifact{
+ ModelArtifact: result,
+ }
+ return Response(201, artifactResult), nil
+ // TODO return Response(200, Artifact{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// CreateRegisteredModel - Create a RegisteredModel
+func (s *ModelRegistryServiceAPIService) CreateRegisteredModel(ctx context.Context, registeredModelCreate model.RegisteredModelCreate) (ImplResponse, error) {
+ registeredModel, err := s.converter.ConvertRegisteredModelCreate(®isteredModelCreate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+
+ result, err := s.coreApi.UpsertRegisteredModel(registeredModel)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(201, result), nil
+ // TODO: return Response(400, Error{}), nil
+ // TODO: return Response(401, Error{}), nil
+}
+
+// CreateRegisteredModelVersion - Create a ModelVersion in RegisteredModel
+func (s *ModelRegistryServiceAPIService) CreateRegisteredModelVersion(ctx context.Context, registeredmodelId string, modelVersion model.ModelVersion) (ImplResponse, error) {
+ result, err := s.coreApi.UpsertModelVersion(&modelVersion, ®isteredmodelId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(201, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// CreateServingEnvironment - Create a ServingEnvironment
+func (s *ModelRegistryServiceAPIService) CreateServingEnvironment(ctx context.Context, servingEnvironmentCreate model.ServingEnvironmentCreate) (ImplResponse, error) {
+ entity, err := s.converter.ConvertServingEnvironmentCreate(&servingEnvironmentCreate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+
+ result, err := s.coreApi.UpsertServingEnvironment(entity)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(201, result), nil
+ // TODO: return Response(400, Error{}), nil
+ // TODO: return Response(401, Error{}), nil
+}
+
+// FindInferenceService - Get an InferenceServices that matches search parameters.
+func (s *ModelRegistryServiceAPIService) FindInferenceService(ctx context.Context, name string, externalID string) (ImplResponse, error) {
+ result, err := s.coreApi.GetInferenceServiceByParams(&name, nil, &externalID)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return esponse(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// FindModelArtifact - Get a ModelArtifact that matches search parameters.
+func (s *ModelRegistryServiceAPIService) FindModelArtifact(ctx context.Context, name string, externalID string, parentResourceID string) (ImplResponse, error) {
+ result, err := s.coreApi.GetModelArtifactByParams(&name, &parentResourceID, &externalID)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return esponse(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// FindModelVersion - Get a ModelVersion that matches search parameters.
+func (s *ModelRegistryServiceAPIService) FindModelVersion(ctx context.Context, name string, externalID string, registeredModelID string) (ImplResponse, error) {
+ result, err := s.coreApi.GetModelVersionByParams(&name, ®isteredModelID, &externalID)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return esponse(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// FindRegisteredModel - Get a RegisteredModel that matches search parameters.
+func (s *ModelRegistryServiceAPIService) FindRegisteredModel(ctx context.Context, name string, externalID string) (ImplResponse, error) {
+ result, err := s.coreApi.GetRegisteredModelByParams(&name, &externalID)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return esponse(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// FindServingEnvironment - Find ServingEnvironment
+func (s *ModelRegistryServiceAPIService) FindServingEnvironment(ctx context.Context, name string, externalID string) (ImplResponse, error) {
+ result, err := s.coreApi.GetServingEnvironmentByParams(&name, &externalID)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetEnvironmentInferenceServices - List All ServingEnvironment's InferenceServices
+func (s *ModelRegistryServiceAPIService) GetEnvironmentInferenceServices(ctx context.Context, servingenvironmentId string, name string, externalID string, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetInferenceServices(listOpts, &servingenvironmentId, nil)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetInferenceService - Get a InferenceService
+func (s *ModelRegistryServiceAPIService) GetInferenceService(ctx context.Context, inferenceserviceId string) (ImplResponse, error) {
+ result, err := s.coreApi.GetInferenceServiceById(inferenceserviceId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO: return Response(401, Error{}), nil
+ // TODO: return Response(404, Error{}), nil
+}
+
+// GetInferenceServiceModel - Get InferenceService's RegisteredModel
+func (s *ModelRegistryServiceAPIService) GetInferenceServiceModel(ctx context.Context, inferenceserviceId string) (ImplResponse, error) {
+ result, err := s.coreApi.GetRegisteredModelByInferenceService(inferenceserviceId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO: return Response(401, Error{}), nil
+ // TODO: return Response(404, Error{}), nil
+}
+
+// GetInferenceServiceServes - List All InferenceService's ServeModel actions
+func (s *ModelRegistryServiceAPIService) GetInferenceServiceServes(ctx context.Context, inferenceserviceId string, name string, externalID string, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetServeModels(listOpts, &inferenceserviceId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetInferenceServiceVersion - Get InferenceService's ModelVersion
+func (s *ModelRegistryServiceAPIService) GetInferenceServiceVersion(ctx context.Context, inferenceserviceId string) (ImplResponse, error) {
+ result, err := s.coreApi.GetModelVersionByInferenceService(inferenceserviceId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO: return Response(401, Error{}), nil
+ // TODO: return Response(404, Error{}), nil
+}
+
+// GetInferenceServices - List All InferenceServices
+func (s *ModelRegistryServiceAPIService) GetInferenceServices(ctx context.Context, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetInferenceServices(listOpts, nil, nil)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetModelArtifact - Get a ModelArtifact
+func (s *ModelRegistryServiceAPIService) GetModelArtifact(ctx context.Context, modelartifactId string) (ImplResponse, error) {
+ result, err := s.coreApi.GetModelArtifactById(modelartifactId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO: return Response(401, Error{}), nil
+ // TODO: return Response(404, Error{}), nil
+}
+
+// GetModelArtifacts - List All ModelArtifacts
+func (s *ModelRegistryServiceAPIService) GetModelArtifacts(ctx context.Context, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetModelArtifacts(listOpts, nil)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetModelVersion - Get a ModelVersion
+func (s *ModelRegistryServiceAPIService) GetModelVersion(ctx context.Context, modelversionId string) (ImplResponse, error) {
+ result, err := s.coreApi.GetModelVersionById(modelversionId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO: return Response(401, Error{}), nil
+ // TODO: return Response(404, Error{}), nil
+}
+
+// GetModelVersionArtifacts - List All ModelVersion's artifacts
+func (s *ModelRegistryServiceAPIService) GetModelVersionArtifacts(ctx context.Context, modelversionId string, name string, externalID string, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ // TODO name unused
+ // TODO externalID unused
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetModelArtifacts(listOpts, &modelversionId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetModelVersions - List All ModelVersions
+func (s *ModelRegistryServiceAPIService) GetModelVersions(ctx context.Context, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetModelVersions(listOpts, nil)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetRegisteredModel - Get a RegisteredModel
+func (s *ModelRegistryServiceAPIService) GetRegisteredModel(ctx context.Context, registeredmodelId string) (ImplResponse, error) {
+ result, err := s.coreApi.GetRegisteredModelById(registeredmodelId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO: return Response(401, Error{}), nil
+ // TODO: return Response(404, Error{}), nil
+}
+
+// GetRegisteredModelVersions - List All RegisteredModel's ModelVersions
+func (s *ModelRegistryServiceAPIService) GetRegisteredModelVersions(ctx context.Context, registeredmodelId string, name string, externalID string, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ // TODO name unused
+ // TODO externalID unused
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetModelVersions(listOpts, ®isteredmodelId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetRegisteredModels - List All RegisteredModels
+func (s *ModelRegistryServiceAPIService) GetRegisteredModels(ctx context.Context, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetRegisteredModels(listOpts)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// GetServingEnvironment - Get a ServingEnvironment
+func (s *ModelRegistryServiceAPIService) GetServingEnvironment(ctx context.Context, servingenvironmentId string) (ImplResponse, error) {
+ result, err := s.coreApi.GetServingEnvironmentById(servingenvironmentId)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO: return Response(401, Error{}), nil
+ // TODO: return Response(404, Error{}), nil
+}
+
+// GetServingEnvironments - List All ServingEnvironments
+func (s *ModelRegistryServiceAPIService) GetServingEnvironments(ctx context.Context, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) {
+ listOpts, err := apiutils.BuildListOption(pageSize, orderBy, sortOrder, nextPageToken)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ result, err := s.coreApi.GetServingEnvironments(listOpts)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(401, Error{}), nil
+}
+
+// UpdateInferenceService - Update a InferenceService
+func (s *ModelRegistryServiceAPIService) UpdateInferenceService(ctx context.Context, inferenceserviceId string, inferenceServiceUpdate model.InferenceServiceUpdate) (ImplResponse, error) {
+ entity, err := s.converter.ConvertInferenceServiceUpdate(&inferenceServiceUpdate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ entity.Id = &inferenceserviceId
+ result, err := s.coreApi.UpsertInferenceService(entity)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// UpdateModelArtifact - Update a ModelArtifact
+func (s *ModelRegistryServiceAPIService) UpdateModelArtifact(ctx context.Context, modelartifactId string, modelArtifactUpdate model.ModelArtifactUpdate) (ImplResponse, error) {
+ modelArtifact, err := s.converter.ConvertModelArtifactUpdate(&modelArtifactUpdate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ modelArtifact.Id = &modelartifactId
+ result, err := s.coreApi.UpsertModelArtifact(modelArtifact, nil)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// UpdateModelVersion - Update a ModelVersion
+func (s *ModelRegistryServiceAPIService) UpdateModelVersion(ctx context.Context, modelversionId string, modelVersion model.ModelVersion) (ImplResponse, error) {
+ // TODO: this API is getting model.ModelVersion instead of model.ModelVersionUpdate.
+ // c, err := s.converter.ConvertModelVersionUpdate(&modelVersion)
+ // if err != nil {
+ // return Response(500, model.Error{Message: err.Error()}), nil
+ // }
+ // modelVersion.Id = &modelversionId
+ result, err := s.coreApi.UpsertModelVersion(&modelVersion, nil)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// UpdateRegisteredModel - Update a RegisteredModel
+func (s *ModelRegistryServiceAPIService) UpdateRegisteredModel(ctx context.Context, registeredmodelId string, registeredModelUpdate model.RegisteredModelUpdate) (ImplResponse, error) {
+ registeredModel, err := s.converter.ConvertRegisteredModelUpdate(®isteredModelUpdate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ registeredModel.Id = ®isteredmodelId
+ result, err := s.coreApi.UpsertRegisteredModel(registeredModel)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
+
+// UpdateServingEnvironment - Update a ServingEnvironment
+func (s *ModelRegistryServiceAPIService) UpdateServingEnvironment(ctx context.Context, servingenvironmentId string, servingEnvironmentUpdate model.ServingEnvironmentUpdate) (ImplResponse, error) {
+ entity, err := s.converter.ConvertServingEnvironmentUpdate(&servingEnvironmentUpdate)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ entity.Id = &servingenvironmentId
+ result, err := s.coreApi.UpsertServingEnvironment(entity)
+ if err != nil {
+ return Response(500, model.Error{Message: err.Error()}), nil
+ }
+ return Response(200, result), nil
+ // TODO return Response(400, Error{}), nil
+ // TODO return Response(401, Error{}), nil
+ // TODO return Response(404, Error{}), nil
+}
diff --git a/internal/server/openapi/error.go b/internal/server/openapi/error.go
new file mode 100644
index 000000000..670c7ca9d
--- /dev/null
+++ b/internal/server/openapi/error.go
@@ -0,0 +1,62 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package openapi
+
+import (
+ "errors"
+ "fmt"
+ "net/http"
+)
+
+var (
+ // ErrTypeAssertionError is thrown when type an interface does not match the asserted type
+ ErrTypeAssertionError = errors.New("unable to assert type")
+)
+
+// ParsingError indicates that an error has occurred when parsing request parameters
+type ParsingError struct {
+ Err error
+}
+
+func (e *ParsingError) Unwrap() error {
+ return e.Err
+}
+
+func (e *ParsingError) Error() string {
+ return e.Err.Error()
+}
+
+// RequiredError indicates that an error has occurred when parsing request parameters
+type RequiredError struct {
+ Field string
+}
+
+func (e *RequiredError) Error() string {
+ return fmt.Sprintf("required field '%s' is zero value.", e.Field)
+}
+
+// ErrorHandler defines the required method for handling error. You may implement it and inject this into a controller if
+// you would like errors to be handled differently from the DefaultErrorHandler
+type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)
+
+// DefaultErrorHandler defines the default logic on how to handle errors from the controller. Any errors from parsing
+// request params will return a StatusBadRequest. Otherwise, the error code originating from the servicer will be used.
+func DefaultErrorHandler(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse) {
+ if _, ok := err.(*ParsingError); ok {
+ // Handle parsing errors
+ EncodeJSONResponse(err.Error(), func(i int) *int { return &i }(http.StatusBadRequest), w)
+ } else if _, ok := err.(*RequiredError); ok {
+ // Handle missing required errors
+ EncodeJSONResponse(err.Error(), func(i int) *int { return &i }(http.StatusUnprocessableEntity), w)
+ } else {
+ // Handle all other errors
+ EncodeJSONResponse(err.Error(), &result.Code, w)
+ }
+}
diff --git a/internal/server/openapi/helpers.go b/internal/server/openapi/helpers.go
new file mode 100644
index 000000000..57e2b44b2
--- /dev/null
+++ b/internal/server/openapi/helpers.go
@@ -0,0 +1,60 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package openapi
+
+import (
+ "reflect"
+)
+
+// Response return a ImplResponse struct filled
+func Response(code int, body interface{}) ImplResponse {
+ return ImplResponse{
+ Code: code,
+ Body: body,
+ }
+}
+
+// IsZeroValue checks if the val is the zero-ed value.
+func IsZeroValue(val interface{}) bool {
+ return val == nil || reflect.DeepEqual(val, reflect.Zero(reflect.TypeOf(val)).Interface())
+}
+
+// AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback.
+// This method traverse nested slices in a preorder fashion.
+func AssertRecurseInterfaceRequired[T any](obj interface{}, callback func(T) error) error {
+ return AssertRecurseValueRequired(reflect.ValueOf(obj), callback)
+}
+
+// AssertRecurseValueRequired checks each struct in the nested slice against the callback.
+// This method traverse nested slices in a preorder fashion. ErrTypeAssertionError is thrown if
+// the underlying struct does not match type T.
+func AssertRecurseValueRequired[T any](value reflect.Value, callback func(T) error) error {
+ switch value.Kind() {
+ // If it is a struct we check using callback
+ case reflect.Struct:
+ obj, ok := value.Interface().(T)
+ if !ok {
+ return ErrTypeAssertionError
+ }
+
+ if err := callback(obj); err != nil {
+ return err
+ }
+
+ // If it is a slice we continue recursion
+ case reflect.Slice:
+ for i := 0; i < value.Len(); i += 1 {
+ if err := AssertRecurseValueRequired(value.Index(i), callback); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
diff --git a/internal/server/openapi/impl.go b/internal/server/openapi/impl.go
new file mode 100644
index 000000000..0901dc5e0
--- /dev/null
+++ b/internal/server/openapi/impl.go
@@ -0,0 +1,16 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package openapi
+
+// ImplResponse defines an implementation response with error code and the associated body
+type ImplResponse struct {
+ Code int
+ Body interface{}
+}
diff --git a/internal/server/openapi/logger.go b/internal/server/openapi/logger.go
new file mode 100644
index 000000000..f8eedd2d6
--- /dev/null
+++ b/internal/server/openapi/logger.go
@@ -0,0 +1,32 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package openapi
+
+import (
+ "log"
+ "net/http"
+ "time"
+)
+
+func Logger(inner http.Handler, name string) http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ start := time.Now()
+
+ inner.ServeHTTP(w, r)
+
+ log.Printf(
+ "%s %s %s %s",
+ r.Method,
+ r.RequestURI,
+ name,
+ time.Since(start),
+ )
+ })
+}
diff --git a/internal/server/openapi/routers.go b/internal/server/openapi/routers.go
new file mode 100644
index 000000000..7846e4453
--- /dev/null
+++ b/internal/server/openapi/routers.go
@@ -0,0 +1,307 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package openapi
+
+import (
+ "encoding/json"
+ "errors"
+ "io"
+ "mime/multipart"
+ "net/http"
+ "os"
+ "strconv"
+ "strings"
+
+ "github.com/go-chi/chi/v5"
+ "github.com/go-chi/chi/v5/middleware"
+ "github.com/go-chi/cors"
+ "github.com/golang/glog"
+)
+
+//lint:file-ignore U1000 Ignore all unused code, it's generated
+
+// A Route defines the parameters for an api endpoint
+type Route struct {
+ Method string
+ Pattern string
+ HandlerFunc http.HandlerFunc
+}
+
+// Routes is a map of defined api endpoints
+type Routes map[string]Route
+
+// Router defines the required methods for retrieving api routes
+type Router interface {
+ Routes() Routes
+}
+
+const errMsgRequiredMissing = "required parameter is missing"
+const errMsgMinValueConstraint = "provided parameter is not respecting minimum value constraint"
+const errMsgMaxValueConstraint = "provided parameter is not respecting maximum value constraint"
+
+// NewRouter creates a new router for any number of api routers
+func NewRouter(routers ...Router) chi.Router {
+ router := chi.NewRouter()
+ router.Use(middleware.Logger)
+ router.Use(cors.Handler(cors.Options{
+ AllowedOrigins: []string{"https://*", "http://*"},
+ AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
+ AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token", "X-PINGOTHER"},
+ ExposedHeaders: []string{"Link"},
+ AllowCredentials: false,
+ MaxAge: 300, // Maximum value not ignored by any of major browsers
+ }))
+ for _, api := range routers {
+ for _, route := range api.Routes() {
+ handler := route.HandlerFunc
+ router.Method(route.Method, route.Pattern, handler)
+ }
+ }
+
+ return router
+}
+
+// EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code
+func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ if status != nil {
+ w.WriteHeader(*status)
+ } else {
+ w.WriteHeader(http.StatusOK)
+ }
+
+ if i != nil {
+ if err := json.NewEncoder(w).Encode(i); err != nil {
+ // FIXME: is it too late to inform the client of an error at this point??
+ glog.Errorf("error encoding JSON response: %v", err)
+ }
+ }
+}
+
+// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
+func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) {
+ _, fileHeader, err := r.FormFile(key)
+ if err != nil {
+ return nil, err
+ }
+
+ return readFileHeaderToTempFile(fileHeader)
+}
+
+// ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files
+func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) {
+ if err := r.ParseMultipartForm(32 << 20); err != nil {
+ return nil, err
+ }
+
+ files := make([]*os.File, 0, len(r.MultipartForm.File[key]))
+
+ for _, fileHeader := range r.MultipartForm.File[key] {
+ file, err := readFileHeaderToTempFile(fileHeader)
+ if err != nil {
+ return nil, err
+ }
+
+ files = append(files, file)
+ }
+
+ return files, nil
+}
+
+// readFileHeaderToTempFile reads multipart.FileHeader and writes it to a temporary file
+func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (*os.File, error) {
+ formFile, err := fileHeader.Open()
+ if err != nil {
+ return nil, err
+ }
+
+ defer formFile.Close()
+
+ fileBytes, err := io.ReadAll(formFile)
+ if err != nil {
+ return nil, err
+ }
+
+ file, err := os.CreateTemp("", fileHeader.Filename)
+ if err != nil {
+ return nil, err
+ }
+
+ defer file.Close()
+
+ // FIXME: return values are ignored!!!
+ _, _ = file.Write(fileBytes)
+
+ return file, nil
+}
+
+type Number interface {
+ ~int32 | ~int64 | ~float32 | ~float64
+}
+
+type ParseString[T Number | string | bool] func(v string) (T, error)
+
+// parseFloat64 parses a string parameter to an float64.
+func parseFloat64(param string) (float64, error) {
+ if param == "" {
+ return 0, nil
+ }
+
+ return strconv.ParseFloat(param, 64)
+}
+
+// parseFloat32 parses a string parameter to an float32.
+func parseFloat32(param string) (float32, error) {
+ if param == "" {
+ return 0, nil
+ }
+
+ v, err := strconv.ParseFloat(param, 32)
+ return float32(v), err
+}
+
+// parseInt64 parses a string parameter to an int64.
+func parseInt64(param string) (int64, error) {
+ if param == "" {
+ return 0, nil
+ }
+
+ return strconv.ParseInt(param, 10, 64)
+}
+
+// parseInt32 parses a string parameter to an int32.
+func parseInt32(param string) (int32, error) {
+ if param == "" {
+ return 0, nil
+ }
+
+ val, err := strconv.ParseInt(param, 10, 32)
+ return int32(val), err
+}
+
+// parseBool parses a string parameter to an bool.
+func parseBool(param string) (bool, error) {
+ if param == "" {
+ return false, nil
+ }
+
+ return strconv.ParseBool(param)
+}
+
+type Operation[T Number | string | bool] func(actual string) (T, bool, error)
+
+func WithRequire[T Number | string | bool](parse ParseString[T]) Operation[T] {
+ var empty T
+ return func(actual string) (T, bool, error) {
+ if actual == "" {
+ return empty, false, errors.New(errMsgRequiredMissing)
+ }
+
+ v, err := parse(actual)
+ return v, false, err
+ }
+}
+
+func WithDefaultOrParse[T Number | string | bool](def T, parse ParseString[T]) Operation[T] {
+ return func(actual string) (T, bool, error) {
+ if actual == "" {
+ return def, true, nil
+ }
+
+ v, err := parse(actual)
+ return v, false, err
+ }
+}
+
+func WithParse[T Number | string | bool](parse ParseString[T]) Operation[T] {
+ return func(actual string) (T, bool, error) {
+ v, err := parse(actual)
+ return v, false, err
+ }
+}
+
+type Constraint[T Number | string | bool] func(actual T) error
+
+func WithMinimum[T Number](expected T) Constraint[T] {
+ return func(actual T) error {
+ if actual < expected {
+ return errors.New(errMsgMinValueConstraint)
+ }
+
+ return nil
+ }
+}
+
+func WithMaximum[T Number](expected T) Constraint[T] {
+ return func(actual T) error {
+ if actual > expected {
+ return errors.New(errMsgMaxValueConstraint)
+ }
+
+ return nil
+ }
+}
+
+// parseNumericParameter parses a numeric parameter to its respective type.
+func parseNumericParameter[T Number](param string, fn Operation[T], checks ...Constraint[T]) (T, error) {
+ v, ok, err := fn(param)
+ if err != nil {
+ return 0, err
+ }
+
+ if !ok {
+ for _, check := range checks {
+ if err := check(v); err != nil {
+ return 0, err
+ }
+ }
+ }
+
+ return v, nil
+}
+
+// parseBoolParameter parses a string parameter to a bool
+func parseBoolParameter(param string, fn Operation[bool]) (bool, error) {
+ v, _, err := fn(param)
+ return v, err
+}
+
+// parseNumericArrayParameter parses a string parameter containing array of values to its respective type.
+func parseNumericArrayParameter[T Number](param, delim string, required bool, fn Operation[T], checks ...Constraint[T]) ([]T, error) {
+ if param == "" {
+ if required {
+ return nil, errors.New(errMsgRequiredMissing)
+ }
+
+ return nil, nil
+ }
+
+ str := strings.Split(param, delim)
+ values := make([]T, len(str))
+
+ for i, s := range str {
+ v, ok, err := fn(s)
+ if err != nil {
+ return nil, err
+ }
+
+ if !ok {
+ for _, check := range checks {
+ if err := check(v); err != nil {
+ return nil, err
+ }
+ }
+ }
+
+ values[i] = v
+ }
+
+ return values, nil
+}
diff --git a/internal/server/openapi/type_asserts.go b/internal/server/openapi/type_asserts.go
new file mode 100644
index 000000000..38ed51dd9
--- /dev/null
+++ b/internal/server/openapi/type_asserts.go
@@ -0,0 +1,734 @@
+/*
+ * Model Registry REST API
+ *
+ * REST API for Model Registry to create and manage ML model metadata
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ *
+ */
+
+// File generated by scripts/gen_type_assert.sh - DO NOT EDIT
+
+package openapi
+
+import (
+ model "github.com/opendatahub-io/model-registry/pkg/openapi"
+)
+
+// AssertArtifactRequired checks if the required fields are not zero-ed
+func AssertArtifactRequired(obj model.Artifact) error {
+ // FIXME(manual): Artifact.ArtifactType is not present on client models
+ // elements := map[string]interface{}{
+ // "artifactType": obj.ArtifactType,
+ // }
+ // for name, el := range elements {
+ // if isZero := IsZeroValue(el); isZero {
+ // return &RequiredError{Field: name}
+ // }
+ // }
+ return nil
+}
+
+// AssertArtifactConstraints checks if the values respects the defined constraints
+func AssertArtifactConstraints(obj model.Artifact) error {
+ return nil
+}
+
+// AssertArtifactListRequired checks if the required fields are not zero-ed
+func AssertArtifactListRequired(obj model.ArtifactList) error {
+ elements := map[string]interface{}{
+ "nextPageToken": obj.NextPageToken,
+ "pageSize": obj.PageSize,
+ "size": obj.Size,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ for _, el := range obj.Items {
+ if err := AssertArtifactRequired(el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AssertArtifactListConstraints checks if the values respects the defined constraints
+func AssertArtifactListConstraints(obj model.ArtifactList) error {
+ return nil
+}
+
+// AssertArtifactStateRequired checks if the required fields are not zero-ed
+func AssertArtifactStateRequired(obj model.ArtifactState) error {
+ return nil
+}
+
+// AssertArtifactStateConstraints checks if the values respects the defined constraints
+func AssertArtifactStateConstraints(obj model.ArtifactState) error {
+ return nil
+}
+
+// AssertBaseArtifactCreateRequired checks if the required fields are not zero-ed
+func AssertBaseArtifactCreateRequired(obj model.BaseArtifactCreate) error {
+ return nil
+}
+
+// AssertBaseArtifactCreateConstraints checks if the values respects the defined constraints
+func AssertBaseArtifactCreateConstraints(obj model.BaseArtifactCreate) error {
+ return nil
+}
+
+// AssertBaseArtifactRequired checks if the required fields are not zero-ed
+func AssertBaseArtifactRequired(obj model.BaseArtifact) error {
+ elements := map[string]interface{}{
+ "artifactType": obj.ArtifactType,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertBaseArtifactConstraints checks if the values respects the defined constraints
+func AssertBaseArtifactConstraints(obj model.BaseArtifact) error {
+ return nil
+}
+
+// AssertBaseArtifactUpdateRequired checks if the required fields are not zero-ed
+func AssertBaseArtifactUpdateRequired(obj model.BaseArtifactUpdate) error {
+ return nil
+}
+
+// AssertBaseArtifactUpdateConstraints checks if the values respects the defined constraints
+func AssertBaseArtifactUpdateConstraints(obj model.BaseArtifactUpdate) error {
+ return nil
+}
+
+// AssertBaseExecutionCreateRequired checks if the required fields are not zero-ed
+func AssertBaseExecutionCreateRequired(obj model.BaseExecutionCreate) error {
+ return nil
+}
+
+// AssertBaseExecutionCreateConstraints checks if the values respects the defined constraints
+func AssertBaseExecutionCreateConstraints(obj model.BaseExecutionCreate) error {
+ return nil
+}
+
+// AssertBaseExecutionRequired checks if the required fields are not zero-ed
+func AssertBaseExecutionRequired(obj model.BaseExecution) error {
+ return nil
+}
+
+// AssertBaseExecutionConstraints checks if the values respects the defined constraints
+func AssertBaseExecutionConstraints(obj model.BaseExecution) error {
+ return nil
+}
+
+// AssertBaseExecutionUpdateRequired checks if the required fields are not zero-ed
+func AssertBaseExecutionUpdateRequired(obj model.BaseExecutionUpdate) error {
+ return nil
+}
+
+// AssertBaseExecutionUpdateConstraints checks if the values respects the defined constraints
+func AssertBaseExecutionUpdateConstraints(obj model.BaseExecutionUpdate) error {
+ return nil
+}
+
+// AssertBaseResourceCreateRequired checks if the required fields are not zero-ed
+func AssertBaseResourceCreateRequired(obj model.BaseResourceCreate) error {
+ return nil
+}
+
+// AssertBaseResourceCreateConstraints checks if the values respects the defined constraints
+func AssertBaseResourceCreateConstraints(obj model.BaseResourceCreate) error {
+ return nil
+}
+
+// AssertBaseResourceRequired checks if the required fields are not zero-ed
+func AssertBaseResourceRequired(obj model.BaseResource) error {
+ return nil
+}
+
+// AssertBaseResourceConstraints checks if the values respects the defined constraints
+func AssertBaseResourceConstraints(obj model.BaseResource) error {
+ return nil
+}
+
+// AssertBaseResourceListRequired checks if the required fields are not zero-ed
+func AssertBaseResourceListRequired(obj model.BaseResourceList) error {
+ elements := map[string]interface{}{
+ "nextPageToken": obj.NextPageToken,
+ "pageSize": obj.PageSize,
+ "size": obj.Size,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertBaseResourceListConstraints checks if the values respects the defined constraints
+func AssertBaseResourceListConstraints(obj model.BaseResourceList) error {
+ return nil
+}
+
+// AssertBaseResourceUpdateRequired checks if the required fields are not zero-ed
+func AssertBaseResourceUpdateRequired(obj model.BaseResourceUpdate) error {
+ return nil
+}
+
+// AssertBaseResourceUpdateConstraints checks if the values respects the defined constraints
+func AssertBaseResourceUpdateConstraints(obj model.BaseResourceUpdate) error {
+ return nil
+}
+
+// AssertErrorRequired checks if the required fields are not zero-ed
+func AssertErrorRequired(obj model.Error) error {
+ elements := map[string]interface{}{
+ "code": obj.Code,
+ "message": obj.Message,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertErrorConstraints checks if the values respects the defined constraints
+func AssertErrorConstraints(obj model.Error) error {
+ return nil
+}
+
+// AssertExecutionStateRequired checks if the required fields are not zero-ed
+func AssertExecutionStateRequired(obj model.ExecutionState) error {
+ return nil
+}
+
+// AssertExecutionStateConstraints checks if the values respects the defined constraints
+func AssertExecutionStateConstraints(obj model.ExecutionState) error {
+ return nil
+}
+
+// AssertInferenceServiceCreateRequired checks if the required fields are not zero-ed
+func AssertInferenceServiceCreateRequired(obj model.InferenceServiceCreate) error {
+ elements := map[string]interface{}{
+ "registeredModelId": obj.RegisteredModelId,
+ "servingEnvironmentId": obj.ServingEnvironmentId,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertInferenceServiceCreateConstraints checks if the values respects the defined constraints
+func AssertInferenceServiceCreateConstraints(obj model.InferenceServiceCreate) error {
+ return nil
+}
+
+// AssertInferenceServiceRequired checks if the required fields are not zero-ed
+func AssertInferenceServiceRequired(obj model.InferenceService) error {
+ elements := map[string]interface{}{
+ "registeredModelId": obj.RegisteredModelId,
+ "servingEnvironmentId": obj.ServingEnvironmentId,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertInferenceServiceConstraints checks if the values respects the defined constraints
+func AssertInferenceServiceConstraints(obj model.InferenceService) error {
+ return nil
+}
+
+// AssertInferenceServiceListRequired checks if the required fields are not zero-ed
+func AssertInferenceServiceListRequired(obj model.InferenceServiceList) error {
+ elements := map[string]interface{}{
+ "nextPageToken": obj.NextPageToken,
+ "pageSize": obj.PageSize,
+ "size": obj.Size,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ for _, el := range obj.Items {
+ if err := AssertInferenceServiceRequired(el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AssertInferenceServiceListConstraints checks if the values respects the defined constraints
+func AssertInferenceServiceListConstraints(obj model.InferenceServiceList) error {
+ return nil
+}
+
+// AssertInferenceServiceStateRequired checks if the required fields are not zero-ed
+func AssertInferenceServiceStateRequired(obj model.InferenceServiceState) error {
+ return nil
+}
+
+// AssertInferenceServiceStateConstraints checks if the values respects the defined constraints
+func AssertInferenceServiceStateConstraints(obj model.InferenceServiceState) error {
+ return nil
+}
+
+// AssertInferenceServiceUpdateRequired checks if the required fields are not zero-ed
+func AssertInferenceServiceUpdateRequired(obj model.InferenceServiceUpdate) error {
+ return nil
+}
+
+// AssertInferenceServiceUpdateConstraints checks if the values respects the defined constraints
+func AssertInferenceServiceUpdateConstraints(obj model.InferenceServiceUpdate) error {
+ return nil
+}
+
+// AssertMetadataBoolValueRequired checks if the required fields are not zero-ed
+func AssertMetadataBoolValueRequired(obj model.MetadataBoolValue) error {
+ return nil
+}
+
+// AssertMetadataBoolValueConstraints checks if the values respects the defined constraints
+func AssertMetadataBoolValueConstraints(obj model.MetadataBoolValue) error {
+ return nil
+}
+
+// AssertMetadataDoubleValueRequired checks if the required fields are not zero-ed
+func AssertMetadataDoubleValueRequired(obj model.MetadataDoubleValue) error {
+ return nil
+}
+
+// AssertMetadataDoubleValueConstraints checks if the values respects the defined constraints
+func AssertMetadataDoubleValueConstraints(obj model.MetadataDoubleValue) error {
+ return nil
+}
+
+// AssertMetadataIntValueRequired checks if the required fields are not zero-ed
+func AssertMetadataIntValueRequired(obj model.MetadataIntValue) error {
+ return nil
+}
+
+// AssertMetadataIntValueConstraints checks if the values respects the defined constraints
+func AssertMetadataIntValueConstraints(obj model.MetadataIntValue) error {
+ return nil
+}
+
+// AssertMetadataProtoValueRequired checks if the required fields are not zero-ed
+func AssertMetadataProtoValueRequired(obj model.MetadataProtoValue) error {
+ return nil
+}
+
+// AssertMetadataProtoValueConstraints checks if the values respects the defined constraints
+func AssertMetadataProtoValueConstraints(obj model.MetadataProtoValue) error {
+ return nil
+}
+
+// AssertMetadataStringValueRequired checks if the required fields are not zero-ed
+func AssertMetadataStringValueRequired(obj model.MetadataStringValue) error {
+ return nil
+}
+
+// AssertMetadataStringValueConstraints checks if the values respects the defined constraints
+func AssertMetadataStringValueConstraints(obj model.MetadataStringValue) error {
+ return nil
+}
+
+// AssertMetadataStructValueRequired checks if the required fields are not zero-ed
+func AssertMetadataStructValueRequired(obj model.MetadataStructValue) error {
+ return nil
+}
+
+// AssertMetadataStructValueConstraints checks if the values respects the defined constraints
+func AssertMetadataStructValueConstraints(obj model.MetadataStructValue) error {
+ return nil
+}
+
+// AssertMetadataValueRequired checks if the required fields are not zero-ed
+func AssertMetadataValueRequired(obj model.MetadataValue) error {
+ return nil
+}
+
+// AssertMetadataValueConstraints checks if the values respects the defined constraints
+func AssertMetadataValueConstraints(obj model.MetadataValue) error {
+ return nil
+}
+
+// AssertModelArtifactCreateRequired checks if the required fields are not zero-ed
+func AssertModelArtifactCreateRequired(obj model.ModelArtifactCreate) error {
+ return nil
+}
+
+// AssertModelArtifactCreateConstraints checks if the values respects the defined constraints
+func AssertModelArtifactCreateConstraints(obj model.ModelArtifactCreate) error {
+ return nil
+}
+
+// AssertModelArtifactRequired checks if the required fields are not zero-ed
+func AssertModelArtifactRequired(obj model.ModelArtifact) error {
+ elements := map[string]interface{}{
+ "artifactType": obj.ArtifactType,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertModelArtifactConstraints checks if the values respects the defined constraints
+func AssertModelArtifactConstraints(obj model.ModelArtifact) error {
+ return nil
+}
+
+// AssertModelArtifactListRequired checks if the required fields are not zero-ed
+func AssertModelArtifactListRequired(obj model.ModelArtifactList) error {
+ elements := map[string]interface{}{
+ "nextPageToken": obj.NextPageToken,
+ "pageSize": obj.PageSize,
+ "size": obj.Size,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ for _, el := range obj.Items {
+ if err := AssertModelArtifactRequired(el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AssertModelArtifactListConstraints checks if the values respects the defined constraints
+func AssertModelArtifactListConstraints(obj model.ModelArtifactList) error {
+ return nil
+}
+
+// AssertModelArtifactUpdateRequired checks if the required fields are not zero-ed
+func AssertModelArtifactUpdateRequired(obj model.ModelArtifactUpdate) error {
+ return nil
+}
+
+// AssertModelArtifactUpdateConstraints checks if the values respects the defined constraints
+func AssertModelArtifactUpdateConstraints(obj model.ModelArtifactUpdate) error {
+ return nil
+}
+
+// AssertModelVersionCreateRequired checks if the required fields are not zero-ed
+func AssertModelVersionCreateRequired(obj model.ModelVersionCreate) error {
+ elements := map[string]interface{}{
+ "registeredModelID": obj.RegisteredModelID,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertModelVersionCreateConstraints checks if the values respects the defined constraints
+func AssertModelVersionCreateConstraints(obj model.ModelVersionCreate) error {
+ return nil
+}
+
+// AssertModelVersionRequired checks if the required fields are not zero-ed
+func AssertModelVersionRequired(obj model.ModelVersion) error {
+ return nil
+}
+
+// AssertModelVersionConstraints checks if the values respects the defined constraints
+func AssertModelVersionConstraints(obj model.ModelVersion) error {
+ return nil
+}
+
+// AssertModelVersionListRequired checks if the required fields are not zero-ed
+func AssertModelVersionListRequired(obj model.ModelVersionList) error {
+ elements := map[string]interface{}{
+ "nextPageToken": obj.NextPageToken,
+ "pageSize": obj.PageSize,
+ "size": obj.Size,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ for _, el := range obj.Items {
+ if err := AssertModelVersionRequired(el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AssertModelVersionListConstraints checks if the values respects the defined constraints
+func AssertModelVersionListConstraints(obj model.ModelVersionList) error {
+ return nil
+}
+
+// AssertModelVersionStateRequired checks if the required fields are not zero-ed
+func AssertModelVersionStateRequired(obj model.ModelVersionState) error {
+ return nil
+}
+
+// AssertModelVersionStateConstraints checks if the values respects the defined constraints
+func AssertModelVersionStateConstraints(obj model.ModelVersionState) error {
+ return nil
+}
+
+// AssertModelVersionUpdateRequired checks if the required fields are not zero-ed
+func AssertModelVersionUpdateRequired(obj model.ModelVersionUpdate) error {
+ return nil
+}
+
+// AssertModelVersionUpdateConstraints checks if the values respects the defined constraints
+func AssertModelVersionUpdateConstraints(obj model.ModelVersionUpdate) error {
+ return nil
+}
+
+// AssertOrderByFieldRequired checks if the required fields are not zero-ed
+func AssertOrderByFieldRequired(obj model.OrderByField) error {
+ return nil
+}
+
+// AssertOrderByFieldConstraints checks if the values respects the defined constraints
+func AssertOrderByFieldConstraints(obj model.OrderByField) error {
+ return nil
+}
+
+// AssertRegisteredModelCreateRequired checks if the required fields are not zero-ed
+func AssertRegisteredModelCreateRequired(obj model.RegisteredModelCreate) error {
+ return nil
+}
+
+// AssertRegisteredModelCreateConstraints checks if the values respects the defined constraints
+func AssertRegisteredModelCreateConstraints(obj model.RegisteredModelCreate) error {
+ return nil
+}
+
+// AssertRegisteredModelRequired checks if the required fields are not zero-ed
+func AssertRegisteredModelRequired(obj model.RegisteredModel) error {
+ return nil
+}
+
+// AssertRegisteredModelConstraints checks if the values respects the defined constraints
+func AssertRegisteredModelConstraints(obj model.RegisteredModel) error {
+ return nil
+}
+
+// AssertRegisteredModelListRequired checks if the required fields are not zero-ed
+func AssertRegisteredModelListRequired(obj model.RegisteredModelList) error {
+ elements := map[string]interface{}{
+ "nextPageToken": obj.NextPageToken,
+ "pageSize": obj.PageSize,
+ "size": obj.Size,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ for _, el := range obj.Items {
+ if err := AssertRegisteredModelRequired(el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AssertRegisteredModelListConstraints checks if the values respects the defined constraints
+func AssertRegisteredModelListConstraints(obj model.RegisteredModelList) error {
+ return nil
+}
+
+// AssertRegisteredModelStateRequired checks if the required fields are not zero-ed
+func AssertRegisteredModelStateRequired(obj model.RegisteredModelState) error {
+ return nil
+}
+
+// AssertRegisteredModelStateConstraints checks if the values respects the defined constraints
+func AssertRegisteredModelStateConstraints(obj model.RegisteredModelState) error {
+ return nil
+}
+
+// AssertRegisteredModelUpdateRequired checks if the required fields are not zero-ed
+func AssertRegisteredModelUpdateRequired(obj model.RegisteredModelUpdate) error {
+ return nil
+}
+
+// AssertRegisteredModelUpdateConstraints checks if the values respects the defined constraints
+func AssertRegisteredModelUpdateConstraints(obj model.RegisteredModelUpdate) error {
+ return nil
+}
+
+// AssertServeModelCreateRequired checks if the required fields are not zero-ed
+func AssertServeModelCreateRequired(obj model.ServeModelCreate) error {
+ elements := map[string]interface{}{
+ "modelVersionId": obj.ModelVersionId,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertServeModelCreateConstraints checks if the values respects the defined constraints
+func AssertServeModelCreateConstraints(obj model.ServeModelCreate) error {
+ return nil
+}
+
+// AssertServeModelRequired checks if the required fields are not zero-ed
+func AssertServeModelRequired(obj model.ServeModel) error {
+ elements := map[string]interface{}{
+ "modelVersionId": obj.ModelVersionId,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ return nil
+}
+
+// AssertServeModelConstraints checks if the values respects the defined constraints
+func AssertServeModelConstraints(obj model.ServeModel) error {
+ return nil
+}
+
+// AssertServeModelListRequired checks if the required fields are not zero-ed
+func AssertServeModelListRequired(obj model.ServeModelList) error {
+ elements := map[string]interface{}{
+ "nextPageToken": obj.NextPageToken,
+ "pageSize": obj.PageSize,
+ "size": obj.Size,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ for _, el := range obj.Items {
+ if err := AssertServeModelRequired(el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AssertServeModelListConstraints checks if the values respects the defined constraints
+func AssertServeModelListConstraints(obj model.ServeModelList) error {
+ return nil
+}
+
+// AssertServeModelUpdateRequired checks if the required fields are not zero-ed
+func AssertServeModelUpdateRequired(obj model.ServeModelUpdate) error {
+ return nil
+}
+
+// AssertServeModelUpdateConstraints checks if the values respects the defined constraints
+func AssertServeModelUpdateConstraints(obj model.ServeModelUpdate) error {
+ return nil
+}
+
+// AssertServingEnvironmentCreateRequired checks if the required fields are not zero-ed
+func AssertServingEnvironmentCreateRequired(obj model.ServingEnvironmentCreate) error {
+ return nil
+}
+
+// AssertServingEnvironmentCreateConstraints checks if the values respects the defined constraints
+func AssertServingEnvironmentCreateConstraints(obj model.ServingEnvironmentCreate) error {
+ return nil
+}
+
+// AssertServingEnvironmentRequired checks if the required fields are not zero-ed
+func AssertServingEnvironmentRequired(obj model.ServingEnvironment) error {
+ return nil
+}
+
+// AssertServingEnvironmentConstraints checks if the values respects the defined constraints
+func AssertServingEnvironmentConstraints(obj model.ServingEnvironment) error {
+ return nil
+}
+
+// AssertServingEnvironmentListRequired checks if the required fields are not zero-ed
+func AssertServingEnvironmentListRequired(obj model.ServingEnvironmentList) error {
+ elements := map[string]interface{}{
+ "nextPageToken": obj.NextPageToken,
+ "pageSize": obj.PageSize,
+ "size": obj.Size,
+ }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+ for _, el := range obj.Items {
+ if err := AssertServingEnvironmentRequired(el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AssertServingEnvironmentListConstraints checks if the values respects the defined constraints
+func AssertServingEnvironmentListConstraints(obj model.ServingEnvironmentList) error {
+ return nil
+}
+
+// AssertServingEnvironmentUpdateRequired checks if the required fields are not zero-ed
+func AssertServingEnvironmentUpdateRequired(obj model.ServingEnvironmentUpdate) error {
+ return nil
+}
+
+// AssertServingEnvironmentUpdateConstraints checks if the values respects the defined constraints
+func AssertServingEnvironmentUpdateConstraints(obj model.ServingEnvironmentUpdate) error {
+ return nil
+}
+
+// AssertSortOrderRequired checks if the required fields are not zero-ed
+func AssertSortOrderRequired(obj model.SortOrder) error {
+ return nil
+}
+
+// AssertSortOrderConstraints checks if the values respects the defined constraints
+func AssertSortOrderConstraints(obj model.SortOrder) error {
+ return nil
+}
diff --git a/internal/testutils/test_container_utils.go b/internal/testutils/test_container_utils.go
new file mode 100644
index 000000000..426715502
--- /dev/null
+++ b/internal/testutils/test_container_utils.go
@@ -0,0 +1,139 @@
+package testutils
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "os"
+ "testing"
+
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/testcontainers/testcontainers-go"
+ "github.com/testcontainers/testcontainers-go/wait"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
+)
+
+const (
+ useProvider = testcontainers.ProviderDefault // or explicit to testcontainers.ProviderPodman if needed
+ mlmdImage = "gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0"
+ sqliteFile = "metadata.sqlite.db"
+ testConfigFolder = "test/config/ml-metadata"
+)
+
+func ClearMetadataSqliteDB() error {
+ wd, err := getTestConfigWorkingDir()
+ if err != nil {
+ return err
+ }
+
+ if err := os.Remove(fmt.Sprintf("%s/%s", wd, sqliteFile)); err != nil {
+ return fmt.Errorf("expected to clear sqlite file but didn't find: %v", err)
+ }
+ return nil
+}
+
+func fileExists(filePath string) (bool, error) {
+ info, err := os.Stat(filePath)
+ if err == nil {
+ return !info.IsDir(), nil
+ }
+ if errors.Is(err, os.ErrNotExist) {
+ return false, nil
+ }
+ return false, err
+}
+
+func getTestConfigWorkingDir() (string, error) {
+ wd, err := os.Getwd()
+ if err != nil {
+ return "", err
+ }
+ return fmt.Sprintf("%s/../../%s", wd, testConfigFolder), nil
+}
+
+// SetupMLMetadataTestContainer setup a test container for MLMD server exposing gRPC interface
+// Returns:
+// - The test container gRPC address :
+// - The teardown function to close and teardown the test container
+func SetupMLMetadataTestContainer(t *testing.T) (*grpc.ClientConn, proto.MetadataStoreServiceClient, func(t *testing.T)) {
+ ctx := context.Background()
+ wd, err := getTestConfigWorkingDir()
+ if err != nil {
+ t.Errorf("error getting working directory: %v", err)
+ }
+ // t.Logf("using working directory: %s", wd)
+
+ // when unhandled panics or other hard failures, could leave the DB in the directory
+ // here we make sure it's not existing already, and that it was really cleanup by previous runs
+ sqlitePath := fmt.Sprintf("%s/%s", wd, sqliteFile)
+ exists, err := fileExists(sqlitePath)
+ if err != nil {
+ t.Errorf("error looking up for SQLite path: %v", err)
+ }
+ if exists {
+ t.Errorf("SQLite should not exists: %v", sqlitePath)
+ panic("halting immediately, SQLite should not exists: " + sqlitePath)
+ }
+
+ req := testcontainers.ContainerRequest{
+ Image: mlmdImage,
+ ExposedPorts: []string{"8080/tcp"},
+ Env: map[string]string{
+ "METADATA_STORE_SERVER_CONFIG_FILE": "/tmp/shared/conn_config.pb",
+ },
+ Mounts: testcontainers.ContainerMounts{
+ testcontainers.ContainerMount{
+ Source: testcontainers.GenericBindMountSource{
+ HostPath: wd,
+ },
+ Target: "/tmp/shared",
+ },
+ },
+ WaitingFor: wait.ForLog("Server listening on"),
+ }
+
+ mlmdgrpc, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
+ ProviderType: useProvider,
+ ContainerRequest: req,
+ Started: true,
+ })
+ if err != nil {
+ t.Errorf("error setting up mlmd grpc container: %v", err)
+ }
+
+ mappedHost, err := mlmdgrpc.Host(ctx)
+ if err != nil {
+ t.Error(err)
+ }
+ mappedPort, err := mlmdgrpc.MappedPort(ctx, "8080")
+ if err != nil {
+ t.Error(err)
+ }
+
+ mlmdAddr := fmt.Sprintf("%s:%s", mappedHost, mappedPort.Port())
+ t.Log("MLMD test container running at: ", mlmdAddr)
+
+ // setup grpc connection
+ conn, err := grpc.DialContext(
+ context.Background(),
+ mlmdAddr,
+ grpc.WithReturnConnectionError(),
+ grpc.WithBlock(),
+ grpc.WithTransportCredentials(insecure.NewCredentials()),
+ )
+ if err != nil {
+ t.Errorf("error dialing connection to mlmd server %s: %v", mlmdAddr, err)
+ }
+
+ mlmdClient := proto.NewMetadataStoreServiceClient(conn)
+
+ return conn, mlmdClient, func(t *testing.T) {
+ if err := conn.Close(); err != nil {
+ t.Error(err)
+ }
+ if err := mlmdgrpc.Terminate(ctx); err != nil {
+ t.Error(err)
+ }
+ }
+}
diff --git a/main.go b/main.go
new file mode 100644
index 000000000..bccdb30f2
--- /dev/null
+++ b/main.go
@@ -0,0 +1,20 @@
+package main
+
+import (
+ "github.com/golang/glog"
+ "github.com/opendatahub-io/model-registry/cmd"
+ "log"
+ "net/http"
+ _ "net/http/pprof"
+)
+
+func main() {
+ defer glog.Flush()
+
+ // start pprof server on 6060
+ go func() {
+ log.Println(http.ListenAndServe("localhost:6060", nil))
+ }()
+
+ cmd.Execute()
+}
diff --git a/openapitools.json b/openapitools.json
new file mode 100644
index 000000000..4053ae890
--- /dev/null
+++ b/openapitools.json
@@ -0,0 +1,7 @@
+{
+ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
+ "spaces": 2,
+ "generator-cli": {
+ "version": "7.0.1"
+ }
+}
diff --git a/patches/type_asserts.patch b/patches/type_asserts.patch
new file mode 100644
index 000000000..8735b1c23
--- /dev/null
+++ b/patches/type_asserts.patch
@@ -0,0 +1,28 @@
+diff --git a/internal/server/openapi/type_asserts.go b/internal/server/openapi/type_asserts.go
+index 4318f15..2aba64a 100644
+--- a/internal/server/openapi/type_asserts.go
++++ b/internal/server/openapi/type_asserts.go
+@@ -18,15 +18,15 @@ import (
+
+ // AssertArtifactRequired checks if the required fields are not zero-ed
+ func AssertArtifactRequired(obj model.Artifact) error {
+- elements := map[string]interface{}{
+- "artifactType": obj.ArtifactType,
+- }
+- for name, el := range elements {
+- if isZero := IsZeroValue(el); isZero {
+- return &RequiredError{Field: name}
+- }
+- }
+-
++ // FIXME(manual): Artifact.ArtifactType is not present on client models
++ // elements := map[string]interface{}{
++ // "artifactType": obj.ArtifactType,
++ // }
++ // for name, el := range elements {
++ // if isZero := IsZeroValue(el); isZero {
++ // return &RequiredError{Field: name}
++ // }
++ // }
+ return nil
+ }
diff --git a/pkg/api/api.go b/pkg/api/api.go
new file mode 100644
index 000000000..dd2dd4bcc
--- /dev/null
+++ b/pkg/api/api.go
@@ -0,0 +1,119 @@
+package api
+
+import "github.com/opendatahub-io/model-registry/pkg/openapi"
+
+// ListOptions provides options for listing entities with pagination and sorting.
+// It includes parameters such as PageSize, OrderBy, SortOrder, and NextPageToken.
+type ListOptions struct {
+ PageSize *int32 // The maximum number of entities to be returned per page.
+ OrderBy *string // The field by which entities are ordered.
+ SortOrder *string // The sorting order, which can be "ASC" (ascending) or "DESC" (descending).
+ NextPageToken *string // A token to retrieve the next page of entities in a paginated result set.
+}
+
+// ModelRegistryApi defines the external API for the Model Registry library
+type ModelRegistryApi interface {
+ // REGISTERED MODEL
+
+ // UpsertRegisteredModel create or update a registered model, the behavior follows the same
+ // approach used by MLMD gRPC api. If Id is provided update the entity otherwise create a new one.
+ UpsertRegisteredModel(registeredModel *openapi.RegisteredModel) (*openapi.RegisteredModel, error)
+
+ // GetRegisteredModelById retrieve RegisteredModel by id
+ GetRegisteredModelById(id string) (*openapi.RegisteredModel, error)
+
+ // GetRegisteredModelByInferenceService retrieve a RegisteredModel by inference service id
+ GetRegisteredModelByInferenceService(inferenceServiceId string) (*openapi.RegisteredModel, error)
+
+ // GetRegisteredModelByParams find RegisteredModel instances that match the provided optional params
+ GetRegisteredModelByParams(name *string, externalId *string) (*openapi.RegisteredModel, error)
+
+ // GetRegisteredModels return all ModelArtifact properly ordered and sized based on listOptions param.
+ GetRegisteredModels(listOptions ListOptions) (*openapi.RegisteredModelList, error)
+
+ // MODEL VERSION
+
+ // UpsertModelVersion create a new Model Version or update a Model Version associated to a
+ // specific RegisteredModel identified by registeredModelId parameter
+ UpsertModelVersion(modelVersion *openapi.ModelVersion, registeredModelId *string) (*openapi.ModelVersion, error)
+
+ // GetModelVersionById retrieve ModelVersion by id
+ GetModelVersionById(id string) (*openapi.ModelVersion, error)
+
+ // GetModelVersionByInferenceService retrieve a ModelVersion by inference service id
+ GetModelVersionByInferenceService(inferenceServiceId string) (*openapi.ModelVersion, error)
+
+ // GetModelVersionByParams find ModelVersion instances that match the provided optional params
+ GetModelVersionByParams(versionName *string, registeredModelId *string, externalId *string) (*openapi.ModelVersion, error)
+
+ // GetModelVersions return all ModelArtifact properly ordered and sized based on listOptions param.
+ // if registeredModelId is provided, return all ModelVersion instances belonging to a specific RegisteredModel
+ GetModelVersions(listOptions ListOptions, registeredModelId *string) (*openapi.ModelVersionList, error)
+
+ // MODEL ARTIFACT
+
+ // UpsertModelArtifact create a new Artifact or update an Artifact associated to a specific
+ // ModelVersion identified by modelVersionId parameter
+ UpsertModelArtifact(modelArtifact *openapi.ModelArtifact, modelVersionId *string) (*openapi.ModelArtifact, error)
+
+ // GetModelArtifactById retrieve ModelArtifact by id
+ GetModelArtifactById(id string) (*openapi.ModelArtifact, error)
+
+ // GetModelArtifactByInferenceService retrieve a ModelArtifact by inference service id
+ GetModelArtifactByInferenceService(inferenceServiceId string) (*openapi.ModelArtifact, error)
+
+ // GetModelArtifactByParams find ModelArtifact instances that match the provided optional params
+ GetModelArtifactByParams(artifactName *string, modelVersionId *string, externalId *string) (*openapi.ModelArtifact, error)
+
+ // GetModelArtifacts return all ModelArtifact properly ordered and sized based on listOptions param.
+ // if modelVersionId is provided, return all ModelArtifact instances belonging to a specific ModelVersion
+ GetModelArtifacts(listOptions ListOptions, modelVersionId *string) (*openapi.ModelArtifactList, error)
+
+ // SERVING ENVIRONMENT
+
+ // UpsertServingEnvironment create or update a serving environmet, the behavior follows the same
+ // approach used by MLMD gRPC api. If Id is provided update the entity otherwise create a new one.
+ UpsertServingEnvironment(registeredModel *openapi.ServingEnvironment) (*openapi.ServingEnvironment, error)
+
+ // GetInferenceServiceById retrieve ServingEnvironment by id
+ GetServingEnvironmentById(id string) (*openapi.ServingEnvironment, error)
+
+ // GetServingEnvironmentByParams find ServingEnvironment instances that match the provided optional params
+ GetServingEnvironmentByParams(name *string, externalId *string) (*openapi.ServingEnvironment, error)
+
+ // GetServingEnvironments return all ServingEnvironment properly ordered and sized based on listOptions param
+ GetServingEnvironments(listOptions ListOptions) (*openapi.ServingEnvironmentList, error)
+
+ // INFERENCE SERVICE
+
+ // UpsertInferenceService create or update an inference service, the behavior follows the same
+ // approach used by MLMD gRPC api. If Id is provided update the entity otherwise create a new one.
+ // inferenceService.servingEnvironmentId defines the ServingEnvironment to be associated as parent ownership
+ // to the newly created InferenceService.
+ UpsertInferenceService(inferenceService *openapi.InferenceService) (*openapi.InferenceService, error)
+
+ // GetInferenceServiceById retrieve InferenceService by id
+ GetInferenceServiceById(id string) (*openapi.InferenceService, error)
+
+ // GetInferenceServiceByParams find InferenceService instances that match the provided optional params
+ GetInferenceServiceByParams(name *string, parentResourceId *string, externalId *string) (*openapi.InferenceService, error)
+
+ // GetInferenceServices return all InferenceService properly ordered and sized based on listOptions param
+ // if servingEnvironmentId is provided, return all InferenceService instances belonging to a specific ServingEnvironment
+ // if runtime is provided, filter those InferenceService having that runtime
+ GetInferenceServices(listOptions ListOptions, servingEnvironmentId *string, runtime *string) (*openapi.InferenceServiceList, error)
+
+ // SERVE MODEL
+
+ // UpsertServeModel create or update a serve model, the behavior follows the same
+ // approach used by MLMD gRPC api. If Id is provided update the entity otherwise create a new one.
+ // inferenceServiceId defines the InferenceService to be linked to the newly created ServeModel.
+ UpsertServeModel(serveModel *openapi.ServeModel, inferenceServiceId *string) (*openapi.ServeModel, error)
+
+ // GetServeModelById retrieve ServeModel by id
+ GetServeModelById(id string) (*openapi.ServeModel, error)
+
+ // GetServeModels get all ServeModel objects properly ordered and sized based on listOptions param.
+ // if inferenceServiceId is provided, return all ServeModel instances belonging to a specific InferenceService
+ GetServeModels(listOptions ListOptions, inferenceServiceId *string) (*openapi.ServeModelList, error)
+}
diff --git a/pkg/core/core.go b/pkg/core/core.go
new file mode 100644
index 000000000..e04a5dd53
--- /dev/null
+++ b/pkg/core/core.go
@@ -0,0 +1,1365 @@
+package core
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/golang/glog"
+ "github.com/opendatahub-io/model-registry/internal/apiutils"
+ "github.com/opendatahub-io/model-registry/internal/constants"
+ "github.com/opendatahub-io/model-registry/internal/converter"
+ "github.com/opendatahub-io/model-registry/internal/converter/generated"
+ "github.com/opendatahub-io/model-registry/internal/mapper"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/pkg/api"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+ "google.golang.org/grpc"
+)
+
+var (
+ registeredModelTypeName = apiutils.Of(constants.RegisteredModelTypeName)
+ modelVersionTypeName = apiutils.Of(constants.ModelVersionTypeName)
+ modelArtifactTypeName = apiutils.Of(constants.ModelArtifactTypeName)
+ servingEnvironmentTypeName = apiutils.Of(constants.ServingEnvironmentTypeName)
+ inferenceServiceTypeName = apiutils.Of(constants.InferenceServiceTypeName)
+ serveModelTypeName = apiutils.Of(constants.ServeModelTypeName)
+)
+
+// ModelRegistryService is the core library of the model registry
+type ModelRegistryService struct {
+ mlmdClient proto.MetadataStoreServiceClient
+ typesMap map[string]int64
+ mapper *mapper.Mapper
+ openapiConv *generated.OpenAPIConverterImpl
+}
+
+// NewModelRegistryService creates a new instance of the ModelRegistryService, initializing it with the provided gRPC client connection.
+// It _assumes_ the necessary MLMD's Context, Artifact, Execution types etc. are already setup in the underlying MLMD service.
+//
+// Parameters:
+// - cc: A gRPC client connection to the underlying MLMD service
+func NewModelRegistryService(cc grpc.ClientConnInterface) (api.ModelRegistryApi, error) {
+ typesMap, err := BuildTypesMap(cc)
+ if err != nil { // early return in case type Ids cannot be retrieved
+ return nil, err
+ }
+
+ client := proto.NewMetadataStoreServiceClient(cc)
+
+ return &ModelRegistryService{
+ mlmdClient: client,
+ typesMap: typesMap,
+ openapiConv: &generated.OpenAPIConverterImpl{},
+ mapper: mapper.NewMapper(typesMap),
+ }, nil
+}
+
+func BuildTypesMap(cc grpc.ClientConnInterface) (map[string]int64, error) {
+ client := proto.NewMetadataStoreServiceClient(cc)
+
+ registeredModelContextTypeReq := proto.GetContextTypeRequest{
+ TypeName: registeredModelTypeName,
+ }
+ registeredModelResp, err := client.GetContextType(context.Background(), ®isteredModelContextTypeReq)
+ if err != nil {
+ return nil, fmt.Errorf("error getting context type %s: %v", *registeredModelTypeName, err)
+ }
+ modelVersionContextTypeReq := proto.GetContextTypeRequest{
+ TypeName: modelVersionTypeName,
+ }
+ modelVersionResp, err := client.GetContextType(context.Background(), &modelVersionContextTypeReq)
+ if err != nil {
+ return nil, fmt.Errorf("error getting context type %s: %v", *modelVersionTypeName, err)
+ }
+ modelArtifactArtifactTypeReq := proto.GetArtifactTypeRequest{
+ TypeName: modelArtifactTypeName,
+ }
+ modelArtifactResp, err := client.GetArtifactType(context.Background(), &modelArtifactArtifactTypeReq)
+ if err != nil {
+ return nil, fmt.Errorf("error getting artifact type %s: %v", *modelArtifactTypeName, err)
+ }
+ servingEnvironmentContextTypeReq := proto.GetContextTypeRequest{
+ TypeName: servingEnvironmentTypeName,
+ }
+ servingEnvironmentResp, err := client.GetContextType(context.Background(), &servingEnvironmentContextTypeReq)
+ if err != nil {
+ return nil, fmt.Errorf("error getting context type %s: %v", *servingEnvironmentTypeName, err)
+ }
+ inferenceServiceContextTypeReq := proto.GetContextTypeRequest{
+ TypeName: inferenceServiceTypeName,
+ }
+ inferenceServiceResp, err := client.GetContextType(context.Background(), &inferenceServiceContextTypeReq)
+ if err != nil {
+ return nil, fmt.Errorf("error getting context type %s: %v", *inferenceServiceTypeName, err)
+ }
+ serveModelExecutionReq := proto.GetExecutionTypeRequest{
+ TypeName: serveModelTypeName,
+ }
+ serveModelResp, err := client.GetExecutionType(context.Background(), &serveModelExecutionReq)
+ if err != nil {
+ return nil, fmt.Errorf("error getting execution type %s: %v", *serveModelTypeName, err)
+ }
+
+ typesMap := map[string]int64{
+ constants.RegisteredModelTypeName: registeredModelResp.ContextType.GetId(),
+ constants.ModelVersionTypeName: modelVersionResp.ContextType.GetId(),
+ constants.ModelArtifactTypeName: modelArtifactResp.ArtifactType.GetId(),
+ constants.ServingEnvironmentTypeName: servingEnvironmentResp.ContextType.GetId(),
+ constants.InferenceServiceTypeName: inferenceServiceResp.ContextType.GetId(),
+ constants.ServeModelTypeName: serveModelResp.ExecutionType.GetId(),
+ }
+ return typesMap, nil
+}
+
+// REGISTERED MODELS
+
+// UpsertRegisteredModel creates a new registered model if the given registered model's ID is nil,
+// or updates an existing registered model if the ID is provided.
+func (serv *ModelRegistryService) UpsertRegisteredModel(registeredModel *openapi.RegisteredModel) (*openapi.RegisteredModel, error) {
+ var err error
+ var existing *openapi.RegisteredModel
+
+ if registeredModel.Id == nil {
+ glog.Info("Creating new registered model")
+ } else {
+ glog.Infof("Updating registered model %s", *registeredModel.Id)
+ existing, err = serv.GetRegisteredModelById(*registeredModel.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ withNotEditable, err := serv.openapiConv.OverrideNotEditableForRegisteredModel(converter.NewOpenapiUpdateWrapper(existing, registeredModel))
+ if err != nil {
+ return nil, err
+ }
+ registeredModel = &withNotEditable
+ }
+
+ modelCtx, err := serv.mapper.MapFromRegisteredModel(registeredModel)
+ if err != nil {
+ return nil, err
+ }
+
+ modelCtxResp, err := serv.mlmdClient.PutContexts(context.Background(), &proto.PutContextsRequest{
+ Contexts: []*proto.Context{
+ modelCtx,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ idAsString := converter.Int64ToString(&modelCtxResp.ContextIds[0])
+ model, err := serv.GetRegisteredModelById(*idAsString)
+ if err != nil {
+ return nil, err
+ }
+
+ return model, nil
+}
+
+// GetRegisteredModelById retrieves a registered model by its unique identifier (ID).
+func (serv *ModelRegistryService) GetRegisteredModelById(id string) (*openapi.RegisteredModel, error) {
+ glog.Infof("Getting registered model %s", id)
+
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ getByIdResp, err := serv.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{int64(*idAsInt)},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getByIdResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple registered models found for id %s", id)
+ }
+
+ if len(getByIdResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no registered model found for id %s", id)
+ }
+
+ regModel, err := serv.mapper.MapToRegisteredModel(getByIdResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return regModel, nil
+}
+
+// GetRegisteredModelByInferenceService retrieves a registered model associated with the specified inference service ID.
+func (serv *ModelRegistryService) GetRegisteredModelByInferenceService(inferenceServiceId string) (*openapi.RegisteredModel, error) {
+ is, err := serv.GetInferenceServiceById(inferenceServiceId)
+ if err != nil {
+ return nil, err
+ }
+ return serv.GetRegisteredModelById(is.RegisteredModelId)
+}
+
+// getRegisteredModelByVersionId retrieves a registered model associated with the specified model version ID.
+func (serv *ModelRegistryService) getRegisteredModelByVersionId(id string) (*openapi.RegisteredModel, error) {
+ glog.Infof("Getting registered model for model version %s", id)
+
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ getParentResp, err := serv.mlmdClient.GetParentContextsByContext(context.Background(), &proto.GetParentContextsByContextRequest{
+ ContextId: idAsInt,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getParentResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple registered models found for model version %s", id)
+ }
+
+ if len(getParentResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no registered model found for model version %s", id)
+ }
+
+ regModel, err := serv.mapper.MapToRegisteredModel(getParentResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return regModel, nil
+}
+
+// GetRegisteredModelByParams retrieves a registered model based on specified parameters, such as name or external ID.
+// If multiple or no registered models are found, an error is returned accordingly.
+func (serv *ModelRegistryService) GetRegisteredModelByParams(name *string, externalId *string) (*openapi.RegisteredModel, error) {
+ glog.Infof("Getting registered model by params name=%v, externalId=%v", name, externalId)
+
+ filterQuery := ""
+ if name != nil {
+ filterQuery = fmt.Sprintf("name = \"%s\"", *name)
+ } else if externalId != nil {
+ filterQuery = fmt.Sprintf("external_id = \"%s\"", *externalId)
+ } else {
+ return nil, fmt.Errorf("invalid parameters call, supply either name or externalId")
+ }
+
+ getByParamsResp, err := serv.mlmdClient.GetContextsByType(context.Background(), &proto.GetContextsByTypeRequest{
+ TypeName: registeredModelTypeName,
+ Options: &proto.ListOperationOptions{
+ FilterQuery: &filterQuery,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getByParamsResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple registered models found for name=%v, externalId=%v", apiutils.ZeroIfNil(name), apiutils.ZeroIfNil(externalId))
+ }
+
+ if len(getByParamsResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no registered models found for name=%v, externalId=%v", apiutils.ZeroIfNil(name), apiutils.ZeroIfNil(externalId))
+ }
+
+ regModel, err := serv.mapper.MapToRegisteredModel(getByParamsResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+ return regModel, nil
+}
+
+// GetRegisteredModels retrieves a list of registered models based on the provided list options.
+func (serv *ModelRegistryService) GetRegisteredModels(listOptions api.ListOptions) (*openapi.RegisteredModelList, error) {
+ listOperationOptions, err := apiutils.BuildListOperationOptions(listOptions)
+ if err != nil {
+ return nil, err
+ }
+ contextsResp, err := serv.mlmdClient.GetContextsByType(context.Background(), &proto.GetContextsByTypeRequest{
+ TypeName: registeredModelTypeName,
+ Options: listOperationOptions,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ results := []openapi.RegisteredModel{}
+ for _, c := range contextsResp.Contexts {
+ mapped, err := serv.mapper.MapToRegisteredModel(c)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, *mapped)
+ }
+
+ toReturn := openapi.RegisteredModelList{
+ NextPageToken: apiutils.ZeroIfNil(contextsResp.NextPageToken),
+ PageSize: apiutils.ZeroIfNil(listOptions.PageSize),
+ Size: int32(len(results)),
+ Items: results,
+ }
+ return &toReturn, nil
+}
+
+// MODEL VERSIONS
+
+// UpsertModelVersion creates a new model version if the provided model version's ID is nil,
+// or updates an existing model version if the ID is provided.
+func (serv *ModelRegistryService) UpsertModelVersion(modelVersion *openapi.ModelVersion, registeredModelId *string) (*openapi.ModelVersion, error) {
+ var err error
+ var existing *openapi.ModelVersion
+ var registeredModel *openapi.RegisteredModel
+
+ if modelVersion.Id == nil {
+ // create
+ glog.Info("Creating new model version")
+ if registeredModelId == nil {
+ return nil, fmt.Errorf("missing registered model id, cannot create model version without registered model")
+ }
+ registeredModel, err = serv.GetRegisteredModelById(*registeredModelId)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ // update
+ glog.Infof("Updating model version %s", *modelVersion.Id)
+ existing, err = serv.GetModelVersionById(*modelVersion.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ withNotEditable, err := serv.openapiConv.OverrideNotEditableForModelVersion(converter.NewOpenapiUpdateWrapper(existing, modelVersion))
+ if err != nil {
+ return nil, err
+ }
+ modelVersion = &withNotEditable
+
+ registeredModel, err = serv.getRegisteredModelByVersionId(*modelVersion.Id)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ modelCtx, err := serv.mapper.MapFromModelVersion(modelVersion, *registeredModel.Id, registeredModel.Name)
+ if err != nil {
+ return nil, err
+ }
+
+ modelCtxResp, err := serv.mlmdClient.PutContexts(context.Background(), &proto.PutContextsRequest{
+ Contexts: []*proto.Context{
+ modelCtx,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ modelId := &modelCtxResp.ContextIds[0]
+ if modelVersion.Id == nil {
+ registeredModelId, err := converter.StringToInt64(registeredModel.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ _, err = serv.mlmdClient.PutParentContexts(context.Background(), &proto.PutParentContextsRequest{
+ ParentContexts: []*proto.ParentContext{{
+ ChildId: modelId,
+ ParentId: registeredModelId}},
+ TransactionOptions: &proto.TransactionOptions{},
+ })
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ idAsString := converter.Int64ToString(modelId)
+ model, err := serv.GetModelVersionById(*idAsString)
+ if err != nil {
+ return nil, err
+ }
+
+ return model, nil
+}
+
+// GetModelVersionById retrieves a model version by its unique identifier (ID).
+func (serv *ModelRegistryService) GetModelVersionById(id string) (*openapi.ModelVersion, error) {
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ getByIdResp, err := serv.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{int64(*idAsInt)},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getByIdResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple model versions found for id %s", id)
+ }
+
+ if len(getByIdResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no model version found for id %s", id)
+ }
+
+ modelVer, err := serv.mapper.MapToModelVersion(getByIdResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return modelVer, nil
+}
+
+// GetModelVersionByInferenceService retrieves the model version associated with the specified inference service ID.
+func (serv *ModelRegistryService) GetModelVersionByInferenceService(inferenceServiceId string) (*openapi.ModelVersion, error) {
+ is, err := serv.GetInferenceServiceById(inferenceServiceId)
+ if err != nil {
+ return nil, err
+ }
+ if is.ModelVersionId != nil {
+ return serv.GetModelVersionById(*is.ModelVersionId)
+ }
+ // modelVersionId: ID of the ModelVersion to serve. If it's unspecified, then the latest ModelVersion by creation order will be served.
+ orderByCreateTime := "CREATE_TIME"
+ sortOrderDesc := "DESC"
+ versions, err := serv.GetModelVersions(api.ListOptions{OrderBy: &orderByCreateTime, SortOrder: &sortOrderDesc}, &is.RegisteredModelId)
+ if err != nil {
+ return nil, err
+ }
+ if len(versions.Items) == 0 {
+ return nil, fmt.Errorf("no model versions found for id %s", is.RegisteredModelId)
+ }
+ return &versions.Items[0], nil
+}
+
+// getModelVersionByArtifactId retrieves the model version associated with the specified model artifact ID.
+func (serv *ModelRegistryService) getModelVersionByArtifactId(id string) (*openapi.ModelVersion, error) {
+ glog.Infof("Getting model version for model artifact %s", id)
+
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ getParentResp, err := serv.mlmdClient.GetContextsByArtifact(context.Background(), &proto.GetContextsByArtifactRequest{
+ ArtifactId: idAsInt,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getParentResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple model versions found for model artifact %s", id)
+ }
+
+ if len(getParentResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no model version found for model artifact %s", id)
+ }
+
+ modelVersion, err := serv.mapper.MapToModelVersion(getParentResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return modelVersion, nil
+}
+
+// GetModelVersionByParams retrieves a model version based on specified parameters, such as (version name and registered model ID), or external ID.
+// If multiple or no model versions are found, an error is returned.
+func (serv *ModelRegistryService) GetModelVersionByParams(versionName *string, registeredModelId *string, externalId *string) (*openapi.ModelVersion, error) {
+ filterQuery := ""
+ if versionName != nil && registeredModelId != nil {
+ filterQuery = fmt.Sprintf("name = \"%s\"", converter.PrefixWhenOwned(registeredModelId, *versionName))
+ } else if externalId != nil {
+ filterQuery = fmt.Sprintf("external_id = \"%s\"", *externalId)
+ } else {
+ return nil, fmt.Errorf("invalid parameters call, supply either (versionName and registeredModelId), or externalId")
+ }
+
+ getByParamsResp, err := serv.mlmdClient.GetContextsByType(context.Background(), &proto.GetContextsByTypeRequest{
+ TypeName: modelVersionTypeName,
+ Options: &proto.ListOperationOptions{
+ FilterQuery: &filterQuery,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getByParamsResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple model versions found for versionName=%v, registeredModelId=%v, externalId=%v", apiutils.ZeroIfNil(versionName), apiutils.ZeroIfNil(registeredModelId), apiutils.ZeroIfNil(externalId))
+ }
+
+ if len(getByParamsResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no model versions found for versionName=%v, registeredModelId=%v, externalId=%v", apiutils.ZeroIfNil(versionName), apiutils.ZeroIfNil(registeredModelId), apiutils.ZeroIfNil(externalId))
+ }
+
+ modelVer, err := serv.mapper.MapToModelVersion(getByParamsResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+ return modelVer, nil
+}
+
+// GetModelVersions retrieves a list of model versions based on the provided list options and optional registered model ID.
+func (serv *ModelRegistryService) GetModelVersions(listOptions api.ListOptions, registeredModelId *string) (*openapi.ModelVersionList, error) {
+ listOperationOptions, err := apiutils.BuildListOperationOptions(listOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ if registeredModelId != nil {
+ queryParentCtxId := fmt.Sprintf("parent_contexts_a.id = %s", *registeredModelId)
+ listOperationOptions.FilterQuery = &queryParentCtxId
+ }
+
+ contextsResp, err := serv.mlmdClient.GetContextsByType(context.Background(), &proto.GetContextsByTypeRequest{
+ TypeName: modelVersionTypeName,
+ Options: listOperationOptions,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ results := []openapi.ModelVersion{}
+ for _, c := range contextsResp.Contexts {
+ mapped, err := serv.mapper.MapToModelVersion(c)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, *mapped)
+ }
+
+ toReturn := openapi.ModelVersionList{
+ NextPageToken: apiutils.ZeroIfNil(contextsResp.NextPageToken),
+ PageSize: apiutils.ZeroIfNil(listOptions.PageSize),
+ Size: int32(len(results)),
+ Items: results,
+ }
+ return &toReturn, nil
+}
+
+// MODEL ARTIFACTS
+
+// UpsertModelArtifact creates a new model artifact if the provided model artifact's ID is nil,
+// or updates an existing model artifact if the ID is provided.
+// If a model version ID is provided and the model artifact is newly created, establishes an
+// explicit attribution between the model version and the created model artifact.
+func (serv *ModelRegistryService) UpsertModelArtifact(modelArtifact *openapi.ModelArtifact, modelVersionId *string) (*openapi.ModelArtifact, error) {
+ var err error
+ var existing *openapi.ModelArtifact
+
+ if modelArtifact.Id == nil {
+ // create
+ glog.Info("Creating new model artifact")
+ if modelVersionId == nil {
+ return nil, fmt.Errorf("missing model version id, cannot create model artifact without model version")
+ }
+ _, err = serv.GetModelVersionById(*modelVersionId)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ // update
+ glog.Infof("Updating model artifact %s", *modelArtifact.Id)
+ existing, err = serv.GetModelArtifactById(*modelArtifact.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ withNotEditable, err := serv.openapiConv.OverrideNotEditableForModelArtifact(converter.NewOpenapiUpdateWrapper(existing, modelArtifact))
+ if err != nil {
+ return nil, err
+ }
+ modelArtifact = &withNotEditable
+
+ _, err = serv.getModelVersionByArtifactId(*modelArtifact.Id)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ artifact, err := serv.mapper.MapFromModelArtifact(modelArtifact, modelVersionId)
+ if err != nil {
+ return nil, err
+ }
+
+ artifactsResp, err := serv.mlmdClient.PutArtifacts(context.Background(), &proto.PutArtifactsRequest{
+ Artifacts: []*proto.Artifact{artifact},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ // add explicit Attribution between Artifact and ModelVersion
+ if modelVersionId != nil && modelArtifact.Id == nil {
+ modelVersionId, err := converter.StringToInt64(modelVersionId)
+ if err != nil {
+ return nil, err
+ }
+ attributions := []*proto.Attribution{}
+ for _, a := range artifactsResp.ArtifactIds {
+ attributions = append(attributions, &proto.Attribution{
+ ContextId: modelVersionId,
+ ArtifactId: &a,
+ })
+ }
+ _, err = serv.mlmdClient.PutAttributionsAndAssociations(context.Background(), &proto.PutAttributionsAndAssociationsRequest{
+ Attributions: attributions,
+ Associations: make([]*proto.Association, 0),
+ })
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ idAsString := converter.Int64ToString(&artifactsResp.ArtifactIds[0])
+ mapped, err := serv.GetModelArtifactById(*idAsString)
+ if err != nil {
+ return nil, err
+ }
+ return mapped, nil
+}
+
+// GetModelArtifactById retrieves a model artifact by its unique identifier (ID).
+func (serv *ModelRegistryService) GetModelArtifactById(id string) (*openapi.ModelArtifact, error) {
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ artifactsResp, err := serv.mlmdClient.GetArtifactsByID(context.Background(), &proto.GetArtifactsByIDRequest{
+ ArtifactIds: []int64{int64(*idAsInt)},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(artifactsResp.Artifacts) > 1 {
+ return nil, fmt.Errorf("multiple model artifacts found for id %s", id)
+ }
+
+ if len(artifactsResp.Artifacts) == 0 {
+ return nil, fmt.Errorf("no model artifact found for id %s", id)
+ }
+
+ result, err := serv.mapper.MapToModelArtifact(artifactsResp.Artifacts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return result, nil
+}
+
+// GetModelArtifactByInferenceService retrieves the model artifact associated with the specified inference service ID.
+func (serv *ModelRegistryService) GetModelArtifactByInferenceService(inferenceServiceId string) (*openapi.ModelArtifact, error) {
+
+ mv, err := serv.GetModelVersionByInferenceService(inferenceServiceId)
+ if err != nil {
+ return nil, err
+ }
+
+ artifactList, err := serv.GetModelArtifacts(api.ListOptions{}, mv.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ if artifactList.Size == 0 {
+ return nil, fmt.Errorf("no artifacts found for model version %s", *mv.Id)
+ }
+
+ return &artifactList.Items[0], nil
+}
+
+// GetModelArtifactByParams retrieves a model artifact based on specified parameters, such as (artifact name and model version ID), or external ID.
+// If multiple or no model artifacts are found, an error is returned.
+func (serv *ModelRegistryService) GetModelArtifactByParams(artifactName *string, modelVersionId *string, externalId *string) (*openapi.ModelArtifact, error) {
+ var artifact0 *proto.Artifact
+
+ filterQuery := ""
+ if externalId != nil {
+ filterQuery = fmt.Sprintf("external_id = \"%s\"", *externalId)
+ } else if artifactName != nil && modelVersionId != nil {
+ filterQuery = fmt.Sprintf("name = \"%s\"", converter.PrefixWhenOwned(modelVersionId, *artifactName))
+ } else {
+ return nil, fmt.Errorf("invalid parameters call, supply either (artifactName and modelVersionId), or externalId")
+ }
+
+ artifactsResponse, err := serv.mlmdClient.GetArtifactsByType(context.Background(), &proto.GetArtifactsByTypeRequest{
+ TypeName: modelArtifactTypeName,
+ Options: &proto.ListOperationOptions{
+ FilterQuery: &filterQuery,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(artifactsResponse.Artifacts) > 1 {
+ return nil, fmt.Errorf("multiple model artifacts found for artifactName=%v, modelVersionId=%v, externalId=%v", apiutils.ZeroIfNil(artifactName), apiutils.ZeroIfNil(modelVersionId), apiutils.ZeroIfNil(externalId))
+ }
+
+ if len(artifactsResponse.Artifacts) == 0 {
+ return nil, fmt.Errorf("no model artifacts found for artifactName=%v, modelVersionId=%v, externalId=%v", apiutils.ZeroIfNil(artifactName), apiutils.ZeroIfNil(modelVersionId), apiutils.ZeroIfNil(externalId))
+ }
+
+ artifact0 = artifactsResponse.Artifacts[0]
+
+ result, err := serv.mapper.MapToModelArtifact(artifact0)
+ if err != nil {
+ return nil, err
+ }
+
+ return result, nil
+}
+
+// GetModelArtifacts retrieves a list of model artifacts based on the provided list options and optional model version ID.
+func (serv *ModelRegistryService) GetModelArtifacts(listOptions api.ListOptions, modelVersionId *string) (*openapi.ModelArtifactList, error) {
+ listOperationOptions, err := apiutils.BuildListOperationOptions(listOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ var artifacts []*proto.Artifact
+ var nextPageToken *string
+ if modelVersionId != nil {
+ ctxId, err := converter.StringToInt64(modelVersionId)
+ if err != nil {
+ return nil, err
+ }
+ artifactsResp, err := serv.mlmdClient.GetArtifactsByContext(context.Background(), &proto.GetArtifactsByContextRequest{
+ ContextId: ctxId,
+ Options: listOperationOptions,
+ })
+ if err != nil {
+ return nil, err
+ }
+ artifacts = artifactsResp.Artifacts
+ nextPageToken = artifactsResp.NextPageToken
+ } else {
+ artifactsResp, err := serv.mlmdClient.GetArtifactsByType(context.Background(), &proto.GetArtifactsByTypeRequest{
+ TypeName: modelArtifactTypeName,
+ Options: listOperationOptions,
+ })
+ if err != nil {
+ return nil, err
+ }
+ artifacts = artifactsResp.Artifacts
+ nextPageToken = artifactsResp.NextPageToken
+ }
+
+ results := []openapi.ModelArtifact{}
+ for _, a := range artifacts {
+ mapped, err := serv.mapper.MapToModelArtifact(a)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, *mapped)
+ }
+
+ toReturn := openapi.ModelArtifactList{
+ NextPageToken: apiutils.ZeroIfNil(nextPageToken),
+ PageSize: apiutils.ZeroIfNil(listOptions.PageSize),
+ Size: int32(len(results)),
+ Items: results,
+ }
+ return &toReturn, nil
+}
+
+// SERVING ENVIRONMENT
+
+// UpsertServingEnvironment creates a new serving environment if the provided serving environment's ID is nil,
+// or updates an existing serving environment if the ID is provided.
+func (serv *ModelRegistryService) UpsertServingEnvironment(servingEnvironment *openapi.ServingEnvironment) (*openapi.ServingEnvironment, error) {
+ var err error
+ var existing *openapi.ServingEnvironment
+
+ if servingEnvironment.Id == nil {
+ glog.Info("Creating new serving environment")
+ } else {
+ glog.Infof("Updating serving environment %s", *servingEnvironment.Id)
+ existing, err = serv.GetServingEnvironmentById(*servingEnvironment.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ withNotEditable, err := serv.openapiConv.OverrideNotEditableForServingEnvironment(converter.NewOpenapiUpdateWrapper(existing, servingEnvironment))
+ if err != nil {
+ return nil, err
+ }
+ servingEnvironment = &withNotEditable
+ }
+
+ protoCtx, err := serv.mapper.MapFromServingEnvironment(servingEnvironment)
+ if err != nil {
+ return nil, err
+ }
+
+ protoCtxResp, err := serv.mlmdClient.PutContexts(context.Background(), &proto.PutContextsRequest{
+ Contexts: []*proto.Context{
+ protoCtx,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ idAsString := converter.Int64ToString(&protoCtxResp.ContextIds[0])
+ openapiModel, err := serv.GetServingEnvironmentById(*idAsString)
+ if err != nil {
+ return nil, err
+ }
+
+ return openapiModel, nil
+}
+
+// GetServingEnvironmentById retrieves a serving environment by its unique identifier (ID).
+func (serv *ModelRegistryService) GetServingEnvironmentById(id string) (*openapi.ServingEnvironment, error) {
+ glog.Infof("Getting serving environment %s", id)
+
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ getByIdResp, err := serv.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{*idAsInt},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getByIdResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple serving environments found for id %s", id)
+ }
+
+ if len(getByIdResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no serving environment found for id %s", id)
+ }
+
+ openapiModel, err := serv.mapper.MapToServingEnvironment(getByIdResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return openapiModel, nil
+}
+
+// GetServingEnvironmentByParams retrieves a serving environment based on specified parameters, such as name or external ID.
+// If multiple or no serving environments are found, an error is returned accordingly.
+func (serv *ModelRegistryService) GetServingEnvironmentByParams(name *string, externalId *string) (*openapi.ServingEnvironment, error) {
+ glog.Infof("Getting serving environment by params name=%v, externalId=%v", name, externalId)
+
+ filterQuery := ""
+ if name != nil {
+ filterQuery = fmt.Sprintf("name = \"%s\"", *name)
+ } else if externalId != nil {
+ filterQuery = fmt.Sprintf("external_id = \"%s\"", *externalId)
+ } else {
+ return nil, fmt.Errorf("invalid parameters call, supply either name or externalId")
+ }
+
+ getByParamsResp, err := serv.mlmdClient.GetContextsByType(context.Background(), &proto.GetContextsByTypeRequest{
+ TypeName: servingEnvironmentTypeName,
+ Options: &proto.ListOperationOptions{
+ FilterQuery: &filterQuery,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getByParamsResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple serving environments found for name=%v, externalId=%v", apiutils.ZeroIfNil(name), apiutils.ZeroIfNil(externalId))
+ }
+
+ if len(getByParamsResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no serving environments found for name=%v, externalId=%v", apiutils.ZeroIfNil(name), apiutils.ZeroIfNil(externalId))
+ }
+
+ openapiModel, err := serv.mapper.MapToServingEnvironment(getByParamsResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+ return openapiModel, nil
+}
+
+// GetServingEnvironments retrieves a list of serving environments based on the provided list options.
+func (serv *ModelRegistryService) GetServingEnvironments(listOptions api.ListOptions) (*openapi.ServingEnvironmentList, error) {
+ listOperationOptions, err := apiutils.BuildListOperationOptions(listOptions)
+ if err != nil {
+ return nil, err
+ }
+ contextsResp, err := serv.mlmdClient.GetContextsByType(context.Background(), &proto.GetContextsByTypeRequest{
+ TypeName: servingEnvironmentTypeName,
+ Options: listOperationOptions,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ results := []openapi.ServingEnvironment{}
+ for _, c := range contextsResp.Contexts {
+ mapped, err := serv.mapper.MapToServingEnvironment(c)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, *mapped)
+ }
+
+ toReturn := openapi.ServingEnvironmentList{
+ NextPageToken: apiutils.ZeroIfNil(contextsResp.NextPageToken),
+ PageSize: apiutils.ZeroIfNil(listOptions.PageSize),
+ Size: int32(len(results)),
+ Items: results,
+ }
+ return &toReturn, nil
+}
+
+// INFERENCE SERVICE
+
+// UpsertInferenceService creates a new inference service if the provided inference service's ID is nil,
+// or updates an existing inference service if the ID is provided.
+func (serv *ModelRegistryService) UpsertInferenceService(inferenceService *openapi.InferenceService) (*openapi.InferenceService, error) {
+ var err error
+ var existing *openapi.InferenceService
+ var servingEnvironment *openapi.ServingEnvironment
+
+ if inferenceService.Id == nil {
+ // create
+ glog.Info("Creating new InferenceService")
+ servingEnvironment, err = serv.GetServingEnvironmentById(inferenceService.ServingEnvironmentId)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ // update
+ glog.Infof("Updating InferenceService %s", *inferenceService.Id)
+
+ existing, err = serv.GetInferenceServiceById(*inferenceService.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ withNotEditable, err := serv.openapiConv.OverrideNotEditableForInferenceService(converter.NewOpenapiUpdateWrapper(existing, inferenceService))
+ if err != nil {
+ return nil, err
+ }
+ inferenceService = &withNotEditable
+
+ servingEnvironment, err = serv.getServingEnvironmentByInferenceServiceId(*inferenceService.Id)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // validate RegisteredModelId is also valid
+ if _, err := serv.GetRegisteredModelById(inferenceService.RegisteredModelId); err != nil {
+ return nil, err
+ }
+
+ // if already existing assure the name is the same
+ if existing != nil && inferenceService.Name == nil {
+ // user did not provide it
+ // need to set it to avoid mlmd error "context name should not be empty"
+ inferenceService.Name = existing.Name
+ }
+
+ protoCtx, err := serv.mapper.MapFromInferenceService(inferenceService, *servingEnvironment.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ protoCtxResp, err := serv.mlmdClient.PutContexts(context.Background(), &proto.PutContextsRequest{
+ Contexts: []*proto.Context{
+ protoCtx,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ inferenceServiceId := &protoCtxResp.ContextIds[0]
+ if inferenceService.Id == nil {
+ servingEnvironmentId, err := converter.StringToInt64(servingEnvironment.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ _, err = serv.mlmdClient.PutParentContexts(context.Background(), &proto.PutParentContextsRequest{
+ ParentContexts: []*proto.ParentContext{{
+ ChildId: inferenceServiceId,
+ ParentId: servingEnvironmentId}},
+ TransactionOptions: &proto.TransactionOptions{},
+ })
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ idAsString := converter.Int64ToString(inferenceServiceId)
+ toReturn, err := serv.GetInferenceServiceById(*idAsString)
+ if err != nil {
+ return nil, err
+ }
+
+ return toReturn, nil
+}
+
+// getServingEnvironmentByInferenceServiceId retrieves the serving environment associated with the specified inference service ID.
+func (serv *ModelRegistryService) getServingEnvironmentByInferenceServiceId(id string) (*openapi.ServingEnvironment, error) {
+ glog.Infof("Getting ServingEnvironment for InferenceService %s", id)
+
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ getParentResp, err := serv.mlmdClient.GetParentContextsByContext(context.Background(), &proto.GetParentContextsByContextRequest{
+ ContextId: idAsInt,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getParentResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple ServingEnvironments found for InferenceService %s", id)
+ }
+
+ if len(getParentResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no ServingEnvironments found for InferenceService %s", id)
+ }
+
+ toReturn, err := serv.mapper.MapToServingEnvironment(getParentResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return toReturn, nil
+}
+
+// GetInferenceServiceById retrieves an inference service by its unique identifier (ID).
+func (serv *ModelRegistryService) GetInferenceServiceById(id string) (*openapi.InferenceService, error) {
+ glog.Infof("Getting InferenceService by id %s", id)
+
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ getByIdResp, err := serv.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{*idAsInt},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getByIdResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple InferenceServices found for id %s", id)
+ }
+
+ if len(getByIdResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no InferenceService found for id %s", id)
+ }
+
+ toReturn, err := serv.mapper.MapToInferenceService(getByIdResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return toReturn, nil
+}
+
+// GetInferenceServiceByParams retrieves an inference service based on specified parameters, such as (name and serving environment ID), or external ID.
+// If multiple or no serving environments are found, an error is returned accordingly.
+func (serv *ModelRegistryService) GetInferenceServiceByParams(name *string, servingEnvironmentId *string, externalId *string) (*openapi.InferenceService, error) {
+ filterQuery := ""
+ if name != nil && servingEnvironmentId != nil {
+ filterQuery = fmt.Sprintf("name = \"%s\"", converter.PrefixWhenOwned(servingEnvironmentId, *name))
+ } else if externalId != nil {
+ filterQuery = fmt.Sprintf("external_id = \"%s\"", *externalId)
+ } else {
+ return nil, fmt.Errorf("invalid parameters call, supply either (name and servingEnvironmentId), or externalId")
+ }
+
+ getByParamsResp, err := serv.mlmdClient.GetContextsByType(context.Background(), &proto.GetContextsByTypeRequest{
+ TypeName: inferenceServiceTypeName,
+ Options: &proto.ListOperationOptions{
+ FilterQuery: &filterQuery,
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getByParamsResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple inference services found for name=%v, servingEnvironmentId=%v, externalId=%v", apiutils.ZeroIfNil(name), apiutils.ZeroIfNil(servingEnvironmentId), apiutils.ZeroIfNil(externalId))
+ }
+
+ if len(getByParamsResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no inference services found for name=%v, servingEnvironmentId=%v, externalId=%v", apiutils.ZeroIfNil(name), apiutils.ZeroIfNil(servingEnvironmentId), apiutils.ZeroIfNil(externalId))
+ }
+
+ toReturn, err := serv.mapper.MapToInferenceService(getByParamsResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+ return toReturn, nil
+}
+
+// GetInferenceServices retrieves a list of inference services based on the provided list options and optional serving environment ID and runtime.
+func (serv *ModelRegistryService) GetInferenceServices(listOptions api.ListOptions, servingEnvironmentId *string, runtime *string) (*openapi.InferenceServiceList, error) {
+ listOperationOptions, err := apiutils.BuildListOperationOptions(listOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ queries := []string{}
+ if servingEnvironmentId != nil {
+ queryParentCtxId := fmt.Sprintf("parent_contexts_a.id = %s", *servingEnvironmentId)
+ queries = append(queries, queryParentCtxId)
+ }
+
+ if runtime != nil {
+ queryRuntimeProp := fmt.Sprintf("properties.runtime.string_value = \"%s\"", *runtime)
+ queries = append(queries, queryRuntimeProp)
+ }
+
+ query := strings.Join(queries, " and ")
+ listOperationOptions.FilterQuery = &query
+
+ contextsResp, err := serv.mlmdClient.GetContextsByType(context.Background(), &proto.GetContextsByTypeRequest{
+ TypeName: inferenceServiceTypeName,
+ Options: listOperationOptions,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ results := []openapi.InferenceService{}
+ for _, c := range contextsResp.Contexts {
+ mapped, err := serv.mapper.MapToInferenceService(c)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, *mapped)
+ }
+
+ toReturn := openapi.InferenceServiceList{
+ NextPageToken: apiutils.ZeroIfNil(contextsResp.NextPageToken),
+ PageSize: apiutils.ZeroIfNil(listOptions.PageSize),
+ Size: int32(len(results)),
+ Items: results,
+ }
+ return &toReturn, nil
+}
+
+// SERVE MODEL
+
+// UpsertServeModel creates a new serve model if the provided serve model's ID is nil,
+// or updates an existing serve model if the ID is provided.
+func (serv *ModelRegistryService) UpsertServeModel(serveModel *openapi.ServeModel, inferenceServiceId *string) (*openapi.ServeModel, error) {
+ var err error
+ var existing *openapi.ServeModel
+
+ if serveModel.Id == nil {
+ // create
+ glog.Info("Creating new ServeModel")
+ if inferenceServiceId == nil {
+ return nil, fmt.Errorf("missing inferenceServiceId, cannot create ServeModel without parent resource InferenceService")
+ }
+ _, err = serv.GetInferenceServiceById(*inferenceServiceId)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ // update
+ glog.Infof("Updating ServeModel %s", *serveModel.Id)
+
+ existing, err = serv.GetServeModelById(*serveModel.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ withNotEditable, err := serv.openapiConv.OverrideNotEditableForServeModel(converter.NewOpenapiUpdateWrapper(existing, serveModel))
+ if err != nil {
+ return nil, err
+ }
+ serveModel = &withNotEditable
+
+ _, err = serv.getInferenceServiceByServeModel(*serveModel.Id)
+ if err != nil {
+ return nil, err
+ }
+ }
+ _, err = serv.GetModelVersionById(serveModel.ModelVersionId)
+ if err != nil {
+ return nil, err
+ }
+
+ // if already existing assure the name is the same
+ if existing != nil && serveModel.Name == nil {
+ // user did not provide it
+ // need to set it to avoid mlmd error "artifact name should not be empty"
+ serveModel.Name = existing.Name
+ }
+
+ execution, err := serv.mapper.MapFromServeModel(serveModel, *inferenceServiceId)
+ if err != nil {
+ return nil, err
+ }
+
+ executionsResp, err := serv.mlmdClient.PutExecutions(context.Background(), &proto.PutExecutionsRequest{
+ Executions: []*proto.Execution{execution},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ // add explicit Association between ServeModel and InferenceService
+ if inferenceServiceId != nil && serveModel.Id == nil {
+ inferenceServiceId, err := converter.StringToInt64(inferenceServiceId)
+ if err != nil {
+ return nil, err
+ }
+ associations := []*proto.Association{}
+ for _, a := range executionsResp.ExecutionIds {
+ associations = append(associations, &proto.Association{
+ ContextId: inferenceServiceId,
+ ExecutionId: &a,
+ })
+ }
+ _, err = serv.mlmdClient.PutAttributionsAndAssociations(context.Background(), &proto.PutAttributionsAndAssociationsRequest{
+ Attributions: make([]*proto.Attribution, 0),
+ Associations: associations,
+ })
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ idAsString := converter.Int64ToString(&executionsResp.ExecutionIds[0])
+ mapped, err := serv.GetServeModelById(*idAsString)
+ if err != nil {
+ return nil, err
+ }
+ return mapped, nil
+}
+
+// getInferenceServiceByServeModel retrieves the inference service associated with the specified serve model ID.
+func (serv *ModelRegistryService) getInferenceServiceByServeModel(id string) (*openapi.InferenceService, error) {
+ glog.Infof("Getting InferenceService for ServeModel %s", id)
+
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ getParentResp, err := serv.mlmdClient.GetContextsByExecution(context.Background(), &proto.GetContextsByExecutionRequest{
+ ExecutionId: idAsInt,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(getParentResp.Contexts) > 1 {
+ return nil, fmt.Errorf("multiple InferenceService found for ServeModel %s", id)
+ }
+
+ if len(getParentResp.Contexts) == 0 {
+ return nil, fmt.Errorf("no InferenceService found for ServeModel %s", id)
+ }
+
+ toReturn, err := serv.mapper.MapToInferenceService(getParentResp.Contexts[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return toReturn, nil
+}
+
+// GetServeModelById retrieves a serve model by its unique identifier (ID).
+func (serv *ModelRegistryService) GetServeModelById(id string) (*openapi.ServeModel, error) {
+ idAsInt, err := converter.StringToInt64(&id)
+ if err != nil {
+ return nil, err
+ }
+
+ executionsResp, err := serv.mlmdClient.GetExecutionsByID(context.Background(), &proto.GetExecutionsByIDRequest{
+ ExecutionIds: []int64{int64(*idAsInt)},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if len(executionsResp.Executions) > 1 {
+ return nil, fmt.Errorf("multiple ServeModels found for id %s", id)
+ }
+
+ if len(executionsResp.Executions) == 0 {
+ return nil, fmt.Errorf("no ServeModel found for id %s", id)
+ }
+
+ result, err := serv.mapper.MapToServeModel(executionsResp.Executions[0])
+ if err != nil {
+ return nil, err
+ }
+
+ return result, nil
+}
+
+// GetServeModels retrieves a list of serve models based on the provided list options and optional inference service ID.
+func (serv *ModelRegistryService) GetServeModels(listOptions api.ListOptions, inferenceServiceId *string) (*openapi.ServeModelList, error) {
+ listOperationOptions, err := apiutils.BuildListOperationOptions(listOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ var executions []*proto.Execution
+ var nextPageToken *string
+ if inferenceServiceId != nil {
+ ctxId, err := converter.StringToInt64(inferenceServiceId)
+ if err != nil {
+ return nil, err
+ }
+ executionsResp, err := serv.mlmdClient.GetExecutionsByContext(context.Background(), &proto.GetExecutionsByContextRequest{
+ ContextId: ctxId,
+ Options: listOperationOptions,
+ })
+ if err != nil {
+ return nil, err
+ }
+ executions = executionsResp.Executions
+ nextPageToken = executionsResp.NextPageToken
+ } else {
+ executionsResp, err := serv.mlmdClient.GetExecutionsByType(context.Background(), &proto.GetExecutionsByTypeRequest{
+ TypeName: serveModelTypeName,
+ Options: listOperationOptions,
+ })
+ if err != nil {
+ return nil, err
+ }
+ executions = executionsResp.Executions
+ nextPageToken = executionsResp.NextPageToken
+ }
+
+ results := []openapi.ServeModel{}
+ for _, a := range executions {
+ mapped, err := serv.mapper.MapToServeModel(a)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, *mapped)
+ }
+
+ toReturn := openapi.ServeModelList{
+ NextPageToken: apiutils.ZeroIfNil(nextPageToken),
+ PageSize: apiutils.ZeroIfNil(listOptions.PageSize),
+ Size: int32(len(results)),
+ Items: results,
+ }
+ return &toReturn, nil
+}
diff --git a/pkg/core/core_test.go b/pkg/core/core_test.go
new file mode 100644
index 000000000..e4473253d
--- /dev/null
+++ b/pkg/core/core_test.go
@@ -0,0 +1,3150 @@
+package core
+
+import (
+ "context"
+ "fmt"
+ "testing"
+
+ "github.com/opendatahub-io/model-registry/internal/apiutils"
+ "github.com/opendatahub-io/model-registry/internal/converter"
+ "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
+ "github.com/opendatahub-io/model-registry/internal/mlmdtypes"
+ "github.com/opendatahub-io/model-registry/internal/testutils"
+ "github.com/opendatahub-io/model-registry/pkg/api"
+ "github.com/opendatahub-io/model-registry/pkg/openapi"
+ "github.com/stretchr/testify/suite"
+ "google.golang.org/grpc"
+)
+
+// common utility test variables
+var (
+ // generic
+ ascOrderDirection string
+ descOrderDirection string
+ customString string
+ // registered models
+ modelName string
+ modelDescription string
+ modelExternalId string
+ owner string
+ // model version
+ modelVersionName string
+ modelVersionDescription string
+ versionExternalId string
+ author string
+ // model artifact
+ artifactName string
+ artifactDescription string
+ artifactExtId string
+ artifactState string
+ artifactUri string
+ // entity under test
+ entityName string
+ entityExternalId string
+ entityExternalId2 string
+ entityDescription string
+ // ServeModel
+ executionState string
+)
+
+type CoreTestSuite struct {
+ suite.Suite
+ grpcConn *grpc.ClientConn
+ mlmdClient proto.MetadataStoreServiceClient
+}
+
+var (
+ canAddFields = apiutils.Of(true)
+)
+
+func TestRunCoreTestSuite(t *testing.T) {
+ // before all
+ grpcConn, mlmdClient, teardown := testutils.SetupMLMetadataTestContainer(t)
+ defer teardown(t)
+
+ coreTestSuite := CoreTestSuite{
+ grpcConn: grpcConn,
+ mlmdClient: mlmdClient,
+ }
+ suite.Run(t, &coreTestSuite)
+}
+
+// before each test case
+func (suite *CoreTestSuite) SetupTest() {
+ // initialize test variable before each test
+ ascOrderDirection = "ASC"
+ descOrderDirection = "DESC"
+ customString = "this is a customString value"
+ modelName = "MyAwesomeModel"
+ modelDescription = "reg model description"
+ modelExternalId = "org.myawesomemodel"
+ owner = "owner"
+ modelVersionName = "v1"
+ modelVersionDescription = "model version description"
+ versionExternalId = "org.myawesomemodel@v1"
+ author = "author1"
+ artifactName = "Pickle model"
+ artifactDescription = "artifact description"
+ artifactExtId = "org.myawesomemodel@v1:pickle"
+ artifactState = "LIVE"
+ artifactUri = "path/to/model/v1"
+ entityName = "MyAwesomeEntity"
+ entityExternalId = "entityExternalID"
+ entityExternalId2 = "entityExternalID2"
+ entityDescription = "lorem ipsum entity description"
+ executionState = "RUNNING"
+}
+
+// after each test
+// - remove the metadata sqlite file used by mlmd, this way mlmd will recreate it
+func (suite *CoreTestSuite) AfterTest(suiteName, testName string) {
+ if err := testutils.ClearMetadataSqliteDB(); err != nil {
+ suite.Error(err)
+ }
+}
+
+func (suite *CoreTestSuite) setupModelRegistryService() *ModelRegistryService {
+ _, err := mlmdtypes.CreateMLMDTypes(suite.grpcConn)
+ suite.Nilf(err, "error creating MLMD types: %v", err)
+ // setup model registry service
+ service, err := NewModelRegistryService(suite.grpcConn)
+ suite.Nilf(err, "error creating core service: %v", err)
+ mrService, ok := service.(*ModelRegistryService)
+ suite.True(ok)
+ return mrService
+}
+
+// utility function that register a new simple model and return its ID
+func (suite *CoreTestSuite) registerModel(service api.ModelRegistryApi, overrideModelName *string, overrideExternalId *string) string {
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ Description: &modelDescription,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ if overrideModelName != nil {
+ registeredModel.Name = overrideModelName
+ }
+
+ if overrideExternalId != nil {
+ registeredModel.ExternalID = overrideExternalId
+ }
+
+ // test
+ createdModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ return *createdModel.Id
+}
+
+// utility function that register a new simple ServingEnvironment and return its ID
+func (suite *CoreTestSuite) registerServingEnvironment(service api.ModelRegistryApi, overrideName *string, overrideExternalId *string) string {
+ eutName := "Simple ServingEnvironment"
+ eutExtID := "Simple ServingEnvironment ExtID"
+ eut := &openapi.ServingEnvironment{
+ Name: &eutName,
+ ExternalID: &eutExtID,
+ Description: &entityDescription,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ if overrideName != nil {
+ eut.Name = overrideName
+ }
+
+ if overrideExternalId != nil {
+ eut.ExternalID = overrideExternalId
+ }
+
+ // test
+ createdEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ return *createdEntity.Id
+}
+
+// utility function that register a new simple model and return its ID
+func (suite *CoreTestSuite) registerModelVersion(
+ service api.ModelRegistryApi,
+ overrideModelName *string,
+ overrideExternalId *string,
+ overrideVersionName *string,
+ overrideVersionExtId *string,
+) string {
+ registeredModelId := suite.registerModel(service, overrideModelName, overrideExternalId)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Description: &modelVersionDescription,
+ Author: &author,
+ }
+
+ if overrideVersionName != nil {
+ modelVersion.Name = overrideVersionName
+ }
+
+ if overrideVersionExtId != nil {
+ modelVersion.ExternalID = overrideVersionExtId
+ }
+
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating model version: %v", err)
+
+ return *createdVersion.Id
+}
+
+// utility function that register a new simple ServingEnvironment and return its ID
+func (suite *CoreTestSuite) registerInferenceService(service api.ModelRegistryApi, registerdModelId string, overrideParentResourceName *string, overrideParentResourceExternalId *string, overrideName *string, overrideExternalId *string) string {
+ servingEnvironmentId := suite.registerServingEnvironment(service, overrideParentResourceName, overrideParentResourceExternalId)
+
+ eutName := "simpleInferenceService"
+ eutExtID := "simpleInferenceService ExtID"
+ eut := &openapi.InferenceService{
+ Name: &eutName,
+ ExternalID: &eutExtID,
+ RegisteredModelId: registerdModelId,
+ ServingEnvironmentId: servingEnvironmentId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ if overrideName != nil {
+ eut.Name = overrideName
+ }
+ if overrideExternalId != nil {
+ eut.ExternalID = overrideExternalId
+ }
+
+ // test
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating InferenceService: %v", err)
+
+ return *createdEntity.Id
+}
+
+func (suite *CoreTestSuite) TestModelRegistryStartupWithExistingEmptyTypes() {
+ ctx := context.Background()
+
+ // create all types without props
+ registeredModelReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: registeredModelTypeName,
+ },
+ }
+ modelVersionReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: modelVersionTypeName,
+ },
+ }
+ modelArtifactReq := proto.PutArtifactTypeRequest{
+ CanAddFields: canAddFields,
+ ArtifactType: &proto.ArtifactType{
+ Name: modelArtifactTypeName,
+ },
+ }
+ servingEnvironmentReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: servingEnvironmentTypeName,
+ },
+ }
+ inferenceServiceReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: inferenceServiceTypeName,
+ },
+ }
+ serveModelReq := proto.PutExecutionTypeRequest{
+ CanAddFields: canAddFields,
+ ExecutionType: &proto.ExecutionType{
+ Name: serveModelTypeName,
+ },
+ }
+
+ _, err := suite.mlmdClient.PutContextType(context.Background(), ®isteredModelReq)
+ suite.Nil(err)
+ _, err = suite.mlmdClient.PutContextType(context.Background(), &modelVersionReq)
+ suite.Nil(err)
+ _, err = suite.mlmdClient.PutArtifactType(context.Background(), &modelArtifactReq)
+ suite.Nil(err)
+ _, err = suite.mlmdClient.PutContextType(context.Background(), &servingEnvironmentReq)
+ suite.Nil(err)
+ _, err = suite.mlmdClient.PutContextType(context.Background(), &inferenceServiceReq)
+ suite.Nil(err)
+ _, err = suite.mlmdClient.PutExecutionType(context.Background(), &serveModelReq)
+ suite.Nil(err)
+
+ // check empty props
+ regModelResp, _ := suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: registeredModelTypeName,
+ })
+ modelVersionResp, _ := suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: modelVersionTypeName,
+ })
+ modelArtifactResp, _ := suite.mlmdClient.GetArtifactType(ctx, &proto.GetArtifactTypeRequest{
+ TypeName: modelArtifactTypeName,
+ })
+ servingEnvResp, _ := suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: servingEnvironmentTypeName,
+ })
+ inferenceServiceResp, _ := suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: inferenceServiceTypeName,
+ })
+ serveModelResp, _ := suite.mlmdClient.GetExecutionType(ctx, &proto.GetExecutionTypeRequest{
+ TypeName: serveModelTypeName,
+ })
+
+ suite.Equal(0, len(regModelResp.ContextType.Properties))
+ suite.Equal(0, len(modelVersionResp.ContextType.Properties))
+ suite.Equal(0, len(modelArtifactResp.ArtifactType.Properties))
+ suite.Equal(0, len(servingEnvResp.ContextType.Properties))
+ suite.Equal(0, len(inferenceServiceResp.ContextType.Properties))
+ suite.Equal(0, len(serveModelResp.ExecutionType.Properties))
+
+ // create model registry service
+ _ = suite.setupModelRegistryService()
+
+ // assure the types have been correctly setup at startup
+ // check NOT empty props
+ regModelResp, _ = suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: registeredModelTypeName,
+ })
+ suite.NotNilf(regModelResp.ContextType, "registered model type %s should exists", *registeredModelTypeName)
+ suite.Equal(*registeredModelTypeName, *regModelResp.ContextType.Name)
+ suite.Equal(2, len(regModelResp.ContextType.Properties))
+
+ modelVersionResp, _ = suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: modelVersionTypeName,
+ })
+ suite.NotNilf(modelVersionResp.ContextType, "model version type %s should exists", *modelVersionTypeName)
+ suite.Equal(*modelVersionTypeName, *modelVersionResp.ContextType.Name)
+ suite.Equal(5, len(modelVersionResp.ContextType.Properties))
+
+ modelArtifactResp, _ = suite.mlmdClient.GetArtifactType(ctx, &proto.GetArtifactTypeRequest{
+ TypeName: modelArtifactTypeName,
+ })
+ suite.NotNilf(modelArtifactResp.ArtifactType, "model artifact type %s should exists", *modelArtifactTypeName)
+ suite.Equal(*modelArtifactTypeName, *modelArtifactResp.ArtifactType.Name)
+ suite.Equal(6, len(modelArtifactResp.ArtifactType.Properties))
+
+ servingEnvResp, _ = suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: servingEnvironmentTypeName,
+ })
+ suite.NotNilf(servingEnvResp.ContextType, "serving environment type %s should exists", *servingEnvironmentTypeName)
+ suite.Equal(*servingEnvironmentTypeName, *servingEnvResp.ContextType.Name)
+ suite.Equal(1, len(servingEnvResp.ContextType.Properties))
+
+ inferenceServiceResp, _ = suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: inferenceServiceTypeName,
+ })
+ suite.NotNilf(inferenceServiceResp.ContextType, "inference service type %s should exists", *inferenceServiceTypeName)
+ suite.Equal(*inferenceServiceTypeName, *inferenceServiceResp.ContextType.Name)
+ suite.Equal(6, len(inferenceServiceResp.ContextType.Properties))
+
+ serveModelResp, _ = suite.mlmdClient.GetExecutionType(ctx, &proto.GetExecutionTypeRequest{
+ TypeName: serveModelTypeName,
+ })
+ suite.NotNilf(serveModelResp.ExecutionType, "serve model type %s should exists", *serveModelTypeName)
+ suite.Equal(*serveModelTypeName, *serveModelResp.ExecutionType.Name)
+ suite.Equal(2, len(serveModelResp.ExecutionType.Properties))
+}
+
+func (suite *CoreTestSuite) TestModelRegistryTypes() {
+ // create model registry service
+ _ = suite.setupModelRegistryService()
+
+ // assure the types have been correctly setup at startup
+ ctx := context.Background()
+ regModelResp, _ := suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: registeredModelTypeName,
+ })
+ suite.NotNilf(regModelResp.ContextType, "registered model type %s should exists", *registeredModelTypeName)
+ suite.Equal(*registeredModelTypeName, *regModelResp.ContextType.Name)
+
+ modelVersionResp, _ := suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: modelVersionTypeName,
+ })
+ suite.NotNilf(modelVersionResp.ContextType, "model version type %s should exists", *modelVersionTypeName)
+ suite.Equal(*modelVersionTypeName, *modelVersionResp.ContextType.Name)
+
+ modelArtifactResp, _ := suite.mlmdClient.GetArtifactType(ctx, &proto.GetArtifactTypeRequest{
+ TypeName: modelArtifactTypeName,
+ })
+ suite.NotNilf(modelArtifactResp.ArtifactType, "model version type %s should exists", *modelArtifactTypeName)
+ suite.Equal(*modelArtifactTypeName, *modelArtifactResp.ArtifactType.Name)
+
+ servingEnvResp, _ := suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: servingEnvironmentTypeName,
+ })
+ suite.NotNilf(servingEnvResp.ContextType, "serving environment type %s should exists", *servingEnvironmentTypeName)
+ suite.Equal(*servingEnvironmentTypeName, *servingEnvResp.ContextType.Name)
+
+ inferenceServiceResp, _ := suite.mlmdClient.GetContextType(ctx, &proto.GetContextTypeRequest{
+ TypeName: inferenceServiceTypeName,
+ })
+ suite.NotNilf(inferenceServiceResp.ContextType, "inference service type %s should exists", *inferenceServiceTypeName)
+ suite.Equal(*inferenceServiceTypeName, *inferenceServiceResp.ContextType.Name)
+
+ serveModelResp, _ := suite.mlmdClient.GetExecutionType(ctx, &proto.GetExecutionTypeRequest{
+ TypeName: serveModelTypeName,
+ })
+ suite.NotNilf(serveModelResp.ExecutionType, "serve model type %s should exists", *serveModelTypeName)
+ suite.Equal(*serveModelTypeName, *serveModelResp.ExecutionType.Name)
+}
+
+func (suite *CoreTestSuite) TestModelRegistryFailureForOmittedFieldInRegisteredModel() {
+ registeredModelReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: registeredModelTypeName,
+ Properties: map[string]proto.PropertyType{
+ "deprecated": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ _, err := suite.mlmdClient.PutContextType(context.Background(), ®isteredModelReq)
+ suite.Nil(err)
+
+ // steps to create model registry service
+ _, err = mlmdtypes.CreateMLMDTypes(suite.grpcConn)
+ suite.NotNil(err)
+ suite.Regexp("error setting up context type odh.RegisteredModel: rpc error: code = AlreadyExists.*", err.Error())
+}
+
+func (suite *CoreTestSuite) TestModelRegistryFailureForOmittedFieldInModelVersion() {
+ modelVersionReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: modelVersionTypeName,
+ Properties: map[string]proto.PropertyType{
+ "deprecated": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ _, err := suite.mlmdClient.PutContextType(context.Background(), &modelVersionReq)
+ suite.Nil(err)
+
+ // steps to create model registry service
+ _, err = mlmdtypes.CreateMLMDTypes(suite.grpcConn)
+ suite.NotNil(err)
+ suite.Regexp("error setting up context type odh.ModelVersion: rpc error: code = AlreadyExists.*", err.Error())
+}
+
+func (suite *CoreTestSuite) TestModelRegistryFailureForOmittedFieldInModelArtifact() {
+ modelArtifactReq := proto.PutArtifactTypeRequest{
+ CanAddFields: canAddFields,
+ ArtifactType: &proto.ArtifactType{
+ Name: modelArtifactTypeName,
+ Properties: map[string]proto.PropertyType{
+ "deprecated": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ _, err := suite.mlmdClient.PutArtifactType(context.Background(), &modelArtifactReq)
+ suite.Nil(err)
+
+ // steps to create model registry service
+ _, err = mlmdtypes.CreateMLMDTypes(suite.grpcConn)
+ suite.NotNil(err)
+ suite.Regexp("error setting up artifact type odh.ModelArtifact: rpc error: code = AlreadyExists.*", err.Error())
+}
+
+func (suite *CoreTestSuite) TestModelRegistryFailureForOmittedFieldInServingEnvironment() {
+ servingEnvironmentReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: servingEnvironmentTypeName,
+ Properties: map[string]proto.PropertyType{
+ "deprecated": proto.PropertyType_STRING,
+ },
+ },
+ }
+ _, err := suite.mlmdClient.PutContextType(context.Background(), &servingEnvironmentReq)
+ suite.Nil(err)
+
+ // steps to create model registry service
+ _, err = mlmdtypes.CreateMLMDTypes(suite.grpcConn)
+ suite.NotNil(err)
+ suite.Regexp("error setting up context type odh.ServingEnvironment: rpc error: code = AlreadyExists.*", err.Error())
+}
+
+func (suite *CoreTestSuite) TestModelRegistryFailureForOmittedFieldInInferenceService() {
+ inferenceServiceReq := proto.PutContextTypeRequest{
+ CanAddFields: canAddFields,
+ ContextType: &proto.ContextType{
+ Name: inferenceServiceTypeName,
+ Properties: map[string]proto.PropertyType{
+ "deprecated": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ _, err := suite.mlmdClient.PutContextType(context.Background(), &inferenceServiceReq)
+ suite.Nil(err)
+
+ // steps to create model registry service
+ _, err = mlmdtypes.CreateMLMDTypes(suite.grpcConn)
+ suite.NotNil(err)
+ suite.Regexp("error setting up context type odh.InferenceService: rpc error: code = AlreadyExists.*", err.Error())
+}
+
+func (suite *CoreTestSuite) TestModelRegistryFailureForOmittedFieldInServeModel() {
+ serveModelReq := proto.PutExecutionTypeRequest{
+ CanAddFields: canAddFields,
+ ExecutionType: &proto.ExecutionType{
+ Name: serveModelTypeName,
+ Properties: map[string]proto.PropertyType{
+ "deprecated": proto.PropertyType_STRING,
+ },
+ },
+ }
+
+ _, err := suite.mlmdClient.PutExecutionType(context.Background(), &serveModelReq)
+ suite.Nil(err)
+
+ // steps to create model registry service
+ _, err = mlmdtypes.CreateMLMDTypes(suite.grpcConn)
+ suite.NotNil(err)
+ suite.Regexp("error setting up execution type odh.ServeModel: rpc error: code = AlreadyExists.*", err.Error())
+}
+
+// REGISTERED MODELS
+
+func (suite *CoreTestSuite) TestCreateRegisteredModel() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ state := openapi.REGISTEREDMODELSTATE_ARCHIVED
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ Description: &modelDescription,
+ State: &state,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ // test
+ createdModel, err := service.UpsertRegisteredModel(registeredModel)
+
+ // checks
+ suite.Nilf(err, "error creating registered model: %v", err)
+ suite.NotNilf(createdModel.Id, "created registered model should not have nil Id")
+
+ createdModelId, _ := converter.StringToInt64(createdModel.Id)
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{*createdModelId},
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ ctxId := converter.Int64ToString(ctx.Id)
+ suite.Equal(*createdModel.Id, *ctxId, "returned model id should match the mlmd one")
+ suite.Equal(modelName, *ctx.Name, "saved model name should match the provided one")
+ suite.Equal(modelExternalId, *ctx.ExternalId, "saved external id should match the provided one")
+ suite.Equal(modelDescription, ctx.Properties["description"].GetStringValue(), "saved description should match the provided one")
+ suite.Equal(string(state), ctx.Properties["state"].GetStringValue(), "saved state should match the provided one")
+ suite.Equal(owner, ctx.CustomProperties["owner"].GetStringValue(), "saved owner custom property should match the provided one")
+
+ getAllResp, err := suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(1, len(getAllResp.Contexts), "there should be just one context saved in mlmd")
+}
+
+func (suite *CoreTestSuite) TestUpdateRegisteredModel() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ // test
+ createdModel, err := service.UpsertRegisteredModel(registeredModel)
+
+ // checks
+ suite.Nilf(err, "error creating registered model: %v", err)
+ suite.NotNilf(createdModel.Id, "created registered model should not have nil Id")
+ createdModelId, _ := converter.StringToInt64(createdModel.Id)
+
+ // checks created model matches original one except for Id
+ suite.Equal(*registeredModel.Name, *createdModel.Name, "returned model name should match the original one")
+ suite.Equal(*registeredModel.ExternalID, *createdModel.ExternalID, "returned model external id should match the original one")
+ suite.Equal(*registeredModel.CustomProperties, *createdModel.CustomProperties, "returned model custom props should match the original one")
+
+ // update existing model
+ newModelExternalId := "newExternalId"
+ newOwner := "newOwner"
+
+ createdModel.ExternalID = &newModelExternalId
+ (*createdModel.CustomProperties)["owner"] = openapi.MetadataValue{
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &newOwner,
+ },
+ }
+
+ // update the model
+ createdModel, err = service.UpsertRegisteredModel(createdModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ // still one registered model
+ getAllResp, err := suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(1, len(getAllResp.Contexts), "there should be just one context saved in mlmd")
+
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{*createdModelId},
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ ctxId := converter.Int64ToString(ctx.Id)
+ suite.Equal(*createdModel.Id, *ctxId, "returned model id should match the mlmd one")
+ suite.Equal(modelName, *ctx.Name, "saved model name should match the provided one")
+ suite.Equal(newModelExternalId, *ctx.ExternalId, "saved external id should match the provided one")
+ suite.Equal(newOwner, ctx.CustomProperties["owner"].GetStringValue(), "saved owner custom property should match the provided one")
+
+ // update the model keeping nil name
+ newModelExternalId = "newNewExternalId"
+ createdModel.ExternalID = &newModelExternalId
+ createdModel.Name = nil
+ createdModel, err = service.UpsertRegisteredModel(createdModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ // still one registered model
+ getAllResp, err = suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(1, len(getAllResp.Contexts), "there should be just one context saved in mlmd")
+
+ ctxById, err = suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{*createdModelId},
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx = ctxById.Contexts[0]
+ ctxId = converter.Int64ToString(ctx.Id)
+ suite.Equal(*createdModel.Id, *ctxId, "returned model id should match the mlmd one")
+ suite.Equal(modelName, *ctx.Name, "saved model name should match the provided one")
+ suite.Equal(newModelExternalId, *ctx.ExternalId, "saved external id should match the provided one")
+ suite.Equal(newOwner, ctx.CustomProperties["owner"].GetStringValue(), "saved owner custom property should match the provided one")
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelById() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ state := openapi.REGISTEREDMODELSTATE_LIVE
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ State: &state,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ // test
+ createdModel, err := service.UpsertRegisteredModel(registeredModel)
+
+ // checks
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ getModelById, err := service.GetRegisteredModelById(*createdModel.Id)
+ suite.Nilf(err, "error getting registered model by id %s: %v", *createdModel.Id, err)
+
+ // checks created model matches original one except for Id
+ suite.Equal(*registeredModel.Name, *getModelById.Name, "saved model name should match the original one")
+ suite.Equal(*registeredModel.ExternalID, *getModelById.ExternalID, "saved model external id should match the original one")
+ suite.Equal(*registeredModel.State, *getModelById.State, "saved model state should match the original one")
+ suite.Equal(*registeredModel.CustomProperties, *getModelById.CustomProperties, "saved model custom props should match the original one")
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelByParamsWithNoResults() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ _, err := service.GetRegisteredModelByParams(apiutils.Of("not-present"), nil)
+ suite.NotNil(err)
+ suite.Equal("no registered models found for name=not-present, externalId=", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelByParamsName() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ }
+
+ createdModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ byName, err := service.GetRegisteredModelByParams(&modelName, nil)
+ suite.Nilf(err, "error getting registered model by name: %v", err)
+
+ suite.Equalf(*createdModel.Id, *byName.Id, "the returned model id should match the retrieved by name")
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelByParamsExternalId() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ }
+
+ createdModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ byName, err := service.GetRegisteredModelByParams(nil, &modelExternalId)
+ suite.Nilf(err, "error getting registered model by external id: %v", err)
+
+ suite.Equalf(*createdModel.Id, *byName.Id, "the returned model id should match the retrieved by name")
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelByEmptyParams() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ }
+
+ _, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ _, err = service.GetRegisteredModelByParams(nil, nil)
+ suite.NotNil(err)
+ suite.Equal("invalid parameters call, supply either name or externalId", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelsOrderedById() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ orderBy := "ID"
+
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ }
+
+ _, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ newModelName := "PricingModel2"
+ newModelExternalId := "myExternalId2"
+ registeredModel.Name = &newModelName
+ registeredModel.ExternalID = &newModelExternalId
+ _, err = service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ newModelName = "PricingModel3"
+ newModelExternalId = "myExternalId3"
+ registeredModel.Name = &newModelName
+ registeredModel.ExternalID = &newModelExternalId
+ _, err = service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ orderedById, err := service.GetRegisteredModels(api.ListOptions{
+ OrderBy: &orderBy,
+ SortOrder: &ascOrderDirection,
+ })
+ suite.Nilf(err, "error getting registered models: %v", err)
+
+ suite.Equal(3, int(orderedById.Size))
+ for i := 0; i < int(orderedById.Size)-1; i++ {
+ suite.Less(*orderedById.Items[i].Id, *orderedById.Items[i+1].Id)
+ }
+
+ orderedById, err = service.GetRegisteredModels(api.ListOptions{
+ OrderBy: &orderBy,
+ SortOrder: &descOrderDirection,
+ })
+ suite.Nilf(err, "error getting registered models: %v", err)
+
+ suite.Equal(3, int(orderedById.Size))
+ for i := 0; i < int(orderedById.Size)-1; i++ {
+ suite.Greater(*orderedById.Items[i].Id, *orderedById.Items[i+1].Id)
+ }
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelsOrderedByLastUpdate() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ orderBy := "LAST_UPDATE_TIME"
+
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ }
+
+ firstModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ newModelName := "PricingModel2"
+ newModelExternalId := "myExternalId2"
+ registeredModel.Name = &newModelName
+ registeredModel.ExternalID = &newModelExternalId
+ secondModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ newModelName = "PricingModel3"
+ newModelExternalId = "myExternalId3"
+ registeredModel.Name = &newModelName
+ registeredModel.ExternalID = &newModelExternalId
+ thirdModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ // update second model
+ secondModel.ExternalID = nil
+ _, err = service.UpsertRegisteredModel(secondModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ orderedById, err := service.GetRegisteredModels(api.ListOptions{
+ OrderBy: &orderBy,
+ SortOrder: &ascOrderDirection,
+ })
+ suite.Nilf(err, "error getting registered models: %v", err)
+
+ suite.Equal(3, int(orderedById.Size))
+ suite.Equal(*firstModel.Id, *orderedById.Items[0].Id)
+ suite.Equal(*thirdModel.Id, *orderedById.Items[1].Id)
+ suite.Equal(*secondModel.Id, *orderedById.Items[2].Id)
+
+ orderedById, err = service.GetRegisteredModels(api.ListOptions{
+ OrderBy: &orderBy,
+ SortOrder: &descOrderDirection,
+ })
+ suite.Nilf(err, "error getting registered models: %v", err)
+
+ suite.Equal(3, int(orderedById.Size))
+ suite.Equal(*secondModel.Id, *orderedById.Items[0].Id)
+ suite.Equal(*thirdModel.Id, *orderedById.Items[1].Id)
+ suite.Equal(*firstModel.Id, *orderedById.Items[2].Id)
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelsWithPageSize() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ pageSize := int32(1)
+ pageSize2 := int32(2)
+ modelName := "PricingModel1"
+ modelExternalId := "myExternalId1"
+
+ // register a new model
+ registeredModel := &openapi.RegisteredModel{
+ Name: &modelName,
+ ExternalID: &modelExternalId,
+ }
+
+ firstModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ newModelName := "PricingModel2"
+ newModelExternalId := "myExternalId2"
+ registeredModel.Name = &newModelName
+ registeredModel.ExternalID = &newModelExternalId
+ secondModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ newModelName = "PricingModel3"
+ newModelExternalId = "myExternalId3"
+ registeredModel.Name = &newModelName
+ registeredModel.ExternalID = &newModelExternalId
+ thirdModel, err := service.UpsertRegisteredModel(registeredModel)
+ suite.Nilf(err, "error creating registered model: %v", err)
+
+ truncatedList, err := service.GetRegisteredModels(api.ListOptions{
+ PageSize: &pageSize,
+ })
+ suite.Nilf(err, "error getting registered models: %v", err)
+
+ suite.Equal(1, int(truncatedList.Size))
+ suite.NotEqual("", truncatedList.NextPageToken, "next page token should not be empty")
+ suite.Equal(*firstModel.Id, *truncatedList.Items[0].Id)
+
+ truncatedList, err = service.GetRegisteredModels(api.ListOptions{
+ PageSize: &pageSize2,
+ NextPageToken: &truncatedList.NextPageToken,
+ })
+ suite.Nilf(err, "error getting registered models: %v", err)
+
+ suite.Equal(2, int(truncatedList.Size))
+ suite.Equal("", truncatedList.NextPageToken, "next page token should be empty as list item returned")
+ suite.Equal(*secondModel.Id, *truncatedList.Items[0].Id)
+ suite.Equal(*thirdModel.Id, *truncatedList.Items[1].Id)
+}
+
+// MODEL VERSIONS
+
+func (suite *CoreTestSuite) TestCreateModelVersion() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ state := openapi.MODELVERSIONSTATE_LIVE
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Description: &modelVersionDescription,
+ State: &state,
+ Author: &author,
+ }
+
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ suite.NotNilf(createdVersion.Id, "created model version should not have nil Id")
+
+ createdVersionId, _ := converter.StringToInt64(createdVersion.Id)
+
+ byId, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *createdVersionId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+ suite.Equal(1, len(byId.Contexts), "there should be just one context saved in mlmd")
+
+ suite.Equal(*createdVersionId, *byId.Contexts[0].Id, "returned model id should match the mlmd one")
+ suite.Equal(fmt.Sprintf("%s:%s", registeredModelId, modelVersionName), *byId.Contexts[0].Name, "saved model name should match the provided one")
+ suite.Equal(versionExternalId, *byId.Contexts[0].ExternalId, "saved external id should match the provided one")
+ suite.Equal(author, byId.Contexts[0].Properties["author"].GetStringValue(), "saved author property should match the provided one")
+ suite.Equal(modelVersionDescription, byId.Contexts[0].Properties["description"].GetStringValue(), "saved description should match the provided one")
+ suite.Equal(string(state), byId.Contexts[0].Properties["state"].GetStringValue(), "saved state should match the provided one")
+ suite.Equalf(*modelVersionTypeName, *byId.Contexts[0].Type, "saved context should be of type of %s", *modelVersionTypeName)
+
+ getAllResp, err := suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(2, len(getAllResp.Contexts), "there should be two contexts saved in mlmd")
+}
+
+func (suite *CoreTestSuite) TestCreateModelVersionFailure() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := "9999"
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Author: &author,
+ }
+
+ _, err := service.UpsertModelVersion(modelVersion, nil)
+ suite.NotNil(err)
+ suite.Equal("missing registered model id, cannot create model version without registered model", err.Error())
+
+ _, err = service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.NotNil(err)
+ suite.Equal("no registered model found for id 9999", err.Error())
+}
+
+func (suite *CoreTestSuite) TestUpdateModelVersion() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Author: &author,
+ }
+
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ suite.NotNilf(createdVersion.Id, "created model version should not have nil Id")
+ createdVersionId, _ := converter.StringToInt64(createdVersion.Id)
+
+ newExternalId := "org.my_awesome_model@v1"
+ newScore := 0.95
+
+ createdVersion.ExternalID = &newExternalId
+ (*createdVersion.CustomProperties)["score"] = openapi.MetadataValue{
+ MetadataDoubleValue: &openapi.MetadataDoubleValue{
+ DoubleValue: &newScore,
+ },
+ }
+
+ updatedVersion, err := service.UpsertModelVersion(createdVersion, ®isteredModelId)
+ suite.Nilf(err, "error updating new model version for %s: %v", registeredModelId, err)
+
+ updateVersionId, _ := converter.StringToInt64(updatedVersion.Id)
+ suite.Equal(*createdVersionId, *updateVersionId, "created and updated model version should have same id")
+
+ byId, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *updateVersionId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+ suite.Equal(1, len(byId.Contexts), "there should be just one context saved in mlmd")
+
+ suite.Equal(*updateVersionId, *byId.Contexts[0].Id, "returned model id should match the mlmd one")
+ suite.Equal(fmt.Sprintf("%s:%s", registeredModelId, modelVersionName), *byId.Contexts[0].Name, "saved model name should match the provided one")
+ suite.Equal(newExternalId, *byId.Contexts[0].ExternalId, "saved external id should match the provided one")
+ suite.Equal(author, byId.Contexts[0].Properties["author"].GetStringValue(), "saved author property should match the provided one")
+ suite.Equal(newScore, byId.Contexts[0].CustomProperties["score"].GetDoubleValue(), "saved score custom property should match the provided one")
+ suite.Equalf(*modelVersionTypeName, *byId.Contexts[0].Type, "saved context should be of type of %s", *modelVersionTypeName)
+
+ getAllResp, err := suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(2, len(getAllResp.Contexts), "there should be two contexts saved in mlmd")
+
+ // update with nil name
+ newExternalId = "org.my_awesome_model_@v1"
+ updatedVersion.ExternalID = &newExternalId
+ updatedVersion.Name = nil
+ updatedVersion, err = service.UpsertModelVersion(updatedVersion, ®isteredModelId)
+ suite.Nilf(err, "error updating new model version for %s: %v", registeredModelId, err)
+
+ updateVersionId, _ = converter.StringToInt64(updatedVersion.Id)
+ suite.Equal(*createdVersionId, *updateVersionId, "created and updated model version should have same id")
+
+ byId, err = suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *updateVersionId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+ suite.Equal(1, len(byId.Contexts), "there should be just one context saved in mlmd")
+
+ suite.Equal(*updateVersionId, *byId.Contexts[0].Id, "returned model id should match the mlmd one")
+ suite.Equal(fmt.Sprintf("%s:%s", registeredModelId, modelVersionName), *byId.Contexts[0].Name, "saved model name should match the provided one")
+ suite.Equal(newExternalId, *byId.Contexts[0].ExternalId, "saved external id should match the provided one")
+ suite.Equal(author, byId.Contexts[0].Properties["author"].GetStringValue(), "saved author property should match the provided one")
+ suite.Equal(newScore, byId.Contexts[0].CustomProperties["score"].GetDoubleValue(), "saved score custom property should match the provided one")
+ suite.Equalf(*modelVersionTypeName, *byId.Contexts[0].Type, "saved context should be of type of %s", *modelVersionTypeName)
+}
+
+func (suite *CoreTestSuite) TestUpdateModelVersionFailure() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Author: &author,
+ }
+
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %s", registeredModelId)
+ suite.NotNilf(createdVersion.Id, "created model version should not have nil Id")
+
+ newExternalId := "org.my_awesome_model@v1"
+ newScore := 0.95
+
+ createdVersion.ExternalID = &newExternalId
+ (*createdVersion.CustomProperties)["score"] = openapi.MetadataValue{
+ MetadataDoubleValue: &openapi.MetadataDoubleValue{
+ DoubleValue: &newScore,
+ },
+ }
+
+ wrongId := "9999"
+ createdVersion.Id = &wrongId
+ _, err = service.UpsertModelVersion(createdVersion, ®isteredModelId)
+ suite.NotNil(err)
+ suite.Equal(fmt.Sprintf("no model version found for id %s", wrongId), err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetModelVersionById() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ state := openapi.MODELVERSIONSTATE_ARCHIVED
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ State: &state,
+ Author: &author,
+ }
+
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ suite.NotNilf(createdVersion.Id, "created model version should not have nil Id")
+ createdVersionId, _ := converter.StringToInt64(createdVersion.Id)
+
+ getById, err := service.GetModelVersionById(*createdVersion.Id)
+ suite.Nilf(err, "error getting model version with id %d", *createdVersionId)
+
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *createdVersionId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ suite.Equal(*converter.Int64ToString(ctx.Id), *getById.Id, "returned model version id should match the mlmd context one")
+ suite.Equal(*modelVersion.Name, *getById.Name, "saved model name should match the provided one")
+ suite.Equal(*modelVersion.ExternalID, *getById.ExternalID, "saved external id should match the provided one")
+ suite.Equal(*modelVersion.State, *getById.State, "saved model state should match the original one")
+ suite.Equal(*getById.Author, author, "saved author property should match the provided one")
+}
+
+func (suite *CoreTestSuite) TestGetModelVersionByParamsWithNoResults() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ _, err := service.GetModelVersionByParams(apiutils.Of("not-present"), ®isteredModelId, nil)
+ suite.NotNil(err)
+ suite.Equal("no model versions found for versionName=not-present, registeredModelId=1, externalId=", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetModelVersionByParamsName() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Author: &author,
+ }
+
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ suite.NotNilf(createdVersion.Id, "created model version should not have nil Id")
+ createdVersionId, _ := converter.StringToInt64(createdVersion.Id)
+
+ getByName, err := service.GetModelVersionByParams(&modelVersionName, ®isteredModelId, nil)
+ suite.Nilf(err, "error getting model version by name %d", *createdVersionId)
+
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *createdVersionId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ suite.Equal(*converter.Int64ToString(ctx.Id), *getByName.Id, "returned model version id should match the mlmd context one")
+ suite.Equal(fmt.Sprintf("%s:%s", registeredModelId, *getByName.Name), *ctx.Name, "saved model name should match the provided one")
+ suite.Equal(*ctx.ExternalId, *getByName.ExternalID, "saved external id should match the provided one")
+ suite.Equal(ctx.Properties["author"].GetStringValue(), *getByName.Author, "saved author property should match the provided one")
+}
+
+func (suite *CoreTestSuite) TestGetModelVersionByParamsExternalId() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Author: &author,
+ }
+
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ suite.NotNilf(createdVersion.Id, "created model version should not have nil Id")
+ createdVersionId, _ := converter.StringToInt64(createdVersion.Id)
+
+ getByExternalId, err := service.GetModelVersionByParams(nil, nil, modelVersion.ExternalID)
+ suite.Nilf(err, "error getting model version by external id %d", *modelVersion.ExternalID)
+
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *createdVersionId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ suite.Equal(*converter.Int64ToString(ctx.Id), *getByExternalId.Id, "returned model version id should match the mlmd context one")
+ suite.Equal(fmt.Sprintf("%s:%s", registeredModelId, *getByExternalId.Name), *ctx.Name, "saved model name should match the provided one")
+ suite.Equal(*ctx.ExternalId, *getByExternalId.ExternalID, "saved external id should match the provided one")
+ suite.Equal(ctx.Properties["author"].GetStringValue(), *getByExternalId.Author, "saved author property should match the provided one")
+}
+
+func (suite *CoreTestSuite) TestGetModelVersionByEmptyParams() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Author: &author,
+ }
+
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ suite.NotNilf(createdVersion.Id, "created model version should not have nil Id")
+
+ _, err = service.GetModelVersionByParams(nil, nil, nil)
+ suite.NotNil(err)
+ suite.Equal("invalid parameters call, supply either (versionName and registeredModelId), or externalId", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetModelVersions() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ modelVersion1 := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ }
+
+ secondModelVersionName := "v2"
+ secondModelVersionExtId := "org.myawesomemodel@v2"
+ modelVersion2 := &openapi.ModelVersion{
+ Name: &secondModelVersionName,
+ ExternalID: &secondModelVersionExtId,
+ }
+
+ thirdModelVersionName := "v3"
+ thirdModelVersionExtId := "org.myawesomemodel@v3"
+ modelVersion3 := &openapi.ModelVersion{
+ Name: &thirdModelVersionName,
+ ExternalID: &thirdModelVersionExtId,
+ }
+
+ createdVersion1, err := service.UpsertModelVersion(modelVersion1, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ createdVersion2, err := service.UpsertModelVersion(modelVersion2, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ createdVersion3, err := service.UpsertModelVersion(modelVersion3, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ anotherRegModelName := "AnotherModel"
+ anotherRegModelExtId := "org.another"
+ anotherRegisteredModelId := suite.registerModel(service, &anotherRegModelName, &anotherRegModelExtId)
+
+ anotherModelVersionName := "v1.0"
+ anotherModelVersionExtId := "org.another@v1.0"
+ modelVersionAnother := &openapi.ModelVersion{
+ Name: &anotherModelVersionName,
+ ExternalID: &anotherModelVersionExtId,
+ }
+
+ _, err = service.UpsertModelVersion(modelVersionAnother, &anotherRegisteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", anotherRegisteredModelId)
+
+ createdVersionId1, _ := converter.StringToInt64(createdVersion1.Id)
+ createdVersionId2, _ := converter.StringToInt64(createdVersion2.Id)
+ createdVersionId3, _ := converter.StringToInt64(createdVersion3.Id)
+
+ getAll, err := service.GetModelVersions(api.ListOptions{}, nil)
+ suite.Nilf(err, "error getting all model versions")
+ suite.Equal(int32(4), getAll.Size, "expected four model versions across all registered models")
+
+ getAllByRegModel, err := service.GetModelVersions(api.ListOptions{}, ®isteredModelId)
+ suite.Nilf(err, "error getting all model versions")
+ suite.Equalf(int32(3), getAllByRegModel.Size, "expected three model versions for registered model %d", registeredModelId)
+
+ suite.Equal(*converter.Int64ToString(createdVersionId1), *getAllByRegModel.Items[0].Id)
+ suite.Equal(*converter.Int64ToString(createdVersionId2), *getAllByRegModel.Items[1].Id)
+ suite.Equal(*converter.Int64ToString(createdVersionId3), *getAllByRegModel.Items[2].Id)
+
+ // order by last update time, expecting last created as first
+ orderByLastUpdate := "LAST_UPDATE_TIME"
+ getAllByRegModel, err = service.GetModelVersions(api.ListOptions{
+ OrderBy: &orderByLastUpdate,
+ SortOrder: &descOrderDirection,
+ }, ®isteredModelId)
+ suite.Nilf(err, "error getting all model versions")
+ suite.Equalf(int32(3), getAllByRegModel.Size, "expected three model versions for registered model %d", registeredModelId)
+
+ suite.Equal(*converter.Int64ToString(createdVersionId1), *getAllByRegModel.Items[2].Id)
+ suite.Equal(*converter.Int64ToString(createdVersionId2), *getAllByRegModel.Items[1].Id)
+ suite.Equal(*converter.Int64ToString(createdVersionId3), *getAllByRegModel.Items[0].Id)
+
+ // update the second version
+ newVersionExternalId := "updated.org:v2"
+ createdVersion2.ExternalID = &newVersionExternalId
+ createdVersion2, err = service.UpsertModelVersion(createdVersion2, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+
+ suite.Equal(newVersionExternalId, *createdVersion2.ExternalID)
+
+ getAllByRegModel, err = service.GetModelVersions(api.ListOptions{
+ OrderBy: &orderByLastUpdate,
+ SortOrder: &descOrderDirection,
+ }, ®isteredModelId)
+ suite.Nilf(err, "error getting all model versions")
+ suite.Equalf(int32(3), getAllByRegModel.Size, "expected three model versions for registered model %d", registeredModelId)
+
+ suite.Equal(*converter.Int64ToString(createdVersionId1), *getAllByRegModel.Items[2].Id)
+ suite.Equal(*converter.Int64ToString(createdVersionId2), *getAllByRegModel.Items[0].Id)
+ suite.Equal(*converter.Int64ToString(createdVersionId3), *getAllByRegModel.Items[1].Id)
+}
+
+// MODEL ARTIFACTS
+
+func (suite *CoreTestSuite) TestCreateModelArtifact() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := suite.registerModelVersion(service, nil, nil, nil, nil)
+
+ modelArtifact := &openapi.ModelArtifact{
+ Name: &artifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &artifactUri,
+ Description: &artifactDescription,
+ ModelFormatName: apiutils.Of("onnx"),
+ ModelFormatVersion: apiutils.Of("1"),
+ StorageKey: apiutils.Of("aws-connection-models"),
+ StoragePath: apiutils.Of("bucket"),
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdArtifact, err := service.UpsertModelArtifact(modelArtifact, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for %d", modelVersionId)
+
+ state, _ := openapi.NewArtifactStateFromValue(artifactState)
+ suite.NotNil(createdArtifact.Id, "created artifact id should not be nil")
+ suite.Equal(artifactName, *createdArtifact.Name)
+ suite.Equal(*state, *createdArtifact.State)
+ suite.Equal(artifactUri, *createdArtifact.Uri)
+ suite.Equal(artifactDescription, *createdArtifact.Description)
+ suite.Equal("onnx", *createdArtifact.ModelFormatName)
+ suite.Equal("1", *createdArtifact.ModelFormatVersion)
+ suite.Equal("aws-connection-models", *createdArtifact.StorageKey)
+ suite.Equal("bucket", *createdArtifact.StoragePath)
+ suite.Equal(customString, *(*createdArtifact.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue)
+
+ createdArtifactId, _ := converter.StringToInt64(createdArtifact.Id)
+ getById, err := suite.mlmdClient.GetArtifactsByID(context.Background(), &proto.GetArtifactsByIDRequest{
+ ArtifactIds: []int64{*createdArtifactId},
+ })
+ suite.Nilf(err, "error getting model artifact by id %d", createdArtifactId)
+
+ suite.Equal(*createdArtifactId, *getById.Artifacts[0].Id)
+ suite.Equal(fmt.Sprintf("%s:%s", modelVersionId, *createdArtifact.Name), *getById.Artifacts[0].Name)
+ suite.Equal(string(*createdArtifact.State), getById.Artifacts[0].State.String())
+ suite.Equal(*createdArtifact.Uri, *getById.Artifacts[0].Uri)
+ suite.Equal(*createdArtifact.Description, getById.Artifacts[0].Properties["description"].GetStringValue())
+ suite.Equal(*createdArtifact.ModelFormatName, getById.Artifacts[0].Properties["model_format_name"].GetStringValue())
+ suite.Equal(*createdArtifact.ModelFormatVersion, getById.Artifacts[0].Properties["model_format_version"].GetStringValue())
+ suite.Equal(*createdArtifact.StorageKey, getById.Artifacts[0].Properties["storage_key"].GetStringValue())
+ suite.Equal(*createdArtifact.StoragePath, getById.Artifacts[0].Properties["storage_path"].GetStringValue())
+ suite.Equal(*(*createdArtifact.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, getById.Artifacts[0].CustomProperties["custom_string_prop"].GetStringValue())
+
+ modelVersionIdAsInt, _ := converter.StringToInt64(&modelVersionId)
+ byCtx, _ := suite.mlmdClient.GetArtifactsByContext(context.Background(), &proto.GetArtifactsByContextRequest{
+ ContextId: (*int64)(modelVersionIdAsInt),
+ })
+ suite.Equal(1, len(byCtx.Artifacts))
+ suite.Equal(*createdArtifactId, *byCtx.Artifacts[0].Id)
+}
+
+func (suite *CoreTestSuite) TestCreateModelArtifactFailure() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := "9998"
+
+ modelArtifact := &openapi.ModelArtifact{
+ Name: &artifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &artifactUri,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ _, err := service.UpsertModelArtifact(modelArtifact, nil)
+ suite.NotNil(err)
+ suite.Equal("missing model version id, cannot create model artifact without model version", err.Error())
+
+ _, err = service.UpsertModelArtifact(modelArtifact, &modelVersionId)
+ suite.NotNil(err)
+ suite.Equal("no model version found for id 9998", err.Error())
+}
+
+func (suite *CoreTestSuite) TestUpdateModelArtifact() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := suite.registerModelVersion(service, nil, nil, nil, nil)
+
+ modelArtifact := &openapi.ModelArtifact{
+ Name: &artifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &artifactUri,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdArtifact, err := service.UpsertModelArtifact(modelArtifact, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for %d", modelVersionId)
+
+ newState := "MARKED_FOR_DELETION"
+ createdArtifact.State = (*openapi.ArtifactState)(&newState)
+ updatedArtifact, err := service.UpsertModelArtifact(createdArtifact, &modelVersionId)
+ suite.Nilf(err, "error updating model artifact for %d: %v", modelVersionId, err)
+
+ createdArtifactId, _ := converter.StringToInt64(createdArtifact.Id)
+ updatedArtifactId, _ := converter.StringToInt64(updatedArtifact.Id)
+ suite.Equal(createdArtifactId, updatedArtifactId)
+
+ getById, err := suite.mlmdClient.GetArtifactsByID(context.Background(), &proto.GetArtifactsByIDRequest{
+ ArtifactIds: []int64{*createdArtifactId},
+ })
+ suite.Nilf(err, "error getting model artifact by id %d", createdArtifactId)
+
+ suite.Equal(*createdArtifactId, *getById.Artifacts[0].Id)
+ suite.Equal(fmt.Sprintf("%s:%s", modelVersionId, *createdArtifact.Name), *getById.Artifacts[0].Name)
+ suite.Equal(string(newState), getById.Artifacts[0].State.String())
+ suite.Equal(*createdArtifact.Uri, *getById.Artifacts[0].Uri)
+ suite.Equal(*(*createdArtifact.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, getById.Artifacts[0].CustomProperties["custom_string_prop"].GetStringValue())
+}
+
+func (suite *CoreTestSuite) TestUpdateModelArtifactFailure() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := suite.registerModelVersion(service, nil, nil, nil, nil)
+
+ modelArtifact := &openapi.ModelArtifact{
+ Name: &artifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &artifactUri,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdArtifact, err := service.UpsertModelArtifact(modelArtifact, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for model version %s", modelVersionId)
+ suite.NotNilf(createdArtifact.Id, "created model artifact should not have nil Id")
+
+ newState := "MARKED_FOR_DELETION"
+ createdArtifact.State = (*openapi.ArtifactState)(&newState)
+ updatedArtifact, err := service.UpsertModelArtifact(createdArtifact, &modelVersionId)
+ suite.Nilf(err, "error updating model artifact for %d: %v", modelVersionId, err)
+
+ wrongId := "9998"
+ updatedArtifact.Id = &wrongId
+ _, err = service.UpsertModelArtifact(updatedArtifact, &modelVersionId)
+ suite.NotNil(err)
+ suite.Equal(fmt.Sprintf("no model artifact found for id %s", wrongId), err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetModelArtifactById() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := suite.registerModelVersion(service, nil, nil, nil, nil)
+
+ modelArtifact := &openapi.ModelArtifact{
+ Name: &artifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &artifactUri,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdArtifact, err := service.UpsertModelArtifact(modelArtifact, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for %d", modelVersionId)
+
+ createdArtifactId, _ := converter.StringToInt64(createdArtifact.Id)
+
+ getById, err := service.GetModelArtifactById(*createdArtifact.Id)
+ suite.Nilf(err, "error getting model artifact by id %d", createdArtifactId)
+
+ state, _ := openapi.NewArtifactStateFromValue(artifactState)
+ suite.NotNil(createdArtifact.Id, "created artifact id should not be nil")
+ suite.Equal(artifactName, *getById.Name)
+ suite.Equal(*state, *getById.State)
+ suite.Equal(artifactUri, *getById.Uri)
+ suite.Equal(customString, *(*getById.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue)
+
+ suite.Equal(*createdArtifact, *getById, "artifacts returned during creation and on get by id should be equal")
+}
+
+func (suite *CoreTestSuite) TestGetModelArtifactByParams() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := suite.registerModelVersion(service, nil, nil, nil, nil)
+
+ modelArtifact := &openapi.ModelArtifact{
+ Name: &artifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &artifactUri,
+ ExternalID: &artifactExtId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdArtifact, err := service.UpsertModelArtifact(modelArtifact, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for %d", modelVersionId)
+
+ createdArtifactId, _ := converter.StringToInt64(createdArtifact.Id)
+
+ state, _ := openapi.NewArtifactStateFromValue(artifactState)
+
+ getByName, err := service.GetModelArtifactByParams(&artifactName, &modelVersionId, nil)
+ suite.Nilf(err, "error getting model artifact by id %d", createdArtifactId)
+
+ suite.NotNil(createdArtifact.Id, "created artifact id should not be nil")
+ suite.Equal(artifactName, *getByName.Name)
+ suite.Equal(artifactExtId, *getByName.ExternalID)
+ suite.Equal(*state, *getByName.State)
+ suite.Equal(artifactUri, *getByName.Uri)
+ suite.Equal(customString, *(*getByName.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue)
+
+ suite.Equal(*createdArtifact, *getByName, "artifacts returned during creation and on get by name should be equal")
+
+ getByExtId, err := service.GetModelArtifactByParams(nil, nil, &artifactExtId)
+ suite.Nilf(err, "error getting model artifact by id %d", createdArtifactId)
+
+ suite.NotNil(createdArtifact.Id, "created artifact id should not be nil")
+ suite.Equal(artifactName, *getByExtId.Name)
+ suite.Equal(artifactExtId, *getByExtId.ExternalID)
+ suite.Equal(*state, *getByExtId.State)
+ suite.Equal(artifactUri, *getByExtId.Uri)
+ suite.Equal(customString, *(*getByExtId.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue)
+
+ suite.Equal(*createdArtifact, *getByExtId, "artifacts returned during creation and on get by ext id should be equal")
+}
+
+func (suite *CoreTestSuite) TestGetModelArtifactByEmptyParams() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := suite.registerModelVersion(service, nil, nil, nil, nil)
+
+ modelArtifact := &openapi.ModelArtifact{
+ Name: &artifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &artifactUri,
+ ExternalID: &artifactExtId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ _, err := service.UpsertModelArtifact(modelArtifact, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for %d", modelVersionId)
+
+ _, err = service.GetModelArtifactByParams(nil, nil, nil)
+ suite.NotNil(err)
+ suite.Equal("invalid parameters call, supply either (artifactName and modelVersionId), or externalId", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetModelArtifactByParamsWithNoResults() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := suite.registerModelVersion(service, nil, nil, nil, nil)
+
+ _, err := service.GetModelArtifactByParams(apiutils.Of("not-present"), &modelVersionId, nil)
+ suite.NotNil(err)
+ suite.Equal("no model artifacts found for artifactName=not-present, modelVersionId=2, externalId=", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetModelArtifacts() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ modelVersionId := suite.registerModelVersion(service, nil, nil, nil, nil)
+
+ modelArtifact1 := &openapi.ModelArtifact{
+ Name: &artifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &artifactUri,
+ ExternalID: &artifactExtId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ secondArtifactName := "second-name"
+ secondArtifactExtId := "second-ext-id"
+ secondArtifactUri := "second-uri"
+ modelArtifact2 := &openapi.ModelArtifact{
+ Name: &secondArtifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &secondArtifactUri,
+ ExternalID: &secondArtifactExtId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ thirdArtifactName := "third-name"
+ thirdArtifactExtId := "third-ext-id"
+ thirdArtifactUri := "third-uri"
+ modelArtifact3 := &openapi.ModelArtifact{
+ Name: &thirdArtifactName,
+ State: (*openapi.ArtifactState)(&artifactState),
+ Uri: &thirdArtifactUri,
+ ExternalID: &thirdArtifactExtId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdArtifact1, err := service.UpsertModelArtifact(modelArtifact1, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for %d", modelVersionId)
+ createdArtifact2, err := service.UpsertModelArtifact(modelArtifact2, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for %d", modelVersionId)
+ createdArtifact3, err := service.UpsertModelArtifact(modelArtifact3, &modelVersionId)
+ suite.Nilf(err, "error creating new model artifact for %d", modelVersionId)
+
+ createdArtifactId1, _ := converter.StringToInt64(createdArtifact1.Id)
+ createdArtifactId2, _ := converter.StringToInt64(createdArtifact2.Id)
+ createdArtifactId3, _ := converter.StringToInt64(createdArtifact3.Id)
+
+ getAll, err := service.GetModelArtifacts(api.ListOptions{}, nil)
+ suite.Nilf(err, "error getting all model artifacts")
+ suite.Equalf(int32(3), getAll.Size, "expected three model artifacts")
+
+ suite.Equal(*converter.Int64ToString(createdArtifactId1), *getAll.Items[0].Id)
+ suite.Equal(*converter.Int64ToString(createdArtifactId2), *getAll.Items[1].Id)
+ suite.Equal(*converter.Int64ToString(createdArtifactId3), *getAll.Items[2].Id)
+
+ orderByLastUpdate := "LAST_UPDATE_TIME"
+ getAllByModelVersion, err := service.GetModelArtifacts(api.ListOptions{
+ OrderBy: &orderByLastUpdate,
+ SortOrder: &descOrderDirection,
+ }, &modelVersionId)
+ suite.Nilf(err, "error getting all model artifacts for %d", modelVersionId)
+ suite.Equalf(int32(3), getAllByModelVersion.Size, "expected three model artifacts for model version %d", modelVersionId)
+
+ suite.Equal(*converter.Int64ToString(createdArtifactId1), *getAllByModelVersion.Items[2].Id)
+ suite.Equal(*converter.Int64ToString(createdArtifactId2), *getAllByModelVersion.Items[1].Id)
+ suite.Equal(*converter.Int64ToString(createdArtifactId3), *getAllByModelVersion.Items[0].Id)
+}
+
+// SERVING ENVIRONMENT
+
+func (suite *CoreTestSuite) TestCreateServingEnvironment() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new ServingEnvironment
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ Description: &entityDescription,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ // test
+ createdEntity, err := service.UpsertServingEnvironment(eut)
+
+ // checks
+ suite.Nilf(err, "error creating uut: %v", err)
+ suite.NotNilf(createdEntity.Id, "created uut should not have nil Id")
+
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{*createdEntityId},
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ ctxId := converter.Int64ToString(ctx.Id)
+ suite.Equal(*createdEntity.Id, *ctxId, "returned id should match the mlmd one")
+ suite.Equal(entityName, *ctx.Name, "saved name should match the provided one")
+ suite.Equal(entityExternalId, *ctx.ExternalId, "saved external id should match the provided one")
+ suite.Equal(entityDescription, ctx.Properties["description"].GetStringValue(), "saved description should match the provided one")
+ suite.Equal(owner, ctx.CustomProperties["owner"].GetStringValue(), "saved owner custom property should match the provided one")
+
+ getAllResp, err := suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(1, len(getAllResp.Contexts), "there should be just one context saved in mlmd")
+}
+
+func (suite *CoreTestSuite) TestUpdateServingEnvironment() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new ServingEnvironment
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ // test
+ createdEntity, err := service.UpsertServingEnvironment(eut)
+
+ // checks
+ suite.Nilf(err, "error creating uut: %v", err)
+ suite.NotNilf(createdEntity.Id, "created uut should not have nil Id")
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+
+ // checks created entity matches original one except for Id
+ suite.Equal(*eut.Name, *createdEntity.Name, "returned entity should match the original one")
+ suite.Equal(*eut.ExternalID, *createdEntity.ExternalID, "returned entity external id should match the original one")
+ suite.Equal(*eut.CustomProperties, *createdEntity.CustomProperties, "returned entity custom props should match the original one")
+
+ // update existing entity
+ newExternalId := "newExternalId"
+ newOwner := "newOwner"
+
+ createdEntity.ExternalID = &newExternalId
+ (*createdEntity.CustomProperties)["owner"] = openapi.MetadataValue{
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &newOwner,
+ },
+ }
+
+ // update the entity
+ createdEntity, err = service.UpsertServingEnvironment(createdEntity)
+ suite.Nilf(err, "error creating uut: %v", err)
+
+ // still one expected MLMD type
+ getAllResp, err := suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(1, len(getAllResp.Contexts), "there should be just one context saved in mlmd")
+
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{*createdEntityId},
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ ctxId := converter.Int64ToString(ctx.Id)
+ suite.Equal(*createdEntity.Id, *ctxId, "returned entity id should match the mlmd one")
+ suite.Equal(entityName, *ctx.Name, "saved entity name should match the provided one")
+ suite.Equal(newExternalId, *ctx.ExternalId, "saved external id should match the provided one")
+ suite.Equal(newOwner, ctx.CustomProperties["owner"].GetStringValue(), "saved owner custom property should match the provided one")
+
+ // update the entity under test, keeping nil name
+ newExternalId = "newNewExternalId"
+ createdEntity.ExternalID = &newExternalId
+ createdEntity.Name = nil
+ createdEntity, err = service.UpsertServingEnvironment(createdEntity)
+ suite.Nilf(err, "error creating entity: %v", err)
+
+ // still one registered entity
+ getAllResp, err = suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(1, len(getAllResp.Contexts), "there should be just one context saved in mlmd")
+
+ ctxById, err = suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{*createdEntityId},
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+
+ ctx = ctxById.Contexts[0]
+ ctxId = converter.Int64ToString(ctx.Id)
+ suite.Equal(*createdEntity.Id, *ctxId, "returned entity id should match the mlmd one")
+ suite.Equal(entityName, *ctx.Name, "saved entity name should match the provided one")
+ suite.Equal(newExternalId, *ctx.ExternalId, "saved external id should match the provided one")
+ suite.Equal(newOwner, ctx.CustomProperties["owner"].GetStringValue(), "saved owner custom property should match the provided one")
+}
+
+func (suite *CoreTestSuite) TestGetServingEnvironmentById() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new entity
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "owner": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &owner,
+ },
+ },
+ },
+ }
+
+ // test
+ createdEntity, err := service.UpsertServingEnvironment(eut)
+
+ // checks
+ suite.Nilf(err, "error creating eut: %v", err)
+
+ getEntityById, err := service.GetServingEnvironmentById(*createdEntity.Id)
+ suite.Nilf(err, "error getting eut by id %s: %v", *createdEntity.Id, err)
+
+ // checks created entity matches original one except for Id
+ suite.Equal(*eut.Name, *getEntityById.Name, "saved name should match the original one")
+ suite.Equal(*eut.ExternalID, *getEntityById.ExternalID, "saved external id should match the original one")
+ suite.Equal(*eut.CustomProperties, *getEntityById.CustomProperties, "saved custom props should match the original one")
+}
+
+func (suite *CoreTestSuite) TestGetServingEnvironmentByParamsWithNoResults() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ _, err := service.GetServingEnvironmentByParams(apiutils.Of("not-present"), nil)
+ suite.NotNil(err)
+ suite.Equal("no serving environments found for name=not-present, externalId=", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetServingEnvironmentByParamsName() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new ServingEnvironment
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ }
+
+ createdEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ byName, err := service.GetServingEnvironmentByParams(&entityName, nil)
+ suite.Nilf(err, "error getting ServingEnvironment by name: %v", err)
+
+ suite.Equalf(*createdEntity.Id, *byName.Id, "the returned entity id should match the retrieved by name")
+}
+
+func (suite *CoreTestSuite) TestGetServingEnvironmentByParamsExternalId() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new ServingEnvironment
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ }
+
+ createdEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ byName, err := service.GetServingEnvironmentByParams(nil, &entityExternalId)
+ suite.Nilf(err, "error getting ServingEnvironment by external id: %v", err)
+
+ suite.Equalf(*createdEntity.Id, *byName.Id, "the returned entity id should match the retrieved by name")
+}
+
+func (suite *CoreTestSuite) TestGetServingEnvironmentByEmptyParams() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ // register a new ServingEnvironment
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ }
+
+ _, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ _, err = service.GetServingEnvironmentByParams(nil, nil)
+ suite.NotNil(err)
+ suite.Equal("invalid parameters call, supply either name or externalId", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetServingEnvironmentsOrderedById() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ orderBy := "ID"
+
+ // register a new ServingEnvironment
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ }
+
+ _, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ newName := "Pricingentity2"
+ newExternalId := "myExternalId2"
+ eut.Name = &newName
+ eut.ExternalID = &newExternalId
+ _, err = service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ newName = "Pricingentity3"
+ newExternalId = "myExternalId3"
+ eut.Name = &newName
+ eut.ExternalID = &newExternalId
+ _, err = service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ orderedById, err := service.GetServingEnvironments(api.ListOptions{
+ OrderBy: &orderBy,
+ SortOrder: &ascOrderDirection,
+ })
+ suite.Nilf(err, "error getting ServingEnvironment: %v", err)
+
+ suite.Equal(3, int(orderedById.Size))
+ for i := 0; i < int(orderedById.Size)-1; i++ {
+ suite.Less(*orderedById.Items[i].Id, *orderedById.Items[i+1].Id)
+ }
+
+ orderedById, err = service.GetServingEnvironments(api.ListOptions{
+ OrderBy: &orderBy,
+ SortOrder: &descOrderDirection,
+ })
+ suite.Nilf(err, "error getting ServingEnvironments: %v", err)
+
+ suite.Equal(3, int(orderedById.Size))
+ for i := 0; i < int(orderedById.Size)-1; i++ {
+ suite.Greater(*orderedById.Items[i].Id, *orderedById.Items[i+1].Id)
+ }
+}
+
+func (suite *CoreTestSuite) TestGetServingEnvironmentsOrderedByLastUpdate() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ orderBy := "LAST_UPDATE_TIME"
+
+ // register a new ServingEnvironment
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ }
+
+ firstEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ newName := "Pricingentity2"
+ newExternalId := "myExternalId2"
+ eut.Name = &newName
+ eut.ExternalID = &newExternalId
+ secondEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ newName = "Pricingentity3"
+ newExternalId = "myExternalId3"
+ eut.Name = &newName
+ eut.ExternalID = &newExternalId
+ thirdEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ // update second entity
+ secondEntity.ExternalID = nil
+ _, err = service.UpsertServingEnvironment(secondEntity)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ orderedById, err := service.GetServingEnvironments(api.ListOptions{
+ OrderBy: &orderBy,
+ SortOrder: &ascOrderDirection,
+ })
+ suite.Nilf(err, "error getting ServingEnvironments: %v", err)
+
+ suite.Equal(3, int(orderedById.Size))
+ suite.Equal(*firstEntity.Id, *orderedById.Items[0].Id)
+ suite.Equal(*thirdEntity.Id, *orderedById.Items[1].Id)
+ suite.Equal(*secondEntity.Id, *orderedById.Items[2].Id)
+
+ orderedById, err = service.GetServingEnvironments(api.ListOptions{
+ OrderBy: &orderBy,
+ SortOrder: &descOrderDirection,
+ })
+ suite.Nilf(err, "error getting ServingEnvironments: %v", err)
+
+ suite.Equal(3, int(orderedById.Size))
+ suite.Equal(*secondEntity.Id, *orderedById.Items[0].Id)
+ suite.Equal(*thirdEntity.Id, *orderedById.Items[1].Id)
+ suite.Equal(*firstEntity.Id, *orderedById.Items[2].Id)
+}
+
+func (suite *CoreTestSuite) TestGetServingEnvironmentsWithPageSize() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ pageSize := int32(1)
+ pageSize2 := int32(2)
+ entityName := "Pricingentity1"
+ entityExternalId := "myExternalId1"
+
+ // register a new ServingEnvironment
+ eut := &openapi.ServingEnvironment{
+ Name: &entityName,
+ ExternalID: &entityExternalId,
+ }
+
+ firstEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating registered entity: %v", err)
+
+ newName := "Pricingentity2"
+ newExternalId := "myExternalId2"
+ eut.Name = &newName
+ eut.ExternalID = &newExternalId
+ secondEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ newName = "Pricingentity3"
+ newExternalId = "myExternalId3"
+ eut.Name = &newName
+ eut.ExternalID = &newExternalId
+ thirdEntity, err := service.UpsertServingEnvironment(eut)
+ suite.Nilf(err, "error creating ServingEnvironment: %v", err)
+
+ truncatedList, err := service.GetServingEnvironments(api.ListOptions{
+ PageSize: &pageSize,
+ })
+ suite.Nilf(err, "error getting ServingEnvironments: %v", err)
+
+ suite.Equal(1, int(truncatedList.Size))
+ suite.NotEqual("", truncatedList.NextPageToken, "next page token should not be empty")
+ suite.Equal(*firstEntity.Id, *truncatedList.Items[0].Id)
+
+ truncatedList, err = service.GetServingEnvironments(api.ListOptions{
+ PageSize: &pageSize2,
+ NextPageToken: &truncatedList.NextPageToken,
+ })
+ suite.Nilf(err, "error getting ServingEnvironments: %v", err)
+
+ suite.Equal(2, int(truncatedList.Size))
+ suite.Equal("", truncatedList.NextPageToken, "next page token should be empty as list item returned")
+ suite.Equal(*secondEntity.Id, *truncatedList.Items[0].Id)
+ suite.Equal(*thirdEntity.Id, *truncatedList.Items[1].Id)
+}
+
+// INFERENCE SERVICE
+
+func (suite *CoreTestSuite) TestCreateInferenceService() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+ runtime := "model-server"
+ desiredState := openapi.INFERENCESERVICESTATE_DEPLOYED
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ Runtime: &runtime,
+ DesiredState: &desiredState,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %s: %v", parentResourceId, err)
+
+ suite.NotNilf(createdEntity.Id, "created eut should not have nil Id")
+
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+
+ byId, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *createdEntityId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+ suite.Equal(1, len(byId.Contexts), "there should be just one context saved in mlmd")
+
+ suite.Equal(*createdEntityId, *byId.Contexts[0].Id, "returned id should match the mlmd one")
+ suite.Equal(fmt.Sprintf("%s:%s", parentResourceId, entityName), *byId.Contexts[0].Name, "saved name should match the provided one")
+ suite.Equal(entityExternalId2, *byId.Contexts[0].ExternalId, "saved external id should match the provided one")
+ suite.Equal(customString, byId.Contexts[0].CustomProperties["custom_string_prop"].GetStringValue(), "saved custom_string_prop custom property should match the provided one")
+ suite.Equal(entityDescription, byId.Contexts[0].Properties["description"].GetStringValue(), "saved description should match the provided one")
+ suite.Equal(runtime, byId.Contexts[0].Properties["runtime"].GetStringValue(), "saved runtime should match the provided one")
+ suite.Equal(string(desiredState), byId.Contexts[0].Properties["desired_state"].GetStringValue(), "saved state should match the provided one")
+ suite.Equalf(*inferenceServiceTypeName, *byId.Contexts[0].Type, "saved context should be of type of %s", *inferenceServiceTypeName)
+
+ getAllResp, err := suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(3, len(getAllResp.Contexts), "there should be 3 contexts (RegisteredModel, ServingEnvironment, InferenceService) saved in mlmd")
+}
+
+func (suite *CoreTestSuite) TestCreateInferenceServiceFailure() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ ServingEnvironmentId: "9999",
+ RegisteredModelId: "9998",
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ _, err := service.UpsertInferenceService(eut)
+ suite.NotNil(err)
+ suite.Equal("no serving environment found for id 9999", err.Error())
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ eut.ServingEnvironmentId = parentResourceId
+
+ _, err = service.UpsertInferenceService(eut)
+ suite.NotNil(err)
+ suite.Equal("no registered model found for id 9998", err.Error())
+}
+
+func (suite *CoreTestSuite) TestUpdateInferenceService() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ suite.NotNilf(createdEntity.Id, "created eut should not have nil Id")
+
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+
+ newExternalId := "org.my_awesome_entity@v1"
+ newScore := 0.95
+
+ createdEntity.ExternalID = &newExternalId
+ (*createdEntity.CustomProperties)["score"] = openapi.MetadataValue{
+ MetadataDoubleValue: &openapi.MetadataDoubleValue{
+ DoubleValue: &newScore,
+ },
+ }
+
+ updatedEntity, err := service.UpsertInferenceService(createdEntity)
+ suite.Nilf(err, "error updating new entity for %s: %v", registeredModelId, err)
+
+ updateEntityId, _ := converter.StringToInt64(updatedEntity.Id)
+ suite.Equal(*createdEntityId, *updateEntityId, "created and updated should have same id")
+
+ byId, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *updateEntityId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+ suite.Equal(1, len(byId.Contexts), "there should be 1 context saved in mlmd by id")
+
+ suite.Equal(*updateEntityId, *byId.Contexts[0].Id, "returned id should match the mlmd one")
+ suite.Equal(fmt.Sprintf("%s:%s", parentResourceId, *eut.Name), *byId.Contexts[0].Name, "saved name should match the provided one")
+ suite.Equal(newExternalId, *byId.Contexts[0].ExternalId, "saved external id should match the provided one")
+ suite.Equal(customString, byId.Contexts[0].CustomProperties["custom_string_prop"].GetStringValue(), "saved custom_string_prop custom property should match the provided one")
+ suite.Equal(newScore, byId.Contexts[0].CustomProperties["score"].GetDoubleValue(), "saved score custom property should match the provided one")
+ suite.Equalf(*inferenceServiceTypeName, *byId.Contexts[0].Type, "saved context should be of type of %s", *inferenceServiceTypeName)
+
+ getAllResp, err := suite.mlmdClient.GetContexts(context.Background(), &proto.GetContextsRequest{})
+ suite.Nilf(err, "error retrieving all contexts, not related to the test itself: %v", err)
+ suite.Equal(3, len(getAllResp.Contexts), "there should be 3 contexts saved in mlmd")
+
+ // update with nil name
+ newExternalId = "org.my_awesome_entity_@v1"
+ updatedEntity.ExternalID = &newExternalId
+ updatedEntity.Name = nil
+ updatedEntity, err = service.UpsertInferenceService(updatedEntity)
+ suite.Nilf(err, "error updating new model version for %s: %v", updateEntityId, err)
+
+ updateEntityId, _ = converter.StringToInt64(updatedEntity.Id)
+ suite.Equal(*createdEntityId, *updateEntityId, "created and updated should have same id")
+
+ byId, err = suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *updateEntityId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context by type and name, not related to the test itself: %v", err)
+ suite.Equal(1, len(byId.Contexts), "there should be 1 context saved in mlmd by id")
+
+ suite.Equal(*updateEntityId, *byId.Contexts[0].Id, "returned id should match the mlmd one")
+ suite.Equal(fmt.Sprintf("%s:%s", parentResourceId, *eut.Name), *byId.Contexts[0].Name, "saved name should match the provided one")
+ suite.Equal(newExternalId, *byId.Contexts[0].ExternalId, "saved external id should match the provided one")
+ suite.Equal(customString, byId.Contexts[0].CustomProperties["custom_string_prop"].GetStringValue(), "saved custom_string_prop custom property should match the provided one")
+ suite.Equal(newScore, byId.Contexts[0].CustomProperties["score"].GetDoubleValue(), "saved score custom property should match the provided one")
+ suite.Equalf(*inferenceServiceTypeName, *byId.Contexts[0].Type, "saved context should be of type of %s", *inferenceServiceTypeName)
+
+ // update with empty registeredModelId
+ newExternalId = "org.my_awesome_entity_@v1"
+ prevRegModelId := updatedEntity.RegisteredModelId
+ updatedEntity.RegisteredModelId = ""
+ updatedEntity, err = service.UpsertInferenceService(updatedEntity)
+ suite.Nil(err)
+ suite.Equal(prevRegModelId, updatedEntity.RegisteredModelId)
+}
+
+func (suite *CoreTestSuite) TestUpdateInferenceServiceFailure() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ suite.NotNilf(createdEntity.Id, "created eut should not have nil Id")
+
+ newExternalId := "org.my_awesome_entity@v1"
+ newScore := 0.95
+
+ createdEntity.ExternalID = &newExternalId
+ (*createdEntity.CustomProperties)["score"] = openapi.MetadataValue{
+ MetadataDoubleValue: &openapi.MetadataDoubleValue{
+ DoubleValue: &newScore,
+ },
+ }
+
+ wrongId := "9999"
+ createdEntity.Id = &wrongId
+ _, err = service.UpsertInferenceService(createdEntity)
+ suite.NotNil(err)
+ suite.Equal(fmt.Sprintf("no InferenceService found for id %s", wrongId), err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetInferenceServiceById() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ state := openapi.INFERENCESERVICESTATE_UNDEPLOYED
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ DesiredState: &state,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ suite.NotNilf(createdEntity.Id, "created eut should not have nil Id")
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+
+ getById, err := service.GetInferenceServiceById(*createdEntity.Id)
+ suite.Nilf(err, "error getting model version with id %d", *createdEntityId)
+
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *createdEntityId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ suite.Equal(*getById.Id, *converter.Int64ToString(ctx.Id), "returned id should match the mlmd context one")
+ suite.Equal(*eut.Name, *getById.Name, "saved name should match the provided one")
+ suite.Equal(*eut.ExternalID, *getById.ExternalID, "saved external id should match the provided one")
+ suite.Equal(*eut.DesiredState, *getById.DesiredState, "saved state should match the provided one")
+ suite.Equal(*(*getById.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, customString, "saved custom_string_prop custom property should match the provided one")
+}
+
+func (suite *CoreTestSuite) TestGetRegisteredModelByInferenceServiceId() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+ suite.NotNilf(createdEntity.Id, "created eut should not have nil Id")
+
+ getRM, err := service.GetRegisteredModelByInferenceService(*createdEntity.Id)
+ suite.Nilf(err, "error getting using id %s", *createdEntity.Id)
+
+ suite.Equal(registeredModelId, *getRM.Id, "returned id should match the original registeredModelId")
+}
+
+func (suite *CoreTestSuite) TestGetModelVersionByInferenceServiceId() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ modelVersion1Name := "v1"
+ modelVersion1 := &openapi.ModelVersion{Name: &modelVersion1Name, Description: &modelVersionDescription}
+ createdVersion1, err := service.UpsertModelVersion(modelVersion1, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersion1Id := *createdVersion1.Id
+
+ modelVersion2Name := "v2"
+ modelVersion2 := &openapi.ModelVersion{Name: &modelVersion2Name, Description: &modelVersionDescription}
+ createdVersion2, err := service.UpsertModelVersion(modelVersion2, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersion2Id := *createdVersion2.Id
+ // end of data preparation
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ ModelVersionId: nil, // first we test by unspecified
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ getVModel, err := service.GetModelVersionByInferenceService(*createdEntity.Id)
+ suite.Nilf(err, "error getting using id %s", *createdEntity.Id)
+ suite.Equal(createdVersion2Id, *getVModel.Id, "returned id shall be the latest ModelVersion by creation order")
+
+ // here we used the returned entity (so ID is populated), and we update to specify the "ID of the ModelVersion to serve"
+ createdEntity.ModelVersionId = &createdVersion1Id
+ _, err = service.UpsertInferenceService(createdEntity)
+ suite.Nilf(err, "error updating eut for %v", parentResourceId)
+
+ getVModel, err = service.GetModelVersionByInferenceService(*createdEntity.Id)
+ suite.Nilf(err, "error getting using id %s", *createdEntity.Id)
+ suite.Equal(createdVersion1Id, *getVModel.Id, "returned id shall be the specified one")
+}
+
+func (suite *CoreTestSuite) TestGetModelArtifactByInferenceServiceId() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ modelVersion1Name := "v1"
+ modelVersion1 := &openapi.ModelVersion{Name: &modelVersion1Name, Description: &modelVersionDescription}
+ createdVersion1, err := service.UpsertModelVersion(modelVersion1, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %s", registeredModelId)
+ modelArtifact1Name := "v1-artifact"
+ modelArtifact1 := &openapi.ModelArtifact{Name: &modelArtifact1Name}
+ createdArtifact1, err := service.UpsertModelArtifact(modelArtifact1, createdVersion1.Id)
+ suite.Nilf(err, "error creating new model artifact for %s", *createdVersion1.Id)
+
+ modelVersion2Name := "v2"
+ modelVersion2 := &openapi.ModelVersion{Name: &modelVersion2Name, Description: &modelVersionDescription}
+ createdVersion2, err := service.UpsertModelVersion(modelVersion2, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %s", registeredModelId)
+ modelArtifact2Name := "v2-artifact"
+ modelArtifact2 := &openapi.ModelArtifact{Name: &modelArtifact2Name}
+ createdArtifact2, err := service.UpsertModelArtifact(modelArtifact2, createdVersion2.Id)
+ suite.Nilf(err, "error creating new model artifact for %s", *createdVersion2.Id)
+ // end of data preparation
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ ModelVersionId: nil, // first we test by unspecified
+ }
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ getModelArt, err := service.GetModelArtifactByInferenceService(*createdEntity.Id)
+ suite.Nilf(err, "error getting using id %s", *createdEntity.Id)
+ suite.Equal(*createdArtifact2.Id, *getModelArt.Id, "returned id shall be the latest ModelVersion by creation order")
+
+ // here we used the returned entity (so ID is populated), and we update to specify the "ID of the ModelVersion to serve"
+ createdEntity.ModelVersionId = createdVersion1.Id
+ _, err = service.UpsertInferenceService(createdEntity)
+ suite.Nilf(err, "error updating eut for %v", parentResourceId)
+
+ getModelArt, err = service.GetModelArtifactByInferenceService(*createdEntity.Id)
+ suite.Nilf(err, "error getting using id %s", *createdEntity.Id)
+ suite.Equal(*createdArtifact1.Id, *getModelArt.Id, "returned id shall be the specified one")
+}
+
+func (suite *CoreTestSuite) TestGetInferenceServiceByParamsWithNoResults() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+
+ _, err := service.GetInferenceServiceByParams(apiutils.Of("not-present"), &parentResourceId, nil)
+ suite.NotNil(err)
+ suite.Equal("no inference services found for name=not-present, servingEnvironmentId=1, externalId=", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetInferenceServiceByParamsName() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ suite.NotNilf(createdEntity.Id, "created eut should not have nil Id")
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+
+ getByName, err := service.GetInferenceServiceByParams(&entityName, &parentResourceId, nil)
+ suite.Nilf(err, "error getting model version by name %d", *createdEntityId)
+
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *createdEntityId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ suite.Equal(*converter.Int64ToString(ctx.Id), *getByName.Id, "returned id should match the mlmd context one")
+ suite.Equal(fmt.Sprintf("%s:%s", parentResourceId, *getByName.Name), *ctx.Name, "saved name should match the provided one")
+ suite.Equal(*ctx.ExternalId, *getByName.ExternalID, "saved external id should match the provided one")
+ suite.Equal(ctx.CustomProperties["custom_string_prop"].GetStringValue(), *(*getByName.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, "saved custom_string_prop custom property should match the provided one")
+}
+
+func (suite *CoreTestSuite) TestGetInfernenceServiceByParamsExternalId() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ suite.NotNilf(createdEntity.Id, "created eut should not have nil Id")
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+
+ getByExternalId, err := service.GetInferenceServiceByParams(nil, nil, eut.ExternalID)
+ suite.Nilf(err, "error getting by external id %d", *eut.ExternalID)
+
+ ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{
+ ContextIds: []int64{
+ *createdEntityId,
+ },
+ })
+ suite.Nilf(err, "error retrieving context, not related to the test itself: %v", err)
+
+ ctx := ctxById.Contexts[0]
+ suite.Equal(*converter.Int64ToString(ctx.Id), *getByExternalId.Id, "returned id should match the mlmd context one")
+ suite.Equal(fmt.Sprintf("%s:%s", parentResourceId, *getByExternalId.Name), *ctx.Name, "saved name should match the provided one")
+ suite.Equal(*ctx.ExternalId, *getByExternalId.ExternalID, "saved external id should match the provided one")
+ suite.Equal(ctx.CustomProperties["custom_string_prop"].GetStringValue(), *(*getByExternalId.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, "saved custom_string_prop custom property should match the provided one")
+}
+
+func (suite *CoreTestSuite) TestGetInferenceServiceByEmptyParams() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ eut := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertInferenceService(eut)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ suite.NotNilf(createdEntity.Id, "created eut should not have nil Id")
+
+ _, err = service.GetInferenceServiceByParams(nil, nil, nil)
+ suite.NotNil(err)
+ suite.Equal("invalid parameters call, supply either (name and servingEnvironmentId), or externalId", err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetInferenceServices() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ parentResourceId := suite.registerServingEnvironment(service, nil, nil)
+ registeredModelId := suite.registerModel(service, nil, nil)
+
+ eut1 := &openapi.InferenceService{
+ Name: &entityName,
+ ExternalID: &entityExternalId2,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ Runtime: apiutils.Of("model-server0"),
+ }
+
+ secondName := "v2"
+ secondExtId := "org.myawesomeentity@v2"
+ eut2 := &openapi.InferenceService{
+ Name: &secondName,
+ ExternalID: &secondExtId,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ Runtime: apiutils.Of("model-server1"),
+ }
+
+ thirdName := "v3"
+ thirdExtId := "org.myawesomeentity@v3"
+ eut3 := &openapi.InferenceService{
+ Name: &thirdName,
+ ExternalID: &thirdExtId,
+ ServingEnvironmentId: parentResourceId,
+ RegisteredModelId: registeredModelId,
+ Runtime: apiutils.Of("model-server2"),
+ }
+
+ createdEntity1, err := service.UpsertInferenceService(eut1)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ createdEntity2, err := service.UpsertInferenceService(eut2)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ createdEntity3, err := service.UpsertInferenceService(eut3)
+ suite.Nilf(err, "error creating new eut for %v", parentResourceId)
+
+ anotherParentResourceName := "AnotherModel"
+ anotherParentResourceExtId := "org.another"
+ anotherParentResourceId := suite.registerServingEnvironment(service, &anotherParentResourceName, &anotherParentResourceExtId)
+
+ anotherName := "v1.0"
+ anotherExtId := "org.another@v1.0"
+ eutAnother := &openapi.InferenceService{
+ Name: &anotherName,
+ ExternalID: &anotherExtId,
+ ServingEnvironmentId: anotherParentResourceId,
+ RegisteredModelId: registeredModelId,
+ Runtime: apiutils.Of("model-server3"),
+ }
+
+ _, err = service.UpsertInferenceService(eutAnother)
+ suite.Nilf(err, "error creating new model version for %d", anotherParentResourceId)
+
+ createdId1, _ := converter.StringToInt64(createdEntity1.Id)
+ createdId2, _ := converter.StringToInt64(createdEntity2.Id)
+ createdId3, _ := converter.StringToInt64(createdEntity3.Id)
+
+ getAll, err := service.GetInferenceServices(api.ListOptions{}, nil, nil)
+ suite.Nilf(err, "error getting all")
+ suite.Equal(int32(4), getAll.Size, "expected 4 across all parent resources")
+
+ getAllByParentResource, err := service.GetInferenceServices(api.ListOptions{}, &parentResourceId, nil)
+ suite.Nilf(err, "error getting all")
+ suite.Equalf(int32(3), getAllByParentResource.Size, "expected 3 for parent resource %d", parentResourceId)
+
+ suite.Equal(*converter.Int64ToString(createdId1), *getAllByParentResource.Items[0].Id)
+ suite.Equal(*converter.Int64ToString(createdId2), *getAllByParentResource.Items[1].Id)
+ suite.Equal(*converter.Int64ToString(createdId3), *getAllByParentResource.Items[2].Id)
+
+ modelServer := "model-server1"
+ getAllByParentResourceAndRuntime, err := service.GetInferenceServices(api.ListOptions{}, &parentResourceId, &modelServer)
+ suite.Nilf(err, "error getting all")
+ suite.Equalf(int32(1), getAllByParentResourceAndRuntime.Size, "expected 1 for parent resource %s and runtime %s", parentResourceId, modelServer)
+
+ suite.Equal(*converter.Int64ToString(createdId1), *getAllByParentResource.Items[0].Id)
+
+ // order by last update time, expecting last created as first
+ orderByLastUpdate := "LAST_UPDATE_TIME"
+ getAllByParentResource, err = service.GetInferenceServices(api.ListOptions{
+ OrderBy: &orderByLastUpdate,
+ SortOrder: &descOrderDirection,
+ }, &parentResourceId, nil)
+ suite.Nilf(err, "error getting all")
+ suite.Equalf(int32(3), getAllByParentResource.Size, "expected 3 for parent resource %d", parentResourceId)
+
+ suite.Equal(*converter.Int64ToString(createdId1), *getAllByParentResource.Items[2].Id)
+ suite.Equal(*converter.Int64ToString(createdId2), *getAllByParentResource.Items[1].Id)
+ suite.Equal(*converter.Int64ToString(createdId3), *getAllByParentResource.Items[0].Id)
+
+ // update the second entity
+ newExternalId := "updated.org:v2"
+ createdEntity2.ExternalID = &newExternalId
+ createdEntity2, err = service.UpsertInferenceService(createdEntity2)
+ suite.Nilf(err, "error creating new eut2 for %d", parentResourceId)
+
+ suite.Equal(newExternalId, *createdEntity2.ExternalID)
+
+ getAllByParentResource, err = service.GetInferenceServices(api.ListOptions{
+ OrderBy: &orderByLastUpdate,
+ SortOrder: &descOrderDirection,
+ }, &parentResourceId, nil)
+ suite.Nilf(err, "error getting all")
+ suite.Equalf(int32(3), getAllByParentResource.Size, "expected 3 for parent resource %d", parentResourceId)
+
+ suite.Equal(*converter.Int64ToString(createdId1), *getAllByParentResource.Items[2].Id)
+ suite.Equal(*converter.Int64ToString(createdId2), *getAllByParentResource.Items[0].Id)
+ suite.Equal(*converter.Int64ToString(createdId3), *getAllByParentResource.Items[1].Id)
+}
+
+// SERVE MODEL
+
+func (suite *CoreTestSuite) TestCreateServeModel() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+ inferenceServiceId := suite.registerInferenceService(service, registeredModelId, nil, nil, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Description: &modelVersionDescription,
+ Author: &author,
+ }
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersionId := *createdVersion.Id
+ createdVersionIdAsInt, _ := converter.StringToInt64(&createdVersionId)
+ // end of data preparation
+
+ eut := &openapi.ServeModel{
+ LastKnownState: (*openapi.ExecutionState)(&executionState),
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ Name: &entityName,
+ ModelVersionId: createdVersionId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertServeModel(eut, &inferenceServiceId)
+ suite.Nilf(err, "error creating new ServeModel for %d", inferenceServiceId)
+ suite.NotNil(createdEntity.Id, "created id should not be nil")
+
+ state, _ := openapi.NewExecutionStateFromValue(executionState)
+ suite.Equal(entityName, *createdEntity.Name)
+ suite.Equal(*state, *createdEntity.LastKnownState)
+ suite.Equal(createdVersionId, createdEntity.ModelVersionId)
+ suite.Equal(entityDescription, *createdEntity.Description)
+ suite.Equal(customString, *(*createdEntity.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue)
+
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+ getById, err := suite.mlmdClient.GetExecutionsByID(context.Background(), &proto.GetExecutionsByIDRequest{
+ ExecutionIds: []int64{*createdEntityId},
+ })
+ suite.Nilf(err, "error getting Execution by id %d", createdEntityId)
+
+ suite.Equal(*createdEntityId, *getById.Executions[0].Id)
+ suite.Equal(fmt.Sprintf("%s:%s", inferenceServiceId, *createdEntity.Name), *getById.Executions[0].Name)
+ suite.Equal(string(*createdEntity.LastKnownState), getById.Executions[0].LastKnownState.String())
+ suite.Equal(*createdVersionIdAsInt, getById.Executions[0].Properties["model_version_id"].GetIntValue())
+ suite.Equal(*createdEntity.Description, getById.Executions[0].Properties["description"].GetStringValue())
+ suite.Equal(*(*createdEntity.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, getById.Executions[0].CustomProperties["custom_string_prop"].GetStringValue())
+
+ inferenceServiceIdAsInt, _ := converter.StringToInt64(&inferenceServiceId)
+ byCtx, _ := suite.mlmdClient.GetExecutionsByContext(context.Background(), &proto.GetExecutionsByContextRequest{
+ ContextId: (*int64)(inferenceServiceIdAsInt),
+ })
+ suite.Equal(1, len(byCtx.Executions))
+ suite.Equal(*createdEntityId, *byCtx.Executions[0].Id)
+}
+
+func (suite *CoreTestSuite) TestCreateServeModelFailure() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+ inferenceServiceId := suite.registerInferenceService(service, registeredModelId, nil, nil, nil, nil)
+ // end of data preparation
+
+ eut := &openapi.ServeModel{
+ LastKnownState: (*openapi.ExecutionState)(&executionState),
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ Name: &entityName,
+ ModelVersionId: "9998",
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ _, err := service.UpsertServeModel(eut, nil)
+ suite.NotNil(err)
+ suite.Equal("missing inferenceServiceId, cannot create ServeModel without parent resource InferenceService", err.Error())
+
+ _, err = service.UpsertServeModel(eut, &inferenceServiceId)
+ suite.NotNil(err)
+ suite.Equal("no model version found for id 9998", err.Error())
+}
+
+func (suite *CoreTestSuite) TestUpdateServeModel() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+ inferenceServiceId := suite.registerInferenceService(service, registeredModelId, nil, nil, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Description: &modelVersionDescription,
+ Author: &author,
+ }
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersionId := *createdVersion.Id
+ createdVersionIdAsInt, _ := converter.StringToInt64(&createdVersionId)
+ // end of data preparation
+
+ eut := &openapi.ServeModel{
+ LastKnownState: (*openapi.ExecutionState)(&executionState),
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ Name: &entityName,
+ ModelVersionId: createdVersionId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertServeModel(eut, &inferenceServiceId)
+ suite.Nilf(err, "error creating new ServeModel for %d", inferenceServiceId)
+
+ newState := "UNKNOWN"
+ createdEntity.LastKnownState = (*openapi.ExecutionState)(&newState)
+ updatedEntity, err := service.UpsertServeModel(createdEntity, &inferenceServiceId)
+ suite.Nilf(err, "error updating entity for %d: %v", inferenceServiceId, err)
+
+ createdEntityId, _ := converter.StringToInt64(createdEntity.Id)
+ updatedEntityId, _ := converter.StringToInt64(updatedEntity.Id)
+ suite.Equal(createdEntityId, updatedEntityId)
+
+ getById, err := suite.mlmdClient.GetExecutionsByID(context.Background(), &proto.GetExecutionsByIDRequest{
+ ExecutionIds: []int64{*createdEntityId},
+ })
+ suite.Nilf(err, "error getting by id %d", createdEntityId)
+
+ suite.Equal(*createdEntityId, *getById.Executions[0].Id)
+ suite.Equal(fmt.Sprintf("%s:%s", inferenceServiceId, *createdEntity.Name), *getById.Executions[0].Name)
+ suite.Equal(string(newState), getById.Executions[0].LastKnownState.String())
+ suite.Equal(*createdVersionIdAsInt, getById.Executions[0].Properties["model_version_id"].GetIntValue())
+ suite.Equal(*(*createdEntity.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, getById.Executions[0].CustomProperties["custom_string_prop"].GetStringValue())
+
+ prevModelVersionId := updatedEntity.ModelVersionId
+ updatedEntity.ModelVersionId = ""
+ updatedEntity, err = service.UpsertServeModel(updatedEntity, &inferenceServiceId)
+ suite.Nilf(err, "error updating entity for %d: %v", inferenceServiceId, err)
+ suite.Equal(prevModelVersionId, updatedEntity.ModelVersionId)
+}
+
+func (suite *CoreTestSuite) TestUpdateServeModelFailure() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+ inferenceServiceId := suite.registerInferenceService(service, registeredModelId, nil, nil, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Description: &modelVersionDescription,
+ Author: &author,
+ }
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersionId := *createdVersion.Id
+ // end of data preparation
+
+ eut := &openapi.ServeModel{
+ LastKnownState: (*openapi.ExecutionState)(&executionState),
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ Name: &entityName,
+ ModelVersionId: createdVersionId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertServeModel(eut, &inferenceServiceId)
+ suite.Nilf(err, "error creating new ServeModel for %d", inferenceServiceId)
+ suite.NotNil(createdEntity.Id, "created id should not be nil")
+
+ newState := "UNKNOWN"
+ createdEntity.LastKnownState = (*openapi.ExecutionState)(&newState)
+ updatedEntity, err := service.UpsertServeModel(createdEntity, &inferenceServiceId)
+ suite.Nilf(err, "error updating entity for %d: %v", inferenceServiceId, err)
+
+ wrongId := "9998"
+ updatedEntity.Id = &wrongId
+ _, err = service.UpsertServeModel(updatedEntity, &inferenceServiceId)
+ suite.NotNil(err)
+ suite.Equal(fmt.Sprintf("no ServeModel found for id %s", wrongId), err.Error())
+}
+
+func (suite *CoreTestSuite) TestGetServeModelById() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+ inferenceServiceId := suite.registerInferenceService(service, registeredModelId, nil, nil, nil, nil)
+
+ modelVersion := &openapi.ModelVersion{
+ Name: &modelVersionName,
+ ExternalID: &versionExternalId,
+ Description: &modelVersionDescription,
+ Author: &author,
+ }
+ createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersionId := *createdVersion.Id
+ // end of data preparation
+
+ eut := &openapi.ServeModel{
+ LastKnownState: (*openapi.ExecutionState)(&executionState),
+ ExternalID: &entityExternalId2,
+ Description: &entityDescription,
+ Name: &entityName,
+ ModelVersionId: createdVersionId,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity, err := service.UpsertServeModel(eut, &inferenceServiceId)
+ suite.Nilf(err, "error creating new ServeModel for %d", inferenceServiceId)
+
+ getById, err := service.GetServeModelById(*createdEntity.Id)
+ suite.Nilf(err, "error getting entity by id %d", *createdEntity.Id)
+
+ state, _ := openapi.NewExecutionStateFromValue(executionState)
+ suite.NotNil(createdEntity.Id, "created artifact id should not be nil")
+ suite.Equal(entityName, *getById.Name)
+ suite.Equal(*state, *getById.LastKnownState)
+ suite.Equal(createdVersionId, getById.ModelVersionId)
+ suite.Equal(customString, *(*getById.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue)
+
+ suite.Equal(*createdEntity, *getById, "artifacts returned during creation and on get by id should be equal")
+}
+
+func (suite *CoreTestSuite) TestGetServeModels() {
+ // create mode registry service
+ service := suite.setupModelRegistryService()
+
+ registeredModelId := suite.registerModel(service, nil, nil)
+ inferenceServiceId := suite.registerInferenceService(service, registeredModelId, nil, nil, nil, nil)
+
+ modelVersion1Name := "v1"
+ modelVersion1 := &openapi.ModelVersion{Name: &modelVersion1Name, Description: &modelVersionDescription}
+ createdVersion1, err := service.UpsertModelVersion(modelVersion1, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersion1Id := *createdVersion1.Id
+
+ modelVersion2Name := "v2"
+ modelVersion2 := &openapi.ModelVersion{Name: &modelVersion2Name, Description: &modelVersionDescription}
+ createdVersion2, err := service.UpsertModelVersion(modelVersion2, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersion2Id := *createdVersion2.Id
+
+ modelVersion3Name := "v3"
+ modelVersion3 := &openapi.ModelVersion{Name: &modelVersion3Name, Description: &modelVersionDescription}
+ createdVersion3, err := service.UpsertModelVersion(modelVersion3, ®isteredModelId)
+ suite.Nilf(err, "error creating new model version for %d", registeredModelId)
+ createdVersion3Id := *createdVersion3.Id
+ // end of data preparation
+
+ eut1Name := "sm1"
+ eut1 := &openapi.ServeModel{
+ LastKnownState: (*openapi.ExecutionState)(&executionState),
+ Description: &entityDescription,
+ Name: &eut1Name,
+ ModelVersionId: createdVersion1Id,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ eut2Name := "sm2"
+ eut2 := &openapi.ServeModel{
+ LastKnownState: (*openapi.ExecutionState)(&executionState),
+ Description: &entityDescription,
+ Name: &eut2Name,
+ ModelVersionId: createdVersion2Id,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ eut3Name := "sm3"
+ eut3 := &openapi.ServeModel{
+ LastKnownState: (*openapi.ExecutionState)(&executionState),
+ Description: &entityDescription,
+ Name: &eut3Name,
+ ModelVersionId: createdVersion3Id,
+ CustomProperties: &map[string]openapi.MetadataValue{
+ "custom_string_prop": {
+ MetadataStringValue: &openapi.MetadataStringValue{
+ StringValue: &customString,
+ },
+ },
+ },
+ }
+
+ createdEntity1, err := service.UpsertServeModel(eut1, &inferenceServiceId)
+ suite.Nilf(err, "error creating new ServeModel for %d", inferenceServiceId)
+ createdEntity2, err := service.UpsertServeModel(eut2, &inferenceServiceId)
+ suite.Nilf(err, "error creating new ServeModel for %d", inferenceServiceId)
+ createdEntity3, err := service.UpsertServeModel(eut3, &inferenceServiceId)
+ suite.Nilf(err, "error creating new ServeModel for %d", inferenceServiceId)
+
+ createdEntityId1, _ := converter.StringToInt64(createdEntity1.Id)
+ createdEntityId2, _ := converter.StringToInt64(createdEntity2.Id)
+ createdEntityId3, _ := converter.StringToInt64(createdEntity3.Id)
+
+ getAll, err := service.GetServeModels(api.ListOptions{}, nil)
+ suite.Nilf(err, "error getting all ServeModel")
+ suite.Equalf(int32(3), getAll.Size, "expected three ServeModel")
+
+ suite.Equal(*converter.Int64ToString(createdEntityId1), *getAll.Items[0].Id)
+ suite.Equal(*converter.Int64ToString(createdEntityId2), *getAll.Items[1].Id)
+ suite.Equal(*converter.Int64ToString(createdEntityId3), *getAll.Items[2].Id)
+
+ orderByLastUpdate := "LAST_UPDATE_TIME"
+ getAllByInferenceService, err := service.GetServeModels(api.ListOptions{
+ OrderBy: &orderByLastUpdate,
+ SortOrder: &descOrderDirection,
+ }, &inferenceServiceId)
+ suite.Nilf(err, "error getting all ServeModels for %d", inferenceServiceId)
+ suite.Equalf(int32(3), getAllByInferenceService.Size, "expected three ServeModels for InferenceServiceId %d", inferenceServiceId)
+
+ suite.Equal(*converter.Int64ToString(createdEntityId1), *getAllByInferenceService.Items[2].Id)
+ suite.Equal(*converter.Int64ToString(createdEntityId2), *getAllByInferenceService.Items[1].Id)
+ suite.Equal(*converter.Int64ToString(createdEntityId3), *getAllByInferenceService.Items[0].Id)
+}
diff --git a/pkg/openapi/.openapi-generator/FILES b/pkg/openapi/.openapi-generator/FILES
new file mode 100644
index 000000000..6f119555b
--- /dev/null
+++ b/pkg/openapi/.openapi-generator/FILES
@@ -0,0 +1,56 @@
+api_model_registry_service.go
+client.go
+configuration.go
+model_artifact.go
+model_artifact_list.go
+model_artifact_state.go
+model_base_artifact.go
+model_base_artifact_create.go
+model_base_artifact_update.go
+model_base_execution.go
+model_base_execution_create.go
+model_base_execution_update.go
+model_base_resource.go
+model_base_resource_create.go
+model_base_resource_list.go
+model_base_resource_update.go
+model_error.go
+model_execution_state.go
+model_inference_service.go
+model_inference_service_create.go
+model_inference_service_list.go
+model_inference_service_state.go
+model_inference_service_update.go
+model_metadata_bool_value.go
+model_metadata_double_value.go
+model_metadata_int_value.go
+model_metadata_proto_value.go
+model_metadata_string_value.go
+model_metadata_struct_value.go
+model_metadata_value.go
+model_model_artifact.go
+model_model_artifact_create.go
+model_model_artifact_list.go
+model_model_artifact_update.go
+model_model_version.go
+model_model_version_create.go
+model_model_version_list.go
+model_model_version_state.go
+model_model_version_update.go
+model_order_by_field.go
+model_registered_model.go
+model_registered_model_create.go
+model_registered_model_list.go
+model_registered_model_state.go
+model_registered_model_update.go
+model_serve_model.go
+model_serve_model_create.go
+model_serve_model_list.go
+model_serve_model_update.go
+model_serving_environment.go
+model_serving_environment_create.go
+model_serving_environment_list.go
+model_serving_environment_update.go
+model_sort_order.go
+response.go
+utils.go
diff --git a/pkg/openapi/.openapi-generator/VERSION b/pkg/openapi/.openapi-generator/VERSION
new file mode 100644
index 000000000..73a86b197
--- /dev/null
+++ b/pkg/openapi/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.0.1
\ No newline at end of file
diff --git a/pkg/openapi/api_model_registry_service.go b/pkg/openapi/api_model_registry_service.go
new file mode 100644
index 000000000..839c31062
--- /dev/null
+++ b/pkg/openapi/api_model_registry_service.go
@@ -0,0 +1,5572 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "bytes"
+ "context"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// ModelRegistryServiceAPIService ModelRegistryServiceAPI service
+type ModelRegistryServiceAPIService service
+
+type ApiCreateEnvironmentInferenceServiceRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ servingenvironmentId string
+ inferenceServiceCreate *InferenceServiceCreate
+}
+
+// A new `InferenceService` to be created.
+func (r ApiCreateEnvironmentInferenceServiceRequest) InferenceServiceCreate(inferenceServiceCreate InferenceServiceCreate) ApiCreateEnvironmentInferenceServiceRequest {
+ r.inferenceServiceCreate = &inferenceServiceCreate
+ return r
+}
+
+func (r ApiCreateEnvironmentInferenceServiceRequest) Execute() (*InferenceService, *http.Response, error) {
+ return r.ApiService.CreateEnvironmentInferenceServiceExecute(r)
+}
+
+/*
+CreateEnvironmentInferenceService Create a InferenceService in ServingEnvironment
+
+Creates a new instance of a `InferenceService`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param servingenvironmentId A unique identifier for a `ServingEnvironment`.
+ @return ApiCreateEnvironmentInferenceServiceRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateEnvironmentInferenceService(ctx context.Context, servingenvironmentId string) ApiCreateEnvironmentInferenceServiceRequest {
+ return ApiCreateEnvironmentInferenceServiceRequest{
+ ApiService: a,
+ ctx: ctx,
+ servingenvironmentId: servingenvironmentId,
+ }
+}
+
+// Execute executes the request
+//
+// @return InferenceService
+func (a *ModelRegistryServiceAPIService) CreateEnvironmentInferenceServiceExecute(r ApiCreateEnvironmentInferenceServiceRequest) (*InferenceService, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *InferenceService
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateEnvironmentInferenceService")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}/inference_services"
+ localVarPath = strings.Replace(localVarPath, "{"+"servingenvironmentId"+"}", url.PathEscape(parameterValueToString(r.servingenvironmentId, "servingenvironmentId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.inferenceServiceCreate == nil {
+ return localVarReturnValue, nil, reportError("inferenceServiceCreate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.inferenceServiceCreate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateInferenceServiceRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ inferenceServiceCreate *InferenceServiceCreate
+}
+
+// A new `InferenceService` to be created.
+func (r ApiCreateInferenceServiceRequest) InferenceServiceCreate(inferenceServiceCreate InferenceServiceCreate) ApiCreateInferenceServiceRequest {
+ r.inferenceServiceCreate = &inferenceServiceCreate
+ return r
+}
+
+func (r ApiCreateInferenceServiceRequest) Execute() (*InferenceService, *http.Response, error) {
+ return r.ApiService.CreateInferenceServiceExecute(r)
+}
+
+/*
+CreateInferenceService Create a InferenceService
+
+Creates a new instance of a `InferenceService`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiCreateInferenceServiceRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateInferenceService(ctx context.Context) ApiCreateInferenceServiceRequest {
+ return ApiCreateInferenceServiceRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return InferenceService
+func (a *ModelRegistryServiceAPIService) CreateInferenceServiceExecute(r ApiCreateInferenceServiceRequest) (*InferenceService, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *InferenceService
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateInferenceService")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_services"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.inferenceServiceCreate == nil {
+ return localVarReturnValue, nil, reportError("inferenceServiceCreate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.inferenceServiceCreate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateInferenceServiceServeRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ inferenceserviceId string
+ serveModelCreate *ServeModelCreate
+}
+
+// A new `ServeModel` to be associated with the `InferenceService`.
+func (r ApiCreateInferenceServiceServeRequest) ServeModelCreate(serveModelCreate ServeModelCreate) ApiCreateInferenceServiceServeRequest {
+ r.serveModelCreate = &serveModelCreate
+ return r
+}
+
+func (r ApiCreateInferenceServiceServeRequest) Execute() (*ServeModel, *http.Response, error) {
+ return r.ApiService.CreateInferenceServiceServeExecute(r)
+}
+
+/*
+CreateInferenceServiceServe Create a ServeModel action in a InferenceService
+
+Creates a new instance of a `ServeModel` associated with `InferenceService`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param inferenceserviceId A unique identifier for a `InferenceService`.
+ @return ApiCreateInferenceServiceServeRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateInferenceServiceServe(ctx context.Context, inferenceserviceId string) ApiCreateInferenceServiceServeRequest {
+ return ApiCreateInferenceServiceServeRequest{
+ ApiService: a,
+ ctx: ctx,
+ inferenceserviceId: inferenceserviceId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ServeModel
+func (a *ModelRegistryServiceAPIService) CreateInferenceServiceServeExecute(r ApiCreateInferenceServiceServeRequest) (*ServeModel, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ServeModel
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateInferenceServiceServe")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/serves"
+ localVarPath = strings.Replace(localVarPath, "{"+"inferenceserviceId"+"}", url.PathEscape(parameterValueToString(r.inferenceserviceId, "inferenceserviceId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.serveModelCreate == nil {
+ return localVarReturnValue, nil, reportError("serveModelCreate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.serveModelCreate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateModelArtifactRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ modelArtifactCreate *ModelArtifactCreate
+}
+
+// A new `ModelArtifact` to be created.
+func (r ApiCreateModelArtifactRequest) ModelArtifactCreate(modelArtifactCreate ModelArtifactCreate) ApiCreateModelArtifactRequest {
+ r.modelArtifactCreate = &modelArtifactCreate
+ return r
+}
+
+func (r ApiCreateModelArtifactRequest) Execute() (*ModelArtifact, *http.Response, error) {
+ return r.ApiService.CreateModelArtifactExecute(r)
+}
+
+/*
+CreateModelArtifact Create a ModelArtifact
+
+Creates a new instance of a `ModelArtifact`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiCreateModelArtifactRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateModelArtifact(ctx context.Context) ApiCreateModelArtifactRequest {
+ return ApiCreateModelArtifactRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelArtifact
+func (a *ModelRegistryServiceAPIService) CreateModelArtifactExecute(r ApiCreateModelArtifactRequest) (*ModelArtifact, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelArtifact
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateModelArtifact")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_artifacts"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.modelArtifactCreate == nil {
+ return localVarReturnValue, nil, reportError("modelArtifactCreate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.modelArtifactCreate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateModelVersionRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ modelVersionCreate *ModelVersionCreate
+}
+
+// A new `ModelVersion` to be created.
+func (r ApiCreateModelVersionRequest) ModelVersionCreate(modelVersionCreate ModelVersionCreate) ApiCreateModelVersionRequest {
+ r.modelVersionCreate = &modelVersionCreate
+ return r
+}
+
+func (r ApiCreateModelVersionRequest) Execute() (*ModelVersion, *http.Response, error) {
+ return r.ApiService.CreateModelVersionExecute(r)
+}
+
+/*
+CreateModelVersion Create a ModelVersion
+
+Creates a new instance of a `ModelVersion`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiCreateModelVersionRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateModelVersion(ctx context.Context) ApiCreateModelVersionRequest {
+ return ApiCreateModelVersionRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelVersion
+func (a *ModelRegistryServiceAPIService) CreateModelVersionExecute(r ApiCreateModelVersionRequest) (*ModelVersion, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelVersion
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateModelVersion")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_versions"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.modelVersionCreate == nil {
+ return localVarReturnValue, nil, reportError("modelVersionCreate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.modelVersionCreate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateModelVersionArtifactRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ modelversionId string
+ artifact *Artifact
+}
+
+// A new or existing `Artifact` to be associated with the `ModelVersion`.
+func (r ApiCreateModelVersionArtifactRequest) Artifact(artifact Artifact) ApiCreateModelVersionArtifactRequest {
+ r.artifact = &artifact
+ return r
+}
+
+func (r ApiCreateModelVersionArtifactRequest) Execute() (*Artifact, *http.Response, error) {
+ return r.ApiService.CreateModelVersionArtifactExecute(r)
+}
+
+/*
+CreateModelVersionArtifact Create an Artifact in a ModelVersion
+
+Creates a new instance of an Artifact if needed and associates it with `ModelVersion`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param modelversionId A unique identifier for a `ModelVersion`.
+ @return ApiCreateModelVersionArtifactRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateModelVersionArtifact(ctx context.Context, modelversionId string) ApiCreateModelVersionArtifactRequest {
+ return ApiCreateModelVersionArtifactRequest{
+ ApiService: a,
+ ctx: ctx,
+ modelversionId: modelversionId,
+ }
+}
+
+// Execute executes the request
+//
+// @return Artifact
+func (a *ModelRegistryServiceAPIService) CreateModelVersionArtifactExecute(r ApiCreateModelVersionArtifactRequest) (*Artifact, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *Artifact
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateModelVersionArtifact")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_versions/{modelversionId}/artifacts"
+ localVarPath = strings.Replace(localVarPath, "{"+"modelversionId"+"}", url.PathEscape(parameterValueToString(r.modelversionId, "modelversionId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.artifact == nil {
+ return localVarReturnValue, nil, reportError("artifact is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.artifact
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateRegisteredModelRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ registeredModelCreate *RegisteredModelCreate
+}
+
+// A new `RegisteredModel` to be created.
+func (r ApiCreateRegisteredModelRequest) RegisteredModelCreate(registeredModelCreate RegisteredModelCreate) ApiCreateRegisteredModelRequest {
+ r.registeredModelCreate = ®isteredModelCreate
+ return r
+}
+
+func (r ApiCreateRegisteredModelRequest) Execute() (*RegisteredModel, *http.Response, error) {
+ return r.ApiService.CreateRegisteredModelExecute(r)
+}
+
+/*
+CreateRegisteredModel Create a RegisteredModel
+
+Creates a new instance of a `RegisteredModel`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiCreateRegisteredModelRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateRegisteredModel(ctx context.Context) ApiCreateRegisteredModelRequest {
+ return ApiCreateRegisteredModelRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return RegisteredModel
+func (a *ModelRegistryServiceAPIService) CreateRegisteredModelExecute(r ApiCreateRegisteredModelRequest) (*RegisteredModel, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *RegisteredModel
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateRegisteredModel")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/registered_models"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.registeredModelCreate == nil {
+ return localVarReturnValue, nil, reportError("registeredModelCreate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.registeredModelCreate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateRegisteredModelVersionRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ registeredmodelId string
+ modelVersion *ModelVersion
+}
+
+// A new `ModelVersion` to be created.
+func (r ApiCreateRegisteredModelVersionRequest) ModelVersion(modelVersion ModelVersion) ApiCreateRegisteredModelVersionRequest {
+ r.modelVersion = &modelVersion
+ return r
+}
+
+func (r ApiCreateRegisteredModelVersionRequest) Execute() (*ModelVersion, *http.Response, error) {
+ return r.ApiService.CreateRegisteredModelVersionExecute(r)
+}
+
+/*
+CreateRegisteredModelVersion Create a ModelVersion in RegisteredModel
+
+Creates a new instance of a `ModelVersion`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param registeredmodelId A unique identifier for a `RegisteredModel`.
+ @return ApiCreateRegisteredModelVersionRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateRegisteredModelVersion(ctx context.Context, registeredmodelId string) ApiCreateRegisteredModelVersionRequest {
+ return ApiCreateRegisteredModelVersionRequest{
+ ApiService: a,
+ ctx: ctx,
+ registeredmodelId: registeredmodelId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelVersion
+func (a *ModelRegistryServiceAPIService) CreateRegisteredModelVersionExecute(r ApiCreateRegisteredModelVersionRequest) (*ModelVersion, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelVersion
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateRegisteredModelVersion")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}/versions"
+ localVarPath = strings.Replace(localVarPath, "{"+"registeredmodelId"+"}", url.PathEscape(parameterValueToString(r.registeredmodelId, "registeredmodelId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.modelVersion == nil {
+ return localVarReturnValue, nil, reportError("modelVersion is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.modelVersion
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateServingEnvironmentRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ servingEnvironmentCreate *ServingEnvironmentCreate
+}
+
+// A new `ServingEnvironment` to be created.
+func (r ApiCreateServingEnvironmentRequest) ServingEnvironmentCreate(servingEnvironmentCreate ServingEnvironmentCreate) ApiCreateServingEnvironmentRequest {
+ r.servingEnvironmentCreate = &servingEnvironmentCreate
+ return r
+}
+
+func (r ApiCreateServingEnvironmentRequest) Execute() (*ServingEnvironment, *http.Response, error) {
+ return r.ApiService.CreateServingEnvironmentExecute(r)
+}
+
+/*
+CreateServingEnvironment Create a ServingEnvironment
+
+Creates a new instance of a `ServingEnvironment`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiCreateServingEnvironmentRequest
+*/
+func (a *ModelRegistryServiceAPIService) CreateServingEnvironment(ctx context.Context) ApiCreateServingEnvironmentRequest {
+ return ApiCreateServingEnvironmentRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ServingEnvironment
+func (a *ModelRegistryServiceAPIService) CreateServingEnvironmentExecute(r ApiCreateServingEnvironmentRequest) (*ServingEnvironment, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ServingEnvironment
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.CreateServingEnvironment")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/serving_environments"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.servingEnvironmentCreate == nil {
+ return localVarReturnValue, nil, reportError("servingEnvironmentCreate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.servingEnvironmentCreate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiFindInferenceServiceRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ name *string
+ externalID *string
+}
+
+// Name of entity to search.
+func (r ApiFindInferenceServiceRequest) Name(name string) ApiFindInferenceServiceRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiFindInferenceServiceRequest) ExternalID(externalID string) ApiFindInferenceServiceRequest {
+ r.externalID = &externalID
+ return r
+}
+
+func (r ApiFindInferenceServiceRequest) Execute() (*InferenceService, *http.Response, error) {
+ return r.ApiService.FindInferenceServiceExecute(r)
+}
+
+/*
+FindInferenceService Get an InferenceServices that matches search parameters.
+
+Gets the details of a single instance of `InferenceService` that matches search parameters.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiFindInferenceServiceRequest
+*/
+func (a *ModelRegistryServiceAPIService) FindInferenceService(ctx context.Context) ApiFindInferenceServiceRequest {
+ return ApiFindInferenceServiceRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return InferenceService
+func (a *ModelRegistryServiceAPIService) FindInferenceServiceExecute(r ApiFindInferenceServiceRequest) (*InferenceService, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *InferenceService
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.FindInferenceService")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_service"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiFindModelArtifactRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ name *string
+ externalID *string
+ parentResourceID *string
+}
+
+// Name of entity to search.
+func (r ApiFindModelArtifactRequest) Name(name string) ApiFindModelArtifactRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiFindModelArtifactRequest) ExternalID(externalID string) ApiFindModelArtifactRequest {
+ r.externalID = &externalID
+ return r
+}
+
+// ID of the parent resource to use for search.
+func (r ApiFindModelArtifactRequest) ParentResourceID(parentResourceID string) ApiFindModelArtifactRequest {
+ r.parentResourceID = &parentResourceID
+ return r
+}
+
+func (r ApiFindModelArtifactRequest) Execute() (*ModelArtifact, *http.Response, error) {
+ return r.ApiService.FindModelArtifactExecute(r)
+}
+
+/*
+FindModelArtifact Get a ModelArtifact that matches search parameters.
+
+Gets the details of a single instance of a `ModelArtifact` that matches search parameters.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiFindModelArtifactRequest
+*/
+func (a *ModelRegistryServiceAPIService) FindModelArtifact(ctx context.Context) ApiFindModelArtifactRequest {
+ return ApiFindModelArtifactRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelArtifact
+func (a *ModelRegistryServiceAPIService) FindModelArtifactExecute(r ApiFindModelArtifactRequest) (*ModelArtifact, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelArtifact
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.FindModelArtifact")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_artifact"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ if r.parentResourceID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "parentResourceID", r.parentResourceID, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiFindModelVersionRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ name *string
+ externalID *string
+ parentResourceID *string
+}
+
+// Name of entity to search.
+func (r ApiFindModelVersionRequest) Name(name string) ApiFindModelVersionRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiFindModelVersionRequest) ExternalID(externalID string) ApiFindModelVersionRequest {
+ r.externalID = &externalID
+ return r
+}
+
+// ID of the parent resource to use for search.
+func (r ApiFindModelVersionRequest) ParentResourceID(parentResourceID string) ApiFindModelVersionRequest {
+ r.parentResourceID = &parentResourceID
+ return r
+}
+
+func (r ApiFindModelVersionRequest) Execute() (*ModelVersion, *http.Response, error) {
+ return r.ApiService.FindModelVersionExecute(r)
+}
+
+/*
+FindModelVersion Get a ModelVersion that matches search parameters.
+
+Gets the details of a single instance of a `ModelVersion` that matches search parameters.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiFindModelVersionRequest
+*/
+func (a *ModelRegistryServiceAPIService) FindModelVersion(ctx context.Context) ApiFindModelVersionRequest {
+ return ApiFindModelVersionRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelVersion
+func (a *ModelRegistryServiceAPIService) FindModelVersionExecute(r ApiFindModelVersionRequest) (*ModelVersion, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelVersion
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.FindModelVersion")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_version"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ if r.parentResourceID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "parentResourceID", r.parentResourceID, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiFindRegisteredModelRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ name *string
+ externalID *string
+}
+
+// Name of entity to search.
+func (r ApiFindRegisteredModelRequest) Name(name string) ApiFindRegisteredModelRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiFindRegisteredModelRequest) ExternalID(externalID string) ApiFindRegisteredModelRequest {
+ r.externalID = &externalID
+ return r
+}
+
+func (r ApiFindRegisteredModelRequest) Execute() (*RegisteredModel, *http.Response, error) {
+ return r.ApiService.FindRegisteredModelExecute(r)
+}
+
+/*
+FindRegisteredModel Get a RegisteredModel that matches search parameters.
+
+Gets the details of a single instance of a `RegisteredModel` that matches search parameters.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiFindRegisteredModelRequest
+*/
+func (a *ModelRegistryServiceAPIService) FindRegisteredModel(ctx context.Context) ApiFindRegisteredModelRequest {
+ return ApiFindRegisteredModelRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return RegisteredModel
+func (a *ModelRegistryServiceAPIService) FindRegisteredModelExecute(r ApiFindRegisteredModelRequest) (*RegisteredModel, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *RegisteredModel
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.FindRegisteredModel")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/registered_model"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiFindServingEnvironmentRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ name *string
+ externalID *string
+}
+
+// Name of entity to search.
+func (r ApiFindServingEnvironmentRequest) Name(name string) ApiFindServingEnvironmentRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiFindServingEnvironmentRequest) ExternalID(externalID string) ApiFindServingEnvironmentRequest {
+ r.externalID = &externalID
+ return r
+}
+
+func (r ApiFindServingEnvironmentRequest) Execute() (*ServingEnvironment, *http.Response, error) {
+ return r.ApiService.FindServingEnvironmentExecute(r)
+}
+
+/*
+FindServingEnvironment Find ServingEnvironment
+
+Finds a `ServingEnvironment` entity that matches query parameters.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiFindServingEnvironmentRequest
+*/
+func (a *ModelRegistryServiceAPIService) FindServingEnvironment(ctx context.Context) ApiFindServingEnvironmentRequest {
+ return ApiFindServingEnvironmentRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ServingEnvironment
+func (a *ModelRegistryServiceAPIService) FindServingEnvironmentExecute(r ApiFindServingEnvironmentRequest) (*ServingEnvironment, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ServingEnvironment
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.FindServingEnvironment")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/serving_environment"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetEnvironmentInferenceServicesRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ servingenvironmentId string
+ name *string
+ externalID *string
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Name of entity to search.
+func (r ApiGetEnvironmentInferenceServicesRequest) Name(name string) ApiGetEnvironmentInferenceServicesRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiGetEnvironmentInferenceServicesRequest) ExternalID(externalID string) ApiGetEnvironmentInferenceServicesRequest {
+ r.externalID = &externalID
+ return r
+}
+
+// Number of entities in each page.
+func (r ApiGetEnvironmentInferenceServicesRequest) PageSize(pageSize string) ApiGetEnvironmentInferenceServicesRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetEnvironmentInferenceServicesRequest) OrderBy(orderBy OrderByField) ApiGetEnvironmentInferenceServicesRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetEnvironmentInferenceServicesRequest) SortOrder(sortOrder SortOrder) ApiGetEnvironmentInferenceServicesRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetEnvironmentInferenceServicesRequest) NextPageToken(nextPageToken string) ApiGetEnvironmentInferenceServicesRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetEnvironmentInferenceServicesRequest) Execute() (*InferenceServiceList, *http.Response, error) {
+ return r.ApiService.GetEnvironmentInferenceServicesExecute(r)
+}
+
+/*
+GetEnvironmentInferenceServices List All ServingEnvironment's InferenceServices
+
+Gets a list of all `InferenceService` entities for the `ServingEnvironment`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param servingenvironmentId A unique identifier for a `ServingEnvironment`.
+ @return ApiGetEnvironmentInferenceServicesRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetEnvironmentInferenceServices(ctx context.Context, servingenvironmentId string) ApiGetEnvironmentInferenceServicesRequest {
+ return ApiGetEnvironmentInferenceServicesRequest{
+ ApiService: a,
+ ctx: ctx,
+ servingenvironmentId: servingenvironmentId,
+ }
+}
+
+// Execute executes the request
+//
+// @return InferenceServiceList
+func (a *ModelRegistryServiceAPIService) GetEnvironmentInferenceServicesExecute(r ApiGetEnvironmentInferenceServicesRequest) (*InferenceServiceList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *InferenceServiceList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetEnvironmentInferenceServices")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}/inference_services"
+ localVarPath = strings.Replace(localVarPath, "{"+"servingenvironmentId"+"}", url.PathEscape(parameterValueToString(r.servingenvironmentId, "servingenvironmentId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetInferenceServiceRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ inferenceserviceId string
+}
+
+func (r ApiGetInferenceServiceRequest) Execute() (*InferenceService, *http.Response, error) {
+ return r.ApiService.GetInferenceServiceExecute(r)
+}
+
+/*
+GetInferenceService Get a InferenceService
+
+Gets the details of a single instance of a `InferenceService`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param inferenceserviceId A unique identifier for a `InferenceService`.
+ @return ApiGetInferenceServiceRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetInferenceService(ctx context.Context, inferenceserviceId string) ApiGetInferenceServiceRequest {
+ return ApiGetInferenceServiceRequest{
+ ApiService: a,
+ ctx: ctx,
+ inferenceserviceId: inferenceserviceId,
+ }
+}
+
+// Execute executes the request
+//
+// @return InferenceService
+func (a *ModelRegistryServiceAPIService) GetInferenceServiceExecute(r ApiGetInferenceServiceRequest) (*InferenceService, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *InferenceService
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetInferenceService")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"inferenceserviceId"+"}", url.PathEscape(parameterValueToString(r.inferenceserviceId, "inferenceserviceId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetInferenceServiceModelRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ inferenceserviceId string
+}
+
+func (r ApiGetInferenceServiceModelRequest) Execute() (*RegisteredModel, *http.Response, error) {
+ return r.ApiService.GetInferenceServiceModelExecute(r)
+}
+
+/*
+GetInferenceServiceModel Get InferenceService's RegisteredModel
+
+Gets the `RegisteredModel` entity for the `InferenceService`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param inferenceserviceId A unique identifier for a `InferenceService`.
+ @return ApiGetInferenceServiceModelRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetInferenceServiceModel(ctx context.Context, inferenceserviceId string) ApiGetInferenceServiceModelRequest {
+ return ApiGetInferenceServiceModelRequest{
+ ApiService: a,
+ ctx: ctx,
+ inferenceserviceId: inferenceserviceId,
+ }
+}
+
+// Execute executes the request
+//
+// @return RegisteredModel
+func (a *ModelRegistryServiceAPIService) GetInferenceServiceModelExecute(r ApiGetInferenceServiceModelRequest) (*RegisteredModel, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *RegisteredModel
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetInferenceServiceModel")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/model"
+ localVarPath = strings.Replace(localVarPath, "{"+"inferenceserviceId"+"}", url.PathEscape(parameterValueToString(r.inferenceserviceId, "inferenceserviceId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetInferenceServiceServesRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ inferenceserviceId string
+ name *string
+ externalID *string
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Name of entity to search.
+func (r ApiGetInferenceServiceServesRequest) Name(name string) ApiGetInferenceServiceServesRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiGetInferenceServiceServesRequest) ExternalID(externalID string) ApiGetInferenceServiceServesRequest {
+ r.externalID = &externalID
+ return r
+}
+
+// Number of entities in each page.
+func (r ApiGetInferenceServiceServesRequest) PageSize(pageSize string) ApiGetInferenceServiceServesRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetInferenceServiceServesRequest) OrderBy(orderBy OrderByField) ApiGetInferenceServiceServesRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetInferenceServiceServesRequest) SortOrder(sortOrder SortOrder) ApiGetInferenceServiceServesRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetInferenceServiceServesRequest) NextPageToken(nextPageToken string) ApiGetInferenceServiceServesRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetInferenceServiceServesRequest) Execute() (*ServeModelList, *http.Response, error) {
+ return r.ApiService.GetInferenceServiceServesExecute(r)
+}
+
+/*
+GetInferenceServiceServes List All InferenceService's ServeModel actions
+
+Gets a list of all `ServeModel` entities for the `InferenceService`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param inferenceserviceId A unique identifier for a `InferenceService`.
+ @return ApiGetInferenceServiceServesRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetInferenceServiceServes(ctx context.Context, inferenceserviceId string) ApiGetInferenceServiceServesRequest {
+ return ApiGetInferenceServiceServesRequest{
+ ApiService: a,
+ ctx: ctx,
+ inferenceserviceId: inferenceserviceId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ServeModelList
+func (a *ModelRegistryServiceAPIService) GetInferenceServiceServesExecute(r ApiGetInferenceServiceServesRequest) (*ServeModelList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ServeModelList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetInferenceServiceServes")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/serves"
+ localVarPath = strings.Replace(localVarPath, "{"+"inferenceserviceId"+"}", url.PathEscape(parameterValueToString(r.inferenceserviceId, "inferenceserviceId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetInferenceServiceVersionRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ inferenceserviceId string
+}
+
+func (r ApiGetInferenceServiceVersionRequest) Execute() (*ModelVersion, *http.Response, error) {
+ return r.ApiService.GetInferenceServiceVersionExecute(r)
+}
+
+/*
+GetInferenceServiceVersion Get InferenceService's ModelVersion
+
+Gets the `ModelVersion` entity for the `InferenceService`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param inferenceserviceId A unique identifier for a `InferenceService`.
+ @return ApiGetInferenceServiceVersionRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetInferenceServiceVersion(ctx context.Context, inferenceserviceId string) ApiGetInferenceServiceVersionRequest {
+ return ApiGetInferenceServiceVersionRequest{
+ ApiService: a,
+ ctx: ctx,
+ inferenceserviceId: inferenceserviceId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelVersion
+func (a *ModelRegistryServiceAPIService) GetInferenceServiceVersionExecute(r ApiGetInferenceServiceVersionRequest) (*ModelVersion, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelVersion
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetInferenceServiceVersion")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}/version"
+ localVarPath = strings.Replace(localVarPath, "{"+"inferenceserviceId"+"}", url.PathEscape(parameterValueToString(r.inferenceserviceId, "inferenceserviceId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetInferenceServicesRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Number of entities in each page.
+func (r ApiGetInferenceServicesRequest) PageSize(pageSize string) ApiGetInferenceServicesRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetInferenceServicesRequest) OrderBy(orderBy OrderByField) ApiGetInferenceServicesRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetInferenceServicesRequest) SortOrder(sortOrder SortOrder) ApiGetInferenceServicesRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetInferenceServicesRequest) NextPageToken(nextPageToken string) ApiGetInferenceServicesRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetInferenceServicesRequest) Execute() (*InferenceServiceList, *http.Response, error) {
+ return r.ApiService.GetInferenceServicesExecute(r)
+}
+
+/*
+GetInferenceServices List All InferenceServices
+
+Gets a list of all `InferenceService` entities.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetInferenceServicesRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetInferenceServices(ctx context.Context) ApiGetInferenceServicesRequest {
+ return ApiGetInferenceServicesRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return InferenceServiceList
+func (a *ModelRegistryServiceAPIService) GetInferenceServicesExecute(r ApiGetInferenceServicesRequest) (*InferenceServiceList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *InferenceServiceList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetInferenceServices")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_services"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetModelArtifactRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ modelartifactId string
+}
+
+func (r ApiGetModelArtifactRequest) Execute() (*ModelArtifact, *http.Response, error) {
+ return r.ApiService.GetModelArtifactExecute(r)
+}
+
+/*
+GetModelArtifact Get a ModelArtifact
+
+Gets the details of a single instance of a `ModelArtifact`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param modelartifactId A unique identifier for a `ModelArtifact`.
+ @return ApiGetModelArtifactRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetModelArtifact(ctx context.Context, modelartifactId string) ApiGetModelArtifactRequest {
+ return ApiGetModelArtifactRequest{
+ ApiService: a,
+ ctx: ctx,
+ modelartifactId: modelartifactId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelArtifact
+func (a *ModelRegistryServiceAPIService) GetModelArtifactExecute(r ApiGetModelArtifactRequest) (*ModelArtifact, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelArtifact
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetModelArtifact")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_artifacts/{modelartifactId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"modelartifactId"+"}", url.PathEscape(parameterValueToString(r.modelartifactId, "modelartifactId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetModelArtifactsRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Number of entities in each page.
+func (r ApiGetModelArtifactsRequest) PageSize(pageSize string) ApiGetModelArtifactsRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetModelArtifactsRequest) OrderBy(orderBy OrderByField) ApiGetModelArtifactsRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetModelArtifactsRequest) SortOrder(sortOrder SortOrder) ApiGetModelArtifactsRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetModelArtifactsRequest) NextPageToken(nextPageToken string) ApiGetModelArtifactsRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetModelArtifactsRequest) Execute() (*ModelArtifactList, *http.Response, error) {
+ return r.ApiService.GetModelArtifactsExecute(r)
+}
+
+/*
+GetModelArtifacts List All ModelArtifacts
+
+Gets a list of all `ModelArtifact` entities.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetModelArtifactsRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetModelArtifacts(ctx context.Context) ApiGetModelArtifactsRequest {
+ return ApiGetModelArtifactsRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelArtifactList
+func (a *ModelRegistryServiceAPIService) GetModelArtifactsExecute(r ApiGetModelArtifactsRequest) (*ModelArtifactList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelArtifactList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetModelArtifacts")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_artifacts"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetModelVersionRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ modelversionId string
+}
+
+func (r ApiGetModelVersionRequest) Execute() (*ModelVersion, *http.Response, error) {
+ return r.ApiService.GetModelVersionExecute(r)
+}
+
+/*
+GetModelVersion Get a ModelVersion
+
+Gets the details of a single instance of a `ModelVersion`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param modelversionId A unique identifier for a `ModelVersion`.
+ @return ApiGetModelVersionRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetModelVersion(ctx context.Context, modelversionId string) ApiGetModelVersionRequest {
+ return ApiGetModelVersionRequest{
+ ApiService: a,
+ ctx: ctx,
+ modelversionId: modelversionId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelVersion
+func (a *ModelRegistryServiceAPIService) GetModelVersionExecute(r ApiGetModelVersionRequest) (*ModelVersion, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelVersion
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetModelVersion")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_versions/{modelversionId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"modelversionId"+"}", url.PathEscape(parameterValueToString(r.modelversionId, "modelversionId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetModelVersionArtifactsRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ modelversionId string
+ name *string
+ externalID *string
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Name of entity to search.
+func (r ApiGetModelVersionArtifactsRequest) Name(name string) ApiGetModelVersionArtifactsRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiGetModelVersionArtifactsRequest) ExternalID(externalID string) ApiGetModelVersionArtifactsRequest {
+ r.externalID = &externalID
+ return r
+}
+
+// Number of entities in each page.
+func (r ApiGetModelVersionArtifactsRequest) PageSize(pageSize string) ApiGetModelVersionArtifactsRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetModelVersionArtifactsRequest) OrderBy(orderBy OrderByField) ApiGetModelVersionArtifactsRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetModelVersionArtifactsRequest) SortOrder(sortOrder SortOrder) ApiGetModelVersionArtifactsRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetModelVersionArtifactsRequest) NextPageToken(nextPageToken string) ApiGetModelVersionArtifactsRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetModelVersionArtifactsRequest) Execute() (*ArtifactList, *http.Response, error) {
+ return r.ApiService.GetModelVersionArtifactsExecute(r)
+}
+
+/*
+GetModelVersionArtifacts List All ModelVersion's artifacts
+
+Gets a list of all `Artifact` entities for the `ModelVersion`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param modelversionId A unique identifier for a `ModelVersion`.
+ @return ApiGetModelVersionArtifactsRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetModelVersionArtifacts(ctx context.Context, modelversionId string) ApiGetModelVersionArtifactsRequest {
+ return ApiGetModelVersionArtifactsRequest{
+ ApiService: a,
+ ctx: ctx,
+ modelversionId: modelversionId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ArtifactList
+func (a *ModelRegistryServiceAPIService) GetModelVersionArtifactsExecute(r ApiGetModelVersionArtifactsRequest) (*ArtifactList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ArtifactList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetModelVersionArtifacts")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_versions/{modelversionId}/artifacts"
+ localVarPath = strings.Replace(localVarPath, "{"+"modelversionId"+"}", url.PathEscape(parameterValueToString(r.modelversionId, "modelversionId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetModelVersionsRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Number of entities in each page.
+func (r ApiGetModelVersionsRequest) PageSize(pageSize string) ApiGetModelVersionsRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetModelVersionsRequest) OrderBy(orderBy OrderByField) ApiGetModelVersionsRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetModelVersionsRequest) SortOrder(sortOrder SortOrder) ApiGetModelVersionsRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetModelVersionsRequest) NextPageToken(nextPageToken string) ApiGetModelVersionsRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetModelVersionsRequest) Execute() (*ModelVersionList, *http.Response, error) {
+ return r.ApiService.GetModelVersionsExecute(r)
+}
+
+/*
+GetModelVersions List All ModelVersions
+
+Gets a list of all `ModelVersion` entities.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetModelVersionsRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetModelVersions(ctx context.Context) ApiGetModelVersionsRequest {
+ return ApiGetModelVersionsRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelVersionList
+func (a *ModelRegistryServiceAPIService) GetModelVersionsExecute(r ApiGetModelVersionsRequest) (*ModelVersionList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelVersionList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetModelVersions")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_versions"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetRegisteredModelRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ registeredmodelId string
+}
+
+func (r ApiGetRegisteredModelRequest) Execute() (*RegisteredModel, *http.Response, error) {
+ return r.ApiService.GetRegisteredModelExecute(r)
+}
+
+/*
+GetRegisteredModel Get a RegisteredModel
+
+Gets the details of a single instance of a `RegisteredModel`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param registeredmodelId A unique identifier for a `RegisteredModel`.
+ @return ApiGetRegisteredModelRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetRegisteredModel(ctx context.Context, registeredmodelId string) ApiGetRegisteredModelRequest {
+ return ApiGetRegisteredModelRequest{
+ ApiService: a,
+ ctx: ctx,
+ registeredmodelId: registeredmodelId,
+ }
+}
+
+// Execute executes the request
+//
+// @return RegisteredModel
+func (a *ModelRegistryServiceAPIService) GetRegisteredModelExecute(r ApiGetRegisteredModelRequest) (*RegisteredModel, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *RegisteredModel
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetRegisteredModel")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"registeredmodelId"+"}", url.PathEscape(parameterValueToString(r.registeredmodelId, "registeredmodelId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetRegisteredModelVersionsRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ registeredmodelId string
+ name *string
+ externalID *string
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Name of entity to search.
+func (r ApiGetRegisteredModelVersionsRequest) Name(name string) ApiGetRegisteredModelVersionsRequest {
+ r.name = &name
+ return r
+}
+
+// External ID of entity to search.
+func (r ApiGetRegisteredModelVersionsRequest) ExternalID(externalID string) ApiGetRegisteredModelVersionsRequest {
+ r.externalID = &externalID
+ return r
+}
+
+// Number of entities in each page.
+func (r ApiGetRegisteredModelVersionsRequest) PageSize(pageSize string) ApiGetRegisteredModelVersionsRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetRegisteredModelVersionsRequest) OrderBy(orderBy OrderByField) ApiGetRegisteredModelVersionsRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetRegisteredModelVersionsRequest) SortOrder(sortOrder SortOrder) ApiGetRegisteredModelVersionsRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetRegisteredModelVersionsRequest) NextPageToken(nextPageToken string) ApiGetRegisteredModelVersionsRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetRegisteredModelVersionsRequest) Execute() (*ModelVersionList, *http.Response, error) {
+ return r.ApiService.GetRegisteredModelVersionsExecute(r)
+}
+
+/*
+GetRegisteredModelVersions List All RegisteredModel's ModelVersions
+
+Gets a list of all `ModelVersion` entities for the `RegisteredModel`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param registeredmodelId A unique identifier for a `RegisteredModel`.
+ @return ApiGetRegisteredModelVersionsRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetRegisteredModelVersions(ctx context.Context, registeredmodelId string) ApiGetRegisteredModelVersionsRequest {
+ return ApiGetRegisteredModelVersionsRequest{
+ ApiService: a,
+ ctx: ctx,
+ registeredmodelId: registeredmodelId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelVersionList
+func (a *ModelRegistryServiceAPIService) GetRegisteredModelVersionsExecute(r ApiGetRegisteredModelVersionsRequest) (*ModelVersionList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelVersionList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetRegisteredModelVersions")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}/versions"
+ localVarPath = strings.Replace(localVarPath, "{"+"registeredmodelId"+"}", url.PathEscape(parameterValueToString(r.registeredmodelId, "registeredmodelId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.name != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "")
+ }
+ if r.externalID != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "")
+ }
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetRegisteredModelsRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Number of entities in each page.
+func (r ApiGetRegisteredModelsRequest) PageSize(pageSize string) ApiGetRegisteredModelsRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetRegisteredModelsRequest) OrderBy(orderBy OrderByField) ApiGetRegisteredModelsRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetRegisteredModelsRequest) SortOrder(sortOrder SortOrder) ApiGetRegisteredModelsRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetRegisteredModelsRequest) NextPageToken(nextPageToken string) ApiGetRegisteredModelsRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetRegisteredModelsRequest) Execute() (*RegisteredModelList, *http.Response, error) {
+ return r.ApiService.GetRegisteredModelsExecute(r)
+}
+
+/*
+GetRegisteredModels List All RegisteredModels
+
+Gets a list of all `RegisteredModel` entities.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetRegisteredModelsRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetRegisteredModels(ctx context.Context) ApiGetRegisteredModelsRequest {
+ return ApiGetRegisteredModelsRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return RegisteredModelList
+func (a *ModelRegistryServiceAPIService) GetRegisteredModelsExecute(r ApiGetRegisteredModelsRequest) (*RegisteredModelList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *RegisteredModelList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetRegisteredModels")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/registered_models"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetServingEnvironmentRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ servingenvironmentId string
+}
+
+func (r ApiGetServingEnvironmentRequest) Execute() (*ServingEnvironment, *http.Response, error) {
+ return r.ApiService.GetServingEnvironmentExecute(r)
+}
+
+/*
+GetServingEnvironment Get a ServingEnvironment
+
+Gets the details of a single instance of a `ServingEnvironment`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param servingenvironmentId A unique identifier for a `ServingEnvironment`.
+ @return ApiGetServingEnvironmentRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetServingEnvironment(ctx context.Context, servingenvironmentId string) ApiGetServingEnvironmentRequest {
+ return ApiGetServingEnvironmentRequest{
+ ApiService: a,
+ ctx: ctx,
+ servingenvironmentId: servingenvironmentId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ServingEnvironment
+func (a *ModelRegistryServiceAPIService) GetServingEnvironmentExecute(r ApiGetServingEnvironmentRequest) (*ServingEnvironment, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ServingEnvironment
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetServingEnvironment")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"servingenvironmentId"+"}", url.PathEscape(parameterValueToString(r.servingenvironmentId, "servingenvironmentId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetServingEnvironmentsRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ pageSize *string
+ orderBy *OrderByField
+ sortOrder *SortOrder
+ nextPageToken *string
+}
+
+// Number of entities in each page.
+func (r ApiGetServingEnvironmentsRequest) PageSize(pageSize string) ApiGetServingEnvironmentsRequest {
+ r.pageSize = &pageSize
+ return r
+}
+
+// Specifies the order by criteria for listing entities.
+func (r ApiGetServingEnvironmentsRequest) OrderBy(orderBy OrderByField) ApiGetServingEnvironmentsRequest {
+ r.orderBy = &orderBy
+ return r
+}
+
+// Specifies the sort order for listing entities, defaults to ASC.
+func (r ApiGetServingEnvironmentsRequest) SortOrder(sortOrder SortOrder) ApiGetServingEnvironmentsRequest {
+ r.sortOrder = &sortOrder
+ return r
+}
+
+// Token to use to retrieve next page of results.
+func (r ApiGetServingEnvironmentsRequest) NextPageToken(nextPageToken string) ApiGetServingEnvironmentsRequest {
+ r.nextPageToken = &nextPageToken
+ return r
+}
+
+func (r ApiGetServingEnvironmentsRequest) Execute() (*ServingEnvironmentList, *http.Response, error) {
+ return r.ApiService.GetServingEnvironmentsExecute(r)
+}
+
+/*
+GetServingEnvironments List All ServingEnvironments
+
+Gets a list of all `ServingEnvironment` entities.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetServingEnvironmentsRequest
+*/
+func (a *ModelRegistryServiceAPIService) GetServingEnvironments(ctx context.Context) ApiGetServingEnvironmentsRequest {
+ return ApiGetServingEnvironmentsRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ServingEnvironmentList
+func (a *ModelRegistryServiceAPIService) GetServingEnvironmentsExecute(r ApiGetServingEnvironmentsRequest) (*ServingEnvironmentList, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ServingEnvironmentList
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.GetServingEnvironments")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/serving_environments"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.pageSize != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "")
+ }
+ if r.orderBy != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "")
+ }
+ if r.sortOrder != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "")
+ }
+ if r.nextPageToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "nextPageToken", r.nextPageToken, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiUpdateInferenceServiceRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ inferenceserviceId string
+ inferenceServiceUpdate *InferenceServiceUpdate
+}
+
+// Updated `InferenceService` information.
+func (r ApiUpdateInferenceServiceRequest) InferenceServiceUpdate(inferenceServiceUpdate InferenceServiceUpdate) ApiUpdateInferenceServiceRequest {
+ r.inferenceServiceUpdate = &inferenceServiceUpdate
+ return r
+}
+
+func (r ApiUpdateInferenceServiceRequest) Execute() (*InferenceService, *http.Response, error) {
+ return r.ApiService.UpdateInferenceServiceExecute(r)
+}
+
+/*
+UpdateInferenceService Update a InferenceService
+
+Updates an existing `InferenceService`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param inferenceserviceId A unique identifier for a `InferenceService`.
+ @return ApiUpdateInferenceServiceRequest
+*/
+func (a *ModelRegistryServiceAPIService) UpdateInferenceService(ctx context.Context, inferenceserviceId string) ApiUpdateInferenceServiceRequest {
+ return ApiUpdateInferenceServiceRequest{
+ ApiService: a,
+ ctx: ctx,
+ inferenceserviceId: inferenceserviceId,
+ }
+}
+
+// Execute executes the request
+//
+// @return InferenceService
+func (a *ModelRegistryServiceAPIService) UpdateInferenceServiceExecute(r ApiUpdateInferenceServiceRequest) (*InferenceService, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPatch
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *InferenceService
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.UpdateInferenceService")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/inference_services/{inferenceserviceId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"inferenceserviceId"+"}", url.PathEscape(parameterValueToString(r.inferenceserviceId, "inferenceserviceId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.inferenceServiceUpdate == nil {
+ return localVarReturnValue, nil, reportError("inferenceServiceUpdate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.inferenceServiceUpdate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiUpdateModelArtifactRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ modelartifactId string
+ modelArtifactUpdate *ModelArtifactUpdate
+}
+
+// Updated `ModelArtifact` information.
+func (r ApiUpdateModelArtifactRequest) ModelArtifactUpdate(modelArtifactUpdate ModelArtifactUpdate) ApiUpdateModelArtifactRequest {
+ r.modelArtifactUpdate = &modelArtifactUpdate
+ return r
+}
+
+func (r ApiUpdateModelArtifactRequest) Execute() (*ModelArtifact, *http.Response, error) {
+ return r.ApiService.UpdateModelArtifactExecute(r)
+}
+
+/*
+UpdateModelArtifact Update a ModelArtifact
+
+Updates an existing `ModelArtifact`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param modelartifactId A unique identifier for a `ModelArtifact`.
+ @return ApiUpdateModelArtifactRequest
+*/
+func (a *ModelRegistryServiceAPIService) UpdateModelArtifact(ctx context.Context, modelartifactId string) ApiUpdateModelArtifactRequest {
+ return ApiUpdateModelArtifactRequest{
+ ApiService: a,
+ ctx: ctx,
+ modelartifactId: modelartifactId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelArtifact
+func (a *ModelRegistryServiceAPIService) UpdateModelArtifactExecute(r ApiUpdateModelArtifactRequest) (*ModelArtifact, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPatch
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelArtifact
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.UpdateModelArtifact")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_artifacts/{modelartifactId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"modelartifactId"+"}", url.PathEscape(parameterValueToString(r.modelartifactId, "modelartifactId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.modelArtifactUpdate == nil {
+ return localVarReturnValue, nil, reportError("modelArtifactUpdate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.modelArtifactUpdate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiUpdateModelVersionRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ modelversionId string
+ modelVersion *ModelVersion
+}
+
+// Updated `ModelVersion` information.
+func (r ApiUpdateModelVersionRequest) ModelVersion(modelVersion ModelVersion) ApiUpdateModelVersionRequest {
+ r.modelVersion = &modelVersion
+ return r
+}
+
+func (r ApiUpdateModelVersionRequest) Execute() (*ModelVersion, *http.Response, error) {
+ return r.ApiService.UpdateModelVersionExecute(r)
+}
+
+/*
+UpdateModelVersion Update a ModelVersion
+
+Updates an existing `ModelVersion`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param modelversionId A unique identifier for a `ModelVersion`.
+ @return ApiUpdateModelVersionRequest
+*/
+func (a *ModelRegistryServiceAPIService) UpdateModelVersion(ctx context.Context, modelversionId string) ApiUpdateModelVersionRequest {
+ return ApiUpdateModelVersionRequest{
+ ApiService: a,
+ ctx: ctx,
+ modelversionId: modelversionId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ModelVersion
+func (a *ModelRegistryServiceAPIService) UpdateModelVersionExecute(r ApiUpdateModelVersionRequest) (*ModelVersion, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPatch
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ModelVersion
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.UpdateModelVersion")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/model_versions/{modelversionId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"modelversionId"+"}", url.PathEscape(parameterValueToString(r.modelversionId, "modelversionId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.modelVersion == nil {
+ return localVarReturnValue, nil, reportError("modelVersion is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.modelVersion
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiUpdateRegisteredModelRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ registeredmodelId string
+ registeredModelUpdate *RegisteredModelUpdate
+}
+
+// Updated `RegisteredModel` information.
+func (r ApiUpdateRegisteredModelRequest) RegisteredModelUpdate(registeredModelUpdate RegisteredModelUpdate) ApiUpdateRegisteredModelRequest {
+ r.registeredModelUpdate = ®isteredModelUpdate
+ return r
+}
+
+func (r ApiUpdateRegisteredModelRequest) Execute() (*RegisteredModel, *http.Response, error) {
+ return r.ApiService.UpdateRegisteredModelExecute(r)
+}
+
+/*
+UpdateRegisteredModel Update a RegisteredModel
+
+Updates an existing `RegisteredModel`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param registeredmodelId A unique identifier for a `RegisteredModel`.
+ @return ApiUpdateRegisteredModelRequest
+*/
+func (a *ModelRegistryServiceAPIService) UpdateRegisteredModel(ctx context.Context, registeredmodelId string) ApiUpdateRegisteredModelRequest {
+ return ApiUpdateRegisteredModelRequest{
+ ApiService: a,
+ ctx: ctx,
+ registeredmodelId: registeredmodelId,
+ }
+}
+
+// Execute executes the request
+//
+// @return RegisteredModel
+func (a *ModelRegistryServiceAPIService) UpdateRegisteredModelExecute(r ApiUpdateRegisteredModelRequest) (*RegisteredModel, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPatch
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *RegisteredModel
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.UpdateRegisteredModel")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/registered_models/{registeredmodelId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"registeredmodelId"+"}", url.PathEscape(parameterValueToString(r.registeredmodelId, "registeredmodelId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.registeredModelUpdate == nil {
+ return localVarReturnValue, nil, reportError("registeredModelUpdate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.registeredModelUpdate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiUpdateServingEnvironmentRequest struct {
+ ctx context.Context
+ ApiService *ModelRegistryServiceAPIService
+ servingenvironmentId string
+ servingEnvironmentUpdate *ServingEnvironmentUpdate
+}
+
+// Updated `ServingEnvironment` information.
+func (r ApiUpdateServingEnvironmentRequest) ServingEnvironmentUpdate(servingEnvironmentUpdate ServingEnvironmentUpdate) ApiUpdateServingEnvironmentRequest {
+ r.servingEnvironmentUpdate = &servingEnvironmentUpdate
+ return r
+}
+
+func (r ApiUpdateServingEnvironmentRequest) Execute() (*ServingEnvironment, *http.Response, error) {
+ return r.ApiService.UpdateServingEnvironmentExecute(r)
+}
+
+/*
+UpdateServingEnvironment Update a ServingEnvironment
+
+Updates an existing `ServingEnvironment`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param servingenvironmentId A unique identifier for a `ServingEnvironment`.
+ @return ApiUpdateServingEnvironmentRequest
+*/
+func (a *ModelRegistryServiceAPIService) UpdateServingEnvironment(ctx context.Context, servingenvironmentId string) ApiUpdateServingEnvironmentRequest {
+ return ApiUpdateServingEnvironmentRequest{
+ ApiService: a,
+ ctx: ctx,
+ servingenvironmentId: servingenvironmentId,
+ }
+}
+
+// Execute executes the request
+//
+// @return ServingEnvironment
+func (a *ModelRegistryServiceAPIService) UpdateServingEnvironmentExecute(r ApiUpdateServingEnvironmentRequest) (*ServingEnvironment, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPatch
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ServingEnvironment
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelRegistryServiceAPIService.UpdateServingEnvironment")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/model_registry/v1alpha1/serving_environments/{servingenvironmentId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"servingenvironmentId"+"}", url.PathEscape(parameterValueToString(r.servingenvironmentId, "servingenvironmentId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.servingEnvironmentUpdate == nil {
+ return localVarReturnValue, nil, reportError("servingEnvironmentUpdate is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.servingEnvironmentUpdate
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
diff --git a/pkg/openapi/client.go b/pkg/openapi/client.go
new file mode 100644
index 000000000..2379badff
--- /dev/null
+++ b/pkg/openapi/client.go
@@ -0,0 +1,666 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "log"
+ "mime/multipart"
+ "net/http"
+ "net/http/httputil"
+ "net/url"
+ "os"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+ "time"
+ "unicode/utf8"
+)
+
+var (
+ jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
+ xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
+ queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
+ queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
+)
+
+// APIClient manages communication with the Model Registry REST API API v1.0.0
+// In most cases there should be only one, shared, APIClient.
+type APIClient struct {
+ cfg *Configuration
+ common service // Reuse a single struct instead of allocating one for each service on the heap.
+
+ // API Services
+
+ ModelRegistryServiceAPI *ModelRegistryServiceAPIService
+}
+
+type service struct {
+ client *APIClient
+}
+
+// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
+// optionally a custom http.Client to allow for advanced features such as caching.
+func NewAPIClient(cfg *Configuration) *APIClient {
+ if cfg.HTTPClient == nil {
+ cfg.HTTPClient = http.DefaultClient
+ }
+
+ c := &APIClient{}
+ c.cfg = cfg
+ c.common.client = c
+
+ // API Services
+ c.ModelRegistryServiceAPI = (*ModelRegistryServiceAPIService)(&c.common)
+
+ return c
+}
+
+func atoi(in string) (int, error) {
+ return strconv.Atoi(in)
+}
+
+// selectHeaderContentType select a content type from the available list.
+func selectHeaderContentType(contentTypes []string) string {
+ if len(contentTypes) == 0 {
+ return ""
+ }
+ if contains(contentTypes, "application/json") {
+ return "application/json"
+ }
+ return contentTypes[0] // use the first content type specified in 'consumes'
+}
+
+// selectHeaderAccept join all accept types and return
+func selectHeaderAccept(accepts []string) string {
+ if len(accepts) == 0 {
+ return ""
+ }
+
+ if contains(accepts, "application/json") {
+ return "application/json"
+ }
+
+ return strings.Join(accepts, ",")
+}
+
+// contains is a case insensitive match, finding needle in a haystack
+func contains(haystack []string, needle string) bool {
+ for _, a := range haystack {
+ if strings.EqualFold(a, needle) {
+ return true
+ }
+ }
+ return false
+}
+
+// Verify optional parameters are of the correct type.
+func typeCheckParameter(obj interface{}, expected string, name string) error {
+ // Make sure there is an object.
+ if obj == nil {
+ return nil
+ }
+
+ // Check the type is as expected.
+ if reflect.TypeOf(obj).String() != expected {
+ return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
+ }
+ return nil
+}
+
+func parameterValueToString(obj interface{}, key string) string {
+ if reflect.TypeOf(obj).Kind() != reflect.Ptr {
+ return fmt.Sprintf("%v", obj)
+ }
+ var param, ok = obj.(MappedNullable)
+ if !ok {
+ return ""
+ }
+ dataMap, err := param.ToMap()
+ if err != nil {
+ return ""
+ }
+ return fmt.Sprintf("%v", dataMap[key])
+}
+
+// parameterAddToHeaderOrQuery adds the provided object to the request header or url query
+// supporting deep object syntax
+func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) {
+ var v = reflect.ValueOf(obj)
+ var value = ""
+ if v == reflect.ValueOf(nil) {
+ value = "null"
+ } else {
+ switch v.Kind() {
+ case reflect.Invalid:
+ value = "invalid"
+
+ case reflect.Struct:
+ if t, ok := obj.(MappedNullable); ok {
+ dataMap, err := t.ToMap()
+ if err != nil {
+ return
+ }
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType)
+ return
+ }
+ if t, ok := obj.(time.Time); ok {
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType)
+ return
+ }
+ value = v.Type().String() + " value"
+ case reflect.Slice:
+ var indValue = reflect.ValueOf(obj)
+ if indValue == reflect.ValueOf(nil) {
+ return
+ }
+ var lenIndValue = indValue.Len()
+ for i := 0; i < lenIndValue; i++ {
+ var arrayValue = indValue.Index(i)
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType)
+ }
+ return
+
+ case reflect.Map:
+ var indValue = reflect.ValueOf(obj)
+ if indValue == reflect.ValueOf(nil) {
+ return
+ }
+ iter := indValue.MapRange()
+ for iter.Next() {
+ k, v := iter.Key(), iter.Value()
+ parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType)
+ }
+ return
+
+ case reflect.Interface:
+ fallthrough
+ case reflect.Ptr:
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType)
+ return
+
+ case reflect.Int, reflect.Int8, reflect.Int16,
+ reflect.Int32, reflect.Int64:
+ value = strconv.FormatInt(v.Int(), 10)
+ case reflect.Uint, reflect.Uint8, reflect.Uint16,
+ reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ value = strconv.FormatUint(v.Uint(), 10)
+ case reflect.Float32, reflect.Float64:
+ value = strconv.FormatFloat(v.Float(), 'g', -1, 32)
+ case reflect.Bool:
+ value = strconv.FormatBool(v.Bool())
+ case reflect.String:
+ value = v.String()
+ default:
+ value = v.Type().String() + " value"
+ }
+ }
+
+ switch valuesMap := headerOrQueryParams.(type) {
+ case url.Values:
+ if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" {
+ valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value)
+ } else {
+ valuesMap.Add(keyPrefix, value)
+ }
+ break
+ case map[string]string:
+ valuesMap[keyPrefix] = value
+ break
+ }
+}
+
+// helper for converting interface{} parameters to json strings
+func parameterToJson(obj interface{}) (string, error) {
+ jsonBuf, err := json.Marshal(obj)
+ if err != nil {
+ return "", err
+ }
+ return string(jsonBuf), err
+}
+
+// callAPI do the request.
+func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
+ if c.cfg.Debug {
+ dump, err := httputil.DumpRequestOut(request, true)
+ if err != nil {
+ return nil, err
+ }
+ log.Printf("\n%s\n", string(dump))
+ }
+
+ resp, err := c.cfg.HTTPClient.Do(request)
+ if err != nil {
+ return resp, err
+ }
+
+ if c.cfg.Debug {
+ dump, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return resp, err
+ }
+ log.Printf("\n%s\n", string(dump))
+ }
+ return resp, err
+}
+
+// Allow modification of underlying config for alternate implementations and testing
+// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
+func (c *APIClient) GetConfig() *Configuration {
+ return c.cfg
+}
+
+type formFile struct {
+ fileBytes []byte
+ fileName string
+ formFileName string
+}
+
+// prepareRequest build the request
+func (c *APIClient) prepareRequest(
+ ctx context.Context,
+ path string, method string,
+ postBody interface{},
+ headerParams map[string]string,
+ queryParams url.Values,
+ formParams url.Values,
+ formFiles []formFile) (localVarRequest *http.Request, err error) {
+
+ var body *bytes.Buffer
+
+ // Detect postBody type and post.
+ if postBody != nil {
+ contentType := headerParams["Content-Type"]
+ if contentType == "" {
+ contentType = detectContentType(postBody)
+ headerParams["Content-Type"] = contentType
+ }
+
+ body, err = setBody(postBody, contentType)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // add form parameters and file if available.
+ if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ w := multipart.NewWriter(body)
+
+ for k, v := range formParams {
+ for _, iv := range v {
+ if strings.HasPrefix(k, "@") { // file
+ err = addFile(w, k[1:], iv)
+ if err != nil {
+ return nil, err
+ }
+ } else { // form value
+ w.WriteField(k, iv)
+ }
+ }
+ }
+ for _, formFile := range formFiles {
+ if len(formFile.fileBytes) > 0 && formFile.fileName != "" {
+ w.Boundary()
+ part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName))
+ if err != nil {
+ return nil, err
+ }
+ _, err = part.Write(formFile.fileBytes)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+
+ // Set the Boundary in the Content-Type
+ headerParams["Content-Type"] = w.FormDataContentType()
+
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ w.Close()
+ }
+
+ if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ body.WriteString(formParams.Encode())
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ }
+
+ // Setup path and query parameters
+ url, err := url.Parse(path)
+ if err != nil {
+ return nil, err
+ }
+
+ // Override request host, if applicable
+ if c.cfg.Host != "" {
+ url.Host = c.cfg.Host
+ }
+
+ // Override request scheme, if applicable
+ if c.cfg.Scheme != "" {
+ url.Scheme = c.cfg.Scheme
+ }
+
+ // Adding Query Param
+ query := url.Query()
+ for k, v := range queryParams {
+ for _, iv := range v {
+ query.Add(k, iv)
+ }
+ }
+
+ // Encode the parameters.
+ url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string {
+ pieces := strings.Split(s, "=")
+ pieces[0] = queryDescape.Replace(pieces[0])
+ return strings.Join(pieces, "=")
+ })
+
+ // Generate a new request
+ if body != nil {
+ localVarRequest, err = http.NewRequest(method, url.String(), body)
+ } else {
+ localVarRequest, err = http.NewRequest(method, url.String(), nil)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // add header parameters, if any
+ if len(headerParams) > 0 {
+ headers := http.Header{}
+ for h, v := range headerParams {
+ headers[h] = []string{v}
+ }
+ localVarRequest.Header = headers
+ }
+
+ // Add the user agent to the request.
+ localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
+
+ if ctx != nil {
+ // add context to the request
+ localVarRequest = localVarRequest.WithContext(ctx)
+
+ // Walk through any authentication.
+
+ // AccessToken Authentication
+ if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
+ localVarRequest.Header.Add("Authorization", "Bearer "+auth)
+ }
+
+ }
+
+ for header, value := range c.cfg.DefaultHeader {
+ localVarRequest.Header.Add(header, value)
+ }
+ return localVarRequest, nil
+}
+
+func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
+ if len(b) == 0 {
+ return nil
+ }
+ if s, ok := v.(*string); ok {
+ *s = string(b)
+ return nil
+ }
+ if f, ok := v.(*os.File); ok {
+ f, err = os.CreateTemp("", "HttpClientFile")
+ if err != nil {
+ return
+ }
+ _, err = f.Write(b)
+ if err != nil {
+ return
+ }
+ _, err = f.Seek(0, io.SeekStart)
+ err = os.Remove(f.Name())
+ return
+ }
+ if f, ok := v.(**os.File); ok {
+ *f, err = os.CreateTemp("", "HttpClientFile")
+ if err != nil {
+ return
+ }
+ _, err = (*f).Write(b)
+ if err != nil {
+ return
+ }
+ _, err = (*f).Seek(0, io.SeekStart)
+ err = os.Remove((*f).Name())
+ return
+ }
+ if xmlCheck.MatchString(contentType) {
+ if err = xml.Unmarshal(b, v); err != nil {
+ return err
+ }
+ return nil
+ }
+ if jsonCheck.MatchString(contentType) {
+ if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
+ if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
+ if err = unmarshalObj.UnmarshalJSON(b); err != nil {
+ return err
+ }
+ } else {
+ return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
+ }
+ } else if err = json.Unmarshal(b, v); err != nil { // simple model
+ return err
+ }
+ return nil
+ }
+ return errors.New("undefined response type")
+}
+
+// Add a file to the multipart request
+func addFile(w *multipart.Writer, fieldName, path string) error {
+ file, err := os.Open(filepath.Clean(path))
+ if err != nil {
+ return err
+ }
+ err = file.Close()
+ if err != nil {
+ return err
+ }
+
+ part, err := w.CreateFormFile(fieldName, filepath.Base(path))
+ if err != nil {
+ return err
+ }
+ _, err = io.Copy(part, file)
+
+ return err
+}
+
+// Prevent trying to import "fmt"
+func reportError(format string, a ...interface{}) error {
+ return fmt.Errorf(format, a...)
+}
+
+// A wrapper for strict JSON decoding
+func newStrictDecoder(data []byte) *json.Decoder {
+ dec := json.NewDecoder(bytes.NewBuffer(data))
+ dec.DisallowUnknownFields()
+ return dec
+}
+
+// Set request body from an interface{}
+func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
+ if bodyBuf == nil {
+ bodyBuf = &bytes.Buffer{}
+ }
+
+ if reader, ok := body.(io.Reader); ok {
+ _, err = bodyBuf.ReadFrom(reader)
+ } else if fp, ok := body.(*os.File); ok {
+ _, err = bodyBuf.ReadFrom(fp)
+ } else if b, ok := body.([]byte); ok {
+ _, err = bodyBuf.Write(b)
+ } else if s, ok := body.(string); ok {
+ _, err = bodyBuf.WriteString(s)
+ } else if s, ok := body.(*string); ok {
+ _, err = bodyBuf.WriteString(*s)
+ } else if jsonCheck.MatchString(contentType) {
+ err = json.NewEncoder(bodyBuf).Encode(body)
+ } else if xmlCheck.MatchString(contentType) {
+ var bs []byte
+ bs, err = xml.Marshal(body)
+ if err == nil {
+ bodyBuf.Write(bs)
+ }
+ }
+
+ if err != nil {
+ return nil, err
+ }
+
+ if bodyBuf.Len() == 0 {
+ err = fmt.Errorf("invalid body type %s\n", contentType)
+ return nil, err
+ }
+ return bodyBuf, nil
+}
+
+// detectContentType method is used to figure out `Request.Body` content type for request header
+func detectContentType(body interface{}) string {
+ contentType := "text/plain; charset=utf-8"
+ kind := reflect.TypeOf(body).Kind()
+
+ switch kind {
+ case reflect.Struct, reflect.Map, reflect.Ptr:
+ contentType = "application/json; charset=utf-8"
+ case reflect.String:
+ contentType = "text/plain; charset=utf-8"
+ default:
+ if b, ok := body.([]byte); ok {
+ contentType = http.DetectContentType(b)
+ } else if kind == reflect.Slice {
+ contentType = "application/json; charset=utf-8"
+ }
+ }
+
+ return contentType
+}
+
+// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
+type cacheControl map[string]string
+
+func parseCacheControl(headers http.Header) cacheControl {
+ cc := cacheControl{}
+ ccHeader := headers.Get("Cache-Control")
+ for _, part := range strings.Split(ccHeader, ",") {
+ part = strings.Trim(part, " ")
+ if part == "" {
+ continue
+ }
+ if strings.ContainsRune(part, '=') {
+ keyval := strings.Split(part, "=")
+ cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
+ } else {
+ cc[part] = ""
+ }
+ }
+ return cc
+}
+
+// CacheExpires helper function to determine remaining time before repeating a request.
+func CacheExpires(r *http.Response) time.Time {
+ // Figure out when the cache expires.
+ var expires time.Time
+ now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
+ if err != nil {
+ return time.Now()
+ }
+ respCacheControl := parseCacheControl(r.Header)
+
+ if maxAge, ok := respCacheControl["max-age"]; ok {
+ lifetime, err := time.ParseDuration(maxAge + "s")
+ if err != nil {
+ expires = now
+ } else {
+ expires = now.Add(lifetime)
+ }
+ } else {
+ expiresHeader := r.Header.Get("Expires")
+ if expiresHeader != "" {
+ expires, err = time.Parse(time.RFC1123, expiresHeader)
+ if err != nil {
+ expires = now
+ }
+ }
+ }
+ return expires
+}
+
+func strlen(s string) int {
+ return utf8.RuneCountInString(s)
+}
+
+// GenericOpenAPIError Provides access to the body, error and model on returned errors.
+type GenericOpenAPIError struct {
+ body []byte
+ error string
+ model interface{}
+}
+
+// Error returns non-empty string if there was an error.
+func (e GenericOpenAPIError) Error() string {
+ return e.error
+}
+
+// Body returns the raw bytes of the response
+func (e GenericOpenAPIError) Body() []byte {
+ return e.body
+}
+
+// Model returns the unpacked model of the error
+func (e GenericOpenAPIError) Model() interface{} {
+ return e.model
+}
+
+// format error message using title and detail when model implements rfc7807
+func formatErrorMessage(status string, v interface{}) string {
+ str := ""
+ metaValue := reflect.ValueOf(v).Elem()
+
+ if metaValue.Kind() == reflect.Struct {
+ field := metaValue.FieldByName("Title")
+ if field != (reflect.Value{}) {
+ str = fmt.Sprintf("%s", field.Interface())
+ }
+
+ field = metaValue.FieldByName("Detail")
+ if field != (reflect.Value{}) {
+ str = fmt.Sprintf("%s (%s)", str, field.Interface())
+ }
+ }
+
+ return strings.TrimSpace(fmt.Sprintf("%s %s", status, str))
+}
diff --git a/pkg/openapi/configuration.go b/pkg/openapi/configuration.go
new file mode 100644
index 000000000..66a6313ca
--- /dev/null
+++ b/pkg/openapi/configuration.go
@@ -0,0 +1,221 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "strings"
+)
+
+// contextKeys are used to identify the type of value in the context.
+// Since these are string, it is possible to get a short description of the
+// context key for logging and debugging using key.String().
+
+type contextKey string
+
+func (c contextKey) String() string {
+ return "auth " + string(c)
+}
+
+var (
+ // ContextAccessToken takes a string oauth2 access token as authentication for the request.
+ ContextAccessToken = contextKey("accesstoken")
+
+ // ContextServerIndex uses a server configuration from the index.
+ ContextServerIndex = contextKey("serverIndex")
+
+ // ContextOperationServerIndices uses a server configuration from the index mapping.
+ ContextOperationServerIndices = contextKey("serverOperationIndices")
+
+ // ContextServerVariables overrides a server configuration variables.
+ ContextServerVariables = contextKey("serverVariables")
+
+ // ContextOperationServerVariables overrides a server configuration variables using operation specific values.
+ ContextOperationServerVariables = contextKey("serverOperationVariables")
+)
+
+// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
+type BasicAuth struct {
+ UserName string `json:"userName,omitempty"`
+ Password string `json:"password,omitempty"`
+}
+
+// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
+type APIKey struct {
+ Key string
+ Prefix string
+}
+
+// ServerVariable stores the information about a server variable
+type ServerVariable struct {
+ Description string
+ DefaultValue string
+ EnumValues []string
+}
+
+// ServerConfiguration stores the information about a server
+type ServerConfiguration struct {
+ URL string
+ Description string
+ Variables map[string]ServerVariable
+}
+
+// ServerConfigurations stores multiple ServerConfiguration items
+type ServerConfigurations []ServerConfiguration
+
+// Configuration stores the configuration of the API client
+type Configuration struct {
+ Host string `json:"host,omitempty"`
+ Scheme string `json:"scheme,omitempty"`
+ DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
+ UserAgent string `json:"userAgent,omitempty"`
+ Debug bool `json:"debug,omitempty"`
+ Servers ServerConfigurations
+ OperationServers map[string]ServerConfigurations
+ HTTPClient *http.Client
+}
+
+// NewConfiguration returns a new Configuration object
+func NewConfiguration() *Configuration {
+ cfg := &Configuration{
+ DefaultHeader: make(map[string]string),
+ UserAgent: "OpenAPI-Generator/1.0.0/go",
+ Debug: false,
+ Servers: ServerConfigurations{
+ {
+ URL: "https://localhost:8080",
+ Description: "No description provided",
+ },
+ {
+ URL: "http://localhost:8080",
+ Description: "No description provided",
+ },
+ },
+ OperationServers: map[string]ServerConfigurations{},
+ }
+ return cfg
+}
+
+// AddDefaultHeader adds a new HTTP header to the default header in the request
+func (c *Configuration) AddDefaultHeader(key string, value string) {
+ c.DefaultHeader[key] = value
+}
+
+// URL formats template on a index using given variables
+func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
+ if index < 0 || len(sc) <= index {
+ return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1)
+ }
+ server := sc[index]
+ url := server.URL
+
+ // go through variables and replace placeholders
+ for name, variable := range server.Variables {
+ if value, ok := variables[name]; ok {
+ found := bool(len(variable.EnumValues) == 0)
+ for _, enumValue := range variable.EnumValues {
+ if value == enumValue {
+ found = true
+ }
+ }
+ if !found {
+ return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
+ }
+ url = strings.Replace(url, "{"+name+"}", value, -1)
+ } else {
+ url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
+ }
+ }
+ return url, nil
+}
+
+// ServerURL returns URL based on server settings
+func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
+ return c.Servers.URL(index, variables)
+}
+
+func getServerIndex(ctx context.Context) (int, error) {
+ si := ctx.Value(ContextServerIndex)
+ if si != nil {
+ if index, ok := si.(int); ok {
+ return index, nil
+ }
+ return 0, reportError("Invalid type %T should be int", si)
+ }
+ return 0, nil
+}
+
+func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
+ osi := ctx.Value(ContextOperationServerIndices)
+ if osi != nil {
+ if operationIndices, ok := osi.(map[string]int); !ok {
+ return 0, reportError("Invalid type %T should be map[string]int", osi)
+ } else {
+ index, ok := operationIndices[endpoint]
+ if ok {
+ return index, nil
+ }
+ }
+ }
+ return getServerIndex(ctx)
+}
+
+func getServerVariables(ctx context.Context) (map[string]string, error) {
+ sv := ctx.Value(ContextServerVariables)
+ if sv != nil {
+ if variables, ok := sv.(map[string]string); ok {
+ return variables, nil
+ }
+ return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
+ }
+ return nil, nil
+}
+
+func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
+ osv := ctx.Value(ContextOperationServerVariables)
+ if osv != nil {
+ if operationVariables, ok := osv.(map[string]map[string]string); !ok {
+ return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
+ } else {
+ variables, ok := operationVariables[endpoint]
+ if ok {
+ return variables, nil
+ }
+ }
+ }
+ return getServerVariables(ctx)
+}
+
+// ServerURLWithContext returns a new server URL given an endpoint
+func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
+ sc, ok := c.OperationServers[endpoint]
+ if !ok {
+ sc = c.Servers
+ }
+
+ if ctx == nil {
+ return sc.URL(0, nil)
+ }
+
+ index, err := getServerOperationIndex(ctx, endpoint)
+ if err != nil {
+ return "", err
+ }
+
+ variables, err := getServerOperationVariables(ctx, endpoint)
+ if err != nil {
+ return "", err
+ }
+
+ return sc.URL(index, variables)
+}
diff --git a/pkg/openapi/model_artifact.go b/pkg/openapi/model_artifact.go
new file mode 100644
index 000000000..af2f5b890
--- /dev/null
+++ b/pkg/openapi/model_artifact.go
@@ -0,0 +1,123 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// Artifact - A metadata Artifact Entity.
+type Artifact struct {
+ ModelArtifact *ModelArtifact
+}
+
+// ModelArtifactAsArtifact is a convenience function that returns ModelArtifact wrapped in Artifact
+func ModelArtifactAsArtifact(v *ModelArtifact) Artifact {
+ return Artifact{
+ ModelArtifact: v,
+ }
+}
+
+// Unmarshal JSON data into one of the pointers in the struct
+func (dst *Artifact) UnmarshalJSON(data []byte) error {
+ var err error
+ // use discriminator value to speed up the lookup
+ var jsonDict map[string]interface{}
+ err = newStrictDecoder(data).Decode(&jsonDict)
+ if err != nil {
+ return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup")
+ }
+
+ // check if the discriminator value is 'ModelArtifact'
+ if jsonDict["artifactType"] == "ModelArtifact" {
+ // try to unmarshal JSON data into ModelArtifact
+ err = json.Unmarshal(data, &dst.ModelArtifact)
+ if err == nil {
+ return nil // data stored in dst.ModelArtifact, return on the first match
+ } else {
+ dst.ModelArtifact = nil
+ return fmt.Errorf("failed to unmarshal Artifact as ModelArtifact: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'model-artifact'
+ if jsonDict["artifactType"] == "model-artifact" {
+ // try to unmarshal JSON data into ModelArtifact
+ err = json.Unmarshal(data, &dst.ModelArtifact)
+ if err == nil {
+ return nil // data stored in dst.ModelArtifact, return on the first match
+ } else {
+ dst.ModelArtifact = nil
+ return fmt.Errorf("failed to unmarshal Artifact as ModelArtifact: %s", err.Error())
+ }
+ }
+
+ return nil
+}
+
+// Marshal data from the first non-nil pointers in the struct to JSON
+func (src Artifact) MarshalJSON() ([]byte, error) {
+ if src.ModelArtifact != nil {
+ return json.Marshal(&src.ModelArtifact)
+ }
+
+ return nil, nil // no data in oneOf schemas
+}
+
+// Get the actual instance
+func (obj *Artifact) GetActualInstance() interface{} {
+ if obj == nil {
+ return nil
+ }
+ if obj.ModelArtifact != nil {
+ return obj.ModelArtifact
+ }
+
+ // all schemas are nil
+ return nil
+}
+
+type NullableArtifact struct {
+ value *Artifact
+ isSet bool
+}
+
+func (v NullableArtifact) Get() *Artifact {
+ return v.value
+}
+
+func (v *NullableArtifact) Set(val *Artifact) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableArtifact) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableArtifact) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableArtifact(val *Artifact) *NullableArtifact {
+ return &NullableArtifact{value: val, isSet: true}
+}
+
+func (v NullableArtifact) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableArtifact) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_artifact_list.go b/pkg/openapi/model_artifact_list.go
new file mode 100644
index 000000000..6eae5347b
--- /dev/null
+++ b/pkg/openapi/model_artifact_list.go
@@ -0,0 +1,209 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ArtifactList type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ArtifactList{}
+
+// ArtifactList A list of Artifact entities.
+type ArtifactList struct {
+ // Token to use to retrieve next page of results.
+ NextPageToken string `json:"nextPageToken"`
+ // Maximum number of resources to return in the result.
+ PageSize int32 `json:"pageSize"`
+ // Number of items in result list.
+ Size int32 `json:"size"`
+ // Array of `Artifact` entities.
+ Items []Artifact `json:"items,omitempty"`
+}
+
+// NewArtifactList instantiates a new ArtifactList object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewArtifactList(nextPageToken string, pageSize int32, size int32) *ArtifactList {
+ this := ArtifactList{}
+ this.NextPageToken = nextPageToken
+ this.PageSize = pageSize
+ this.Size = size
+ return &this
+}
+
+// NewArtifactListWithDefaults instantiates a new ArtifactList object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewArtifactListWithDefaults() *ArtifactList {
+ this := ArtifactList{}
+ return &this
+}
+
+// GetNextPageToken returns the NextPageToken field value
+func (o *ArtifactList) GetNextPageToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.NextPageToken
+}
+
+// GetNextPageTokenOk returns a tuple with the NextPageToken field value
+// and a boolean to check if the value has been set.
+func (o *ArtifactList) GetNextPageTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.NextPageToken, true
+}
+
+// SetNextPageToken sets field value
+func (o *ArtifactList) SetNextPageToken(v string) {
+ o.NextPageToken = v
+}
+
+// GetPageSize returns the PageSize field value
+func (o *ArtifactList) GetPageSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value
+// and a boolean to check if the value has been set.
+func (o *ArtifactList) GetPageSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.PageSize, true
+}
+
+// SetPageSize sets field value
+func (o *ArtifactList) SetPageSize(v int32) {
+ o.PageSize = v
+}
+
+// GetSize returns the Size field value
+func (o *ArtifactList) GetSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value
+// and a boolean to check if the value has been set.
+func (o *ArtifactList) GetSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Size, true
+}
+
+// SetSize sets field value
+func (o *ArtifactList) SetSize(v int32) {
+ o.Size = v
+}
+
+// GetItems returns the Items field value if set, zero value otherwise.
+func (o *ArtifactList) GetItems() []Artifact {
+ if o == nil || IsNil(o.Items) {
+ var ret []Artifact
+ return ret
+ }
+ return o.Items
+}
+
+// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ArtifactList) GetItemsOk() ([]Artifact, bool) {
+ if o == nil || IsNil(o.Items) {
+ return nil, false
+ }
+ return o.Items, true
+}
+
+// HasItems returns a boolean if a field has been set.
+func (o *ArtifactList) HasItems() bool {
+ if o != nil && !IsNil(o.Items) {
+ return true
+ }
+
+ return false
+}
+
+// SetItems gets a reference to the given []Artifact and assigns it to the Items field.
+func (o *ArtifactList) SetItems(v []Artifact) {
+ o.Items = v
+}
+
+func (o ArtifactList) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ArtifactList) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["nextPageToken"] = o.NextPageToken
+ toSerialize["pageSize"] = o.PageSize
+ toSerialize["size"] = o.Size
+ if !IsNil(o.Items) {
+ toSerialize["items"] = o.Items
+ }
+ return toSerialize, nil
+}
+
+type NullableArtifactList struct {
+ value *ArtifactList
+ isSet bool
+}
+
+func (v NullableArtifactList) Get() *ArtifactList {
+ return v.value
+}
+
+func (v *NullableArtifactList) Set(val *ArtifactList) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableArtifactList) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableArtifactList) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableArtifactList(val *ArtifactList) *NullableArtifactList {
+ return &NullableArtifactList{value: val, isSet: true}
+}
+
+func (v NullableArtifactList) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableArtifactList) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_artifact_state.go b/pkg/openapi/model_artifact_state.go
new file mode 100644
index 000000000..d377ac0d7
--- /dev/null
+++ b/pkg/openapi/model_artifact_state.go
@@ -0,0 +1,120 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ArtifactState - PENDING: A state indicating that the artifact may exist. - LIVE: A state indicating that the artifact should exist, unless something external to the system deletes it. - MARKED_FOR_DELETION: A state indicating that the artifact should be deleted. - DELETED: A state indicating that the artifact has been deleted. - ABANDONED: A state indicating that the artifact has been abandoned, which may be due to a failed or cancelled execution. - REFERENCE: A state indicating that the artifact is a reference artifact. At execution start time, the orchestrator produces an output artifact for each output key with state PENDING. However, for an intermediate artifact, this first artifact's state will be REFERENCE. Intermediate artifacts emitted during a component's execution will copy the REFERENCE artifact's attributes. At the end of an execution, the artifact state should remain REFERENCE instead of being changed to LIVE. See also: ml-metadata Artifact.State
+type ArtifactState string
+
+// List of ArtifactState
+const (
+ ARTIFACTSTATE_UNKNOWN ArtifactState = "UNKNOWN"
+ ARTIFACTSTATE_PENDING ArtifactState = "PENDING"
+ ARTIFACTSTATE_LIVE ArtifactState = "LIVE"
+ ARTIFACTSTATE_MARKED_FOR_DELETION ArtifactState = "MARKED_FOR_DELETION"
+ ARTIFACTSTATE_DELETED ArtifactState = "DELETED"
+ ARTIFACTSTATE_ABANDONED ArtifactState = "ABANDONED"
+ ARTIFACTSTATE_REFERENCE ArtifactState = "REFERENCE"
+)
+
+// All allowed values of ArtifactState enum
+var AllowedArtifactStateEnumValues = []ArtifactState{
+ "UNKNOWN",
+ "PENDING",
+ "LIVE",
+ "MARKED_FOR_DELETION",
+ "DELETED",
+ "ABANDONED",
+ "REFERENCE",
+}
+
+func (v *ArtifactState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ArtifactState(value)
+ for _, existing := range AllowedArtifactStateEnumValues {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ArtifactState", value)
+}
+
+// NewArtifactStateFromValue returns a pointer to a valid ArtifactState
+// for the value passed as argument, or an error if the value passed is not allowed by the enum
+func NewArtifactStateFromValue(v string) (*ArtifactState, error) {
+ ev := ArtifactState(v)
+ if ev.IsValid() {
+ return &ev, nil
+ } else {
+ return nil, fmt.Errorf("invalid value '%v' for ArtifactState: valid values are %v", v, AllowedArtifactStateEnumValues)
+ }
+}
+
+// IsValid return true if the value is valid for the enum, false otherwise
+func (v ArtifactState) IsValid() bool {
+ for _, existing := range AllowedArtifactStateEnumValues {
+ if existing == v {
+ return true
+ }
+ }
+ return false
+}
+
+// Ptr returns reference to ArtifactState value
+func (v ArtifactState) Ptr() *ArtifactState {
+ return &v
+}
+
+type NullableArtifactState struct {
+ value *ArtifactState
+ isSet bool
+}
+
+func (v NullableArtifactState) Get() *ArtifactState {
+ return v.value
+}
+
+func (v *NullableArtifactState) Set(val *ArtifactState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableArtifactState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableArtifactState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableArtifactState(val *ArtifactState) *NullableArtifactState {
+ return &NullableArtifactState{value: val, isSet: true}
+}
+
+func (v NullableArtifactState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableArtifactState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_artifact.go b/pkg/openapi/model_base_artifact.go
new file mode 100644
index 000000000..5e0fb9a1d
--- /dev/null
+++ b/pkg/openapi/model_base_artifact.go
@@ -0,0 +1,451 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseArtifact type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseArtifact{}
+
+// BaseArtifact struct for BaseArtifact
+type BaseArtifact struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact.
+ Uri *string `json:"uri,omitempty"`
+ State *ArtifactState `json:"state,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+ ArtifactType string `json:"artifactType"`
+}
+
+// NewBaseArtifact instantiates a new BaseArtifact object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseArtifact(artifactType string) *BaseArtifact {
+ this := BaseArtifact{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ this.ArtifactType = artifactType
+ return &this
+}
+
+// NewBaseArtifactWithDefaults instantiates a new BaseArtifact object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseArtifactWithDefaults() *BaseArtifact {
+ this := BaseArtifact{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseArtifact) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseArtifact) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseArtifact) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseArtifact) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseArtifact) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseArtifact) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseArtifact) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseArtifact) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseArtifact) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetUri returns the Uri field value if set, zero value otherwise.
+func (o *BaseArtifact) GetUri() string {
+ if o == nil || IsNil(o.Uri) {
+ var ret string
+ return ret
+ }
+ return *o.Uri
+}
+
+// GetUriOk returns a tuple with the Uri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetUriOk() (*string, bool) {
+ if o == nil || IsNil(o.Uri) {
+ return nil, false
+ }
+ return o.Uri, true
+}
+
+// HasUri returns a boolean if a field has been set.
+func (o *BaseArtifact) HasUri() bool {
+ if o != nil && !IsNil(o.Uri) {
+ return true
+ }
+
+ return false
+}
+
+// SetUri gets a reference to the given string and assigns it to the Uri field.
+func (o *BaseArtifact) SetUri(v string) {
+ o.Uri = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *BaseArtifact) GetState() ArtifactState {
+ if o == nil || IsNil(o.State) {
+ var ret ArtifactState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetStateOk() (*ArtifactState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *BaseArtifact) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ArtifactState and assigns it to the State field.
+func (o *BaseArtifact) SetState(v ArtifactState) {
+ o.State = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *BaseArtifact) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *BaseArtifact) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *BaseArtifact) SetName(v string) {
+ o.Name = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *BaseArtifact) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *BaseArtifact) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *BaseArtifact) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *BaseArtifact) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *BaseArtifact) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *BaseArtifact) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *BaseArtifact) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *BaseArtifact) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *BaseArtifact) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+// GetArtifactType returns the ArtifactType field value
+func (o *BaseArtifact) GetArtifactType() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.ArtifactType
+}
+
+// GetArtifactTypeOk returns a tuple with the ArtifactType field value
+// and a boolean to check if the value has been set.
+func (o *BaseArtifact) GetArtifactTypeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ArtifactType, true
+}
+
+// SetArtifactType sets field value
+func (o *BaseArtifact) SetArtifactType(v string) {
+ o.ArtifactType = v
+}
+
+func (o BaseArtifact) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseArtifact) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ toSerialize["artifactType"] = o.ArtifactType
+ return toSerialize, nil
+}
+
+type NullableBaseArtifact struct {
+ value *BaseArtifact
+ isSet bool
+}
+
+func (v NullableBaseArtifact) Get() *BaseArtifact {
+ return v.value
+}
+
+func (v *NullableBaseArtifact) Set(val *BaseArtifact) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseArtifact) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseArtifact) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseArtifact(val *BaseArtifact) *NullableBaseArtifact {
+ return &NullableBaseArtifact{value: val, isSet: true}
+}
+
+func (v NullableBaseArtifact) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseArtifact) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_artifact_create.go b/pkg/openapi/model_base_artifact_create.go
new file mode 100644
index 000000000..2f5f50da9
--- /dev/null
+++ b/pkg/openapi/model_base_artifact_create.go
@@ -0,0 +1,313 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseArtifactCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseArtifactCreate{}
+
+// BaseArtifactCreate struct for BaseArtifactCreate
+type BaseArtifactCreate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact.
+ Uri *string `json:"uri,omitempty"`
+ State *ArtifactState `json:"state,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+}
+
+// NewBaseArtifactCreate instantiates a new BaseArtifactCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseArtifactCreate() *BaseArtifactCreate {
+ this := BaseArtifactCreate{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// NewBaseArtifactCreateWithDefaults instantiates a new BaseArtifactCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseArtifactCreateWithDefaults() *BaseArtifactCreate {
+ this := BaseArtifactCreate{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseArtifactCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseArtifactCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseArtifactCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseArtifactCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseArtifactCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseArtifactCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseArtifactCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseArtifactCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseArtifactCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetUri returns the Uri field value if set, zero value otherwise.
+func (o *BaseArtifactCreate) GetUri() string {
+ if o == nil || IsNil(o.Uri) {
+ var ret string
+ return ret
+ }
+ return *o.Uri
+}
+
+// GetUriOk returns a tuple with the Uri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactCreate) GetUriOk() (*string, bool) {
+ if o == nil || IsNil(o.Uri) {
+ return nil, false
+ }
+ return o.Uri, true
+}
+
+// HasUri returns a boolean if a field has been set.
+func (o *BaseArtifactCreate) HasUri() bool {
+ if o != nil && !IsNil(o.Uri) {
+ return true
+ }
+
+ return false
+}
+
+// SetUri gets a reference to the given string and assigns it to the Uri field.
+func (o *BaseArtifactCreate) SetUri(v string) {
+ o.Uri = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *BaseArtifactCreate) GetState() ArtifactState {
+ if o == nil || IsNil(o.State) {
+ var ret ArtifactState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactCreate) GetStateOk() (*ArtifactState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *BaseArtifactCreate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ArtifactState and assigns it to the State field.
+func (o *BaseArtifactCreate) SetState(v ArtifactState) {
+ o.State = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *BaseArtifactCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *BaseArtifactCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *BaseArtifactCreate) SetName(v string) {
+ o.Name = &v
+}
+
+func (o BaseArtifactCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseArtifactCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ return toSerialize, nil
+}
+
+type NullableBaseArtifactCreate struct {
+ value *BaseArtifactCreate
+ isSet bool
+}
+
+func (v NullableBaseArtifactCreate) Get() *BaseArtifactCreate {
+ return v.value
+}
+
+func (v *NullableBaseArtifactCreate) Set(val *BaseArtifactCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseArtifactCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseArtifactCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseArtifactCreate(val *BaseArtifactCreate) *NullableBaseArtifactCreate {
+ return &NullableBaseArtifactCreate{value: val, isSet: true}
+}
+
+func (v NullableBaseArtifactCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseArtifactCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_artifact_update.go b/pkg/openapi/model_base_artifact_update.go
new file mode 100644
index 000000000..e24b2fafc
--- /dev/null
+++ b/pkg/openapi/model_base_artifact_update.go
@@ -0,0 +1,276 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseArtifactUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseArtifactUpdate{}
+
+// BaseArtifactUpdate struct for BaseArtifactUpdate
+type BaseArtifactUpdate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact.
+ Uri *string `json:"uri,omitempty"`
+ State *ArtifactState `json:"state,omitempty"`
+}
+
+// NewBaseArtifactUpdate instantiates a new BaseArtifactUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseArtifactUpdate() *BaseArtifactUpdate {
+ this := BaseArtifactUpdate{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// NewBaseArtifactUpdateWithDefaults instantiates a new BaseArtifactUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseArtifactUpdateWithDefaults() *BaseArtifactUpdate {
+ this := BaseArtifactUpdate{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseArtifactUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseArtifactUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseArtifactUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseArtifactUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseArtifactUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseArtifactUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseArtifactUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseArtifactUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseArtifactUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetUri returns the Uri field value if set, zero value otherwise.
+func (o *BaseArtifactUpdate) GetUri() string {
+ if o == nil || IsNil(o.Uri) {
+ var ret string
+ return ret
+ }
+ return *o.Uri
+}
+
+// GetUriOk returns a tuple with the Uri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactUpdate) GetUriOk() (*string, bool) {
+ if o == nil || IsNil(o.Uri) {
+ return nil, false
+ }
+ return o.Uri, true
+}
+
+// HasUri returns a boolean if a field has been set.
+func (o *BaseArtifactUpdate) HasUri() bool {
+ if o != nil && !IsNil(o.Uri) {
+ return true
+ }
+
+ return false
+}
+
+// SetUri gets a reference to the given string and assigns it to the Uri field.
+func (o *BaseArtifactUpdate) SetUri(v string) {
+ o.Uri = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *BaseArtifactUpdate) GetState() ArtifactState {
+ if o == nil || IsNil(o.State) {
+ var ret ArtifactState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseArtifactUpdate) GetStateOk() (*ArtifactState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *BaseArtifactUpdate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ArtifactState and assigns it to the State field.
+func (o *BaseArtifactUpdate) SetState(v ArtifactState) {
+ o.State = &v
+}
+
+func (o BaseArtifactUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseArtifactUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ return toSerialize, nil
+}
+
+type NullableBaseArtifactUpdate struct {
+ value *BaseArtifactUpdate
+ isSet bool
+}
+
+func (v NullableBaseArtifactUpdate) Get() *BaseArtifactUpdate {
+ return v.value
+}
+
+func (v *NullableBaseArtifactUpdate) Set(val *BaseArtifactUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseArtifactUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseArtifactUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseArtifactUpdate(val *BaseArtifactUpdate) *NullableBaseArtifactUpdate {
+ return &NullableBaseArtifactUpdate{value: val, isSet: true}
+}
+
+func (v NullableBaseArtifactUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseArtifactUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_execution.go b/pkg/openapi/model_base_execution.go
new file mode 100644
index 000000000..45216b32c
--- /dev/null
+++ b/pkg/openapi/model_base_execution.go
@@ -0,0 +1,387 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseExecution type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseExecution{}
+
+// BaseExecution struct for BaseExecution
+type BaseExecution struct {
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+}
+
+// NewBaseExecution instantiates a new BaseExecution object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseExecution() *BaseExecution {
+ this := BaseExecution{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// NewBaseExecutionWithDefaults instantiates a new BaseExecution object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseExecutionWithDefaults() *BaseExecution {
+ this := BaseExecution{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise.
+func (o *BaseExecution) GetLastKnownState() ExecutionState {
+ if o == nil || IsNil(o.LastKnownState) {
+ var ret ExecutionState
+ return ret
+ }
+ return *o.LastKnownState
+}
+
+// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecution) GetLastKnownStateOk() (*ExecutionState, bool) {
+ if o == nil || IsNil(o.LastKnownState) {
+ return nil, false
+ }
+ return o.LastKnownState, true
+}
+
+// HasLastKnownState returns a boolean if a field has been set.
+func (o *BaseExecution) HasLastKnownState() bool {
+ if o != nil && !IsNil(o.LastKnownState) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field.
+func (o *BaseExecution) SetLastKnownState(v ExecutionState) {
+ o.LastKnownState = &v
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseExecution) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecution) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseExecution) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseExecution) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseExecution) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecution) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseExecution) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseExecution) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseExecution) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecution) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseExecution) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseExecution) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *BaseExecution) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecution) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *BaseExecution) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *BaseExecution) SetName(v string) {
+ o.Name = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *BaseExecution) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecution) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *BaseExecution) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *BaseExecution) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *BaseExecution) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecution) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *BaseExecution) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *BaseExecution) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *BaseExecution) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecution) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *BaseExecution) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *BaseExecution) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+func (o BaseExecution) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseExecution) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ return toSerialize, nil
+}
+
+type NullableBaseExecution struct {
+ value *BaseExecution
+ isSet bool
+}
+
+func (v NullableBaseExecution) Get() *BaseExecution {
+ return v.value
+}
+
+func (v *NullableBaseExecution) Set(val *BaseExecution) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseExecution) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseExecution) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseExecution(val *BaseExecution) *NullableBaseExecution {
+ return &NullableBaseExecution{value: val, isSet: true}
+}
+
+func (v NullableBaseExecution) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseExecution) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_execution_create.go b/pkg/openapi/model_base_execution_create.go
new file mode 100644
index 000000000..919088875
--- /dev/null
+++ b/pkg/openapi/model_base_execution_create.go
@@ -0,0 +1,276 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseExecutionCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseExecutionCreate{}
+
+// BaseExecutionCreate struct for BaseExecutionCreate
+type BaseExecutionCreate struct {
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+}
+
+// NewBaseExecutionCreate instantiates a new BaseExecutionCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseExecutionCreate() *BaseExecutionCreate {
+ this := BaseExecutionCreate{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// NewBaseExecutionCreateWithDefaults instantiates a new BaseExecutionCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseExecutionCreateWithDefaults() *BaseExecutionCreate {
+ this := BaseExecutionCreate{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise.
+func (o *BaseExecutionCreate) GetLastKnownState() ExecutionState {
+ if o == nil || IsNil(o.LastKnownState) {
+ var ret ExecutionState
+ return ret
+ }
+ return *o.LastKnownState
+}
+
+// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionCreate) GetLastKnownStateOk() (*ExecutionState, bool) {
+ if o == nil || IsNil(o.LastKnownState) {
+ return nil, false
+ }
+ return o.LastKnownState, true
+}
+
+// HasLastKnownState returns a boolean if a field has been set.
+func (o *BaseExecutionCreate) HasLastKnownState() bool {
+ if o != nil && !IsNil(o.LastKnownState) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field.
+func (o *BaseExecutionCreate) SetLastKnownState(v ExecutionState) {
+ o.LastKnownState = &v
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseExecutionCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseExecutionCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseExecutionCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseExecutionCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseExecutionCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseExecutionCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseExecutionCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseExecutionCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseExecutionCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *BaseExecutionCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *BaseExecutionCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *BaseExecutionCreate) SetName(v string) {
+ o.Name = &v
+}
+
+func (o BaseExecutionCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseExecutionCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ return toSerialize, nil
+}
+
+type NullableBaseExecutionCreate struct {
+ value *BaseExecutionCreate
+ isSet bool
+}
+
+func (v NullableBaseExecutionCreate) Get() *BaseExecutionCreate {
+ return v.value
+}
+
+func (v *NullableBaseExecutionCreate) Set(val *BaseExecutionCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseExecutionCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseExecutionCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseExecutionCreate(val *BaseExecutionCreate) *NullableBaseExecutionCreate {
+ return &NullableBaseExecutionCreate{value: val, isSet: true}
+}
+
+func (v NullableBaseExecutionCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseExecutionCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_execution_update.go b/pkg/openapi/model_base_execution_update.go
new file mode 100644
index 000000000..44023c280
--- /dev/null
+++ b/pkg/openapi/model_base_execution_update.go
@@ -0,0 +1,239 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseExecutionUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseExecutionUpdate{}
+
+// BaseExecutionUpdate struct for BaseExecutionUpdate
+type BaseExecutionUpdate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
+}
+
+// NewBaseExecutionUpdate instantiates a new BaseExecutionUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseExecutionUpdate() *BaseExecutionUpdate {
+ this := BaseExecutionUpdate{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// NewBaseExecutionUpdateWithDefaults instantiates a new BaseExecutionUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseExecutionUpdateWithDefaults() *BaseExecutionUpdate {
+ this := BaseExecutionUpdate{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseExecutionUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseExecutionUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseExecutionUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseExecutionUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseExecutionUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseExecutionUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseExecutionUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseExecutionUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseExecutionUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise.
+func (o *BaseExecutionUpdate) GetLastKnownState() ExecutionState {
+ if o == nil || IsNil(o.LastKnownState) {
+ var ret ExecutionState
+ return ret
+ }
+ return *o.LastKnownState
+}
+
+// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseExecutionUpdate) GetLastKnownStateOk() (*ExecutionState, bool) {
+ if o == nil || IsNil(o.LastKnownState) {
+ return nil, false
+ }
+ return o.LastKnownState, true
+}
+
+// HasLastKnownState returns a boolean if a field has been set.
+func (o *BaseExecutionUpdate) HasLastKnownState() bool {
+ if o != nil && !IsNil(o.LastKnownState) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field.
+func (o *BaseExecutionUpdate) SetLastKnownState(v ExecutionState) {
+ o.LastKnownState = &v
+}
+
+func (o BaseExecutionUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseExecutionUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
+ return toSerialize, nil
+}
+
+type NullableBaseExecutionUpdate struct {
+ value *BaseExecutionUpdate
+ isSet bool
+}
+
+func (v NullableBaseExecutionUpdate) Get() *BaseExecutionUpdate {
+ return v.value
+}
+
+func (v *NullableBaseExecutionUpdate) Set(val *BaseExecutionUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseExecutionUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseExecutionUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseExecutionUpdate(val *BaseExecutionUpdate) *NullableBaseExecutionUpdate {
+ return &NullableBaseExecutionUpdate{value: val, isSet: true}
+}
+
+func (v NullableBaseExecutionUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseExecutionUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_resource.go b/pkg/openapi/model_base_resource.go
new file mode 100644
index 000000000..544d70fdc
--- /dev/null
+++ b/pkg/openapi/model_base_resource.go
@@ -0,0 +1,347 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseResource type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseResource{}
+
+// BaseResource struct for BaseResource
+type BaseResource struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+}
+
+// NewBaseResource instantiates a new BaseResource object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseResource() *BaseResource {
+ this := BaseResource{}
+ return &this
+}
+
+// NewBaseResourceWithDefaults instantiates a new BaseResource object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseResourceWithDefaults() *BaseResource {
+ this := BaseResource{}
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseResource) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResource) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseResource) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseResource) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseResource) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResource) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseResource) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseResource) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseResource) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResource) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseResource) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseResource) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *BaseResource) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResource) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *BaseResource) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *BaseResource) SetName(v string) {
+ o.Name = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *BaseResource) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResource) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *BaseResource) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *BaseResource) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *BaseResource) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResource) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *BaseResource) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *BaseResource) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *BaseResource) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResource) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *BaseResource) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *BaseResource) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+func (o BaseResource) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseResource) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ return toSerialize, nil
+}
+
+type NullableBaseResource struct {
+ value *BaseResource
+ isSet bool
+}
+
+func (v NullableBaseResource) Get() *BaseResource {
+ return v.value
+}
+
+func (v *NullableBaseResource) Set(val *BaseResource) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseResource) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseResource) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseResource(val *BaseResource) *NullableBaseResource {
+ return &NullableBaseResource{value: val, isSet: true}
+}
+
+func (v NullableBaseResource) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseResource) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_resource_create.go b/pkg/openapi/model_base_resource_create.go
new file mode 100644
index 000000000..13e4e6d3c
--- /dev/null
+++ b/pkg/openapi/model_base_resource_create.go
@@ -0,0 +1,236 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseResourceCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseResourceCreate{}
+
+// BaseResourceCreate struct for BaseResourceCreate
+type BaseResourceCreate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+}
+
+// NewBaseResourceCreate instantiates a new BaseResourceCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseResourceCreate() *BaseResourceCreate {
+ this := BaseResourceCreate{}
+ return &this
+}
+
+// NewBaseResourceCreateWithDefaults instantiates a new BaseResourceCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseResourceCreateWithDefaults() *BaseResourceCreate {
+ this := BaseResourceCreate{}
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseResourceCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResourceCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseResourceCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseResourceCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseResourceCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResourceCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseResourceCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseResourceCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseResourceCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResourceCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseResourceCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseResourceCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *BaseResourceCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResourceCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *BaseResourceCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *BaseResourceCreate) SetName(v string) {
+ o.Name = &v
+}
+
+func (o BaseResourceCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseResourceCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ return toSerialize, nil
+}
+
+type NullableBaseResourceCreate struct {
+ value *BaseResourceCreate
+ isSet bool
+}
+
+func (v NullableBaseResourceCreate) Get() *BaseResourceCreate {
+ return v.value
+}
+
+func (v *NullableBaseResourceCreate) Set(val *BaseResourceCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseResourceCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseResourceCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseResourceCreate(val *BaseResourceCreate) *NullableBaseResourceCreate {
+ return &NullableBaseResourceCreate{value: val, isSet: true}
+}
+
+func (v NullableBaseResourceCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseResourceCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_resource_list.go b/pkg/openapi/model_base_resource_list.go
new file mode 100644
index 000000000..d438b6873
--- /dev/null
+++ b/pkg/openapi/model_base_resource_list.go
@@ -0,0 +1,172 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseResourceList type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseResourceList{}
+
+// BaseResourceList struct for BaseResourceList
+type BaseResourceList struct {
+ // Token to use to retrieve next page of results.
+ NextPageToken string `json:"nextPageToken"`
+ // Maximum number of resources to return in the result.
+ PageSize int32 `json:"pageSize"`
+ // Number of items in result list.
+ Size int32 `json:"size"`
+}
+
+// NewBaseResourceList instantiates a new BaseResourceList object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseResourceList(nextPageToken string, pageSize int32, size int32) *BaseResourceList {
+ this := BaseResourceList{}
+ this.NextPageToken = nextPageToken
+ this.PageSize = pageSize
+ this.Size = size
+ return &this
+}
+
+// NewBaseResourceListWithDefaults instantiates a new BaseResourceList object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseResourceListWithDefaults() *BaseResourceList {
+ this := BaseResourceList{}
+ return &this
+}
+
+// GetNextPageToken returns the NextPageToken field value
+func (o *BaseResourceList) GetNextPageToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.NextPageToken
+}
+
+// GetNextPageTokenOk returns a tuple with the NextPageToken field value
+// and a boolean to check if the value has been set.
+func (o *BaseResourceList) GetNextPageTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.NextPageToken, true
+}
+
+// SetNextPageToken sets field value
+func (o *BaseResourceList) SetNextPageToken(v string) {
+ o.NextPageToken = v
+}
+
+// GetPageSize returns the PageSize field value
+func (o *BaseResourceList) GetPageSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value
+// and a boolean to check if the value has been set.
+func (o *BaseResourceList) GetPageSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.PageSize, true
+}
+
+// SetPageSize sets field value
+func (o *BaseResourceList) SetPageSize(v int32) {
+ o.PageSize = v
+}
+
+// GetSize returns the Size field value
+func (o *BaseResourceList) GetSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value
+// and a boolean to check if the value has been set.
+func (o *BaseResourceList) GetSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Size, true
+}
+
+// SetSize sets field value
+func (o *BaseResourceList) SetSize(v int32) {
+ o.Size = v
+}
+
+func (o BaseResourceList) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseResourceList) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["nextPageToken"] = o.NextPageToken
+ toSerialize["pageSize"] = o.PageSize
+ toSerialize["size"] = o.Size
+ return toSerialize, nil
+}
+
+type NullableBaseResourceList struct {
+ value *BaseResourceList
+ isSet bool
+}
+
+func (v NullableBaseResourceList) Get() *BaseResourceList {
+ return v.value
+}
+
+func (v *NullableBaseResourceList) Set(val *BaseResourceList) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseResourceList) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseResourceList) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseResourceList(val *BaseResourceList) *NullableBaseResourceList {
+ return &NullableBaseResourceList{value: val, isSet: true}
+}
+
+func (v NullableBaseResourceList) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseResourceList) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_base_resource_update.go b/pkg/openapi/model_base_resource_update.go
new file mode 100644
index 000000000..dbf124c84
--- /dev/null
+++ b/pkg/openapi/model_base_resource_update.go
@@ -0,0 +1,199 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the BaseResourceUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BaseResourceUpdate{}
+
+// BaseResourceUpdate struct for BaseResourceUpdate
+type BaseResourceUpdate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+}
+
+// NewBaseResourceUpdate instantiates a new BaseResourceUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBaseResourceUpdate() *BaseResourceUpdate {
+ this := BaseResourceUpdate{}
+ return &this
+}
+
+// NewBaseResourceUpdateWithDefaults instantiates a new BaseResourceUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBaseResourceUpdateWithDefaults() *BaseResourceUpdate {
+ this := BaseResourceUpdate{}
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *BaseResourceUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResourceUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *BaseResourceUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *BaseResourceUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *BaseResourceUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResourceUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *BaseResourceUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *BaseResourceUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *BaseResourceUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BaseResourceUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *BaseResourceUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *BaseResourceUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+func (o BaseResourceUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BaseResourceUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ return toSerialize, nil
+}
+
+type NullableBaseResourceUpdate struct {
+ value *BaseResourceUpdate
+ isSet bool
+}
+
+func (v NullableBaseResourceUpdate) Get() *BaseResourceUpdate {
+ return v.value
+}
+
+func (v *NullableBaseResourceUpdate) Set(val *BaseResourceUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBaseResourceUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBaseResourceUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBaseResourceUpdate(val *BaseResourceUpdate) *NullableBaseResourceUpdate {
+ return &NullableBaseResourceUpdate{value: val, isSet: true}
+}
+
+func (v NullableBaseResourceUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBaseResourceUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_error.go b/pkg/openapi/model_error.go
new file mode 100644
index 000000000..2ad91eafa
--- /dev/null
+++ b/pkg/openapi/model_error.go
@@ -0,0 +1,144 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the Error type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Error{}
+
+// Error Error code and message.
+type Error struct {
+ // Error code
+ Code string `json:"code"`
+ // Error message
+ Message string `json:"message"`
+}
+
+// NewError instantiates a new Error object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewError(code string, message string) *Error {
+ this := Error{}
+ this.Code = code
+ this.Message = message
+ return &this
+}
+
+// NewErrorWithDefaults instantiates a new Error object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewErrorWithDefaults() *Error {
+ this := Error{}
+ return &this
+}
+
+// GetCode returns the Code field value
+func (o *Error) GetCode() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Code
+}
+
+// GetCodeOk returns a tuple with the Code field value
+// and a boolean to check if the value has been set.
+func (o *Error) GetCodeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Code, true
+}
+
+// SetCode sets field value
+func (o *Error) SetCode(v string) {
+ o.Code = v
+}
+
+// GetMessage returns the Message field value
+func (o *Error) GetMessage() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Message
+}
+
+// GetMessageOk returns a tuple with the Message field value
+// and a boolean to check if the value has been set.
+func (o *Error) GetMessageOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Message, true
+}
+
+// SetMessage sets field value
+func (o *Error) SetMessage(v string) {
+ o.Message = v
+}
+
+func (o Error) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Error) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["code"] = o.Code
+ toSerialize["message"] = o.Message
+ return toSerialize, nil
+}
+
+type NullableError struct {
+ value *Error
+ isSet bool
+}
+
+func (v NullableError) Get() *Error {
+ return v.value
+}
+
+func (v *NullableError) Set(val *Error) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableError) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableError) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableError(val *Error) *NullableError {
+ return &NullableError{value: val, isSet: true}
+}
+
+func (v NullableError) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableError) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_execution_state.go b/pkg/openapi/model_execution_state.go
new file mode 100644
index 000000000..3cc5df20e
--- /dev/null
+++ b/pkg/openapi/model_execution_state.go
@@ -0,0 +1,120 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ExecutionState The state of the Execution. The state transitions are NEW -> RUNNING -> COMPLETE | CACHED | FAILED | CANCELED CACHED means the execution is skipped due to cached results. CANCELED means the execution is skipped due to precondition not met. It is different from CACHED in that a CANCELED execution will not have any event associated with it. It is different from FAILED in that there is no unexpected error happened and it is regarded as a normal state. See also: ml-metadata Execution.State
+type ExecutionState string
+
+// List of ExecutionState
+const (
+ EXECUTIONSTATE_UNKNOWN ExecutionState = "UNKNOWN"
+ EXECUTIONSTATE_NEW ExecutionState = "NEW"
+ EXECUTIONSTATE_RUNNING ExecutionState = "RUNNING"
+ EXECUTIONSTATE_COMPLETE ExecutionState = "COMPLETE"
+ EXECUTIONSTATE_FAILED ExecutionState = "FAILED"
+ EXECUTIONSTATE_CACHED ExecutionState = "CACHED"
+ EXECUTIONSTATE_CANCELED ExecutionState = "CANCELED"
+)
+
+// All allowed values of ExecutionState enum
+var AllowedExecutionStateEnumValues = []ExecutionState{
+ "UNKNOWN",
+ "NEW",
+ "RUNNING",
+ "COMPLETE",
+ "FAILED",
+ "CACHED",
+ "CANCELED",
+}
+
+func (v *ExecutionState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ExecutionState(value)
+ for _, existing := range AllowedExecutionStateEnumValues {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ExecutionState", value)
+}
+
+// NewExecutionStateFromValue returns a pointer to a valid ExecutionState
+// for the value passed as argument, or an error if the value passed is not allowed by the enum
+func NewExecutionStateFromValue(v string) (*ExecutionState, error) {
+ ev := ExecutionState(v)
+ if ev.IsValid() {
+ return &ev, nil
+ } else {
+ return nil, fmt.Errorf("invalid value '%v' for ExecutionState: valid values are %v", v, AllowedExecutionStateEnumValues)
+ }
+}
+
+// IsValid return true if the value is valid for the enum, false otherwise
+func (v ExecutionState) IsValid() bool {
+ for _, existing := range AllowedExecutionStateEnumValues {
+ if existing == v {
+ return true
+ }
+ }
+ return false
+}
+
+// Ptr returns reference to ExecutionState value
+func (v ExecutionState) Ptr() *ExecutionState {
+ return &v
+}
+
+type NullableExecutionState struct {
+ value *ExecutionState
+ isSet bool
+}
+
+func (v NullableExecutionState) Get() *ExecutionState {
+ return v.value
+}
+
+func (v *NullableExecutionState) Set(val *ExecutionState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableExecutionState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableExecutionState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableExecutionState(val *ExecutionState) *NullableExecutionState {
+ return &NullableExecutionState{value: val, isSet: true}
+}
+
+func (v NullableExecutionState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableExecutionState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_inference_service.go b/pkg/openapi/model_inference_service.go
new file mode 100644
index 000000000..fdd1e4ea5
--- /dev/null
+++ b/pkg/openapi/model_inference_service.go
@@ -0,0 +1,517 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the InferenceService type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &InferenceService{}
+
+// InferenceService An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving.
+type InferenceService struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+ // ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served.
+ ModelVersionId *string `json:"modelVersionId,omitempty"`
+ // Model runtime.
+ Runtime *string `json:"runtime,omitempty"`
+ DesiredState *InferenceServiceState `json:"desiredState,omitempty"`
+ // ID of the `RegisteredModel` to serve.
+ RegisteredModelId string `json:"registeredModelId"`
+ // ID of the parent `ServingEnvironment` for this `InferenceService` entity.
+ ServingEnvironmentId string `json:"servingEnvironmentId"`
+}
+
+// NewInferenceService instantiates a new InferenceService object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewInferenceService(registeredModelId string, servingEnvironmentId string) *InferenceService {
+ this := InferenceService{}
+ var desiredState InferenceServiceState = INFERENCESERVICESTATE_DEPLOYED
+ this.DesiredState = &desiredState
+ this.RegisteredModelId = registeredModelId
+ this.ServingEnvironmentId = servingEnvironmentId
+ return &this
+}
+
+// NewInferenceServiceWithDefaults instantiates a new InferenceService object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewInferenceServiceWithDefaults() *InferenceService {
+ this := InferenceService{}
+ var desiredState InferenceServiceState = INFERENCESERVICESTATE_DEPLOYED
+ this.DesiredState = &desiredState
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *InferenceService) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *InferenceService) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *InferenceService) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *InferenceService) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *InferenceService) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *InferenceService) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *InferenceService) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *InferenceService) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *InferenceService) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *InferenceService) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *InferenceService) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *InferenceService) SetName(v string) {
+ o.Name = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *InferenceService) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *InferenceService) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *InferenceService) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *InferenceService) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *InferenceService) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *InferenceService) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *InferenceService) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *InferenceService) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *InferenceService) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+// GetModelVersionId returns the ModelVersionId field value if set, zero value otherwise.
+func (o *InferenceService) GetModelVersionId() string {
+ if o == nil || IsNil(o.ModelVersionId) {
+ var ret string
+ return ret
+ }
+ return *o.ModelVersionId
+}
+
+// GetModelVersionIdOk returns a tuple with the ModelVersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetModelVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelVersionId) {
+ return nil, false
+ }
+ return o.ModelVersionId, true
+}
+
+// HasModelVersionId returns a boolean if a field has been set.
+func (o *InferenceService) HasModelVersionId() bool {
+ if o != nil && !IsNil(o.ModelVersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelVersionId gets a reference to the given string and assigns it to the ModelVersionId field.
+func (o *InferenceService) SetModelVersionId(v string) {
+ o.ModelVersionId = &v
+}
+
+// GetRuntime returns the Runtime field value if set, zero value otherwise.
+func (o *InferenceService) GetRuntime() string {
+ if o == nil || IsNil(o.Runtime) {
+ var ret string
+ return ret
+ }
+ return *o.Runtime
+}
+
+// GetRuntimeOk returns a tuple with the Runtime field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetRuntimeOk() (*string, bool) {
+ if o == nil || IsNil(o.Runtime) {
+ return nil, false
+ }
+ return o.Runtime, true
+}
+
+// HasRuntime returns a boolean if a field has been set.
+func (o *InferenceService) HasRuntime() bool {
+ if o != nil && !IsNil(o.Runtime) {
+ return true
+ }
+
+ return false
+}
+
+// SetRuntime gets a reference to the given string and assigns it to the Runtime field.
+func (o *InferenceService) SetRuntime(v string) {
+ o.Runtime = &v
+}
+
+// GetDesiredState returns the DesiredState field value if set, zero value otherwise.
+func (o *InferenceService) GetDesiredState() InferenceServiceState {
+ if o == nil || IsNil(o.DesiredState) {
+ var ret InferenceServiceState
+ return ret
+ }
+ return *o.DesiredState
+}
+
+// GetDesiredStateOk returns a tuple with the DesiredState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetDesiredStateOk() (*InferenceServiceState, bool) {
+ if o == nil || IsNil(o.DesiredState) {
+ return nil, false
+ }
+ return o.DesiredState, true
+}
+
+// HasDesiredState returns a boolean if a field has been set.
+func (o *InferenceService) HasDesiredState() bool {
+ if o != nil && !IsNil(o.DesiredState) {
+ return true
+ }
+
+ return false
+}
+
+// SetDesiredState gets a reference to the given InferenceServiceState and assigns it to the DesiredState field.
+func (o *InferenceService) SetDesiredState(v InferenceServiceState) {
+ o.DesiredState = &v
+}
+
+// GetRegisteredModelId returns the RegisteredModelId field value
+func (o *InferenceService) GetRegisteredModelId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RegisteredModelId
+}
+
+// GetRegisteredModelIdOk returns a tuple with the RegisteredModelId field value
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetRegisteredModelIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RegisteredModelId, true
+}
+
+// SetRegisteredModelId sets field value
+func (o *InferenceService) SetRegisteredModelId(v string) {
+ o.RegisteredModelId = v
+}
+
+// GetServingEnvironmentId returns the ServingEnvironmentId field value
+func (o *InferenceService) GetServingEnvironmentId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.ServingEnvironmentId
+}
+
+// GetServingEnvironmentIdOk returns a tuple with the ServingEnvironmentId field value
+// and a boolean to check if the value has been set.
+func (o *InferenceService) GetServingEnvironmentIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ServingEnvironmentId, true
+}
+
+// SetServingEnvironmentId sets field value
+func (o *InferenceService) SetServingEnvironmentId(v string) {
+ o.ServingEnvironmentId = v
+}
+
+func (o InferenceService) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o InferenceService) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ if !IsNil(o.ModelVersionId) {
+ toSerialize["modelVersionId"] = o.ModelVersionId
+ }
+ if !IsNil(o.Runtime) {
+ toSerialize["runtime"] = o.Runtime
+ }
+ if !IsNil(o.DesiredState) {
+ toSerialize["desiredState"] = o.DesiredState
+ }
+ toSerialize["registeredModelId"] = o.RegisteredModelId
+ toSerialize["servingEnvironmentId"] = o.ServingEnvironmentId
+ return toSerialize, nil
+}
+
+type NullableInferenceService struct {
+ value *InferenceService
+ isSet bool
+}
+
+func (v NullableInferenceService) Get() *InferenceService {
+ return v.value
+}
+
+func (v *NullableInferenceService) Set(val *InferenceService) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInferenceService) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInferenceService) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInferenceService(val *InferenceService) *NullableInferenceService {
+ return &NullableInferenceService{value: val, isSet: true}
+}
+
+func (v NullableInferenceService) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInferenceService) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_inference_service_create.go b/pkg/openapi/model_inference_service_create.go
new file mode 100644
index 000000000..8724b96f0
--- /dev/null
+++ b/pkg/openapi/model_inference_service_create.go
@@ -0,0 +1,406 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the InferenceServiceCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &InferenceServiceCreate{}
+
+// InferenceServiceCreate An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving.
+type InferenceServiceCreate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served.
+ ModelVersionId *string `json:"modelVersionId,omitempty"`
+ // Model runtime.
+ Runtime *string `json:"runtime,omitempty"`
+ DesiredState *InferenceServiceState `json:"desiredState,omitempty"`
+ // ID of the `RegisteredModel` to serve.
+ RegisteredModelId string `json:"registeredModelId"`
+ // ID of the parent `ServingEnvironment` for this `InferenceService` entity.
+ ServingEnvironmentId string `json:"servingEnvironmentId"`
+}
+
+// NewInferenceServiceCreate instantiates a new InferenceServiceCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewInferenceServiceCreate(registeredModelId string, servingEnvironmentId string) *InferenceServiceCreate {
+ this := InferenceServiceCreate{}
+ var desiredState InferenceServiceState = INFERENCESERVICESTATE_DEPLOYED
+ this.DesiredState = &desiredState
+ this.RegisteredModelId = registeredModelId
+ this.ServingEnvironmentId = servingEnvironmentId
+ return &this
+}
+
+// NewInferenceServiceCreateWithDefaults instantiates a new InferenceServiceCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewInferenceServiceCreateWithDefaults() *InferenceServiceCreate {
+ this := InferenceServiceCreate{}
+ var desiredState InferenceServiceState = INFERENCESERVICESTATE_DEPLOYED
+ this.DesiredState = &desiredState
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *InferenceServiceCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *InferenceServiceCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *InferenceServiceCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *InferenceServiceCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *InferenceServiceCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *InferenceServiceCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *InferenceServiceCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *InferenceServiceCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *InferenceServiceCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *InferenceServiceCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *InferenceServiceCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *InferenceServiceCreate) SetName(v string) {
+ o.Name = &v
+}
+
+// GetModelVersionId returns the ModelVersionId field value if set, zero value otherwise.
+func (o *InferenceServiceCreate) GetModelVersionId() string {
+ if o == nil || IsNil(o.ModelVersionId) {
+ var ret string
+ return ret
+ }
+ return *o.ModelVersionId
+}
+
+// GetModelVersionIdOk returns a tuple with the ModelVersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetModelVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelVersionId) {
+ return nil, false
+ }
+ return o.ModelVersionId, true
+}
+
+// HasModelVersionId returns a boolean if a field has been set.
+func (o *InferenceServiceCreate) HasModelVersionId() bool {
+ if o != nil && !IsNil(o.ModelVersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelVersionId gets a reference to the given string and assigns it to the ModelVersionId field.
+func (o *InferenceServiceCreate) SetModelVersionId(v string) {
+ o.ModelVersionId = &v
+}
+
+// GetRuntime returns the Runtime field value if set, zero value otherwise.
+func (o *InferenceServiceCreate) GetRuntime() string {
+ if o == nil || IsNil(o.Runtime) {
+ var ret string
+ return ret
+ }
+ return *o.Runtime
+}
+
+// GetRuntimeOk returns a tuple with the Runtime field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetRuntimeOk() (*string, bool) {
+ if o == nil || IsNil(o.Runtime) {
+ return nil, false
+ }
+ return o.Runtime, true
+}
+
+// HasRuntime returns a boolean if a field has been set.
+func (o *InferenceServiceCreate) HasRuntime() bool {
+ if o != nil && !IsNil(o.Runtime) {
+ return true
+ }
+
+ return false
+}
+
+// SetRuntime gets a reference to the given string and assigns it to the Runtime field.
+func (o *InferenceServiceCreate) SetRuntime(v string) {
+ o.Runtime = &v
+}
+
+// GetDesiredState returns the DesiredState field value if set, zero value otherwise.
+func (o *InferenceServiceCreate) GetDesiredState() InferenceServiceState {
+ if o == nil || IsNil(o.DesiredState) {
+ var ret InferenceServiceState
+ return ret
+ }
+ return *o.DesiredState
+}
+
+// GetDesiredStateOk returns a tuple with the DesiredState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetDesiredStateOk() (*InferenceServiceState, bool) {
+ if o == nil || IsNil(o.DesiredState) {
+ return nil, false
+ }
+ return o.DesiredState, true
+}
+
+// HasDesiredState returns a boolean if a field has been set.
+func (o *InferenceServiceCreate) HasDesiredState() bool {
+ if o != nil && !IsNil(o.DesiredState) {
+ return true
+ }
+
+ return false
+}
+
+// SetDesiredState gets a reference to the given InferenceServiceState and assigns it to the DesiredState field.
+func (o *InferenceServiceCreate) SetDesiredState(v InferenceServiceState) {
+ o.DesiredState = &v
+}
+
+// GetRegisteredModelId returns the RegisteredModelId field value
+func (o *InferenceServiceCreate) GetRegisteredModelId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RegisteredModelId
+}
+
+// GetRegisteredModelIdOk returns a tuple with the RegisteredModelId field value
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetRegisteredModelIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RegisteredModelId, true
+}
+
+// SetRegisteredModelId sets field value
+func (o *InferenceServiceCreate) SetRegisteredModelId(v string) {
+ o.RegisteredModelId = v
+}
+
+// GetServingEnvironmentId returns the ServingEnvironmentId field value
+func (o *InferenceServiceCreate) GetServingEnvironmentId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.ServingEnvironmentId
+}
+
+// GetServingEnvironmentIdOk returns a tuple with the ServingEnvironmentId field value
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceCreate) GetServingEnvironmentIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ServingEnvironmentId, true
+}
+
+// SetServingEnvironmentId sets field value
+func (o *InferenceServiceCreate) SetServingEnvironmentId(v string) {
+ o.ServingEnvironmentId = v
+}
+
+func (o InferenceServiceCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o InferenceServiceCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.ModelVersionId) {
+ toSerialize["modelVersionId"] = o.ModelVersionId
+ }
+ if !IsNil(o.Runtime) {
+ toSerialize["runtime"] = o.Runtime
+ }
+ if !IsNil(o.DesiredState) {
+ toSerialize["desiredState"] = o.DesiredState
+ }
+ toSerialize["registeredModelId"] = o.RegisteredModelId
+ toSerialize["servingEnvironmentId"] = o.ServingEnvironmentId
+ return toSerialize, nil
+}
+
+type NullableInferenceServiceCreate struct {
+ value *InferenceServiceCreate
+ isSet bool
+}
+
+func (v NullableInferenceServiceCreate) Get() *InferenceServiceCreate {
+ return v.value
+}
+
+func (v *NullableInferenceServiceCreate) Set(val *InferenceServiceCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInferenceServiceCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInferenceServiceCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInferenceServiceCreate(val *InferenceServiceCreate) *NullableInferenceServiceCreate {
+ return &NullableInferenceServiceCreate{value: val, isSet: true}
+}
+
+func (v NullableInferenceServiceCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInferenceServiceCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_inference_service_list.go b/pkg/openapi/model_inference_service_list.go
new file mode 100644
index 000000000..e016a5f88
--- /dev/null
+++ b/pkg/openapi/model_inference_service_list.go
@@ -0,0 +1,209 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the InferenceServiceList type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &InferenceServiceList{}
+
+// InferenceServiceList List of InferenceServices.
+type InferenceServiceList struct {
+ // Token to use to retrieve next page of results.
+ NextPageToken string `json:"nextPageToken"`
+ // Maximum number of resources to return in the result.
+ PageSize int32 `json:"pageSize"`
+ // Number of items in result list.
+ Size int32 `json:"size"`
+ //
+ Items []InferenceService `json:"items,omitempty"`
+}
+
+// NewInferenceServiceList instantiates a new InferenceServiceList object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewInferenceServiceList(nextPageToken string, pageSize int32, size int32) *InferenceServiceList {
+ this := InferenceServiceList{}
+ this.NextPageToken = nextPageToken
+ this.PageSize = pageSize
+ this.Size = size
+ return &this
+}
+
+// NewInferenceServiceListWithDefaults instantiates a new InferenceServiceList object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewInferenceServiceListWithDefaults() *InferenceServiceList {
+ this := InferenceServiceList{}
+ return &this
+}
+
+// GetNextPageToken returns the NextPageToken field value
+func (o *InferenceServiceList) GetNextPageToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.NextPageToken
+}
+
+// GetNextPageTokenOk returns a tuple with the NextPageToken field value
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceList) GetNextPageTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.NextPageToken, true
+}
+
+// SetNextPageToken sets field value
+func (o *InferenceServiceList) SetNextPageToken(v string) {
+ o.NextPageToken = v
+}
+
+// GetPageSize returns the PageSize field value
+func (o *InferenceServiceList) GetPageSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceList) GetPageSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.PageSize, true
+}
+
+// SetPageSize sets field value
+func (o *InferenceServiceList) SetPageSize(v int32) {
+ o.PageSize = v
+}
+
+// GetSize returns the Size field value
+func (o *InferenceServiceList) GetSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceList) GetSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Size, true
+}
+
+// SetSize sets field value
+func (o *InferenceServiceList) SetSize(v int32) {
+ o.Size = v
+}
+
+// GetItems returns the Items field value if set, zero value otherwise.
+func (o *InferenceServiceList) GetItems() []InferenceService {
+ if o == nil || IsNil(o.Items) {
+ var ret []InferenceService
+ return ret
+ }
+ return o.Items
+}
+
+// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceList) GetItemsOk() ([]InferenceService, bool) {
+ if o == nil || IsNil(o.Items) {
+ return nil, false
+ }
+ return o.Items, true
+}
+
+// HasItems returns a boolean if a field has been set.
+func (o *InferenceServiceList) HasItems() bool {
+ if o != nil && !IsNil(o.Items) {
+ return true
+ }
+
+ return false
+}
+
+// SetItems gets a reference to the given []InferenceService and assigns it to the Items field.
+func (o *InferenceServiceList) SetItems(v []InferenceService) {
+ o.Items = v
+}
+
+func (o InferenceServiceList) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o InferenceServiceList) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["nextPageToken"] = o.NextPageToken
+ toSerialize["pageSize"] = o.PageSize
+ toSerialize["size"] = o.Size
+ if !IsNil(o.Items) {
+ toSerialize["items"] = o.Items
+ }
+ return toSerialize, nil
+}
+
+type NullableInferenceServiceList struct {
+ value *InferenceServiceList
+ isSet bool
+}
+
+func (v NullableInferenceServiceList) Get() *InferenceServiceList {
+ return v.value
+}
+
+func (v *NullableInferenceServiceList) Set(val *InferenceServiceList) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInferenceServiceList) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInferenceServiceList) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInferenceServiceList(val *InferenceServiceList) *NullableInferenceServiceList {
+ return &NullableInferenceServiceList{value: val, isSet: true}
+}
+
+func (v NullableInferenceServiceList) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInferenceServiceList) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_inference_service_state.go b/pkg/openapi/model_inference_service_state.go
new file mode 100644
index 000000000..84c39e0b2
--- /dev/null
+++ b/pkg/openapi/model_inference_service_state.go
@@ -0,0 +1,110 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// InferenceServiceState - DEPLOYED: A state indicating that the `InferenceService` should be deployed. - UNDEPLOYED: A state indicating that the `InferenceService` should be un-deployed. The state indicates the desired state of inference service. See the associated `ServeModel` for the actual status of service deployment action.
+type InferenceServiceState string
+
+// List of InferenceServiceState
+const (
+ INFERENCESERVICESTATE_DEPLOYED InferenceServiceState = "DEPLOYED"
+ INFERENCESERVICESTATE_UNDEPLOYED InferenceServiceState = "UNDEPLOYED"
+)
+
+// All allowed values of InferenceServiceState enum
+var AllowedInferenceServiceStateEnumValues = []InferenceServiceState{
+ "DEPLOYED",
+ "UNDEPLOYED",
+}
+
+func (v *InferenceServiceState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := InferenceServiceState(value)
+ for _, existing := range AllowedInferenceServiceStateEnumValues {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid InferenceServiceState", value)
+}
+
+// NewInferenceServiceStateFromValue returns a pointer to a valid InferenceServiceState
+// for the value passed as argument, or an error if the value passed is not allowed by the enum
+func NewInferenceServiceStateFromValue(v string) (*InferenceServiceState, error) {
+ ev := InferenceServiceState(v)
+ if ev.IsValid() {
+ return &ev, nil
+ } else {
+ return nil, fmt.Errorf("invalid value '%v' for InferenceServiceState: valid values are %v", v, AllowedInferenceServiceStateEnumValues)
+ }
+}
+
+// IsValid return true if the value is valid for the enum, false otherwise
+func (v InferenceServiceState) IsValid() bool {
+ for _, existing := range AllowedInferenceServiceStateEnumValues {
+ if existing == v {
+ return true
+ }
+ }
+ return false
+}
+
+// Ptr returns reference to InferenceServiceState value
+func (v InferenceServiceState) Ptr() *InferenceServiceState {
+ return &v
+}
+
+type NullableInferenceServiceState struct {
+ value *InferenceServiceState
+ isSet bool
+}
+
+func (v NullableInferenceServiceState) Get() *InferenceServiceState {
+ return v.value
+}
+
+func (v *NullableInferenceServiceState) Set(val *InferenceServiceState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInferenceServiceState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInferenceServiceState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInferenceServiceState(val *InferenceServiceState) *NullableInferenceServiceState {
+ return &NullableInferenceServiceState{value: val, isSet: true}
+}
+
+func (v NullableInferenceServiceState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInferenceServiceState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_inference_service_update.go b/pkg/openapi/model_inference_service_update.go
new file mode 100644
index 000000000..9442f9178
--- /dev/null
+++ b/pkg/openapi/model_inference_service_update.go
@@ -0,0 +1,313 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the InferenceServiceUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &InferenceServiceUpdate{}
+
+// InferenceServiceUpdate An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving.
+type InferenceServiceUpdate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served.
+ ModelVersionId *string `json:"modelVersionId,omitempty"`
+ // Model runtime.
+ Runtime *string `json:"runtime,omitempty"`
+ DesiredState *InferenceServiceState `json:"desiredState,omitempty"`
+}
+
+// NewInferenceServiceUpdate instantiates a new InferenceServiceUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewInferenceServiceUpdate() *InferenceServiceUpdate {
+ this := InferenceServiceUpdate{}
+ var desiredState InferenceServiceState = INFERENCESERVICESTATE_DEPLOYED
+ this.DesiredState = &desiredState
+ return &this
+}
+
+// NewInferenceServiceUpdateWithDefaults instantiates a new InferenceServiceUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewInferenceServiceUpdateWithDefaults() *InferenceServiceUpdate {
+ this := InferenceServiceUpdate{}
+ var desiredState InferenceServiceState = INFERENCESERVICESTATE_DEPLOYED
+ this.DesiredState = &desiredState
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *InferenceServiceUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *InferenceServiceUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *InferenceServiceUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *InferenceServiceUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *InferenceServiceUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *InferenceServiceUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *InferenceServiceUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *InferenceServiceUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *InferenceServiceUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetModelVersionId returns the ModelVersionId field value if set, zero value otherwise.
+func (o *InferenceServiceUpdate) GetModelVersionId() string {
+ if o == nil || IsNil(o.ModelVersionId) {
+ var ret string
+ return ret
+ }
+ return *o.ModelVersionId
+}
+
+// GetModelVersionIdOk returns a tuple with the ModelVersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceUpdate) GetModelVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelVersionId) {
+ return nil, false
+ }
+ return o.ModelVersionId, true
+}
+
+// HasModelVersionId returns a boolean if a field has been set.
+func (o *InferenceServiceUpdate) HasModelVersionId() bool {
+ if o != nil && !IsNil(o.ModelVersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelVersionId gets a reference to the given string and assigns it to the ModelVersionId field.
+func (o *InferenceServiceUpdate) SetModelVersionId(v string) {
+ o.ModelVersionId = &v
+}
+
+// GetRuntime returns the Runtime field value if set, zero value otherwise.
+func (o *InferenceServiceUpdate) GetRuntime() string {
+ if o == nil || IsNil(o.Runtime) {
+ var ret string
+ return ret
+ }
+ return *o.Runtime
+}
+
+// GetRuntimeOk returns a tuple with the Runtime field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceUpdate) GetRuntimeOk() (*string, bool) {
+ if o == nil || IsNil(o.Runtime) {
+ return nil, false
+ }
+ return o.Runtime, true
+}
+
+// HasRuntime returns a boolean if a field has been set.
+func (o *InferenceServiceUpdate) HasRuntime() bool {
+ if o != nil && !IsNil(o.Runtime) {
+ return true
+ }
+
+ return false
+}
+
+// SetRuntime gets a reference to the given string and assigns it to the Runtime field.
+func (o *InferenceServiceUpdate) SetRuntime(v string) {
+ o.Runtime = &v
+}
+
+// GetDesiredState returns the DesiredState field value if set, zero value otherwise.
+func (o *InferenceServiceUpdate) GetDesiredState() InferenceServiceState {
+ if o == nil || IsNil(o.DesiredState) {
+ var ret InferenceServiceState
+ return ret
+ }
+ return *o.DesiredState
+}
+
+// GetDesiredStateOk returns a tuple with the DesiredState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InferenceServiceUpdate) GetDesiredStateOk() (*InferenceServiceState, bool) {
+ if o == nil || IsNil(o.DesiredState) {
+ return nil, false
+ }
+ return o.DesiredState, true
+}
+
+// HasDesiredState returns a boolean if a field has been set.
+func (o *InferenceServiceUpdate) HasDesiredState() bool {
+ if o != nil && !IsNil(o.DesiredState) {
+ return true
+ }
+
+ return false
+}
+
+// SetDesiredState gets a reference to the given InferenceServiceState and assigns it to the DesiredState field.
+func (o *InferenceServiceUpdate) SetDesiredState(v InferenceServiceState) {
+ o.DesiredState = &v
+}
+
+func (o InferenceServiceUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o InferenceServiceUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.ModelVersionId) {
+ toSerialize["modelVersionId"] = o.ModelVersionId
+ }
+ if !IsNil(o.Runtime) {
+ toSerialize["runtime"] = o.Runtime
+ }
+ if !IsNil(o.DesiredState) {
+ toSerialize["desiredState"] = o.DesiredState
+ }
+ return toSerialize, nil
+}
+
+type NullableInferenceServiceUpdate struct {
+ value *InferenceServiceUpdate
+ isSet bool
+}
+
+func (v NullableInferenceServiceUpdate) Get() *InferenceServiceUpdate {
+ return v.value
+}
+
+func (v *NullableInferenceServiceUpdate) Set(val *InferenceServiceUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInferenceServiceUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInferenceServiceUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInferenceServiceUpdate(val *InferenceServiceUpdate) *NullableInferenceServiceUpdate {
+ return &NullableInferenceServiceUpdate{value: val, isSet: true}
+}
+
+func (v NullableInferenceServiceUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInferenceServiceUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_metadata_bool_value.go b/pkg/openapi/model_metadata_bool_value.go
new file mode 100644
index 000000000..41cb261d7
--- /dev/null
+++ b/pkg/openapi/model_metadata_bool_value.go
@@ -0,0 +1,124 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the MetadataBoolValue type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &MetadataBoolValue{}
+
+// MetadataBoolValue A bool property value.
+type MetadataBoolValue struct {
+ BoolValue *bool `json:"bool_value,omitempty"`
+}
+
+// NewMetadataBoolValue instantiates a new MetadataBoolValue object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMetadataBoolValue() *MetadataBoolValue {
+ this := MetadataBoolValue{}
+ return &this
+}
+
+// NewMetadataBoolValueWithDefaults instantiates a new MetadataBoolValue object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMetadataBoolValueWithDefaults() *MetadataBoolValue {
+ this := MetadataBoolValue{}
+ return &this
+}
+
+// GetBoolValue returns the BoolValue field value if set, zero value otherwise.
+func (o *MetadataBoolValue) GetBoolValue() bool {
+ if o == nil || IsNil(o.BoolValue) {
+ var ret bool
+ return ret
+ }
+ return *o.BoolValue
+}
+
+// GetBoolValueOk returns a tuple with the BoolValue field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataBoolValue) GetBoolValueOk() (*bool, bool) {
+ if o == nil || IsNil(o.BoolValue) {
+ return nil, false
+ }
+ return o.BoolValue, true
+}
+
+// HasBoolValue returns a boolean if a field has been set.
+func (o *MetadataBoolValue) HasBoolValue() bool {
+ if o != nil && !IsNil(o.BoolValue) {
+ return true
+ }
+
+ return false
+}
+
+// SetBoolValue gets a reference to the given bool and assigns it to the BoolValue field.
+func (o *MetadataBoolValue) SetBoolValue(v bool) {
+ o.BoolValue = &v
+}
+
+func (o MetadataBoolValue) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o MetadataBoolValue) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.BoolValue) {
+ toSerialize["bool_value"] = o.BoolValue
+ }
+ return toSerialize, nil
+}
+
+type NullableMetadataBoolValue struct {
+ value *MetadataBoolValue
+ isSet bool
+}
+
+func (v NullableMetadataBoolValue) Get() *MetadataBoolValue {
+ return v.value
+}
+
+func (v *NullableMetadataBoolValue) Set(val *MetadataBoolValue) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMetadataBoolValue) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMetadataBoolValue) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMetadataBoolValue(val *MetadataBoolValue) *NullableMetadataBoolValue {
+ return &NullableMetadataBoolValue{value: val, isSet: true}
+}
+
+func (v NullableMetadataBoolValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMetadataBoolValue) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_metadata_double_value.go b/pkg/openapi/model_metadata_double_value.go
new file mode 100644
index 000000000..5ab14b9c9
--- /dev/null
+++ b/pkg/openapi/model_metadata_double_value.go
@@ -0,0 +1,124 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the MetadataDoubleValue type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &MetadataDoubleValue{}
+
+// MetadataDoubleValue A double property value.
+type MetadataDoubleValue struct {
+ DoubleValue *float64 `json:"double_value,omitempty"`
+}
+
+// NewMetadataDoubleValue instantiates a new MetadataDoubleValue object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMetadataDoubleValue() *MetadataDoubleValue {
+ this := MetadataDoubleValue{}
+ return &this
+}
+
+// NewMetadataDoubleValueWithDefaults instantiates a new MetadataDoubleValue object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMetadataDoubleValueWithDefaults() *MetadataDoubleValue {
+ this := MetadataDoubleValue{}
+ return &this
+}
+
+// GetDoubleValue returns the DoubleValue field value if set, zero value otherwise.
+func (o *MetadataDoubleValue) GetDoubleValue() float64 {
+ if o == nil || IsNil(o.DoubleValue) {
+ var ret float64
+ return ret
+ }
+ return *o.DoubleValue
+}
+
+// GetDoubleValueOk returns a tuple with the DoubleValue field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataDoubleValue) GetDoubleValueOk() (*float64, bool) {
+ if o == nil || IsNil(o.DoubleValue) {
+ return nil, false
+ }
+ return o.DoubleValue, true
+}
+
+// HasDoubleValue returns a boolean if a field has been set.
+func (o *MetadataDoubleValue) HasDoubleValue() bool {
+ if o != nil && !IsNil(o.DoubleValue) {
+ return true
+ }
+
+ return false
+}
+
+// SetDoubleValue gets a reference to the given float64 and assigns it to the DoubleValue field.
+func (o *MetadataDoubleValue) SetDoubleValue(v float64) {
+ o.DoubleValue = &v
+}
+
+func (o MetadataDoubleValue) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o MetadataDoubleValue) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DoubleValue) {
+ toSerialize["double_value"] = o.DoubleValue
+ }
+ return toSerialize, nil
+}
+
+type NullableMetadataDoubleValue struct {
+ value *MetadataDoubleValue
+ isSet bool
+}
+
+func (v NullableMetadataDoubleValue) Get() *MetadataDoubleValue {
+ return v.value
+}
+
+func (v *NullableMetadataDoubleValue) Set(val *MetadataDoubleValue) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMetadataDoubleValue) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMetadataDoubleValue) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMetadataDoubleValue(val *MetadataDoubleValue) *NullableMetadataDoubleValue {
+ return &NullableMetadataDoubleValue{value: val, isSet: true}
+}
+
+func (v NullableMetadataDoubleValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMetadataDoubleValue) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_metadata_int_value.go b/pkg/openapi/model_metadata_int_value.go
new file mode 100644
index 000000000..367c6cf46
--- /dev/null
+++ b/pkg/openapi/model_metadata_int_value.go
@@ -0,0 +1,124 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the MetadataIntValue type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &MetadataIntValue{}
+
+// MetadataIntValue An integer (int64) property value.
+type MetadataIntValue struct {
+ IntValue *string `json:"int_value,omitempty"`
+}
+
+// NewMetadataIntValue instantiates a new MetadataIntValue object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMetadataIntValue() *MetadataIntValue {
+ this := MetadataIntValue{}
+ return &this
+}
+
+// NewMetadataIntValueWithDefaults instantiates a new MetadataIntValue object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMetadataIntValueWithDefaults() *MetadataIntValue {
+ this := MetadataIntValue{}
+ return &this
+}
+
+// GetIntValue returns the IntValue field value if set, zero value otherwise.
+func (o *MetadataIntValue) GetIntValue() string {
+ if o == nil || IsNil(o.IntValue) {
+ var ret string
+ return ret
+ }
+ return *o.IntValue
+}
+
+// GetIntValueOk returns a tuple with the IntValue field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataIntValue) GetIntValueOk() (*string, bool) {
+ if o == nil || IsNil(o.IntValue) {
+ return nil, false
+ }
+ return o.IntValue, true
+}
+
+// HasIntValue returns a boolean if a field has been set.
+func (o *MetadataIntValue) HasIntValue() bool {
+ if o != nil && !IsNil(o.IntValue) {
+ return true
+ }
+
+ return false
+}
+
+// SetIntValue gets a reference to the given string and assigns it to the IntValue field.
+func (o *MetadataIntValue) SetIntValue(v string) {
+ o.IntValue = &v
+}
+
+func (o MetadataIntValue) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o MetadataIntValue) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.IntValue) {
+ toSerialize["int_value"] = o.IntValue
+ }
+ return toSerialize, nil
+}
+
+type NullableMetadataIntValue struct {
+ value *MetadataIntValue
+ isSet bool
+}
+
+func (v NullableMetadataIntValue) Get() *MetadataIntValue {
+ return v.value
+}
+
+func (v *NullableMetadataIntValue) Set(val *MetadataIntValue) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMetadataIntValue) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMetadataIntValue) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMetadataIntValue(val *MetadataIntValue) *NullableMetadataIntValue {
+ return &NullableMetadataIntValue{value: val, isSet: true}
+}
+
+func (v NullableMetadataIntValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMetadataIntValue) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_metadata_proto_value.go b/pkg/openapi/model_metadata_proto_value.go
new file mode 100644
index 000000000..1c29ecd2c
--- /dev/null
+++ b/pkg/openapi/model_metadata_proto_value.go
@@ -0,0 +1,162 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the MetadataProtoValue type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &MetadataProtoValue{}
+
+// MetadataProtoValue A proto property value.
+type MetadataProtoValue struct {
+ // url describing proto value
+ Type *string `json:"type,omitempty"`
+ // Base64 encoded bytes for proto value
+ ProtoValue *string `json:"proto_value,omitempty"`
+}
+
+// NewMetadataProtoValue instantiates a new MetadataProtoValue object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMetadataProtoValue() *MetadataProtoValue {
+ this := MetadataProtoValue{}
+ return &this
+}
+
+// NewMetadataProtoValueWithDefaults instantiates a new MetadataProtoValue object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMetadataProtoValueWithDefaults() *MetadataProtoValue {
+ this := MetadataProtoValue{}
+ return &this
+}
+
+// GetType returns the Type field value if set, zero value otherwise.
+func (o *MetadataProtoValue) GetType() string {
+ if o == nil || IsNil(o.Type) {
+ var ret string
+ return ret
+ }
+ return *o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataProtoValue) GetTypeOk() (*string, bool) {
+ if o == nil || IsNil(o.Type) {
+ return nil, false
+ }
+ return o.Type, true
+}
+
+// HasType returns a boolean if a field has been set.
+func (o *MetadataProtoValue) HasType() bool {
+ if o != nil && !IsNil(o.Type) {
+ return true
+ }
+
+ return false
+}
+
+// SetType gets a reference to the given string and assigns it to the Type field.
+func (o *MetadataProtoValue) SetType(v string) {
+ o.Type = &v
+}
+
+// GetProtoValue returns the ProtoValue field value if set, zero value otherwise.
+func (o *MetadataProtoValue) GetProtoValue() string {
+ if o == nil || IsNil(o.ProtoValue) {
+ var ret string
+ return ret
+ }
+ return *o.ProtoValue
+}
+
+// GetProtoValueOk returns a tuple with the ProtoValue field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataProtoValue) GetProtoValueOk() (*string, bool) {
+ if o == nil || IsNil(o.ProtoValue) {
+ return nil, false
+ }
+ return o.ProtoValue, true
+}
+
+// HasProtoValue returns a boolean if a field has been set.
+func (o *MetadataProtoValue) HasProtoValue() bool {
+ if o != nil && !IsNil(o.ProtoValue) {
+ return true
+ }
+
+ return false
+}
+
+// SetProtoValue gets a reference to the given string and assigns it to the ProtoValue field.
+func (o *MetadataProtoValue) SetProtoValue(v string) {
+ o.ProtoValue = &v
+}
+
+func (o MetadataProtoValue) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o MetadataProtoValue) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Type) {
+ toSerialize["type"] = o.Type
+ }
+ if !IsNil(o.ProtoValue) {
+ toSerialize["proto_value"] = o.ProtoValue
+ }
+ return toSerialize, nil
+}
+
+type NullableMetadataProtoValue struct {
+ value *MetadataProtoValue
+ isSet bool
+}
+
+func (v NullableMetadataProtoValue) Get() *MetadataProtoValue {
+ return v.value
+}
+
+func (v *NullableMetadataProtoValue) Set(val *MetadataProtoValue) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMetadataProtoValue) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMetadataProtoValue) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMetadataProtoValue(val *MetadataProtoValue) *NullableMetadataProtoValue {
+ return &NullableMetadataProtoValue{value: val, isSet: true}
+}
+
+func (v NullableMetadataProtoValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMetadataProtoValue) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_metadata_string_value.go b/pkg/openapi/model_metadata_string_value.go
new file mode 100644
index 000000000..bf40139a7
--- /dev/null
+++ b/pkg/openapi/model_metadata_string_value.go
@@ -0,0 +1,124 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the MetadataStringValue type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &MetadataStringValue{}
+
+// MetadataStringValue A string property value.
+type MetadataStringValue struct {
+ StringValue *string `json:"string_value,omitempty"`
+}
+
+// NewMetadataStringValue instantiates a new MetadataStringValue object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMetadataStringValue() *MetadataStringValue {
+ this := MetadataStringValue{}
+ return &this
+}
+
+// NewMetadataStringValueWithDefaults instantiates a new MetadataStringValue object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMetadataStringValueWithDefaults() *MetadataStringValue {
+ this := MetadataStringValue{}
+ return &this
+}
+
+// GetStringValue returns the StringValue field value if set, zero value otherwise.
+func (o *MetadataStringValue) GetStringValue() string {
+ if o == nil || IsNil(o.StringValue) {
+ var ret string
+ return ret
+ }
+ return *o.StringValue
+}
+
+// GetStringValueOk returns a tuple with the StringValue field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataStringValue) GetStringValueOk() (*string, bool) {
+ if o == nil || IsNil(o.StringValue) {
+ return nil, false
+ }
+ return o.StringValue, true
+}
+
+// HasStringValue returns a boolean if a field has been set.
+func (o *MetadataStringValue) HasStringValue() bool {
+ if o != nil && !IsNil(o.StringValue) {
+ return true
+ }
+
+ return false
+}
+
+// SetStringValue gets a reference to the given string and assigns it to the StringValue field.
+func (o *MetadataStringValue) SetStringValue(v string) {
+ o.StringValue = &v
+}
+
+func (o MetadataStringValue) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o MetadataStringValue) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.StringValue) {
+ toSerialize["string_value"] = o.StringValue
+ }
+ return toSerialize, nil
+}
+
+type NullableMetadataStringValue struct {
+ value *MetadataStringValue
+ isSet bool
+}
+
+func (v NullableMetadataStringValue) Get() *MetadataStringValue {
+ return v.value
+}
+
+func (v *NullableMetadataStringValue) Set(val *MetadataStringValue) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMetadataStringValue) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMetadataStringValue) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMetadataStringValue(val *MetadataStringValue) *NullableMetadataStringValue {
+ return &NullableMetadataStringValue{value: val, isSet: true}
+}
+
+func (v NullableMetadataStringValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMetadataStringValue) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_metadata_struct_value.go b/pkg/openapi/model_metadata_struct_value.go
new file mode 100644
index 000000000..fc4255ca9
--- /dev/null
+++ b/pkg/openapi/model_metadata_struct_value.go
@@ -0,0 +1,125 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the MetadataStructValue type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &MetadataStructValue{}
+
+// MetadataStructValue A struct property value.
+type MetadataStructValue struct {
+ // Base64 encoded bytes for struct value
+ StructValue *string `json:"struct_value,omitempty"`
+}
+
+// NewMetadataStructValue instantiates a new MetadataStructValue object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMetadataStructValue() *MetadataStructValue {
+ this := MetadataStructValue{}
+ return &this
+}
+
+// NewMetadataStructValueWithDefaults instantiates a new MetadataStructValue object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMetadataStructValueWithDefaults() *MetadataStructValue {
+ this := MetadataStructValue{}
+ return &this
+}
+
+// GetStructValue returns the StructValue field value if set, zero value otherwise.
+func (o *MetadataStructValue) GetStructValue() string {
+ if o == nil || IsNil(o.StructValue) {
+ var ret string
+ return ret
+ }
+ return *o.StructValue
+}
+
+// GetStructValueOk returns a tuple with the StructValue field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataStructValue) GetStructValueOk() (*string, bool) {
+ if o == nil || IsNil(o.StructValue) {
+ return nil, false
+ }
+ return o.StructValue, true
+}
+
+// HasStructValue returns a boolean if a field has been set.
+func (o *MetadataStructValue) HasStructValue() bool {
+ if o != nil && !IsNil(o.StructValue) {
+ return true
+ }
+
+ return false
+}
+
+// SetStructValue gets a reference to the given string and assigns it to the StructValue field.
+func (o *MetadataStructValue) SetStructValue(v string) {
+ o.StructValue = &v
+}
+
+func (o MetadataStructValue) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o MetadataStructValue) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.StructValue) {
+ toSerialize["struct_value"] = o.StructValue
+ }
+ return toSerialize, nil
+}
+
+type NullableMetadataStructValue struct {
+ value *MetadataStructValue
+ isSet bool
+}
+
+func (v NullableMetadataStructValue) Get() *MetadataStructValue {
+ return v.value
+}
+
+func (v *NullableMetadataStructValue) Set(val *MetadataStructValue) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMetadataStructValue) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMetadataStructValue) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMetadataStructValue(val *MetadataStructValue) *NullableMetadataStructValue {
+ return &NullableMetadataStructValue{value: val, isSet: true}
+}
+
+func (v NullableMetadataStructValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMetadataStructValue) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_metadata_value.go b/pkg/openapi/model_metadata_value.go
new file mode 100644
index 000000000..1ae1e9a0c
--- /dev/null
+++ b/pkg/openapi/model_metadata_value.go
@@ -0,0 +1,265 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// MetadataValue - A value in properties.
+type MetadataValue struct {
+ MetadataBoolValue *MetadataBoolValue
+ MetadataDoubleValue *MetadataDoubleValue
+ MetadataIntValue *MetadataIntValue
+ MetadataProtoValue *MetadataProtoValue
+ MetadataStringValue *MetadataStringValue
+ MetadataStructValue *MetadataStructValue
+}
+
+// MetadataBoolValueAsMetadataValue is a convenience function that returns MetadataBoolValue wrapped in MetadataValue
+func MetadataBoolValueAsMetadataValue(v *MetadataBoolValue) MetadataValue {
+ return MetadataValue{
+ MetadataBoolValue: v,
+ }
+}
+
+// MetadataDoubleValueAsMetadataValue is a convenience function that returns MetadataDoubleValue wrapped in MetadataValue
+func MetadataDoubleValueAsMetadataValue(v *MetadataDoubleValue) MetadataValue {
+ return MetadataValue{
+ MetadataDoubleValue: v,
+ }
+}
+
+// MetadataIntValueAsMetadataValue is a convenience function that returns MetadataIntValue wrapped in MetadataValue
+func MetadataIntValueAsMetadataValue(v *MetadataIntValue) MetadataValue {
+ return MetadataValue{
+ MetadataIntValue: v,
+ }
+}
+
+// MetadataProtoValueAsMetadataValue is a convenience function that returns MetadataProtoValue wrapped in MetadataValue
+func MetadataProtoValueAsMetadataValue(v *MetadataProtoValue) MetadataValue {
+ return MetadataValue{
+ MetadataProtoValue: v,
+ }
+}
+
+// MetadataStringValueAsMetadataValue is a convenience function that returns MetadataStringValue wrapped in MetadataValue
+func MetadataStringValueAsMetadataValue(v *MetadataStringValue) MetadataValue {
+ return MetadataValue{
+ MetadataStringValue: v,
+ }
+}
+
+// MetadataStructValueAsMetadataValue is a convenience function that returns MetadataStructValue wrapped in MetadataValue
+func MetadataStructValueAsMetadataValue(v *MetadataStructValue) MetadataValue {
+ return MetadataValue{
+ MetadataStructValue: v,
+ }
+}
+
+// Unmarshal JSON data into one of the pointers in the struct
+func (dst *MetadataValue) UnmarshalJSON(data []byte) error {
+ var err error
+ match := 0
+ // try to unmarshal data into MetadataBoolValue
+ err = json.Unmarshal(data, &dst.MetadataBoolValue)
+ if err == nil {
+ jsonMetadataBoolValue, _ := json.Marshal(dst.MetadataBoolValue)
+ if string(jsonMetadataBoolValue) == "{}" { // empty struct
+ dst.MetadataBoolValue = nil
+ } else {
+ match++
+ }
+ } else {
+ dst.MetadataBoolValue = nil
+ }
+
+ // try to unmarshal data into MetadataDoubleValue
+ err = json.Unmarshal(data, &dst.MetadataDoubleValue)
+ if err == nil {
+ jsonMetadataDoubleValue, _ := json.Marshal(dst.MetadataDoubleValue)
+ if string(jsonMetadataDoubleValue) == "{}" { // empty struct
+ dst.MetadataDoubleValue = nil
+ } else {
+ match++
+ }
+ } else {
+ dst.MetadataDoubleValue = nil
+ }
+
+ // try to unmarshal data into MetadataIntValue
+ err = json.Unmarshal(data, &dst.MetadataIntValue)
+ if err == nil {
+ jsonMetadataIntValue, _ := json.Marshal(dst.MetadataIntValue)
+ if string(jsonMetadataIntValue) == "{}" { // empty struct
+ dst.MetadataIntValue = nil
+ } else {
+ match++
+ }
+ } else {
+ dst.MetadataIntValue = nil
+ }
+
+ // try to unmarshal data into MetadataProtoValue
+ err = json.Unmarshal(data, &dst.MetadataProtoValue)
+ if err == nil {
+ jsonMetadataProtoValue, _ := json.Marshal(dst.MetadataProtoValue)
+ if string(jsonMetadataProtoValue) == "{}" { // empty struct
+ dst.MetadataProtoValue = nil
+ } else {
+ match++
+ }
+ } else {
+ dst.MetadataProtoValue = nil
+ }
+
+ // try to unmarshal data into MetadataStringValue
+ err = json.Unmarshal(data, &dst.MetadataStringValue)
+ if err == nil {
+ jsonMetadataStringValue, _ := json.Marshal(dst.MetadataStringValue)
+ if string(jsonMetadataStringValue) == "{}" { // empty struct
+ dst.MetadataStringValue = nil
+ } else {
+ match++
+ }
+ } else {
+ dst.MetadataStringValue = nil
+ }
+
+ // try to unmarshal data into MetadataStructValue
+ err = json.Unmarshal(data, &dst.MetadataStructValue)
+ if err == nil {
+ jsonMetadataStructValue, _ := json.Marshal(dst.MetadataStructValue)
+ if string(jsonMetadataStructValue) == "{}" { // empty struct
+ dst.MetadataStructValue = nil
+ } else {
+ match++
+ }
+ } else {
+ dst.MetadataStructValue = nil
+ }
+
+ if match > 1 { // more than 1 match
+ // reset to nil
+ dst.MetadataBoolValue = nil
+ dst.MetadataDoubleValue = nil
+ dst.MetadataIntValue = nil
+ dst.MetadataProtoValue = nil
+ dst.MetadataStringValue = nil
+ dst.MetadataStructValue = nil
+
+ return fmt.Errorf("data matches more than one schema in oneOf(MetadataValue)")
+ } else if match == 1 {
+ return nil // exactly one match
+ } else { // no match
+ return fmt.Errorf("data failed to match schemas in oneOf(MetadataValue)")
+ }
+}
+
+// Marshal data from the first non-nil pointers in the struct to JSON
+func (src MetadataValue) MarshalJSON() ([]byte, error) {
+ if src.MetadataBoolValue != nil {
+ return json.Marshal(&src.MetadataBoolValue)
+ }
+
+ if src.MetadataDoubleValue != nil {
+ return json.Marshal(&src.MetadataDoubleValue)
+ }
+
+ if src.MetadataIntValue != nil {
+ return json.Marshal(&src.MetadataIntValue)
+ }
+
+ if src.MetadataProtoValue != nil {
+ return json.Marshal(&src.MetadataProtoValue)
+ }
+
+ if src.MetadataStringValue != nil {
+ return json.Marshal(&src.MetadataStringValue)
+ }
+
+ if src.MetadataStructValue != nil {
+ return json.Marshal(&src.MetadataStructValue)
+ }
+
+ return nil, nil // no data in oneOf schemas
+}
+
+// Get the actual instance
+func (obj *MetadataValue) GetActualInstance() interface{} {
+ if obj == nil {
+ return nil
+ }
+ if obj.MetadataBoolValue != nil {
+ return obj.MetadataBoolValue
+ }
+
+ if obj.MetadataDoubleValue != nil {
+ return obj.MetadataDoubleValue
+ }
+
+ if obj.MetadataIntValue != nil {
+ return obj.MetadataIntValue
+ }
+
+ if obj.MetadataProtoValue != nil {
+ return obj.MetadataProtoValue
+ }
+
+ if obj.MetadataStringValue != nil {
+ return obj.MetadataStringValue
+ }
+
+ if obj.MetadataStructValue != nil {
+ return obj.MetadataStructValue
+ }
+
+ // all schemas are nil
+ return nil
+}
+
+type NullableMetadataValue struct {
+ value *MetadataValue
+ isSet bool
+}
+
+func (v NullableMetadataValue) Get() *MetadataValue {
+ return v.value
+}
+
+func (v *NullableMetadataValue) Set(val *MetadataValue) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMetadataValue) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMetadataValue) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMetadataValue(val *MetadataValue) *NullableMetadataValue {
+ return &NullableMetadataValue{value: val, isSet: true}
+}
+
+func (v NullableMetadataValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMetadataValue) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_artifact.go b/pkg/openapi/model_model_artifact.go
new file mode 100644
index 000000000..56d708c92
--- /dev/null
+++ b/pkg/openapi/model_model_artifact.go
@@ -0,0 +1,638 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ModelArtifact type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ModelArtifact{}
+
+// ModelArtifact An ML model artifact.
+type ModelArtifact struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact.
+ Uri *string `json:"uri,omitempty"`
+ State *ArtifactState `json:"state,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+ ArtifactType string `json:"artifactType"`
+ // Name of the model format.
+ ModelFormatName *string `json:"modelFormatName,omitempty"`
+ // Storage secret name.
+ StorageKey *string `json:"storageKey,omitempty"`
+ // Path for model in storage provided by `storageKey`.
+ StoragePath *string `json:"storagePath,omitempty"`
+ // Version of the model format.
+ ModelFormatVersion *string `json:"modelFormatVersion,omitempty"`
+ // Name of the service account with storage secret.
+ ServiceAccountName *string `json:"serviceAccountName,omitempty"`
+}
+
+// NewModelArtifact instantiates a new ModelArtifact object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModelArtifact(artifactType string) *ModelArtifact {
+ this := ModelArtifact{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ this.ArtifactType = artifactType
+ return &this
+}
+
+// NewModelArtifactWithDefaults instantiates a new ModelArtifact object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModelArtifactWithDefaults() *ModelArtifact {
+ this := ModelArtifact{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ var artifactType string = "model-artifact"
+ this.ArtifactType = artifactType
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ModelArtifact) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ModelArtifact) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ModelArtifact) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ModelArtifact) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ModelArtifact) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ModelArtifact) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ModelArtifact) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ModelArtifact) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ModelArtifact) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetUri returns the Uri field value if set, zero value otherwise.
+func (o *ModelArtifact) GetUri() string {
+ if o == nil || IsNil(o.Uri) {
+ var ret string
+ return ret
+ }
+ return *o.Uri
+}
+
+// GetUriOk returns a tuple with the Uri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetUriOk() (*string, bool) {
+ if o == nil || IsNil(o.Uri) {
+ return nil, false
+ }
+ return o.Uri, true
+}
+
+// HasUri returns a boolean if a field has been set.
+func (o *ModelArtifact) HasUri() bool {
+ if o != nil && !IsNil(o.Uri) {
+ return true
+ }
+
+ return false
+}
+
+// SetUri gets a reference to the given string and assigns it to the Uri field.
+func (o *ModelArtifact) SetUri(v string) {
+ o.Uri = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *ModelArtifact) GetState() ArtifactState {
+ if o == nil || IsNil(o.State) {
+ var ret ArtifactState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetStateOk() (*ArtifactState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *ModelArtifact) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ArtifactState and assigns it to the State field.
+func (o *ModelArtifact) SetState(v ArtifactState) {
+ o.State = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ModelArtifact) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ModelArtifact) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ModelArtifact) SetName(v string) {
+ o.Name = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *ModelArtifact) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *ModelArtifact) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *ModelArtifact) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *ModelArtifact) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *ModelArtifact) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *ModelArtifact) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *ModelArtifact) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *ModelArtifact) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *ModelArtifact) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+// GetArtifactType returns the ArtifactType field value
+func (o *ModelArtifact) GetArtifactType() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.ArtifactType
+}
+
+// GetArtifactTypeOk returns a tuple with the ArtifactType field value
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetArtifactTypeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ArtifactType, true
+}
+
+// SetArtifactType sets field value
+func (o *ModelArtifact) SetArtifactType(v string) {
+ o.ArtifactType = v
+}
+
+// GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise.
+func (o *ModelArtifact) GetModelFormatName() string {
+ if o == nil || IsNil(o.ModelFormatName) {
+ var ret string
+ return ret
+ }
+ return *o.ModelFormatName
+}
+
+// GetModelFormatNameOk returns a tuple with the ModelFormatName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetModelFormatNameOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelFormatName) {
+ return nil, false
+ }
+ return o.ModelFormatName, true
+}
+
+// HasModelFormatName returns a boolean if a field has been set.
+func (o *ModelArtifact) HasModelFormatName() bool {
+ if o != nil && !IsNil(o.ModelFormatName) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelFormatName gets a reference to the given string and assigns it to the ModelFormatName field.
+func (o *ModelArtifact) SetModelFormatName(v string) {
+ o.ModelFormatName = &v
+}
+
+// GetStorageKey returns the StorageKey field value if set, zero value otherwise.
+func (o *ModelArtifact) GetStorageKey() string {
+ if o == nil || IsNil(o.StorageKey) {
+ var ret string
+ return ret
+ }
+ return *o.StorageKey
+}
+
+// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetStorageKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.StorageKey) {
+ return nil, false
+ }
+ return o.StorageKey, true
+}
+
+// HasStorageKey returns a boolean if a field has been set.
+func (o *ModelArtifact) HasStorageKey() bool {
+ if o != nil && !IsNil(o.StorageKey) {
+ return true
+ }
+
+ return false
+}
+
+// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field.
+func (o *ModelArtifact) SetStorageKey(v string) {
+ o.StorageKey = &v
+}
+
+// GetStoragePath returns the StoragePath field value if set, zero value otherwise.
+func (o *ModelArtifact) GetStoragePath() string {
+ if o == nil || IsNil(o.StoragePath) {
+ var ret string
+ return ret
+ }
+ return *o.StoragePath
+}
+
+// GetStoragePathOk returns a tuple with the StoragePath field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetStoragePathOk() (*string, bool) {
+ if o == nil || IsNil(o.StoragePath) {
+ return nil, false
+ }
+ return o.StoragePath, true
+}
+
+// HasStoragePath returns a boolean if a field has been set.
+func (o *ModelArtifact) HasStoragePath() bool {
+ if o != nil && !IsNil(o.StoragePath) {
+ return true
+ }
+
+ return false
+}
+
+// SetStoragePath gets a reference to the given string and assigns it to the StoragePath field.
+func (o *ModelArtifact) SetStoragePath(v string) {
+ o.StoragePath = &v
+}
+
+// GetModelFormatVersion returns the ModelFormatVersion field value if set, zero value otherwise.
+func (o *ModelArtifact) GetModelFormatVersion() string {
+ if o == nil || IsNil(o.ModelFormatVersion) {
+ var ret string
+ return ret
+ }
+ return *o.ModelFormatVersion
+}
+
+// GetModelFormatVersionOk returns a tuple with the ModelFormatVersion field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetModelFormatVersionOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelFormatVersion) {
+ return nil, false
+ }
+ return o.ModelFormatVersion, true
+}
+
+// HasModelFormatVersion returns a boolean if a field has been set.
+func (o *ModelArtifact) HasModelFormatVersion() bool {
+ if o != nil && !IsNil(o.ModelFormatVersion) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelFormatVersion gets a reference to the given string and assigns it to the ModelFormatVersion field.
+func (o *ModelArtifact) SetModelFormatVersion(v string) {
+ o.ModelFormatVersion = &v
+}
+
+// GetServiceAccountName returns the ServiceAccountName field value if set, zero value otherwise.
+func (o *ModelArtifact) GetServiceAccountName() string {
+ if o == nil || IsNil(o.ServiceAccountName) {
+ var ret string
+ return ret
+ }
+ return *o.ServiceAccountName
+}
+
+// GetServiceAccountNameOk returns a tuple with the ServiceAccountName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifact) GetServiceAccountNameOk() (*string, bool) {
+ if o == nil || IsNil(o.ServiceAccountName) {
+ return nil, false
+ }
+ return o.ServiceAccountName, true
+}
+
+// HasServiceAccountName returns a boolean if a field has been set.
+func (o *ModelArtifact) HasServiceAccountName() bool {
+ if o != nil && !IsNil(o.ServiceAccountName) {
+ return true
+ }
+
+ return false
+}
+
+// SetServiceAccountName gets a reference to the given string and assigns it to the ServiceAccountName field.
+func (o *ModelArtifact) SetServiceAccountName(v string) {
+ o.ServiceAccountName = &v
+}
+
+func (o ModelArtifact) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ModelArtifact) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ toSerialize["artifactType"] = o.ArtifactType
+ if !IsNil(o.ModelFormatName) {
+ toSerialize["modelFormatName"] = o.ModelFormatName
+ }
+ if !IsNil(o.StorageKey) {
+ toSerialize["storageKey"] = o.StorageKey
+ }
+ if !IsNil(o.StoragePath) {
+ toSerialize["storagePath"] = o.StoragePath
+ }
+ if !IsNil(o.ModelFormatVersion) {
+ toSerialize["modelFormatVersion"] = o.ModelFormatVersion
+ }
+ if !IsNil(o.ServiceAccountName) {
+ toSerialize["serviceAccountName"] = o.ServiceAccountName
+ }
+ return toSerialize, nil
+}
+
+type NullableModelArtifact struct {
+ value *ModelArtifact
+ isSet bool
+}
+
+func (v NullableModelArtifact) Get() *ModelArtifact {
+ return v.value
+}
+
+func (v *NullableModelArtifact) Set(val *ModelArtifact) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelArtifact) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelArtifact) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelArtifact(val *ModelArtifact) *NullableModelArtifact {
+ return &NullableModelArtifact{value: val, isSet: true}
+}
+
+func (v NullableModelArtifact) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelArtifact) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_artifact_create.go b/pkg/openapi/model_model_artifact_create.go
new file mode 100644
index 000000000..b01bba78b
--- /dev/null
+++ b/pkg/openapi/model_model_artifact_create.go
@@ -0,0 +1,498 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ModelArtifactCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ModelArtifactCreate{}
+
+// ModelArtifactCreate An ML model artifact.
+type ModelArtifactCreate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact.
+ Uri *string `json:"uri,omitempty"`
+ State *ArtifactState `json:"state,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Name of the model format.
+ ModelFormatName *string `json:"modelFormatName,omitempty"`
+ // Storage secret name.
+ StorageKey *string `json:"storageKey,omitempty"`
+ // Path for model in storage provided by `storageKey`.
+ StoragePath *string `json:"storagePath,omitempty"`
+ // Version of the model format.
+ ModelFormatVersion *string `json:"modelFormatVersion,omitempty"`
+ // Name of the service account with storage secret.
+ ServiceAccountName *string `json:"serviceAccountName,omitempty"`
+}
+
+// NewModelArtifactCreate instantiates a new ModelArtifactCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModelArtifactCreate() *ModelArtifactCreate {
+ this := ModelArtifactCreate{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// NewModelArtifactCreateWithDefaults instantiates a new ModelArtifactCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModelArtifactCreateWithDefaults() *ModelArtifactCreate {
+ this := ModelArtifactCreate{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ModelArtifactCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ModelArtifactCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ModelArtifactCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetUri returns the Uri field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetUri() string {
+ if o == nil || IsNil(o.Uri) {
+ var ret string
+ return ret
+ }
+ return *o.Uri
+}
+
+// GetUriOk returns a tuple with the Uri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetUriOk() (*string, bool) {
+ if o == nil || IsNil(o.Uri) {
+ return nil, false
+ }
+ return o.Uri, true
+}
+
+// HasUri returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasUri() bool {
+ if o != nil && !IsNil(o.Uri) {
+ return true
+ }
+
+ return false
+}
+
+// SetUri gets a reference to the given string and assigns it to the Uri field.
+func (o *ModelArtifactCreate) SetUri(v string) {
+ o.Uri = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetState() ArtifactState {
+ if o == nil || IsNil(o.State) {
+ var ret ArtifactState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetStateOk() (*ArtifactState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ArtifactState and assigns it to the State field.
+func (o *ModelArtifactCreate) SetState(v ArtifactState) {
+ o.State = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ModelArtifactCreate) SetName(v string) {
+ o.Name = &v
+}
+
+// GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetModelFormatName() string {
+ if o == nil || IsNil(o.ModelFormatName) {
+ var ret string
+ return ret
+ }
+ return *o.ModelFormatName
+}
+
+// GetModelFormatNameOk returns a tuple with the ModelFormatName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetModelFormatNameOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelFormatName) {
+ return nil, false
+ }
+ return o.ModelFormatName, true
+}
+
+// HasModelFormatName returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasModelFormatName() bool {
+ if o != nil && !IsNil(o.ModelFormatName) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelFormatName gets a reference to the given string and assigns it to the ModelFormatName field.
+func (o *ModelArtifactCreate) SetModelFormatName(v string) {
+ o.ModelFormatName = &v
+}
+
+// GetStorageKey returns the StorageKey field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetStorageKey() string {
+ if o == nil || IsNil(o.StorageKey) {
+ var ret string
+ return ret
+ }
+ return *o.StorageKey
+}
+
+// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetStorageKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.StorageKey) {
+ return nil, false
+ }
+ return o.StorageKey, true
+}
+
+// HasStorageKey returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasStorageKey() bool {
+ if o != nil && !IsNil(o.StorageKey) {
+ return true
+ }
+
+ return false
+}
+
+// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field.
+func (o *ModelArtifactCreate) SetStorageKey(v string) {
+ o.StorageKey = &v
+}
+
+// GetStoragePath returns the StoragePath field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetStoragePath() string {
+ if o == nil || IsNil(o.StoragePath) {
+ var ret string
+ return ret
+ }
+ return *o.StoragePath
+}
+
+// GetStoragePathOk returns a tuple with the StoragePath field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetStoragePathOk() (*string, bool) {
+ if o == nil || IsNil(o.StoragePath) {
+ return nil, false
+ }
+ return o.StoragePath, true
+}
+
+// HasStoragePath returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasStoragePath() bool {
+ if o != nil && !IsNil(o.StoragePath) {
+ return true
+ }
+
+ return false
+}
+
+// SetStoragePath gets a reference to the given string and assigns it to the StoragePath field.
+func (o *ModelArtifactCreate) SetStoragePath(v string) {
+ o.StoragePath = &v
+}
+
+// GetModelFormatVersion returns the ModelFormatVersion field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetModelFormatVersion() string {
+ if o == nil || IsNil(o.ModelFormatVersion) {
+ var ret string
+ return ret
+ }
+ return *o.ModelFormatVersion
+}
+
+// GetModelFormatVersionOk returns a tuple with the ModelFormatVersion field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetModelFormatVersionOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelFormatVersion) {
+ return nil, false
+ }
+ return o.ModelFormatVersion, true
+}
+
+// HasModelFormatVersion returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasModelFormatVersion() bool {
+ if o != nil && !IsNil(o.ModelFormatVersion) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelFormatVersion gets a reference to the given string and assigns it to the ModelFormatVersion field.
+func (o *ModelArtifactCreate) SetModelFormatVersion(v string) {
+ o.ModelFormatVersion = &v
+}
+
+// GetServiceAccountName returns the ServiceAccountName field value if set, zero value otherwise.
+func (o *ModelArtifactCreate) GetServiceAccountName() string {
+ if o == nil || IsNil(o.ServiceAccountName) {
+ var ret string
+ return ret
+ }
+ return *o.ServiceAccountName
+}
+
+// GetServiceAccountNameOk returns a tuple with the ServiceAccountName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactCreate) GetServiceAccountNameOk() (*string, bool) {
+ if o == nil || IsNil(o.ServiceAccountName) {
+ return nil, false
+ }
+ return o.ServiceAccountName, true
+}
+
+// HasServiceAccountName returns a boolean if a field has been set.
+func (o *ModelArtifactCreate) HasServiceAccountName() bool {
+ if o != nil && !IsNil(o.ServiceAccountName) {
+ return true
+ }
+
+ return false
+}
+
+// SetServiceAccountName gets a reference to the given string and assigns it to the ServiceAccountName field.
+func (o *ModelArtifactCreate) SetServiceAccountName(v string) {
+ o.ServiceAccountName = &v
+}
+
+func (o ModelArtifactCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ModelArtifactCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.ModelFormatName) {
+ toSerialize["modelFormatName"] = o.ModelFormatName
+ }
+ if !IsNil(o.StorageKey) {
+ toSerialize["storageKey"] = o.StorageKey
+ }
+ if !IsNil(o.StoragePath) {
+ toSerialize["storagePath"] = o.StoragePath
+ }
+ if !IsNil(o.ModelFormatVersion) {
+ toSerialize["modelFormatVersion"] = o.ModelFormatVersion
+ }
+ if !IsNil(o.ServiceAccountName) {
+ toSerialize["serviceAccountName"] = o.ServiceAccountName
+ }
+ return toSerialize, nil
+}
+
+type NullableModelArtifactCreate struct {
+ value *ModelArtifactCreate
+ isSet bool
+}
+
+func (v NullableModelArtifactCreate) Get() *ModelArtifactCreate {
+ return v.value
+}
+
+func (v *NullableModelArtifactCreate) Set(val *ModelArtifactCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelArtifactCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelArtifactCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelArtifactCreate(val *ModelArtifactCreate) *NullableModelArtifactCreate {
+ return &NullableModelArtifactCreate{value: val, isSet: true}
+}
+
+func (v NullableModelArtifactCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelArtifactCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_artifact_list.go b/pkg/openapi/model_model_artifact_list.go
new file mode 100644
index 000000000..93da4e4b3
--- /dev/null
+++ b/pkg/openapi/model_model_artifact_list.go
@@ -0,0 +1,209 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ModelArtifactList type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ModelArtifactList{}
+
+// ModelArtifactList List of ModelArtifact entities.
+type ModelArtifactList struct {
+ // Token to use to retrieve next page of results.
+ NextPageToken string `json:"nextPageToken"`
+ // Maximum number of resources to return in the result.
+ PageSize int32 `json:"pageSize"`
+ // Number of items in result list.
+ Size int32 `json:"size"`
+ // Array of `ModelArtifact` entities.
+ Items []ModelArtifact `json:"items,omitempty"`
+}
+
+// NewModelArtifactList instantiates a new ModelArtifactList object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModelArtifactList(nextPageToken string, pageSize int32, size int32) *ModelArtifactList {
+ this := ModelArtifactList{}
+ this.NextPageToken = nextPageToken
+ this.PageSize = pageSize
+ this.Size = size
+ return &this
+}
+
+// NewModelArtifactListWithDefaults instantiates a new ModelArtifactList object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModelArtifactListWithDefaults() *ModelArtifactList {
+ this := ModelArtifactList{}
+ return &this
+}
+
+// GetNextPageToken returns the NextPageToken field value
+func (o *ModelArtifactList) GetNextPageToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.NextPageToken
+}
+
+// GetNextPageTokenOk returns a tuple with the NextPageToken field value
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactList) GetNextPageTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.NextPageToken, true
+}
+
+// SetNextPageToken sets field value
+func (o *ModelArtifactList) SetNextPageToken(v string) {
+ o.NextPageToken = v
+}
+
+// GetPageSize returns the PageSize field value
+func (o *ModelArtifactList) GetPageSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactList) GetPageSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.PageSize, true
+}
+
+// SetPageSize sets field value
+func (o *ModelArtifactList) SetPageSize(v int32) {
+ o.PageSize = v
+}
+
+// GetSize returns the Size field value
+func (o *ModelArtifactList) GetSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactList) GetSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Size, true
+}
+
+// SetSize sets field value
+func (o *ModelArtifactList) SetSize(v int32) {
+ o.Size = v
+}
+
+// GetItems returns the Items field value if set, zero value otherwise.
+func (o *ModelArtifactList) GetItems() []ModelArtifact {
+ if o == nil || IsNil(o.Items) {
+ var ret []ModelArtifact
+ return ret
+ }
+ return o.Items
+}
+
+// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactList) GetItemsOk() ([]ModelArtifact, bool) {
+ if o == nil || IsNil(o.Items) {
+ return nil, false
+ }
+ return o.Items, true
+}
+
+// HasItems returns a boolean if a field has been set.
+func (o *ModelArtifactList) HasItems() bool {
+ if o != nil && !IsNil(o.Items) {
+ return true
+ }
+
+ return false
+}
+
+// SetItems gets a reference to the given []ModelArtifact and assigns it to the Items field.
+func (o *ModelArtifactList) SetItems(v []ModelArtifact) {
+ o.Items = v
+}
+
+func (o ModelArtifactList) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ModelArtifactList) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["nextPageToken"] = o.NextPageToken
+ toSerialize["pageSize"] = o.PageSize
+ toSerialize["size"] = o.Size
+ if !IsNil(o.Items) {
+ toSerialize["items"] = o.Items
+ }
+ return toSerialize, nil
+}
+
+type NullableModelArtifactList struct {
+ value *ModelArtifactList
+ isSet bool
+}
+
+func (v NullableModelArtifactList) Get() *ModelArtifactList {
+ return v.value
+}
+
+func (v *NullableModelArtifactList) Set(val *ModelArtifactList) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelArtifactList) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelArtifactList) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelArtifactList(val *ModelArtifactList) *NullableModelArtifactList {
+ return &NullableModelArtifactList{value: val, isSet: true}
+}
+
+func (v NullableModelArtifactList) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelArtifactList) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_artifact_update.go b/pkg/openapi/model_model_artifact_update.go
new file mode 100644
index 000000000..e114c5f0d
--- /dev/null
+++ b/pkg/openapi/model_model_artifact_update.go
@@ -0,0 +1,461 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ModelArtifactUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ModelArtifactUpdate{}
+
+// ModelArtifactUpdate An ML model artifact.
+type ModelArtifactUpdate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact.
+ Uri *string `json:"uri,omitempty"`
+ State *ArtifactState `json:"state,omitempty"`
+ // Name of the model format.
+ ModelFormatName *string `json:"modelFormatName,omitempty"`
+ // Storage secret name.
+ StorageKey *string `json:"storageKey,omitempty"`
+ // Path for model in storage provided by `storageKey`.
+ StoragePath *string `json:"storagePath,omitempty"`
+ // Version of the model format.
+ ModelFormatVersion *string `json:"modelFormatVersion,omitempty"`
+ // Name of the service account with storage secret.
+ ServiceAccountName *string `json:"serviceAccountName,omitempty"`
+}
+
+// NewModelArtifactUpdate instantiates a new ModelArtifactUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModelArtifactUpdate() *ModelArtifactUpdate {
+ this := ModelArtifactUpdate{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// NewModelArtifactUpdateWithDefaults instantiates a new ModelArtifactUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModelArtifactUpdateWithDefaults() *ModelArtifactUpdate {
+ this := ModelArtifactUpdate{}
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ModelArtifactUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ModelArtifactUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ModelArtifactUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetUri returns the Uri field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetUri() string {
+ if o == nil || IsNil(o.Uri) {
+ var ret string
+ return ret
+ }
+ return *o.Uri
+}
+
+// GetUriOk returns a tuple with the Uri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetUriOk() (*string, bool) {
+ if o == nil || IsNil(o.Uri) {
+ return nil, false
+ }
+ return o.Uri, true
+}
+
+// HasUri returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasUri() bool {
+ if o != nil && !IsNil(o.Uri) {
+ return true
+ }
+
+ return false
+}
+
+// SetUri gets a reference to the given string and assigns it to the Uri field.
+func (o *ModelArtifactUpdate) SetUri(v string) {
+ o.Uri = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetState() ArtifactState {
+ if o == nil || IsNil(o.State) {
+ var ret ArtifactState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetStateOk() (*ArtifactState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ArtifactState and assigns it to the State field.
+func (o *ModelArtifactUpdate) SetState(v ArtifactState) {
+ o.State = &v
+}
+
+// GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetModelFormatName() string {
+ if o == nil || IsNil(o.ModelFormatName) {
+ var ret string
+ return ret
+ }
+ return *o.ModelFormatName
+}
+
+// GetModelFormatNameOk returns a tuple with the ModelFormatName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetModelFormatNameOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelFormatName) {
+ return nil, false
+ }
+ return o.ModelFormatName, true
+}
+
+// HasModelFormatName returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasModelFormatName() bool {
+ if o != nil && !IsNil(o.ModelFormatName) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelFormatName gets a reference to the given string and assigns it to the ModelFormatName field.
+func (o *ModelArtifactUpdate) SetModelFormatName(v string) {
+ o.ModelFormatName = &v
+}
+
+// GetStorageKey returns the StorageKey field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetStorageKey() string {
+ if o == nil || IsNil(o.StorageKey) {
+ var ret string
+ return ret
+ }
+ return *o.StorageKey
+}
+
+// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetStorageKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.StorageKey) {
+ return nil, false
+ }
+ return o.StorageKey, true
+}
+
+// HasStorageKey returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasStorageKey() bool {
+ if o != nil && !IsNil(o.StorageKey) {
+ return true
+ }
+
+ return false
+}
+
+// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field.
+func (o *ModelArtifactUpdate) SetStorageKey(v string) {
+ o.StorageKey = &v
+}
+
+// GetStoragePath returns the StoragePath field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetStoragePath() string {
+ if o == nil || IsNil(o.StoragePath) {
+ var ret string
+ return ret
+ }
+ return *o.StoragePath
+}
+
+// GetStoragePathOk returns a tuple with the StoragePath field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetStoragePathOk() (*string, bool) {
+ if o == nil || IsNil(o.StoragePath) {
+ return nil, false
+ }
+ return o.StoragePath, true
+}
+
+// HasStoragePath returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasStoragePath() bool {
+ if o != nil && !IsNil(o.StoragePath) {
+ return true
+ }
+
+ return false
+}
+
+// SetStoragePath gets a reference to the given string and assigns it to the StoragePath field.
+func (o *ModelArtifactUpdate) SetStoragePath(v string) {
+ o.StoragePath = &v
+}
+
+// GetModelFormatVersion returns the ModelFormatVersion field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetModelFormatVersion() string {
+ if o == nil || IsNil(o.ModelFormatVersion) {
+ var ret string
+ return ret
+ }
+ return *o.ModelFormatVersion
+}
+
+// GetModelFormatVersionOk returns a tuple with the ModelFormatVersion field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetModelFormatVersionOk() (*string, bool) {
+ if o == nil || IsNil(o.ModelFormatVersion) {
+ return nil, false
+ }
+ return o.ModelFormatVersion, true
+}
+
+// HasModelFormatVersion returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasModelFormatVersion() bool {
+ if o != nil && !IsNil(o.ModelFormatVersion) {
+ return true
+ }
+
+ return false
+}
+
+// SetModelFormatVersion gets a reference to the given string and assigns it to the ModelFormatVersion field.
+func (o *ModelArtifactUpdate) SetModelFormatVersion(v string) {
+ o.ModelFormatVersion = &v
+}
+
+// GetServiceAccountName returns the ServiceAccountName field value if set, zero value otherwise.
+func (o *ModelArtifactUpdate) GetServiceAccountName() string {
+ if o == nil || IsNil(o.ServiceAccountName) {
+ var ret string
+ return ret
+ }
+ return *o.ServiceAccountName
+}
+
+// GetServiceAccountNameOk returns a tuple with the ServiceAccountName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelArtifactUpdate) GetServiceAccountNameOk() (*string, bool) {
+ if o == nil || IsNil(o.ServiceAccountName) {
+ return nil, false
+ }
+ return o.ServiceAccountName, true
+}
+
+// HasServiceAccountName returns a boolean if a field has been set.
+func (o *ModelArtifactUpdate) HasServiceAccountName() bool {
+ if o != nil && !IsNil(o.ServiceAccountName) {
+ return true
+ }
+
+ return false
+}
+
+// SetServiceAccountName gets a reference to the given string and assigns it to the ServiceAccountName field.
+func (o *ModelArtifactUpdate) SetServiceAccountName(v string) {
+ o.ServiceAccountName = &v
+}
+
+func (o ModelArtifactUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ModelArtifactUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ if !IsNil(o.ModelFormatName) {
+ toSerialize["modelFormatName"] = o.ModelFormatName
+ }
+ if !IsNil(o.StorageKey) {
+ toSerialize["storageKey"] = o.StorageKey
+ }
+ if !IsNil(o.StoragePath) {
+ toSerialize["storagePath"] = o.StoragePath
+ }
+ if !IsNil(o.ModelFormatVersion) {
+ toSerialize["modelFormatVersion"] = o.ModelFormatVersion
+ }
+ if !IsNil(o.ServiceAccountName) {
+ toSerialize["serviceAccountName"] = o.ServiceAccountName
+ }
+ return toSerialize, nil
+}
+
+type NullableModelArtifactUpdate struct {
+ value *ModelArtifactUpdate
+ isSet bool
+}
+
+func (v NullableModelArtifactUpdate) Get() *ModelArtifactUpdate {
+ return v.value
+}
+
+func (v *NullableModelArtifactUpdate) Set(val *ModelArtifactUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelArtifactUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelArtifactUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelArtifactUpdate(val *ModelArtifactUpdate) *NullableModelArtifactUpdate {
+ return &NullableModelArtifactUpdate{value: val, isSet: true}
+}
+
+func (v NullableModelArtifactUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelArtifactUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_version.go b/pkg/openapi/model_model_version.go
new file mode 100644
index 000000000..ee21bbbb5
--- /dev/null
+++ b/pkg/openapi/model_model_version.go
@@ -0,0 +1,424 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ModelVersion type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ModelVersion{}
+
+// ModelVersion Represents a ModelVersion belonging to a RegisteredModel.
+type ModelVersion struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ State *ModelVersionState `json:"state,omitempty"`
+ // Name of the author.
+ Author *string `json:"author,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+}
+
+// NewModelVersion instantiates a new ModelVersion object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModelVersion() *ModelVersion {
+ this := ModelVersion{}
+ var state ModelVersionState = MODELVERSIONSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// NewModelVersionWithDefaults instantiates a new ModelVersion object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModelVersionWithDefaults() *ModelVersion {
+ this := ModelVersion{}
+ var state ModelVersionState = MODELVERSIONSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ModelVersion) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ModelVersion) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ModelVersion) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ModelVersion) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ModelVersion) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ModelVersion) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ModelVersion) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ModelVersion) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ModelVersion) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ModelVersion) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ModelVersion) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ModelVersion) SetName(v string) {
+ o.Name = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *ModelVersion) GetState() ModelVersionState {
+ if o == nil || IsNil(o.State) {
+ var ret ModelVersionState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetStateOk() (*ModelVersionState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *ModelVersion) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ModelVersionState and assigns it to the State field.
+func (o *ModelVersion) SetState(v ModelVersionState) {
+ o.State = &v
+}
+
+// GetAuthor returns the Author field value if set, zero value otherwise.
+func (o *ModelVersion) GetAuthor() string {
+ if o == nil || IsNil(o.Author) {
+ var ret string
+ return ret
+ }
+ return *o.Author
+}
+
+// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetAuthorOk() (*string, bool) {
+ if o == nil || IsNil(o.Author) {
+ return nil, false
+ }
+ return o.Author, true
+}
+
+// HasAuthor returns a boolean if a field has been set.
+func (o *ModelVersion) HasAuthor() bool {
+ if o != nil && !IsNil(o.Author) {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthor gets a reference to the given string and assigns it to the Author field.
+func (o *ModelVersion) SetAuthor(v string) {
+ o.Author = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *ModelVersion) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *ModelVersion) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *ModelVersion) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *ModelVersion) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *ModelVersion) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *ModelVersion) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *ModelVersion) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersion) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *ModelVersion) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *ModelVersion) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+func (o ModelVersion) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ModelVersion) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ if !IsNil(o.Author) {
+ toSerialize["author"] = o.Author
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ return toSerialize, nil
+}
+
+type NullableModelVersion struct {
+ value *ModelVersion
+ isSet bool
+}
+
+func (v NullableModelVersion) Get() *ModelVersion {
+ return v.value
+}
+
+func (v *NullableModelVersion) Set(val *ModelVersion) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelVersion) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelVersion) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelVersion(val *ModelVersion) *NullableModelVersion {
+ return &NullableModelVersion{value: val, isSet: true}
+}
+
+func (v NullableModelVersion) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelVersion) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_version_create.go b/pkg/openapi/model_model_version_create.go
new file mode 100644
index 000000000..d825deeb4
--- /dev/null
+++ b/pkg/openapi/model_model_version_create.go
@@ -0,0 +1,340 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ModelVersionCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ModelVersionCreate{}
+
+// ModelVersionCreate Represents a ModelVersion belonging to a RegisteredModel.
+type ModelVersionCreate struct {
+ // ID of the `RegisteredModel` to which this version belongs.
+ RegisteredModelID string `json:"registeredModelID"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ State *ModelVersionState `json:"state,omitempty"`
+ // Name of the author.
+ Author *string `json:"author,omitempty"`
+}
+
+// NewModelVersionCreate instantiates a new ModelVersionCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModelVersionCreate(registeredModelID string) *ModelVersionCreate {
+ this := ModelVersionCreate{}
+ var state ModelVersionState = MODELVERSIONSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// NewModelVersionCreateWithDefaults instantiates a new ModelVersionCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModelVersionCreateWithDefaults() *ModelVersionCreate {
+ this := ModelVersionCreate{}
+ var state ModelVersionState = MODELVERSIONSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// GetRegisteredModelID returns the RegisteredModelID field value
+func (o *ModelVersionCreate) GetRegisteredModelID() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RegisteredModelID
+}
+
+// GetRegisteredModelIDOk returns a tuple with the RegisteredModelID field value
+// and a boolean to check if the value has been set.
+func (o *ModelVersionCreate) GetRegisteredModelIDOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RegisteredModelID, true
+}
+
+// SetRegisteredModelID sets field value
+func (o *ModelVersionCreate) SetRegisteredModelID(v string) {
+ o.RegisteredModelID = v
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ModelVersionCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ModelVersionCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ModelVersionCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ModelVersionCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ModelVersionCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ModelVersionCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ModelVersionCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ModelVersionCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ModelVersionCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ModelVersionCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ModelVersionCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ModelVersionCreate) SetName(v string) {
+ o.Name = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *ModelVersionCreate) GetState() ModelVersionState {
+ if o == nil || IsNil(o.State) {
+ var ret ModelVersionState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionCreate) GetStateOk() (*ModelVersionState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *ModelVersionCreate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ModelVersionState and assigns it to the State field.
+func (o *ModelVersionCreate) SetState(v ModelVersionState) {
+ o.State = &v
+}
+
+// GetAuthor returns the Author field value if set, zero value otherwise.
+func (o *ModelVersionCreate) GetAuthor() string {
+ if o == nil || IsNil(o.Author) {
+ var ret string
+ return ret
+ }
+ return *o.Author
+}
+
+// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionCreate) GetAuthorOk() (*string, bool) {
+ if o == nil || IsNil(o.Author) {
+ return nil, false
+ }
+ return o.Author, true
+}
+
+// HasAuthor returns a boolean if a field has been set.
+func (o *ModelVersionCreate) HasAuthor() bool {
+ if o != nil && !IsNil(o.Author) {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthor gets a reference to the given string and assigns it to the Author field.
+func (o *ModelVersionCreate) SetAuthor(v string) {
+ o.Author = &v
+}
+
+func (o ModelVersionCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ModelVersionCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["registeredModelID"] = o.RegisteredModelID
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ if !IsNil(o.Author) {
+ toSerialize["author"] = o.Author
+ }
+ return toSerialize, nil
+}
+
+type NullableModelVersionCreate struct {
+ value *ModelVersionCreate
+ isSet bool
+}
+
+func (v NullableModelVersionCreate) Get() *ModelVersionCreate {
+ return v.value
+}
+
+func (v *NullableModelVersionCreate) Set(val *ModelVersionCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelVersionCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelVersionCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelVersionCreate(val *ModelVersionCreate) *NullableModelVersionCreate {
+ return &NullableModelVersionCreate{value: val, isSet: true}
+}
+
+func (v NullableModelVersionCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelVersionCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_version_list.go b/pkg/openapi/model_model_version_list.go
new file mode 100644
index 000000000..3a0a8d034
--- /dev/null
+++ b/pkg/openapi/model_model_version_list.go
@@ -0,0 +1,209 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ModelVersionList type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ModelVersionList{}
+
+// ModelVersionList List of ModelVersion entities.
+type ModelVersionList struct {
+ // Token to use to retrieve next page of results.
+ NextPageToken string `json:"nextPageToken"`
+ // Maximum number of resources to return in the result.
+ PageSize int32 `json:"pageSize"`
+ // Number of items in result list.
+ Size int32 `json:"size"`
+ // Array of `ModelVersion` entities.
+ Items []ModelVersion `json:"items,omitempty"`
+}
+
+// NewModelVersionList instantiates a new ModelVersionList object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModelVersionList(nextPageToken string, pageSize int32, size int32) *ModelVersionList {
+ this := ModelVersionList{}
+ this.NextPageToken = nextPageToken
+ this.PageSize = pageSize
+ this.Size = size
+ return &this
+}
+
+// NewModelVersionListWithDefaults instantiates a new ModelVersionList object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModelVersionListWithDefaults() *ModelVersionList {
+ this := ModelVersionList{}
+ return &this
+}
+
+// GetNextPageToken returns the NextPageToken field value
+func (o *ModelVersionList) GetNextPageToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.NextPageToken
+}
+
+// GetNextPageTokenOk returns a tuple with the NextPageToken field value
+// and a boolean to check if the value has been set.
+func (o *ModelVersionList) GetNextPageTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.NextPageToken, true
+}
+
+// SetNextPageToken sets field value
+func (o *ModelVersionList) SetNextPageToken(v string) {
+ o.NextPageToken = v
+}
+
+// GetPageSize returns the PageSize field value
+func (o *ModelVersionList) GetPageSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value
+// and a boolean to check if the value has been set.
+func (o *ModelVersionList) GetPageSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.PageSize, true
+}
+
+// SetPageSize sets field value
+func (o *ModelVersionList) SetPageSize(v int32) {
+ o.PageSize = v
+}
+
+// GetSize returns the Size field value
+func (o *ModelVersionList) GetSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value
+// and a boolean to check if the value has been set.
+func (o *ModelVersionList) GetSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Size, true
+}
+
+// SetSize sets field value
+func (o *ModelVersionList) SetSize(v int32) {
+ o.Size = v
+}
+
+// GetItems returns the Items field value if set, zero value otherwise.
+func (o *ModelVersionList) GetItems() []ModelVersion {
+ if o == nil || IsNil(o.Items) {
+ var ret []ModelVersion
+ return ret
+ }
+ return o.Items
+}
+
+// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionList) GetItemsOk() ([]ModelVersion, bool) {
+ if o == nil || IsNil(o.Items) {
+ return nil, false
+ }
+ return o.Items, true
+}
+
+// HasItems returns a boolean if a field has been set.
+func (o *ModelVersionList) HasItems() bool {
+ if o != nil && !IsNil(o.Items) {
+ return true
+ }
+
+ return false
+}
+
+// SetItems gets a reference to the given []ModelVersion and assigns it to the Items field.
+func (o *ModelVersionList) SetItems(v []ModelVersion) {
+ o.Items = v
+}
+
+func (o ModelVersionList) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ModelVersionList) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["nextPageToken"] = o.NextPageToken
+ toSerialize["pageSize"] = o.PageSize
+ toSerialize["size"] = o.Size
+ if !IsNil(o.Items) {
+ toSerialize["items"] = o.Items
+ }
+ return toSerialize, nil
+}
+
+type NullableModelVersionList struct {
+ value *ModelVersionList
+ isSet bool
+}
+
+func (v NullableModelVersionList) Get() *ModelVersionList {
+ return v.value
+}
+
+func (v *NullableModelVersionList) Set(val *ModelVersionList) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelVersionList) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelVersionList) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelVersionList(val *ModelVersionList) *NullableModelVersionList {
+ return &NullableModelVersionList{value: val, isSet: true}
+}
+
+func (v NullableModelVersionList) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelVersionList) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_version_state.go b/pkg/openapi/model_model_version_state.go
new file mode 100644
index 000000000..802c7e60d
--- /dev/null
+++ b/pkg/openapi/model_model_version_state.go
@@ -0,0 +1,110 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ModelVersionState - LIVE: A state indicating that the `ModelVersion` exists - ARCHIVED: A state indicating that the `ModelVersion` has been archived.
+type ModelVersionState string
+
+// List of ModelVersionState
+const (
+ MODELVERSIONSTATE_LIVE ModelVersionState = "LIVE"
+ MODELVERSIONSTATE_ARCHIVED ModelVersionState = "ARCHIVED"
+)
+
+// All allowed values of ModelVersionState enum
+var AllowedModelVersionStateEnumValues = []ModelVersionState{
+ "LIVE",
+ "ARCHIVED",
+}
+
+func (v *ModelVersionState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ModelVersionState(value)
+ for _, existing := range AllowedModelVersionStateEnumValues {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ModelVersionState", value)
+}
+
+// NewModelVersionStateFromValue returns a pointer to a valid ModelVersionState
+// for the value passed as argument, or an error if the value passed is not allowed by the enum
+func NewModelVersionStateFromValue(v string) (*ModelVersionState, error) {
+ ev := ModelVersionState(v)
+ if ev.IsValid() {
+ return &ev, nil
+ } else {
+ return nil, fmt.Errorf("invalid value '%v' for ModelVersionState: valid values are %v", v, AllowedModelVersionStateEnumValues)
+ }
+}
+
+// IsValid return true if the value is valid for the enum, false otherwise
+func (v ModelVersionState) IsValid() bool {
+ for _, existing := range AllowedModelVersionStateEnumValues {
+ if existing == v {
+ return true
+ }
+ }
+ return false
+}
+
+// Ptr returns reference to ModelVersionState value
+func (v ModelVersionState) Ptr() *ModelVersionState {
+ return &v
+}
+
+type NullableModelVersionState struct {
+ value *ModelVersionState
+ isSet bool
+}
+
+func (v NullableModelVersionState) Get() *ModelVersionState {
+ return v.value
+}
+
+func (v *NullableModelVersionState) Set(val *ModelVersionState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelVersionState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelVersionState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelVersionState(val *ModelVersionState) *NullableModelVersionState {
+ return &NullableModelVersionState{value: val, isSet: true}
+}
+
+func (v NullableModelVersionState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelVersionState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_model_version_update.go b/pkg/openapi/model_model_version_update.go
new file mode 100644
index 000000000..26ac9fe5b
--- /dev/null
+++ b/pkg/openapi/model_model_version_update.go
@@ -0,0 +1,276 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ModelVersionUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ModelVersionUpdate{}
+
+// ModelVersionUpdate Represents a ModelVersion belonging to a RegisteredModel.
+type ModelVersionUpdate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ State *ModelVersionState `json:"state,omitempty"`
+ // Name of the author.
+ Author *string `json:"author,omitempty"`
+}
+
+// NewModelVersionUpdate instantiates a new ModelVersionUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModelVersionUpdate() *ModelVersionUpdate {
+ this := ModelVersionUpdate{}
+ var state ModelVersionState = MODELVERSIONSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// NewModelVersionUpdateWithDefaults instantiates a new ModelVersionUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModelVersionUpdateWithDefaults() *ModelVersionUpdate {
+ this := ModelVersionUpdate{}
+ var state ModelVersionState = MODELVERSIONSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ModelVersionUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ModelVersionUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ModelVersionUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ModelVersionUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ModelVersionUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ModelVersionUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ModelVersionUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ModelVersionUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ModelVersionUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *ModelVersionUpdate) GetState() ModelVersionState {
+ if o == nil || IsNil(o.State) {
+ var ret ModelVersionState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionUpdate) GetStateOk() (*ModelVersionState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *ModelVersionUpdate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given ModelVersionState and assigns it to the State field.
+func (o *ModelVersionUpdate) SetState(v ModelVersionState) {
+ o.State = &v
+}
+
+// GetAuthor returns the Author field value if set, zero value otherwise.
+func (o *ModelVersionUpdate) GetAuthor() string {
+ if o == nil || IsNil(o.Author) {
+ var ret string
+ return ret
+ }
+ return *o.Author
+}
+
+// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ModelVersionUpdate) GetAuthorOk() (*string, bool) {
+ if o == nil || IsNil(o.Author) {
+ return nil, false
+ }
+ return o.Author, true
+}
+
+// HasAuthor returns a boolean if a field has been set.
+func (o *ModelVersionUpdate) HasAuthor() bool {
+ if o != nil && !IsNil(o.Author) {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthor gets a reference to the given string and assigns it to the Author field.
+func (o *ModelVersionUpdate) SetAuthor(v string) {
+ o.Author = &v
+}
+
+func (o ModelVersionUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ModelVersionUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ if !IsNil(o.Author) {
+ toSerialize["author"] = o.Author
+ }
+ return toSerialize, nil
+}
+
+type NullableModelVersionUpdate struct {
+ value *ModelVersionUpdate
+ isSet bool
+}
+
+func (v NullableModelVersionUpdate) Get() *ModelVersionUpdate {
+ return v.value
+}
+
+func (v *NullableModelVersionUpdate) Set(val *ModelVersionUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModelVersionUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModelVersionUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModelVersionUpdate(val *ModelVersionUpdate) *NullableModelVersionUpdate {
+ return &NullableModelVersionUpdate{value: val, isSet: true}
+}
+
+func (v NullableModelVersionUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModelVersionUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_order_by_field.go b/pkg/openapi/model_order_by_field.go
new file mode 100644
index 000000000..6c8c9e566
--- /dev/null
+++ b/pkg/openapi/model_order_by_field.go
@@ -0,0 +1,112 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// OrderByField Supported fields for ordering result entities.
+type OrderByField string
+
+// List of OrderByField
+const (
+ ORDERBYFIELD_CREATE_TIME OrderByField = "CREATE_TIME"
+ ORDERBYFIELD_LAST_UPDATE_TIME OrderByField = "LAST_UPDATE_TIME"
+ ORDERBYFIELD_ID OrderByField = "ID"
+)
+
+// All allowed values of OrderByField enum
+var AllowedOrderByFieldEnumValues = []OrderByField{
+ "CREATE_TIME",
+ "LAST_UPDATE_TIME",
+ "ID",
+}
+
+func (v *OrderByField) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := OrderByField(value)
+ for _, existing := range AllowedOrderByFieldEnumValues {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid OrderByField", value)
+}
+
+// NewOrderByFieldFromValue returns a pointer to a valid OrderByField
+// for the value passed as argument, or an error if the value passed is not allowed by the enum
+func NewOrderByFieldFromValue(v string) (*OrderByField, error) {
+ ev := OrderByField(v)
+ if ev.IsValid() {
+ return &ev, nil
+ } else {
+ return nil, fmt.Errorf("invalid value '%v' for OrderByField: valid values are %v", v, AllowedOrderByFieldEnumValues)
+ }
+}
+
+// IsValid return true if the value is valid for the enum, false otherwise
+func (v OrderByField) IsValid() bool {
+ for _, existing := range AllowedOrderByFieldEnumValues {
+ if existing == v {
+ return true
+ }
+ }
+ return false
+}
+
+// Ptr returns reference to OrderByField value
+func (v OrderByField) Ptr() *OrderByField {
+ return &v
+}
+
+type NullableOrderByField struct {
+ value *OrderByField
+ isSet bool
+}
+
+func (v NullableOrderByField) Get() *OrderByField {
+ return v.value
+}
+
+func (v *NullableOrderByField) Set(val *OrderByField) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableOrderByField) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableOrderByField) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableOrderByField(val *OrderByField) *NullableOrderByField {
+ return &NullableOrderByField{value: val, isSet: true}
+}
+
+func (v NullableOrderByField) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableOrderByField) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_registered_model.go b/pkg/openapi/model_registered_model.go
new file mode 100644
index 000000000..9ed0d47df
--- /dev/null
+++ b/pkg/openapi/model_registered_model.go
@@ -0,0 +1,387 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the RegisteredModel type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &RegisteredModel{}
+
+// RegisteredModel A registered model in model registry. A registered model has ModelVersion children.
+type RegisteredModel struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+ State *RegisteredModelState `json:"state,omitempty"`
+}
+
+// NewRegisteredModel instantiates a new RegisteredModel object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRegisteredModel() *RegisteredModel {
+ this := RegisteredModel{}
+ var state RegisteredModelState = REGISTEREDMODELSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// NewRegisteredModelWithDefaults instantiates a new RegisteredModel object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRegisteredModelWithDefaults() *RegisteredModel {
+ this := RegisteredModel{}
+ var state RegisteredModelState = REGISTEREDMODELSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *RegisteredModel) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModel) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *RegisteredModel) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *RegisteredModel) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *RegisteredModel) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModel) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *RegisteredModel) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *RegisteredModel) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *RegisteredModel) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModel) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *RegisteredModel) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *RegisteredModel) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *RegisteredModel) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModel) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *RegisteredModel) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *RegisteredModel) SetName(v string) {
+ o.Name = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *RegisteredModel) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModel) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *RegisteredModel) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *RegisteredModel) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *RegisteredModel) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModel) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *RegisteredModel) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *RegisteredModel) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *RegisteredModel) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModel) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *RegisteredModel) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *RegisteredModel) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *RegisteredModel) GetState() RegisteredModelState {
+ if o == nil || IsNil(o.State) {
+ var ret RegisteredModelState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModel) GetStateOk() (*RegisteredModelState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *RegisteredModel) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given RegisteredModelState and assigns it to the State field.
+func (o *RegisteredModel) SetState(v RegisteredModelState) {
+ o.State = &v
+}
+
+func (o RegisteredModel) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o RegisteredModel) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ return toSerialize, nil
+}
+
+type NullableRegisteredModel struct {
+ value *RegisteredModel
+ isSet bool
+}
+
+func (v NullableRegisteredModel) Get() *RegisteredModel {
+ return v.value
+}
+
+func (v *NullableRegisteredModel) Set(val *RegisteredModel) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRegisteredModel) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRegisteredModel) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRegisteredModel(val *RegisteredModel) *NullableRegisteredModel {
+ return &NullableRegisteredModel{value: val, isSet: true}
+}
+
+func (v NullableRegisteredModel) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRegisteredModel) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_registered_model_create.go b/pkg/openapi/model_registered_model_create.go
new file mode 100644
index 000000000..b03d8f647
--- /dev/null
+++ b/pkg/openapi/model_registered_model_create.go
@@ -0,0 +1,276 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the RegisteredModelCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &RegisteredModelCreate{}
+
+// RegisteredModelCreate A registered model in model registry. A registered model has ModelVersion children.
+type RegisteredModelCreate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ State *RegisteredModelState `json:"state,omitempty"`
+}
+
+// NewRegisteredModelCreate instantiates a new RegisteredModelCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRegisteredModelCreate() *RegisteredModelCreate {
+ this := RegisteredModelCreate{}
+ var state RegisteredModelState = REGISTEREDMODELSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// NewRegisteredModelCreateWithDefaults instantiates a new RegisteredModelCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRegisteredModelCreateWithDefaults() *RegisteredModelCreate {
+ this := RegisteredModelCreate{}
+ var state RegisteredModelState = REGISTEREDMODELSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *RegisteredModelCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *RegisteredModelCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *RegisteredModelCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *RegisteredModelCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *RegisteredModelCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *RegisteredModelCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *RegisteredModelCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *RegisteredModelCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *RegisteredModelCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *RegisteredModelCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *RegisteredModelCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *RegisteredModelCreate) SetName(v string) {
+ o.Name = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *RegisteredModelCreate) GetState() RegisteredModelState {
+ if o == nil || IsNil(o.State) {
+ var ret RegisteredModelState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelCreate) GetStateOk() (*RegisteredModelState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *RegisteredModelCreate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given RegisteredModelState and assigns it to the State field.
+func (o *RegisteredModelCreate) SetState(v RegisteredModelState) {
+ o.State = &v
+}
+
+func (o RegisteredModelCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o RegisteredModelCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ return toSerialize, nil
+}
+
+type NullableRegisteredModelCreate struct {
+ value *RegisteredModelCreate
+ isSet bool
+}
+
+func (v NullableRegisteredModelCreate) Get() *RegisteredModelCreate {
+ return v.value
+}
+
+func (v *NullableRegisteredModelCreate) Set(val *RegisteredModelCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRegisteredModelCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRegisteredModelCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRegisteredModelCreate(val *RegisteredModelCreate) *NullableRegisteredModelCreate {
+ return &NullableRegisteredModelCreate{value: val, isSet: true}
+}
+
+func (v NullableRegisteredModelCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRegisteredModelCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_registered_model_list.go b/pkg/openapi/model_registered_model_list.go
new file mode 100644
index 000000000..05892f0a2
--- /dev/null
+++ b/pkg/openapi/model_registered_model_list.go
@@ -0,0 +1,209 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the RegisteredModelList type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &RegisteredModelList{}
+
+// RegisteredModelList List of RegisteredModels.
+type RegisteredModelList struct {
+ // Token to use to retrieve next page of results.
+ NextPageToken string `json:"nextPageToken"`
+ // Maximum number of resources to return in the result.
+ PageSize int32 `json:"pageSize"`
+ // Number of items in result list.
+ Size int32 `json:"size"`
+ //
+ Items []RegisteredModel `json:"items,omitempty"`
+}
+
+// NewRegisteredModelList instantiates a new RegisteredModelList object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRegisteredModelList(nextPageToken string, pageSize int32, size int32) *RegisteredModelList {
+ this := RegisteredModelList{}
+ this.NextPageToken = nextPageToken
+ this.PageSize = pageSize
+ this.Size = size
+ return &this
+}
+
+// NewRegisteredModelListWithDefaults instantiates a new RegisteredModelList object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRegisteredModelListWithDefaults() *RegisteredModelList {
+ this := RegisteredModelList{}
+ return &this
+}
+
+// GetNextPageToken returns the NextPageToken field value
+func (o *RegisteredModelList) GetNextPageToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.NextPageToken
+}
+
+// GetNextPageTokenOk returns a tuple with the NextPageToken field value
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelList) GetNextPageTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.NextPageToken, true
+}
+
+// SetNextPageToken sets field value
+func (o *RegisteredModelList) SetNextPageToken(v string) {
+ o.NextPageToken = v
+}
+
+// GetPageSize returns the PageSize field value
+func (o *RegisteredModelList) GetPageSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelList) GetPageSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.PageSize, true
+}
+
+// SetPageSize sets field value
+func (o *RegisteredModelList) SetPageSize(v int32) {
+ o.PageSize = v
+}
+
+// GetSize returns the Size field value
+func (o *RegisteredModelList) GetSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelList) GetSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Size, true
+}
+
+// SetSize sets field value
+func (o *RegisteredModelList) SetSize(v int32) {
+ o.Size = v
+}
+
+// GetItems returns the Items field value if set, zero value otherwise.
+func (o *RegisteredModelList) GetItems() []RegisteredModel {
+ if o == nil || IsNil(o.Items) {
+ var ret []RegisteredModel
+ return ret
+ }
+ return o.Items
+}
+
+// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelList) GetItemsOk() ([]RegisteredModel, bool) {
+ if o == nil || IsNil(o.Items) {
+ return nil, false
+ }
+ return o.Items, true
+}
+
+// HasItems returns a boolean if a field has been set.
+func (o *RegisteredModelList) HasItems() bool {
+ if o != nil && !IsNil(o.Items) {
+ return true
+ }
+
+ return false
+}
+
+// SetItems gets a reference to the given []RegisteredModel and assigns it to the Items field.
+func (o *RegisteredModelList) SetItems(v []RegisteredModel) {
+ o.Items = v
+}
+
+func (o RegisteredModelList) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o RegisteredModelList) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["nextPageToken"] = o.NextPageToken
+ toSerialize["pageSize"] = o.PageSize
+ toSerialize["size"] = o.Size
+ if !IsNil(o.Items) {
+ toSerialize["items"] = o.Items
+ }
+ return toSerialize, nil
+}
+
+type NullableRegisteredModelList struct {
+ value *RegisteredModelList
+ isSet bool
+}
+
+func (v NullableRegisteredModelList) Get() *RegisteredModelList {
+ return v.value
+}
+
+func (v *NullableRegisteredModelList) Set(val *RegisteredModelList) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRegisteredModelList) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRegisteredModelList) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRegisteredModelList(val *RegisteredModelList) *NullableRegisteredModelList {
+ return &NullableRegisteredModelList{value: val, isSet: true}
+}
+
+func (v NullableRegisteredModelList) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRegisteredModelList) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_registered_model_state.go b/pkg/openapi/model_registered_model_state.go
new file mode 100644
index 000000000..6ceb12dc7
--- /dev/null
+++ b/pkg/openapi/model_registered_model_state.go
@@ -0,0 +1,110 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// RegisteredModelState - LIVE: A state indicating that the `RegisteredModel` exists - ARCHIVED: A state indicating that the `RegisteredModel` has been archived.
+type RegisteredModelState string
+
+// List of RegisteredModelState
+const (
+ REGISTEREDMODELSTATE_LIVE RegisteredModelState = "LIVE"
+ REGISTEREDMODELSTATE_ARCHIVED RegisteredModelState = "ARCHIVED"
+)
+
+// All allowed values of RegisteredModelState enum
+var AllowedRegisteredModelStateEnumValues = []RegisteredModelState{
+ "LIVE",
+ "ARCHIVED",
+}
+
+func (v *RegisteredModelState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := RegisteredModelState(value)
+ for _, existing := range AllowedRegisteredModelStateEnumValues {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid RegisteredModelState", value)
+}
+
+// NewRegisteredModelStateFromValue returns a pointer to a valid RegisteredModelState
+// for the value passed as argument, or an error if the value passed is not allowed by the enum
+func NewRegisteredModelStateFromValue(v string) (*RegisteredModelState, error) {
+ ev := RegisteredModelState(v)
+ if ev.IsValid() {
+ return &ev, nil
+ } else {
+ return nil, fmt.Errorf("invalid value '%v' for RegisteredModelState: valid values are %v", v, AllowedRegisteredModelStateEnumValues)
+ }
+}
+
+// IsValid return true if the value is valid for the enum, false otherwise
+func (v RegisteredModelState) IsValid() bool {
+ for _, existing := range AllowedRegisteredModelStateEnumValues {
+ if existing == v {
+ return true
+ }
+ }
+ return false
+}
+
+// Ptr returns reference to RegisteredModelState value
+func (v RegisteredModelState) Ptr() *RegisteredModelState {
+ return &v
+}
+
+type NullableRegisteredModelState struct {
+ value *RegisteredModelState
+ isSet bool
+}
+
+func (v NullableRegisteredModelState) Get() *RegisteredModelState {
+ return v.value
+}
+
+func (v *NullableRegisteredModelState) Set(val *RegisteredModelState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRegisteredModelState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRegisteredModelState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRegisteredModelState(val *RegisteredModelState) *NullableRegisteredModelState {
+ return &NullableRegisteredModelState{value: val, isSet: true}
+}
+
+func (v NullableRegisteredModelState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRegisteredModelState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_registered_model_update.go b/pkg/openapi/model_registered_model_update.go
new file mode 100644
index 000000000..fc8f64d3c
--- /dev/null
+++ b/pkg/openapi/model_registered_model_update.go
@@ -0,0 +1,239 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the RegisteredModelUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &RegisteredModelUpdate{}
+
+// RegisteredModelUpdate A registered model in model registry. A registered model has ModelVersion children.
+type RegisteredModelUpdate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ State *RegisteredModelState `json:"state,omitempty"`
+}
+
+// NewRegisteredModelUpdate instantiates a new RegisteredModelUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRegisteredModelUpdate() *RegisteredModelUpdate {
+ this := RegisteredModelUpdate{}
+ var state RegisteredModelState = REGISTEREDMODELSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// NewRegisteredModelUpdateWithDefaults instantiates a new RegisteredModelUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRegisteredModelUpdateWithDefaults() *RegisteredModelUpdate {
+ this := RegisteredModelUpdate{}
+ var state RegisteredModelState = REGISTEREDMODELSTATE_LIVE
+ this.State = &state
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *RegisteredModelUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *RegisteredModelUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *RegisteredModelUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *RegisteredModelUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *RegisteredModelUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *RegisteredModelUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *RegisteredModelUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *RegisteredModelUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *RegisteredModelUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *RegisteredModelUpdate) GetState() RegisteredModelState {
+ if o == nil || IsNil(o.State) {
+ var ret RegisteredModelState
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegisteredModelUpdate) GetStateOk() (*RegisteredModelState, bool) {
+ if o == nil || IsNil(o.State) {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *RegisteredModelUpdate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given RegisteredModelState and assigns it to the State field.
+func (o *RegisteredModelUpdate) SetState(v RegisteredModelState) {
+ o.State = &v
+}
+
+func (o RegisteredModelUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o RegisteredModelUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
+ return toSerialize, nil
+}
+
+type NullableRegisteredModelUpdate struct {
+ value *RegisteredModelUpdate
+ isSet bool
+}
+
+func (v NullableRegisteredModelUpdate) Get() *RegisteredModelUpdate {
+ return v.value
+}
+
+func (v *NullableRegisteredModelUpdate) Set(val *RegisteredModelUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRegisteredModelUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRegisteredModelUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRegisteredModelUpdate(val *RegisteredModelUpdate) *NullableRegisteredModelUpdate {
+ return &NullableRegisteredModelUpdate{value: val, isSet: true}
+}
+
+func (v NullableRegisteredModelUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRegisteredModelUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_serve_model.go b/pkg/openapi/model_serve_model.go
new file mode 100644
index 000000000..950b43c16
--- /dev/null
+++ b/pkg/openapi/model_serve_model.go
@@ -0,0 +1,415 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ServeModel type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServeModel{}
+
+// ServeModel An ML model serving action.
+type ServeModel struct {
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+ // ID of the `ModelVersion` that was served in `InferenceService`.
+ ModelVersionId string `json:"modelVersionId"`
+}
+
+// NewServeModel instantiates a new ServeModel object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServeModel(modelVersionId string) *ServeModel {
+ this := ServeModel{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ this.ModelVersionId = modelVersionId
+ return &this
+}
+
+// NewServeModelWithDefaults instantiates a new ServeModel object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServeModelWithDefaults() *ServeModel {
+ this := ServeModel{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise.
+func (o *ServeModel) GetLastKnownState() ExecutionState {
+ if o == nil || IsNil(o.LastKnownState) {
+ var ret ExecutionState
+ return ret
+ }
+ return *o.LastKnownState
+}
+
+// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetLastKnownStateOk() (*ExecutionState, bool) {
+ if o == nil || IsNil(o.LastKnownState) {
+ return nil, false
+ }
+ return o.LastKnownState, true
+}
+
+// HasLastKnownState returns a boolean if a field has been set.
+func (o *ServeModel) HasLastKnownState() bool {
+ if o != nil && !IsNil(o.LastKnownState) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field.
+func (o *ServeModel) SetLastKnownState(v ExecutionState) {
+ o.LastKnownState = &v
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ServeModel) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ServeModel) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ServeModel) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ServeModel) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ServeModel) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ServeModel) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ServeModel) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ServeModel) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ServeModel) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ServeModel) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ServeModel) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ServeModel) SetName(v string) {
+ o.Name = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *ServeModel) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *ServeModel) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *ServeModel) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *ServeModel) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *ServeModel) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *ServeModel) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *ServeModel) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *ServeModel) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *ServeModel) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+// GetModelVersionId returns the ModelVersionId field value
+func (o *ServeModel) GetModelVersionId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.ModelVersionId
+}
+
+// GetModelVersionIdOk returns a tuple with the ModelVersionId field value
+// and a boolean to check if the value has been set.
+func (o *ServeModel) GetModelVersionIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ModelVersionId, true
+}
+
+// SetModelVersionId sets field value
+func (o *ServeModel) SetModelVersionId(v string) {
+ o.ModelVersionId = v
+}
+
+func (o ServeModel) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServeModel) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ toSerialize["modelVersionId"] = o.ModelVersionId
+ return toSerialize, nil
+}
+
+type NullableServeModel struct {
+ value *ServeModel
+ isSet bool
+}
+
+func (v NullableServeModel) Get() *ServeModel {
+ return v.value
+}
+
+func (v *NullableServeModel) Set(val *ServeModel) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServeModel) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServeModel) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServeModel(val *ServeModel) *NullableServeModel {
+ return &NullableServeModel{value: val, isSet: true}
+}
+
+func (v NullableServeModel) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServeModel) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_serve_model_create.go b/pkg/openapi/model_serve_model_create.go
new file mode 100644
index 000000000..a740e77c9
--- /dev/null
+++ b/pkg/openapi/model_serve_model_create.go
@@ -0,0 +1,304 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ServeModelCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServeModelCreate{}
+
+// ServeModelCreate An ML model serving action.
+type ServeModelCreate struct {
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // ID of the `ModelVersion` that was served in `InferenceService`.
+ ModelVersionId string `json:"modelVersionId"`
+}
+
+// NewServeModelCreate instantiates a new ServeModelCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServeModelCreate(modelVersionId string) *ServeModelCreate {
+ this := ServeModelCreate{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ this.ModelVersionId = modelVersionId
+ return &this
+}
+
+// NewServeModelCreateWithDefaults instantiates a new ServeModelCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServeModelCreateWithDefaults() *ServeModelCreate {
+ this := ServeModelCreate{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise.
+func (o *ServeModelCreate) GetLastKnownState() ExecutionState {
+ if o == nil || IsNil(o.LastKnownState) {
+ var ret ExecutionState
+ return ret
+ }
+ return *o.LastKnownState
+}
+
+// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelCreate) GetLastKnownStateOk() (*ExecutionState, bool) {
+ if o == nil || IsNil(o.LastKnownState) {
+ return nil, false
+ }
+ return o.LastKnownState, true
+}
+
+// HasLastKnownState returns a boolean if a field has been set.
+func (o *ServeModelCreate) HasLastKnownState() bool {
+ if o != nil && !IsNil(o.LastKnownState) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field.
+func (o *ServeModelCreate) SetLastKnownState(v ExecutionState) {
+ o.LastKnownState = &v
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ServeModelCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ServeModelCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ServeModelCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ServeModelCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ServeModelCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ServeModelCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ServeModelCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ServeModelCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ServeModelCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ServeModelCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ServeModelCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ServeModelCreate) SetName(v string) {
+ o.Name = &v
+}
+
+// GetModelVersionId returns the ModelVersionId field value
+func (o *ServeModelCreate) GetModelVersionId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.ModelVersionId
+}
+
+// GetModelVersionIdOk returns a tuple with the ModelVersionId field value
+// and a boolean to check if the value has been set.
+func (o *ServeModelCreate) GetModelVersionIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ModelVersionId, true
+}
+
+// SetModelVersionId sets field value
+func (o *ServeModelCreate) SetModelVersionId(v string) {
+ o.ModelVersionId = v
+}
+
+func (o ServeModelCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServeModelCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ toSerialize["modelVersionId"] = o.ModelVersionId
+ return toSerialize, nil
+}
+
+type NullableServeModelCreate struct {
+ value *ServeModelCreate
+ isSet bool
+}
+
+func (v NullableServeModelCreate) Get() *ServeModelCreate {
+ return v.value
+}
+
+func (v *NullableServeModelCreate) Set(val *ServeModelCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServeModelCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServeModelCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServeModelCreate(val *ServeModelCreate) *NullableServeModelCreate {
+ return &NullableServeModelCreate{value: val, isSet: true}
+}
+
+func (v NullableServeModelCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServeModelCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_serve_model_list.go b/pkg/openapi/model_serve_model_list.go
new file mode 100644
index 000000000..2b3285b6d
--- /dev/null
+++ b/pkg/openapi/model_serve_model_list.go
@@ -0,0 +1,209 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ServeModelList type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServeModelList{}
+
+// ServeModelList List of ServeModel entities.
+type ServeModelList struct {
+ // Token to use to retrieve next page of results.
+ NextPageToken string `json:"nextPageToken"`
+ // Maximum number of resources to return in the result.
+ PageSize int32 `json:"pageSize"`
+ // Number of items in result list.
+ Size int32 `json:"size"`
+ // Array of `ModelArtifact` entities.
+ Items []ServeModel `json:"items,omitempty"`
+}
+
+// NewServeModelList instantiates a new ServeModelList object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServeModelList(nextPageToken string, pageSize int32, size int32) *ServeModelList {
+ this := ServeModelList{}
+ this.NextPageToken = nextPageToken
+ this.PageSize = pageSize
+ this.Size = size
+ return &this
+}
+
+// NewServeModelListWithDefaults instantiates a new ServeModelList object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServeModelListWithDefaults() *ServeModelList {
+ this := ServeModelList{}
+ return &this
+}
+
+// GetNextPageToken returns the NextPageToken field value
+func (o *ServeModelList) GetNextPageToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.NextPageToken
+}
+
+// GetNextPageTokenOk returns a tuple with the NextPageToken field value
+// and a boolean to check if the value has been set.
+func (o *ServeModelList) GetNextPageTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.NextPageToken, true
+}
+
+// SetNextPageToken sets field value
+func (o *ServeModelList) SetNextPageToken(v string) {
+ o.NextPageToken = v
+}
+
+// GetPageSize returns the PageSize field value
+func (o *ServeModelList) GetPageSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value
+// and a boolean to check if the value has been set.
+func (o *ServeModelList) GetPageSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.PageSize, true
+}
+
+// SetPageSize sets field value
+func (o *ServeModelList) SetPageSize(v int32) {
+ o.PageSize = v
+}
+
+// GetSize returns the Size field value
+func (o *ServeModelList) GetSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value
+// and a boolean to check if the value has been set.
+func (o *ServeModelList) GetSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Size, true
+}
+
+// SetSize sets field value
+func (o *ServeModelList) SetSize(v int32) {
+ o.Size = v
+}
+
+// GetItems returns the Items field value if set, zero value otherwise.
+func (o *ServeModelList) GetItems() []ServeModel {
+ if o == nil || IsNil(o.Items) {
+ var ret []ServeModel
+ return ret
+ }
+ return o.Items
+}
+
+// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelList) GetItemsOk() ([]ServeModel, bool) {
+ if o == nil || IsNil(o.Items) {
+ return nil, false
+ }
+ return o.Items, true
+}
+
+// HasItems returns a boolean if a field has been set.
+func (o *ServeModelList) HasItems() bool {
+ if o != nil && !IsNil(o.Items) {
+ return true
+ }
+
+ return false
+}
+
+// SetItems gets a reference to the given []ServeModel and assigns it to the Items field.
+func (o *ServeModelList) SetItems(v []ServeModel) {
+ o.Items = v
+}
+
+func (o ServeModelList) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServeModelList) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["nextPageToken"] = o.NextPageToken
+ toSerialize["pageSize"] = o.PageSize
+ toSerialize["size"] = o.Size
+ if !IsNil(o.Items) {
+ toSerialize["items"] = o.Items
+ }
+ return toSerialize, nil
+}
+
+type NullableServeModelList struct {
+ value *ServeModelList
+ isSet bool
+}
+
+func (v NullableServeModelList) Get() *ServeModelList {
+ return v.value
+}
+
+func (v *NullableServeModelList) Set(val *ServeModelList) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServeModelList) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServeModelList) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServeModelList(val *ServeModelList) *NullableServeModelList {
+ return &NullableServeModelList{value: val, isSet: true}
+}
+
+func (v NullableServeModelList) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServeModelList) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_serve_model_update.go b/pkg/openapi/model_serve_model_update.go
new file mode 100644
index 000000000..74e2996b6
--- /dev/null
+++ b/pkg/openapi/model_serve_model_update.go
@@ -0,0 +1,239 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ServeModelUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServeModelUpdate{}
+
+// ServeModelUpdate An ML model serving action.
+type ServeModelUpdate struct {
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+}
+
+// NewServeModelUpdate instantiates a new ServeModelUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServeModelUpdate() *ServeModelUpdate {
+ this := ServeModelUpdate{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// NewServeModelUpdateWithDefaults instantiates a new ServeModelUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServeModelUpdateWithDefaults() *ServeModelUpdate {
+ this := ServeModelUpdate{}
+ var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN
+ this.LastKnownState = &lastKnownState
+ return &this
+}
+
+// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise.
+func (o *ServeModelUpdate) GetLastKnownState() ExecutionState {
+ if o == nil || IsNil(o.LastKnownState) {
+ var ret ExecutionState
+ return ret
+ }
+ return *o.LastKnownState
+}
+
+// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelUpdate) GetLastKnownStateOk() (*ExecutionState, bool) {
+ if o == nil || IsNil(o.LastKnownState) {
+ return nil, false
+ }
+ return o.LastKnownState, true
+}
+
+// HasLastKnownState returns a boolean if a field has been set.
+func (o *ServeModelUpdate) HasLastKnownState() bool {
+ if o != nil && !IsNil(o.LastKnownState) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field.
+func (o *ServeModelUpdate) SetLastKnownState(v ExecutionState) {
+ o.LastKnownState = &v
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ServeModelUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ServeModelUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ServeModelUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ServeModelUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ServeModelUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ServeModelUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ServeModelUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServeModelUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ServeModelUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ServeModelUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+func (o ServeModelUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServeModelUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ return toSerialize, nil
+}
+
+type NullableServeModelUpdate struct {
+ value *ServeModelUpdate
+ isSet bool
+}
+
+func (v NullableServeModelUpdate) Get() *ServeModelUpdate {
+ return v.value
+}
+
+func (v *NullableServeModelUpdate) Set(val *ServeModelUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServeModelUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServeModelUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServeModelUpdate(val *ServeModelUpdate) *NullableServeModelUpdate {
+ return &NullableServeModelUpdate{value: val, isSet: true}
+}
+
+func (v NullableServeModelUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServeModelUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_serving_environment.go b/pkg/openapi/model_serving_environment.go
new file mode 100644
index 000000000..0d93a75b6
--- /dev/null
+++ b/pkg/openapi/model_serving_environment.go
@@ -0,0 +1,347 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ServingEnvironment type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServingEnvironment{}
+
+// ServingEnvironment A Model Serving environment for serving `RegisteredModels`.
+type ServingEnvironment struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+ // Output only. The unique server generated id of the resource.
+ Id *string `json:"id,omitempty"`
+ // Output only. Create time of the resource in millisecond since epoch.
+ CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
+ // Output only. Last update time of the resource since epoch in millisecond since epoch.
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+}
+
+// NewServingEnvironment instantiates a new ServingEnvironment object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServingEnvironment() *ServingEnvironment {
+ this := ServingEnvironment{}
+ return &this
+}
+
+// NewServingEnvironmentWithDefaults instantiates a new ServingEnvironment object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServingEnvironmentWithDefaults() *ServingEnvironment {
+ this := ServingEnvironment{}
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ServingEnvironment) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironment) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ServingEnvironment) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ServingEnvironment) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ServingEnvironment) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironment) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ServingEnvironment) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ServingEnvironment) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ServingEnvironment) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironment) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ServingEnvironment) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ServingEnvironment) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ServingEnvironment) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironment) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ServingEnvironment) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ServingEnvironment) SetName(v string) {
+ o.Name = &v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *ServingEnvironment) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironment) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *ServingEnvironment) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *ServingEnvironment) SetId(v string) {
+ o.Id = &v
+}
+
+// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *ServingEnvironment) GetCreateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.CreateTimeSinceEpoch
+}
+
+// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironment) GetCreateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.CreateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.CreateTimeSinceEpoch, true
+}
+
+// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *ServingEnvironment) HasCreateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
+func (o *ServingEnvironment) SetCreateTimeSinceEpoch(v string) {
+ o.CreateTimeSinceEpoch = &v
+}
+
+// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
+func (o *ServingEnvironment) GetLastUpdateTimeSinceEpoch() string {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ var ret string
+ return ret
+ }
+ return *o.LastUpdateTimeSinceEpoch
+}
+
+// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironment) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
+ if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
+ return nil, false
+ }
+ return o.LastUpdateTimeSinceEpoch, true
+}
+
+// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
+func (o *ServingEnvironment) HasLastUpdateTimeSinceEpoch() bool {
+ if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
+func (o *ServingEnvironment) SetLastUpdateTimeSinceEpoch(v string) {
+ o.LastUpdateTimeSinceEpoch = &v
+}
+
+func (o ServingEnvironment) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServingEnvironment) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.CreateTimeSinceEpoch) {
+ toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
+ }
+ if !IsNil(o.LastUpdateTimeSinceEpoch) {
+ toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
+ }
+ return toSerialize, nil
+}
+
+type NullableServingEnvironment struct {
+ value *ServingEnvironment
+ isSet bool
+}
+
+func (v NullableServingEnvironment) Get() *ServingEnvironment {
+ return v.value
+}
+
+func (v *NullableServingEnvironment) Set(val *ServingEnvironment) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServingEnvironment) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServingEnvironment) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServingEnvironment(val *ServingEnvironment) *NullableServingEnvironment {
+ return &NullableServingEnvironment{value: val, isSet: true}
+}
+
+func (v NullableServingEnvironment) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServingEnvironment) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_serving_environment_create.go b/pkg/openapi/model_serving_environment_create.go
new file mode 100644
index 000000000..faff38de1
--- /dev/null
+++ b/pkg/openapi/model_serving_environment_create.go
@@ -0,0 +1,236 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ServingEnvironmentCreate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServingEnvironmentCreate{}
+
+// ServingEnvironmentCreate A Model Serving environment for serving `RegisteredModels`.
+type ServingEnvironmentCreate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+ // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.
+ Name *string `json:"name,omitempty"`
+}
+
+// NewServingEnvironmentCreate instantiates a new ServingEnvironmentCreate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServingEnvironmentCreate() *ServingEnvironmentCreate {
+ this := ServingEnvironmentCreate{}
+ return &this
+}
+
+// NewServingEnvironmentCreateWithDefaults instantiates a new ServingEnvironmentCreate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServingEnvironmentCreateWithDefaults() *ServingEnvironmentCreate {
+ this := ServingEnvironmentCreate{}
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ServingEnvironmentCreate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ServingEnvironmentCreate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ServingEnvironmentCreate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ServingEnvironmentCreate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentCreate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ServingEnvironmentCreate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ServingEnvironmentCreate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ServingEnvironmentCreate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentCreate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ServingEnvironmentCreate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ServingEnvironmentCreate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ServingEnvironmentCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ServingEnvironmentCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ServingEnvironmentCreate) SetName(v string) {
+ o.Name = &v
+}
+
+func (o ServingEnvironmentCreate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServingEnvironmentCreate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ return toSerialize, nil
+}
+
+type NullableServingEnvironmentCreate struct {
+ value *ServingEnvironmentCreate
+ isSet bool
+}
+
+func (v NullableServingEnvironmentCreate) Get() *ServingEnvironmentCreate {
+ return v.value
+}
+
+func (v *NullableServingEnvironmentCreate) Set(val *ServingEnvironmentCreate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServingEnvironmentCreate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServingEnvironmentCreate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServingEnvironmentCreate(val *ServingEnvironmentCreate) *NullableServingEnvironmentCreate {
+ return &NullableServingEnvironmentCreate{value: val, isSet: true}
+}
+
+func (v NullableServingEnvironmentCreate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServingEnvironmentCreate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_serving_environment_list.go b/pkg/openapi/model_serving_environment_list.go
new file mode 100644
index 000000000..51c1c44b7
--- /dev/null
+++ b/pkg/openapi/model_serving_environment_list.go
@@ -0,0 +1,209 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ServingEnvironmentList type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServingEnvironmentList{}
+
+// ServingEnvironmentList List of ServingEnvironments.
+type ServingEnvironmentList struct {
+ // Token to use to retrieve next page of results.
+ NextPageToken string `json:"nextPageToken"`
+ // Maximum number of resources to return in the result.
+ PageSize int32 `json:"pageSize"`
+ // Number of items in result list.
+ Size int32 `json:"size"`
+ //
+ Items []ServingEnvironment `json:"items,omitempty"`
+}
+
+// NewServingEnvironmentList instantiates a new ServingEnvironmentList object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServingEnvironmentList(nextPageToken string, pageSize int32, size int32) *ServingEnvironmentList {
+ this := ServingEnvironmentList{}
+ this.NextPageToken = nextPageToken
+ this.PageSize = pageSize
+ this.Size = size
+ return &this
+}
+
+// NewServingEnvironmentListWithDefaults instantiates a new ServingEnvironmentList object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServingEnvironmentListWithDefaults() *ServingEnvironmentList {
+ this := ServingEnvironmentList{}
+ return &this
+}
+
+// GetNextPageToken returns the NextPageToken field value
+func (o *ServingEnvironmentList) GetNextPageToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.NextPageToken
+}
+
+// GetNextPageTokenOk returns a tuple with the NextPageToken field value
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentList) GetNextPageTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.NextPageToken, true
+}
+
+// SetNextPageToken sets field value
+func (o *ServingEnvironmentList) SetNextPageToken(v string) {
+ o.NextPageToken = v
+}
+
+// GetPageSize returns the PageSize field value
+func (o *ServingEnvironmentList) GetPageSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentList) GetPageSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.PageSize, true
+}
+
+// SetPageSize sets field value
+func (o *ServingEnvironmentList) SetPageSize(v int32) {
+ o.PageSize = v
+}
+
+// GetSize returns the Size field value
+func (o *ServingEnvironmentList) GetSize() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentList) GetSizeOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Size, true
+}
+
+// SetSize sets field value
+func (o *ServingEnvironmentList) SetSize(v int32) {
+ o.Size = v
+}
+
+// GetItems returns the Items field value if set, zero value otherwise.
+func (o *ServingEnvironmentList) GetItems() []ServingEnvironment {
+ if o == nil || IsNil(o.Items) {
+ var ret []ServingEnvironment
+ return ret
+ }
+ return o.Items
+}
+
+// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentList) GetItemsOk() ([]ServingEnvironment, bool) {
+ if o == nil || IsNil(o.Items) {
+ return nil, false
+ }
+ return o.Items, true
+}
+
+// HasItems returns a boolean if a field has been set.
+func (o *ServingEnvironmentList) HasItems() bool {
+ if o != nil && !IsNil(o.Items) {
+ return true
+ }
+
+ return false
+}
+
+// SetItems gets a reference to the given []ServingEnvironment and assigns it to the Items field.
+func (o *ServingEnvironmentList) SetItems(v []ServingEnvironment) {
+ o.Items = v
+}
+
+func (o ServingEnvironmentList) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServingEnvironmentList) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["nextPageToken"] = o.NextPageToken
+ toSerialize["pageSize"] = o.PageSize
+ toSerialize["size"] = o.Size
+ if !IsNil(o.Items) {
+ toSerialize["items"] = o.Items
+ }
+ return toSerialize, nil
+}
+
+type NullableServingEnvironmentList struct {
+ value *ServingEnvironmentList
+ isSet bool
+}
+
+func (v NullableServingEnvironmentList) Get() *ServingEnvironmentList {
+ return v.value
+}
+
+func (v *NullableServingEnvironmentList) Set(val *ServingEnvironmentList) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServingEnvironmentList) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServingEnvironmentList) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServingEnvironmentList(val *ServingEnvironmentList) *NullableServingEnvironmentList {
+ return &NullableServingEnvironmentList{value: val, isSet: true}
+}
+
+func (v NullableServingEnvironmentList) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServingEnvironmentList) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_serving_environment_update.go b/pkg/openapi/model_serving_environment_update.go
new file mode 100644
index 000000000..3baaf1172
--- /dev/null
+++ b/pkg/openapi/model_serving_environment_update.go
@@ -0,0 +1,199 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+)
+
+// checks if the ServingEnvironmentUpdate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServingEnvironmentUpdate{}
+
+// ServingEnvironmentUpdate A Model Serving environment for serving `RegisteredModels`.
+type ServingEnvironmentUpdate struct {
+ // User provided custom properties which are not defined by its type.
+ CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"`
+ // An optional description about the resource.
+ Description *string `json:"description,omitempty"`
+ // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.
+ ExternalID *string `json:"externalID,omitempty"`
+}
+
+// NewServingEnvironmentUpdate instantiates a new ServingEnvironmentUpdate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServingEnvironmentUpdate() *ServingEnvironmentUpdate {
+ this := ServingEnvironmentUpdate{}
+ return &this
+}
+
+// NewServingEnvironmentUpdateWithDefaults instantiates a new ServingEnvironmentUpdate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServingEnvironmentUpdateWithDefaults() *ServingEnvironmentUpdate {
+ this := ServingEnvironmentUpdate{}
+ return &this
+}
+
+// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise.
+func (o *ServingEnvironmentUpdate) GetCustomProperties() map[string]MetadataValue {
+ if o == nil || IsNil(o.CustomProperties) {
+ var ret map[string]MetadataValue
+ return ret
+ }
+ return *o.CustomProperties
+}
+
+// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) {
+ if o == nil || IsNil(o.CustomProperties) {
+ return nil, false
+ }
+ return o.CustomProperties, true
+}
+
+// HasCustomProperties returns a boolean if a field has been set.
+func (o *ServingEnvironmentUpdate) HasCustomProperties() bool {
+ if o != nil && !IsNil(o.CustomProperties) {
+ return true
+ }
+
+ return false
+}
+
+// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field.
+func (o *ServingEnvironmentUpdate) SetCustomProperties(v map[string]MetadataValue) {
+ o.CustomProperties = &v
+}
+
+// GetDescription returns the Description field value if set, zero value otherwise.
+func (o *ServingEnvironmentUpdate) GetDescription() string {
+ if o == nil || IsNil(o.Description) {
+ var ret string
+ return ret
+ }
+ return *o.Description
+}
+
+// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentUpdate) GetDescriptionOk() (*string, bool) {
+ if o == nil || IsNil(o.Description) {
+ return nil, false
+ }
+ return o.Description, true
+}
+
+// HasDescription returns a boolean if a field has been set.
+func (o *ServingEnvironmentUpdate) HasDescription() bool {
+ if o != nil && !IsNil(o.Description) {
+ return true
+ }
+
+ return false
+}
+
+// SetDescription gets a reference to the given string and assigns it to the Description field.
+func (o *ServingEnvironmentUpdate) SetDescription(v string) {
+ o.Description = &v
+}
+
+// GetExternalID returns the ExternalID field value if set, zero value otherwise.
+func (o *ServingEnvironmentUpdate) GetExternalID() string {
+ if o == nil || IsNil(o.ExternalID) {
+ var ret string
+ return ret
+ }
+ return *o.ExternalID
+}
+
+// GetExternalIDOk returns a tuple with the ExternalID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServingEnvironmentUpdate) GetExternalIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ExternalID) {
+ return nil, false
+ }
+ return o.ExternalID, true
+}
+
+// HasExternalID returns a boolean if a field has been set.
+func (o *ServingEnvironmentUpdate) HasExternalID() bool {
+ if o != nil && !IsNil(o.ExternalID) {
+ return true
+ }
+
+ return false
+}
+
+// SetExternalID gets a reference to the given string and assigns it to the ExternalID field.
+func (o *ServingEnvironmentUpdate) SetExternalID(v string) {
+ o.ExternalID = &v
+}
+
+func (o ServingEnvironmentUpdate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServingEnvironmentUpdate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CustomProperties) {
+ toSerialize["customProperties"] = o.CustomProperties
+ }
+ if !IsNil(o.Description) {
+ toSerialize["description"] = o.Description
+ }
+ if !IsNil(o.ExternalID) {
+ toSerialize["externalID"] = o.ExternalID
+ }
+ return toSerialize, nil
+}
+
+type NullableServingEnvironmentUpdate struct {
+ value *ServingEnvironmentUpdate
+ isSet bool
+}
+
+func (v NullableServingEnvironmentUpdate) Get() *ServingEnvironmentUpdate {
+ return v.value
+}
+
+func (v *NullableServingEnvironmentUpdate) Set(val *ServingEnvironmentUpdate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServingEnvironmentUpdate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServingEnvironmentUpdate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServingEnvironmentUpdate(val *ServingEnvironmentUpdate) *NullableServingEnvironmentUpdate {
+ return &NullableServingEnvironmentUpdate{value: val, isSet: true}
+}
+
+func (v NullableServingEnvironmentUpdate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServingEnvironmentUpdate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/model_sort_order.go b/pkg/openapi/model_sort_order.go
new file mode 100644
index 000000000..f2cdd0e32
--- /dev/null
+++ b/pkg/openapi/model_sort_order.go
@@ -0,0 +1,110 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// SortOrder Supported sort direction for ordering result entities.
+type SortOrder string
+
+// List of SortOrder
+const (
+ SORTORDER_ASC SortOrder = "ASC"
+ SORTORDER_DESC SortOrder = "DESC"
+)
+
+// All allowed values of SortOrder enum
+var AllowedSortOrderEnumValues = []SortOrder{
+ "ASC",
+ "DESC",
+}
+
+func (v *SortOrder) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := SortOrder(value)
+ for _, existing := range AllowedSortOrderEnumValues {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid SortOrder", value)
+}
+
+// NewSortOrderFromValue returns a pointer to a valid SortOrder
+// for the value passed as argument, or an error if the value passed is not allowed by the enum
+func NewSortOrderFromValue(v string) (*SortOrder, error) {
+ ev := SortOrder(v)
+ if ev.IsValid() {
+ return &ev, nil
+ } else {
+ return nil, fmt.Errorf("invalid value '%v' for SortOrder: valid values are %v", v, AllowedSortOrderEnumValues)
+ }
+}
+
+// IsValid return true if the value is valid for the enum, false otherwise
+func (v SortOrder) IsValid() bool {
+ for _, existing := range AllowedSortOrderEnumValues {
+ if existing == v {
+ return true
+ }
+ }
+ return false
+}
+
+// Ptr returns reference to SortOrder value
+func (v SortOrder) Ptr() *SortOrder {
+ return &v
+}
+
+type NullableSortOrder struct {
+ value *SortOrder
+ isSet bool
+}
+
+func (v NullableSortOrder) Get() *SortOrder {
+ return v.value
+}
+
+func (v *NullableSortOrder) Set(val *SortOrder) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSortOrder) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSortOrder) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSortOrder(val *SortOrder) *NullableSortOrder {
+ return &NullableSortOrder{value: val, isSet: true}
+}
+
+func (v NullableSortOrder) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSortOrder) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/pkg/openapi/response.go b/pkg/openapi/response.go
new file mode 100644
index 000000000..7156934b7
--- /dev/null
+++ b/pkg/openapi/response.go
@@ -0,0 +1,47 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "net/http"
+)
+
+// APIResponse stores the API response returned by the server.
+type APIResponse struct {
+ *http.Response `json:"-"`
+ Message string `json:"message,omitempty"`
+ // Operation is the name of the OpenAPI operation.
+ Operation string `json:"operation,omitempty"`
+ // RequestURL is the request URL. This value is always available, even if the
+ // embedded *http.Response is nil.
+ RequestURL string `json:"url,omitempty"`
+ // Method is the HTTP method used for the request. This value is always
+ // available, even if the embedded *http.Response is nil.
+ Method string `json:"method,omitempty"`
+ // Payload holds the contents of the response body (which may be nil or empty).
+ // This is provided here as the raw response.Body() reader will have already
+ // been drained.
+ Payload []byte `json:"-"`
+}
+
+// NewAPIResponse returns a new APIResponse object.
+func NewAPIResponse(r *http.Response) *APIResponse {
+
+ response := &APIResponse{Response: r}
+ return response
+}
+
+// NewAPIResponseWithError returns a new APIResponse object with the provided error message.
+func NewAPIResponseWithError(errorMessage string) *APIResponse {
+
+ response := &APIResponse{Message: errorMessage}
+ return response
+}
diff --git a/pkg/openapi/utils.go b/pkg/openapi/utils.go
new file mode 100644
index 000000000..98fec2c75
--- /dev/null
+++ b/pkg/openapi/utils.go
@@ -0,0 +1,347 @@
+/*
+Model Registry REST API
+
+REST API for Model Registry to create and manage ML model metadata
+
+API version: 1.0.0
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package openapi
+
+import (
+ "encoding/json"
+ "reflect"
+ "time"
+)
+
+// PtrBool is a helper routine that returns a pointer to given boolean value.
+func PtrBool(v bool) *bool { return &v }
+
+// PtrInt is a helper routine that returns a pointer to given integer value.
+func PtrInt(v int) *int { return &v }
+
+// PtrInt32 is a helper routine that returns a pointer to given integer value.
+func PtrInt32(v int32) *int32 { return &v }
+
+// PtrInt64 is a helper routine that returns a pointer to given integer value.
+func PtrInt64(v int64) *int64 { return &v }
+
+// PtrFloat32 is a helper routine that returns a pointer to given float value.
+func PtrFloat32(v float32) *float32 { return &v }
+
+// PtrFloat64 is a helper routine that returns a pointer to given float value.
+func PtrFloat64(v float64) *float64 { return &v }
+
+// PtrString is a helper routine that returns a pointer to given string value.
+func PtrString(v string) *string { return &v }
+
+// PtrTime is helper routine that returns a pointer to given Time value.
+func PtrTime(v time.Time) *time.Time { return &v }
+
+type NullableBool struct {
+ value *bool
+ isSet bool
+}
+
+func (v NullableBool) Get() *bool {
+ return v.value
+}
+
+func (v *NullableBool) Set(val *bool) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBool) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBool) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBool(val *bool) *NullableBool {
+ return &NullableBool{value: val, isSet: true}
+}
+
+func (v NullableBool) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBool) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt struct {
+ value *int
+ isSet bool
+}
+
+func (v NullableInt) Get() *int {
+ return v.value
+}
+
+func (v *NullableInt) Set(val *int) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt(val *int) *NullableInt {
+ return &NullableInt{value: val, isSet: true}
+}
+
+func (v NullableInt) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt32 struct {
+ value *int32
+ isSet bool
+}
+
+func (v NullableInt32) Get() *int32 {
+ return v.value
+}
+
+func (v *NullableInt32) Set(val *int32) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt32) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt32) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt32(val *int32) *NullableInt32 {
+ return &NullableInt32{value: val, isSet: true}
+}
+
+func (v NullableInt32) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt32) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt64 struct {
+ value *int64
+ isSet bool
+}
+
+func (v NullableInt64) Get() *int64 {
+ return v.value
+}
+
+func (v *NullableInt64) Set(val *int64) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt64) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt64) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt64(val *int64) *NullableInt64 {
+ return &NullableInt64{value: val, isSet: true}
+}
+
+func (v NullableInt64) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt64) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableFloat32 struct {
+ value *float32
+ isSet bool
+}
+
+func (v NullableFloat32) Get() *float32 {
+ return v.value
+}
+
+func (v *NullableFloat32) Set(val *float32) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableFloat32) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableFloat32) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableFloat32(val *float32) *NullableFloat32 {
+ return &NullableFloat32{value: val, isSet: true}
+}
+
+func (v NullableFloat32) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableFloat64 struct {
+ value *float64
+ isSet bool
+}
+
+func (v NullableFloat64) Get() *float64 {
+ return v.value
+}
+
+func (v *NullableFloat64) Set(val *float64) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableFloat64) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableFloat64) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableFloat64(val *float64) *NullableFloat64 {
+ return &NullableFloat64{value: val, isSet: true}
+}
+
+func (v NullableFloat64) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableString struct {
+ value *string
+ isSet bool
+}
+
+func (v NullableString) Get() *string {
+ return v.value
+}
+
+func (v *NullableString) Set(val *string) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableString) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableString) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableString(val *string) *NullableString {
+ return &NullableString{value: val, isSet: true}
+}
+
+func (v NullableString) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableString) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableTime struct {
+ value *time.Time
+ isSet bool
+}
+
+func (v NullableTime) Get() *time.Time {
+ return v.value
+}
+
+func (v *NullableTime) Set(val *time.Time) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableTime) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableTime) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableTime(val *time.Time) *NullableTime {
+ return &NullableTime{value: val, isSet: true}
+}
+
+func (v NullableTime) MarshalJSON() ([]byte, error) {
+ return v.value.MarshalJSON()
+}
+
+func (v *NullableTime) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+// IsNil checks if an input is nil
+func IsNil(i interface{}) bool {
+ if i == nil {
+ return true
+ }
+ switch reflect.TypeOf(i).Kind() {
+ case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice:
+ return reflect.ValueOf(i).IsNil()
+ case reflect.Array:
+ return reflect.ValueOf(i).IsZero()
+ }
+ return false
+}
+
+type MappedNullable interface {
+ ToMap() (map[string]interface{}, error)
+}
diff --git a/scripts/build_deploy.sh b/scripts/build_deploy.sh
new file mode 100755
index 000000000..df610c375
--- /dev/null
+++ b/scripts/build_deploy.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+set -e
+
+# quay.io credentials
+QUAY_REGISTRY=quay.io
+QUAY_ORG="${QUAY_ORG:-opendatahub}"
+QUAY_IMG_REPO="${QUAY_IMG_REPO:-model-registry}"
+QUAY_USERNAME="${QUAY_USERNAME}"
+QUAY_PASSWORD="${QUAY_PASSWORD}"
+
+# image version
+HASH="$(git rev-parse --short=7 HEAD)"
+VERSION="${VERSION:-$HASH}"
+
+# if set to 0 skip image build
+# otherwise build it
+BUILD_IMAGE="${BUILD_IMAGE:-true}"
+
+# if set to 0 skip push to registry
+# otherwise push it
+PUSH_IMAGE="${PUSH_IMAGE:-false}"
+
+# skip if image already existing on registry
+SKIP_IF_EXISTING="${SKIP_IF_EXISTING:-false}"
+
+# assure docker exists
+docker -v foo >/dev/null 2>&1 || { echo >&2 "::error:: Docker is required. Aborting."; exit 1; }
+
+# skip if image already existing
+if [[ "${SKIP_IF_EXISTING,,}" == "true" ]]; then
+ TAGS=$(curl --request GET "https://$QUAY_REGISTRY/api/v1/repository/${QUAY_ORG}/${QUAY_IMG_REPO}/tag/?specificTag=${VERSION}")
+ LATEST_TAG_HAS_END_TS=$(echo $TAGS | jq .tags - | jq 'sort_by(.start_ts) | reverse' | jq '.[0].end_ts')
+ NOT_EMPTY=$(echo ${TAGS} | jq .tags - | jq any)
+
+ # Image only exists if there is a tag that does not have "end_ts" (i.e. it is still present).
+ if [[ "$NOT_EMPTY" == "true" && $LATEST_TAG_HAS_END_TS == "null" ]]; then
+ echo "::error:: The image ${QUAY_ORG}/${QUAY_IMG_REPO}:${VERSION} already exists"
+ exit 1
+ else
+ echo "Image does not exist...proceeding with build & push."
+ fi
+fi
+
+# build docker image, login is not required at this step
+if [[ "${BUILD_IMAGE,,}" == "true" ]]; then
+ echo "Building container image.."
+ make \
+ IMG_REGISTRY="${QUAY_REGISTRY}" \
+ IMG_ORG="${QUAY_ORG}" \
+ IMG_REPO="${QUAY_IMG_REPO}" \
+ IMG_VERSION="${VERSION}" \
+ image/build
+else
+ echo "Skip container image build."
+fi
+
+# push container image to registry, requires login
+if [[ "${PUSH_IMAGE,,}" == "true" ]]; then
+ echo "Pushing container image.."
+ make \
+ IMG_REGISTRY="${QUAY_REGISTRY}" \
+ IMG_ORG="${QUAY_ORG}" \
+ IMG_REPO="${QUAY_IMG_REPO}" \
+ IMG_VERSION="${VERSION}" \
+ DOCKER_USER="${QUAY_USERNAME}"\
+ DOCKER_PWD="${QUAY_PASSWORD}" \
+ docker/login \
+ image/push
+else
+ echo "Skip container image push."
+fi
diff --git a/scripts/gen_type_asserts.sh b/scripts/gen_type_asserts.sh
new file mode 100755
index 000000000..27808c3a2
--- /dev/null
+++ b/scripts/gen_type_asserts.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+set -e
+
+ASSERT_FILE_PATH="internal/server/openapi/type_asserts.go"
+PATCH="./patches/type_asserts.patch"
+
+# Remove the existing file identified by env.ASSERT_FILE_PATH
+if [ -f "$ASSERT_FILE_PATH" ]; then
+ rm "$ASSERT_FILE_PATH"
+fi
+
+# Create an empty file
+touch "$ASSERT_FILE_PATH"
+
+INITIAL_CONTENT=$(cat < "$ASSERT_FILE_PATH"
+
+# Iterate over files starting with "model_" in the internal/server/openapi/ folder
+for file in internal/server/openapi/model_*; do
+ # Check if the file is a regular file
+ if [ -f "$file" ]; then
+ # Ignore first 15 lines containing license, package and imports
+ sed -n '13,$p' "$file" >> "$ASSERT_FILE_PATH"
+ # Remove the merged file
+ rm "$file"
+ fi
+done
+
+git apply "$PATCH"
diff --git a/templates/go-server/model.mustache b/templates/go-server/model.mustache
new file mode 100644
index 000000000..b2cd86aa0
--- /dev/null
+++ b/templates/go-server/model.mustache
@@ -0,0 +1,112 @@
+{{>partial_header}}
+package {{packageName}}
+
+{{#models}}{{#imports}}
+{{#-first}}import (
+{{/-first}} "{{import}}"{{#-last}}
+)
+{{/-last}}{{/imports}}
+
+{{#model}}
+
+// Assert{{classname}}Required checks if the required fields are not zero-ed
+func Assert{{classname}}Required(obj model.{{classname}}) error {
+{{#hasRequired}}
+ elements := map[string]interface{}{
+{{#requiredVars}} "{{baseName}}": obj.{{name}},
+{{/requiredVars}} }
+ for name, el := range elements {
+ if isZero := IsZeroValue(el); isZero {
+ return &RequiredError{Field: name}
+ }
+ }
+
+{{/hasRequired}}
+{{#parent}}
+ {{^isMap}}
+ {{^isArray}}
+ if err := Assert{{{parent}}}Required(obj.{{{parent}}}); err != nil {
+ return err
+ }
+
+ {{/isArray}}
+ {{/isMap}}
+{{/parent}}
+{{#Vars}}
+ {{#isNullable}}
+ {{#isModel}}
+ if obj.{{name}} != nil {
+ {{/isModel}}
+ {{#isArray}}
+ {{#items.isModel}}
+ if obj.{{name}} != nil {
+ {{/items.isModel}}
+ {{^items.isModel}}
+ {{#mostInnerItems.isModel}}
+ {{^mostInnerItems.isPrimitiveType}}
+ if obj.{{name}} != nil {
+ {{/mostInnerItems.isPrimitiveType}}
+ {{/mostInnerItems.isModel}}
+ {{/items.isModel}}
+ {{/isArray}}
+ {{/isNullable}}
+ {{#isModel}}
+{{#isNullable}} {{/isNullable}} if err := Assert{{baseType}}Required({{#isNullable}}*{{/isNullable}}obj.{{name}}); err != nil {
+{{#isNullable}} {{/isNullable}} return err
+{{#isNullable}} {{/isNullable}} }
+ {{/isModel}}
+ {{#isArray}}
+ {{#items.isModel}}
+{{#isNullable}} {{/isNullable}} for _, el := range {{#isNullable}}*{{/isNullable}}obj.{{name}} {
+{{#isNullable}} {{/isNullable}} if err := Assert{{items.baseType}}Required(el); err != nil {
+{{#isNullable}} {{/isNullable}} return err
+{{#isNullable}} {{/isNullable}} }
+{{#isNullable}} {{/isNullable}} }
+ {{/items.isModel}}
+ {{^items.isModel}}
+ {{#mostInnerItems.isModel}}
+ {{^mostInnerItems.isPrimitiveType}}
+{{#isNullable}} {{/isNullable}} if err := AssertRecurseInterfaceRequired({{#isNullable}}*{{/isNullable}}obj.{{name}}, Assert{{mostInnerItems.dataType}}Required); err != nil {
+{{#isNullable}} {{/isNullable}} return err
+{{#isNullable}} {{/isNullable}} }
+ {{/mostInnerItems.isPrimitiveType}}
+ {{/mostInnerItems.isModel}}
+ {{/items.isModel}}
+ {{/isArray}}
+ {{#isNullable}}
+ {{#isModel}}
+ }
+ {{/isModel}}
+ {{#isArray}}
+ {{#items.isModel}}
+ }
+ {{/items.isModel}}
+ {{^items.isModel}}
+ {{#mostInnerItems.isModel}}
+ {{^mostInnerItems.isPrimitiveType}}
+ }
+ {{/mostInnerItems.isPrimitiveType}}
+ {{/mostInnerItems.isModel}}
+ {{/items.isModel}}
+ {{/isArray}}
+ {{/isNullable}}
+{{/Vars}}
+ return nil
+}
+
+// Assert{{classname}}Constraints checks if the values respects the defined constraints
+func Assert{{classname}}Constraints(obj model.{{classname}}) error {
+{{#Vars}}
+{{#minimum}}
+ if {{#isNullable}}obj.{{name}} != nil && *{{/isNullable}}obj.{{name}} < {{minimum}} {
+ return &ParsingError{Err: errors.New(errMsgMinValueConstraint)}
+ }
+{{/minimum}}
+{{#maximum}}
+ if {{#isNullable}}obj.{{name}} != nil && *{{/isNullable}}obj.{{name}} > {{maximum}} {
+ return &ParsingError{Err: errors.New(errMsgMaxValueConstraint)}
+ }
+{{/maximum}}
+{{/Vars}}
+ return nil
+}{{/model}}{{/models}}
diff --git a/test/config/ml-metadata/conn_config.pb b/test/config/ml-metadata/conn_config.pb
new file mode 100644
index 000000000..774b7aa01
--- /dev/null
+++ b/test/config/ml-metadata/conn_config.pb
@@ -0,0 +1,6 @@
+connection_config {
+ sqlite {
+ filename_uri: '/tmp/shared/metadata.sqlite.db'
+ connection_mode: READWRITE_OPENCREATE
+ }
+}
diff --git a/test/python/test_mlmetadata.py b/test/python/test_mlmetadata.py
new file mode 100644
index 000000000..463f31d41
--- /dev/null
+++ b/test/python/test_mlmetadata.py
@@ -0,0 +1,176 @@
+from grpc import insecure_channel
+
+# from ml_metadata.metadata_store import metadata_store
+from ml_metadata.proto import metadata_store_pb2
+from ml_metadata.proto import metadata_store_service_pb2
+from ml_metadata.proto import metadata_store_service_pb2_grpc
+
+
+def main():
+ # connection_config = metadata_store_pb2.ConnectionConfig()
+ # connection_config.sqlite.filename_uri = './metadata.sqlite'
+ # connection_config.sqlite.connection_mode = 3 # READWRITE_OPENCREATE
+ # store = metadata_store.MetadataStore(connection_config)
+
+ # connection_config = metadata_store_pb2.ConnectionConfig()
+ # connection_config.mysql.host = 'localhost'
+ # connection_config.mysql.port = 3306
+ # connection_config.mysql.database = 'mlmetadata'
+ # connection_config.mysql.user = 'root'
+ # connection_config.mysql.password = 'my-secret-pw'
+ # store = metadata_store.MetadataStore(connection_config, enable_upgrade_migration=True)
+
+ channel = insecure_channel("localhost:8080")
+ store = metadata_store_service_pb2_grpc.MetadataStoreServiceStub(channel)
+
+ # Create ArtifactTypes, e.g., Data and Model
+ data_type = metadata_store_pb2.ArtifactType()
+ data_type.name = "DataSet"
+ data_type.properties["day"] = metadata_store_pb2.INT
+ data_type.properties["split"] = metadata_store_pb2.STRING
+
+ request = metadata_store_service_pb2.PutArtifactTypeRequest()
+ request.all_fields_match = True
+ request.artifact_type.CopyFrom(data_type)
+ response = store.PutArtifactType(request)
+ data_type_id = response.type_id
+
+ model_type = metadata_store_pb2.ArtifactType()
+ model_type.name = "SavedModel"
+ model_type.properties["version"] = metadata_store_pb2.INT
+ model_type.properties["name"] = metadata_store_pb2.STRING
+
+ request.artifact_type.CopyFrom(model_type)
+ response = store.PutArtifactType(request)
+ model_type_id = response.type_id
+
+ request = metadata_store_service_pb2.GetArtifactTypeRequest()
+ request.type_name = "SavedModel"
+ response = store.GetArtifactType(request)
+ assert response.artifact_type.id == model_type_id
+ assert response.artifact_type.name == "SavedModel"
+
+ # Query all registered Artifact types.
+ # artifact_types = store.GetArtifactTypes()
+
+ # Create an ExecutionType, e.g., Trainer
+ trainer_type = metadata_store_pb2.ExecutionType()
+ trainer_type.name = "Trainer"
+ trainer_type.properties["state"] = metadata_store_pb2.STRING
+
+ request = metadata_store_service_pb2.PutExecutionTypeRequest()
+ request.execution_type.CopyFrom(trainer_type)
+ response = store.PutExecutionType(request)
+ # trainer_type_id = response.type_id
+
+ # # Query a registered Execution type with the returned id
+ # [registered_type] = store.GetExecutionTypesByID([trainer_type_id])
+
+ # Create an input artifact of type DataSet
+ data_artifact = metadata_store_pb2.Artifact()
+ data_artifact.uri = "path/to/data"
+ data_artifact.properties["day"].int_value = 1
+ data_artifact.properties["split"].string_value = "train"
+ data_artifact.type_id = data_type_id
+
+ request = metadata_store_service_pb2.PutArtifactsRequest()
+ request.artifacts.extend([data_artifact])
+ response = store.PutArtifacts(request)
+ # data_artifact_id = response.artifact_ids[0]
+
+ # # Query all registered Artifacts
+ # artifacts = store.GetArtifacts()
+ #
+ # # Plus, there are many ways to query the same Artifact
+ # [stored_data_artifact] = store.GetArtifactsByID([data_artifact_id])
+ # artifacts_with_uri = store.GetArtifactsByURI(data_artifact.uri)
+ # artifacts_with_conditions = store.GetArtifacts(
+ # list_options=mlmd.ListOptions(
+ # filter_query='uri LIKE "%/data" AND properties.day.int_value > 0'))
+ #
+ # # Register the Execution of a Trainer run
+ # trainer_run = metadata_store_pb2.Execution()
+ # trainer_run.type_id = trainer_type_id
+ # trainer_run.properties["state"].string_value = "RUNNING"
+ # [run_id] = store.PutExecutions([trainer_run])
+ #
+ # # Query all registered Execution
+ # executions = store.GetExecutionsByID([run_id])
+ # # Similarly, the same execution can be queried with conditions.
+ # executions_with_conditions = store.GetExecutions(
+ # list_options = mlmd.ListOptions(
+ # filter_query='type = "Trainer" AND properties.state.string_value IS NOT NULL'))
+ #
+ # # Define the input event
+ # input_event = metadata_store_pb2.Event()
+ # input_event.artifact_id = data_artifact_id
+ # input_event.execution_id = run_id
+ # input_event.type = metadata_store_pb2.Event.DECLARED_INPUT
+ #
+ # # Record the input event in the metadata store
+ # store.put_events([input_event])
+ #
+ # # Declare the output artifact of type SavedModel
+ # model_artifact = metadata_store_pb2.Artifact()
+ # model_artifact.uri = 'path/to/model/file'
+ # model_artifact.properties["version"].int_value = 1
+ # model_artifact.properties["name"].string_value = 'MNIST-v1'
+ # model_artifact.type_id = model_type_id
+ # [model_artifact_id] = store.PutArtifacts([model_artifact])
+ #
+ # # Declare the output event
+ # output_event = metadata_store_pb2.Event()
+ # output_event.artifact_id = model_artifact_id
+ # output_event.execution_id = run_id
+ # output_event.type = metadata_store_pb2.Event.DECLARED_OUTPUT
+ #
+ # # Submit output event to the Metadata Store
+ # store.PutEvents([output_event])
+ #
+ # trainer_run.id = run_id
+ # trainer_run.properties["state"].string_value = "COMPLETED"
+ # store.PutExecutions([trainer_run])
+
+ # Create a ContextType, e.g., Experiment with a note property
+ experiment_type = metadata_store_pb2.ContextType()
+ experiment_type.name = "Experiment"
+ experiment_type.properties["note"] = metadata_store_pb2.STRING
+ request = metadata_store_service_pb2.PutContextTypeRequest()
+ request.context_type.CopyFrom(experiment_type)
+ response = store.PutContextType(request)
+ # experiment_type_id = response.type_id
+
+ # # Group the model and the trainer run to an experiment.
+ # my_experiment = metadata_store_pb2.Context()
+ # my_experiment.type_id = experiment_type_id
+ # # Give the experiment a name
+ # my_experiment.name = "exp1"
+ # my_experiment.properties["note"].string_value = "My first experiment."
+ # [experiment_id] = store.PutContexts([my_experiment])
+ #
+ # attribution = metadata_store_pb2.Attribution()
+ # attribution.artifact_id = model_artifact_id
+ # attribution.context_id = experiment_id
+ #
+ # association = metadata_store_pb2.Association()
+ # association.execution_id = run_id
+ # association.context_id = experiment_id
+ #
+ # store.PutAttributionsAndAssociations([attribution], [association])
+ #
+ # # Query the Artifacts and Executions that are linked to the Context.
+ # experiment_artifacts = store.GetArtifactsByContext(experiment_id)
+ # experiment_executions = store.GetExecutionsByContext(experiment_id)
+ #
+ # # You can also use neighborhood queries to fetch these artifacts and executions
+ # # with conditions.
+ # experiment_artifacts_with_conditions = store.GetArtifacts(
+ # list_options = mlmd.ListOptions(
+ # filter_query=('contexts_a.type = "Experiment" AND contexts_a.name = "exp1"')))
+ # experiment_executions_with_conditions = store.GetExecutions(
+ # list_options = mlmd.ListOptions(
+ # filter_query=('contexts_a.id = {}'.format(experiment_id))))
+
+
+if __name__ == "__main__":
+ main()
diff --git a/test/robot/MLMetadata.py b/test/robot/MLMetadata.py
new file mode 100644
index 000000000..eed40672a
--- /dev/null
+++ b/test/robot/MLMetadata.py
@@ -0,0 +1,18 @@
+from ml_metadata import proto
+from ml_metadata.metadata_store import metadata_store
+from ml_metadata.proto import metadata_store_pb2
+
+
+class MLMetadata(metadata_store.MetadataStore):
+ def __init__(self, host: str = "localhost", port: int = 9090):
+ client_connection_config = metadata_store_pb2.MetadataStoreClientConfig()
+ client_connection_config.host = host
+ client_connection_config.port = port
+ print(client_connection_config)
+ super().__init__(client_connection_config)
+
+ def get_context_by_single_id(self, context_id: int) -> list[proto.Context]:
+ return self.get_contexts_by_id([context_id])[0]
+
+ def get_artifact_by_single_id(self, artifact_id: int) -> list[proto.Artifact]:
+ return self.get_artifacts_by_id([artifact_id])[0]
diff --git a/test/robot/MRandLogicalModel.robot b/test/robot/MRandLogicalModel.robot
new file mode 100644
index 000000000..fd3ff706e
--- /dev/null
+++ b/test/robot/MRandLogicalModel.robot
@@ -0,0 +1,77 @@
+*** Settings ***
+Library MLMetadata.py
+Library Collections
+Resource Setup.resource
+Resource MRkeywords.resource
+Test Setup Test Setup with dummy data
+
+
+*** Comments ***
+You can switch between REST and Python flow by environment variables,
+as documented in the keyword implementation
+
+
+*** Test Cases ***
+Verify basic logical mapping between MR and MLMD
+ Comment This test ensures basic logical mapping bewteen MR entities and MLMD entities
+ ... based on the MR logical mapping:
+ ... RegisteredModel shall result in a MLMD Context
+ ... ModelVersion shall result in a MLMD Context and parent Context(of RegisteredModel)
+ ... ModelArtifact shall result in a MLMD Artifact and Attribution(to the parent Context of ModelVersion)
+
+ ${rId} Given I create a RegisteredModel having name=${name}
+ ${vId} And I create a child ModelVersion having registeredModelID=${rId} name=v1
+ ${aId} And I create a child ModelArtifact having modelversionId=${vId} uri=s3://12345
+ ${rId} Convert To Integer ${rId}
+ ${vId} Convert To Integer ${vId}
+ ${aId} Convert To Integer ${aId}
+
+ # RegisteredModel shall result in a MLMD Context
+ ${mlmdProto} Get Context By Single Id ${rId}
+ Log To Console ${mlmdProto}
+ Should be equal ${mlmdProto.type} odh.RegisteredModel
+ Should be equal ${mlmdProto.name} ${name}
+
+ # ModelVersion shall result in a MLMD Context and parent Context(of RegisteredModel)
+ ${mlmdProto} Get Context By Single Id ${vId}
+ Log To Console ${mlmdProto}
+ Should be equal ${mlmdProto.type} odh.ModelVersion
+ Should be equal ${mlmdProto.name} ${rId}:v1
+ ${mlmdProto} Get Parent Contexts By Context ${vId}
+ Should be equal ${mlmdProto[0].id} ${rId}
+
+ # ModelArtifact shall result in a MLMD Artifact and Attribution(to the parent Context of ModelVersion)
+ ${aNamePrefix} Set Variable ${vId}:
+ ${mlmdProto} Get Artifact By Single Id ${aId}
+ Log To Console ${mlmdProto}
+ Should be equal ${mlmdProto.type} odh.ModelArtifact
+ Should Start With ${mlmdProto.name} ${aNamePrefix}
+ Should be equal ${mlmdProto.uri} s3://12345
+ ${mlmdProto} Get Artifacts By Context ${vId}
+ Should be equal ${mlmdProto[0].id} ${aId}
+
+Verify logical mapping of description property between MR and MLMD
+ Comment This test ensures logical mapping of the description bewteen MR entities and MLMD entities
+ ... being implemented as a custom_property
+
+ Set To Dictionary ${registered_model} description=Lorem ipsum dolor sit amet name=${name}
+ Set To Dictionary ${model_version} description=consectetur adipiscing elit
+ Set To Dictionary ${model_artifact} description=sed do eiusmod tempor incididunt
+ ${rId} Given I create a RegisteredModel payload=${registered_model}
+ ${vId} And I create a child ModelVersion registeredModelID=${rId} payload=&{model_version}
+ ${aId} And I create a child ModelArtifact modelversionId=${vId} payload=&{model_artifact}
+ ${rId} Convert To Integer ${rId}
+ ${vId} Convert To Integer ${vId}
+ ${aId} Convert To Integer ${aId}
+
+ # RegisteredModel description
+ ${mlmdProto} Get Context By Single Id ${rId}
+ Should be equal ${mlmdProto.properties['description'].string_value} Lorem ipsum dolor sit amet
+
+ # ModelVersion description
+ ${mlmdProto} Get Context By Single Id ${vId}
+ Should be equal ${mlmdProto.properties['description'].string_value} consectetur adipiscing elit
+
+ # ModelArtifact description
+ ${mlmdProto} Get Artifact By Single Id ${aId}
+ Should be equal ${mlmdProto.properties['description'].string_value} sed do eiusmod tempor incididunt
diff --git a/test/robot/MRkeywords.resource b/test/robot/MRkeywords.resource
new file mode 100644
index 000000000..6c26fcbe8
--- /dev/null
+++ b/test/robot/MRkeywords.resource
@@ -0,0 +1,134 @@
+*** Settings ***
+Library RequestsLibrary
+Library Collections
+Library String
+Library ModelRegistry.py
+
+*** Variables ***
+${MR_HOST} %{TEST_MR_HOST=localhost}
+${MODE} %{TEST_MODE=REST}
+
+*** Keywords ***
+I create a RegisteredModel having
+ [Arguments] ${name}
+ IF $MODE == "REST"
+ ${data} Create Dictionary name=${name}
+ ${resp} POST url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/registered_models json=${data} expected_status=201
+ Log to console ${resp.json()}
+ ${result} Set Variable ${resp.json()['id']}
+ ELSE
+ ${data} Create Dictionary name=${name}
+ ${result} Upsert Registered Model ${data}
+ Log to console ${result}
+ END
+ RETURN ${result}
+
+
+I create a RegisteredModel
+ [Arguments] ${payload}
+ IF $MODE == "REST"
+ ${resp} POST url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/registered_models json=&{payload} expected_status=201
+ Log to console ${resp.json()}
+ ${result} Set Variable ${resp.json()['id']}
+ ELSE
+ ${result} Upsert Registered Model ${payload}
+ Log to console ${result}
+ END
+ RETURN ${result}
+
+
+I create a child ModelVersion having
+ [Arguments] ${registeredModelID} ${name}
+ IF $MODE == "REST"
+ ${data}= Create Dictionary name=${name} registeredModelID=${registeredModelID}
+ ${resp}= POST url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/model_versions json=${data} expected_status=201
+ Log to console ${resp.json()}
+ ${result} Set Variable ${resp.json()['id']}
+ ELSE
+ ${data} Create Dictionary name=${name}
+ ${result} Upsert Model Version ${data} ${registeredModelID}
+ Log to console ${result}
+ END
+ RETURN ${result}
+
+
+I create a child ModelVersion
+ [Arguments] ${registeredModelID} ${payload}
+ IF $MODE == "REST"
+ Set To Dictionary ${payload} registeredModelID=${registeredModelID}
+ ${resp}= POST url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/model_versions json=&{payload} expected_status=201
+ Log to console ${resp.json()}
+ ${result} Set Variable ${resp.json()['id']}
+ ELSE
+ ${result} Upsert Model Version ${payload} ${registeredModelID}
+ Log to console ${result}
+ END
+ RETURN ${result}
+
+
+I create a child ModelArtifact having
+ [Arguments] ${modelversionId} ${uri}
+ IF $MODE == "REST"
+ ${data}= Create Dictionary uri=${uri} artifactType=model-artifact
+ Log to console ${data}
+ ${resp}= POST url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/model_versions/${modelversionId}/artifacts json=${data} expected_status=201
+ Log to console ${resp.json()}
+ ${result} Set Variable ${resp.json()['id']}
+ ELSE
+ ${data} Create Dictionary uri=${uri}
+ ${result} Upsert Model Artifact ${data} ${modelversionId}
+ Log to console ${result}
+ END
+ RETURN ${result}
+
+
+I create a child ModelArtifact
+ [Arguments] ${modelversionId} ${payload}
+ IF $MODE == "REST"
+ ${resp}= POST url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/model_versions/${modelversionId}/artifacts json=&{payload} expected_status=201
+ Log to console ${resp.json()}
+ ${result} Set Variable ${resp.json()['id']}
+ ELSE
+ ${result} Upsert Model Artifact ${payload} ${modelversionId}
+ Log to console ${result}
+ END
+ RETURN ${result}
+
+
+I get RegisteredModelByID
+ [Arguments] ${id}
+ IF $MODE == "REST"
+ ${resp}= GET url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/registered_models/${id} expected_status=200
+ ${result} Set Variable ${resp.json()}
+ Log to console ${resp.json()}
+ ELSE
+ Log to console ${MODE}
+ Fail Not Implemented
+ END
+ RETURN ${result}
+
+
+I get ModelVersionByID
+ [Arguments] ${id}
+ IF $MODE == "REST"
+ ${resp}= GET url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/model_versions/${id} expected_status=200
+ ${result} Set Variable ${resp.json()}
+ Log to console ${resp.json()}
+ ELSE
+ Log to console ${MODE}
+ Fail Not Implemented
+ END
+ RETURN ${result}
+
+
+I get ModelArtifactByID
+ [Arguments] ${id}
+ IF $MODE == "REST"
+ ${resp}= GET url=http://${MR_HOST}:8080/api/model_registry/v1alpha1/model_artifacts/${id} expected_status=200
+ ${result} Set Variable ${resp.json()}
+ Log to console ${resp.json()}
+ ELSE
+ Log to console ${MODE}
+ Fail Not Implemented
+ END
+ RETURN ${result}
diff --git a/test/robot/ModelRegistry.py b/test/robot/ModelRegistry.py
new file mode 100644
index 000000000..4b5d1090e
--- /dev/null
+++ b/test/robot/ModelRegistry.py
@@ -0,0 +1,42 @@
+import model_registry as mr
+from model_registry.types import ModelArtifact, ModelVersion, RegisteredModel
+from robot.libraries.BuiltIn import BuiltIn
+
+
+def write_to_console(s):
+ print(s)
+ BuiltIn().log_to_console(s)
+
+
+class ModelRegistry(mr.core.ModelRegistryAPIClient):
+ def __init__(self, host: str = "localhost", port: int = 9090):
+ super().__init__(host, port)
+
+ def upsert_registered_model(self, registered_model) -> str:
+ p = RegisteredModel("")
+ for key, value in registered_model.items():
+ setattr(p, key, value)
+ return super().upsert_registered_model(p)
+
+ def upsert_model_version(self, model_version, registered_model_id: str) -> str:
+ write_to_console(model_version)
+ p = ModelVersion("", "", "")
+ for key, value in model_version.items():
+ setattr(p, key, value)
+ write_to_console(p)
+ return super().upsert_model_version(p, registered_model_id)
+
+ def upsert_model_artifact(self, model_artifact, model_version_id: str) -> str:
+ write_to_console(model_artifact)
+ p = ModelArtifact("", "")
+ for key, value in model_artifact.items():
+ setattr(p, key, value)
+ write_to_console(p)
+ return super().upsert_model_artifact(p, model_version_id)
+
+
+# Used only for quick smoke tests
+if __name__ == "__main__":
+ demo_instance = ModelRegistry()
+ demo_instance.upsert_registered_model({"name": "testing123"})
+ demo_instance.upsert_model_version({"name": "v1"}, None)
diff --git a/test/robot/Setup.resource b/test/robot/Setup.resource
new file mode 100644
index 000000000..2d2905df7
--- /dev/null
+++ b/test/robot/Setup.resource
@@ -0,0 +1,26 @@
+*** Settings ***
+Library yaml
+Library OperatingSystem
+Library Collections
+Library String
+
+*** Keywords ***
+Test Setup with dummy data
+ Log To Console TEST SETUP
+ ${name} Generate Random String 8 [LETTERS]
+ Set Test Variable $name ${name}
+ ${YAML} Get File ${CURDIR}${/}data.yaml
+ ${YAML} yaml.Safe Load ${YAML}
+ &{registered_model} Get From Dictionary ${YAML} registered_model
+ Set Test Variable ®istered_model &{registered_model}
+ &{model_version} Get From Dictionary ${YAML} model_version
+ Set Test Variable &model_version &{model_version}
+ &{model_artifact} Get From Dictionary ${YAML} model_artifact
+ Set Test Variable &model_artifact &{model_artifact}
+
+
+*** Variables ***
+&{registered_model}
+&{model_version}
+&{model_artifact}
+${name}
diff --git a/test/robot/UserStory.robot b/test/robot/UserStory.robot
new file mode 100644
index 000000000..646d61477
--- /dev/null
+++ b/test/robot/UserStory.robot
@@ -0,0 +1,35 @@
+*** Settings ***
+Resource Setup.resource
+Resource MRkeywords.resource
+Test Setup Test Setup with dummy data
+
+
+*** Comments ***
+These User Story(-ies) are defined in the PM document
+
+
+*** Test Cases ***
+As a MLOps engineer I would like to store Model name
+ ${rId} Given I create a RegisteredModel having name=${name}
+ ${vId} And I create a child ModelVersion having registeredModelID=${rId} name=v1
+ ${aId} And I create a child ModelArtifact having modelversionId=${vId} uri=s3://12345
+ ${r} Then I get RegisteredModelByID id=${rId}
+ And Should be equal ${r["name"]} ${name}
+ ${r} Then I get ModelVersionByID id=${vId}
+ And Should be equal ${r["name"]} v1
+ ${r} Then I get ModelArtifactByID id=${aId}
+ And Should be equal ${r["uri"]} s3://12345
+
+As a MLOps engineer I would like to store a description of the model
+ Set To Dictionary ${registered_model} description=Lorem ipsum dolor sit amet name=${name}
+ Set To Dictionary ${model_version} description=consectetur adipiscing elit
+ Set To Dictionary ${model_artifact} description=sed do eiusmod tempor incididunt
+ ${rId} Given I create a RegisteredModel payload=${registered_model}
+ ${vId} And I create a child ModelVersion registeredModelID=${rId} payload=&{model_version}
+ ${aId} And I create a child ModelArtifact modelversionId=${vId} payload=&{model_artifact}
+ ${r} Then I get RegisteredModelByID id=${rId}
+ And Should be equal ${r["description"]} Lorem ipsum dolor sit amet
+ ${r} Then I get ModelVersionByID id=${vId}
+ And Should be equal ${r["description"]} consectetur adipiscing elit
+ ${r} Then I get ModelArtifactByID id=${aId}
+ And Should be equal ${r["description"]} sed do eiusmod tempor incididunt
diff --git a/test/robot/data.yaml b/test/robot/data.yaml
new file mode 100644
index 000000000..3de590e7b
--- /dev/null
+++ b/test/robot/data.yaml
@@ -0,0 +1,9 @@
+# dummy data for Robot Framework tests
+registered_model:
+ name: RegisteredModelName
+model_version:
+ name: v1.2.3
+model_artifact:
+ artifactType: model-artifact
+ name: ModelArtifactName
+ uri: s3://12345
diff --git a/test/robot/requirements.txt b/test/robot/requirements.txt
new file mode 100644
index 000000000..4b85b513d
--- /dev/null
+++ b/test/robot/requirements.txt
@@ -0,0 +1,4 @@
+ml-metadata==1.14.0
+robotframework
+robotframework-requests
+pyyaml