= ({
|
{isEditing ? (
<>
- {isMUITheme ? (
-
- ) : (
- propertyKeyInput
- )}
+
{keyValidationError && (
@@ -150,11 +144,7 @@ const ModelPropertiesTableRow: React.FC = ({
|
{isEditing ? (
- isMUITheme ? (
-
- ) : (
- propertyValueInput
- )
+
) : (
= ({ ...pageProps }) => {
const [registeredModels, modelsLoaded, modelsLoadError, refreshModels] = useRegisteredModels();
const [modelVersions, versionsLoaded, versionsLoadError, refreshVersions] = useModelVersions();
- const { isMUITheme } = useThemeContext();
const loaded = modelsLoaded && versionsLoaded;
const loadError = modelsLoadError || versionsLoadError;
@@ -38,18 +36,19 @@ const ModelRegistry: React.FC = ({ ...pageProps }) => {
- ) : (
- 'Model Registry'
- )
+
}
description={
- !isMUITheme ? (
- 'Select a model registry to view and manage your registered models. Model registries provide a structured and organized way to store, share, version, deploy, and track models.'
- ) : (
-
- )
+
+
+ Select a model registry to view and manage your registered models. Model registries
+ provide a structured and organized way to store, share, version, deploy, and track
+ models.
+
+
+
+
+
}
headerContent={
= ({
const filteredModelVersions = filterModelVersions(unfilteredModelVersions, search, searchType);
const date = rm.lastUpdateTimeSinceEpoch && new Date(parseInt(rm.lastUpdateTimeSinceEpoch));
+ const resetFilters = () => setSearch('');
+
if (unfilteredModelVersions.length === 0) {
if (isArchiveModel) {
return (
@@ -129,7 +128,7 @@ const ModelVersionListView: React.FC = ({
setSearch('')}
+ clearFilters={resetFilters}
modelVersions={sortModelVersionsByCreateTime(filteredModelVersions)}
toolbarContent={
@@ -137,8 +136,8 @@ const ModelVersionListView: React.FC = ({
setSearch('')}
- deleteLabelGroup={() => setSearch('')}
+ deleteLabel={resetFilters}
+ deleteLabelGroup={resetFilters}
categoryName={searchType}
>
= ({
/>
- {isMUITheme() ? (
- {
- setSearch(searchValue);
- }}
- style={{ minWidth: '200px' }}
- data-testid="model-versions-table-search"
- aria-label="Search"
- />
- }
- field={`Find by ${searchType.toLowerCase()}`}
- />
- ) : (
- {
- setSearch(searchValue);
- }}
- onClear={() => setSearch('')}
- style={{ minWidth: '200px' }}
- data-testid="model-versions-table-search"
- />
- )}
+
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/ModelVersionsArchive/ModelVersionsArchiveListView.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/ModelVersionsArchive/ModelVersionsArchiveListView.tsx
index 49246490f0..8277a24994 100644
--- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/ModelVersionsArchive/ModelVersionsArchiveListView.tsx
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/ModelVersionsArchive/ModelVersionsArchiveListView.tsx
@@ -1,7 +1,5 @@
import * as React from 'react';
import {
- SearchInput,
- TextInput,
ToolbarContent,
ToolbarFilter,
ToolbarGroup,
@@ -15,8 +13,7 @@ import SimpleSelect from '~/shared/components/SimpleSelect';
import { asEnumMember } from '~/shared/utilities/utils';
import { filterModelVersions } from '~/app/pages/modelRegistry/screens/utils';
import EmptyModelRegistryState from '~/app/pages/modelRegistry/screens/components/EmptyModelRegistryState';
-import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
-import { useThemeContext } from '~/app/ThemeContext';
+import ThemeAwareSearchInput from '~/app/pages/modelRegistry/screens/components/ThemeAwareSearchInput';
import ModelVersionsArchiveTable from './ModelVersionsArchiveTable';
type ModelVersionsArchiveListViewProps = {
@@ -33,8 +30,6 @@ const ModelVersionsArchiveListView: React.FC
const searchTypes = [SearchType.KEYWORD, SearchType.AUTHOR];
- const { isMUITheme } = useThemeContext();
-
const filteredModelVersions = filterModelVersions(unfilteredmodelVersions, search, searchType);
if (unfilteredmodelVersions.length === 0) {
@@ -48,10 +43,12 @@ const ModelVersionsArchiveListView: React.FC
);
}
+ const resetFilters = () => setSearch('');
+
return (
setSearch('')}
+ clearFilters={resetFilters}
modelVersions={filteredModelVersions}
toolbarContent={
@@ -59,8 +56,8 @@ const ModelVersionsArchiveListView: React.FC
setSearch('')}
- deleteLabelGroup={() => setSearch('')}
+ deleteLabel={resetFilters}
+ deleteLabelGroup={resetFilters}
categoryName="Keyword"
>
/>
- {isMUITheme ? (
- {
- setSearch(searchValue);
- }}
- style={{ minWidth: '200px' }}
- data-testid="model-versions-archive-table-search"
- aria-label="Search"
- />
- }
- field={`Find by ${searchType.toLowerCase()}`}
- />
- ) : (
- {
- setSearch(searchValue);
- }}
- onClear={() => setSearch('')}
- style={{ minWidth: '200px' }}
- data-testid="model-versions-archive-table-search"
- />
- )}
+
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/PrefilledModelRegistryField.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/PrefilledModelRegistryField.tsx
index f7343f3b0c..d16cfcad0e 100644
--- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/PrefilledModelRegistryField.tsx
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/PrefilledModelRegistryField.tsx
@@ -1,22 +1,19 @@
import React from 'react';
import { FormGroup, TextInput } from '@patternfly/react-core';
import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
-import { useThemeContext } from '~/app/ThemeContext';
type PrefilledModelRegistryFieldProps = {
mrName?: string;
};
const PrefilledModelRegistryField: React.FC = ({ mrName }) => {
- const { isMUITheme } = useThemeContext();
-
const mrNameInput = (
);
return (
- {isMUITheme ? : mrNameInput}
+
);
};
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegisterModelDetailsFormSection.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegisterModelDetailsFormSection.tsx
index 12e8446a6b..e5f44dcf8c 100644
--- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegisterModelDetailsFormSection.tsx
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegisterModelDetailsFormSection.tsx
@@ -10,7 +10,6 @@ import React from 'react';
import FormSection from '~/shared/components/pf-overrides/FormSection';
import { UpdateObjectAtPropAndValue } from '~/shared/types';
import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
-import { useThemeContext } from '~/app/ThemeContext';
import { MR_CHARACTER_LIMIT } from './const';
import { RegisterModelFormData } from './useRegisterModelData';
@@ -26,8 +25,6 @@ const RegisterModelDetailsFormSection = ({
hasModelNameError,
isModelNameDuplicate,
}: RegisterModelDetailsFormSectionProp): React.ReactNode => {
- const { isMUITheme } = useThemeContext();
-
const modelNameInput = (
({
description="Provide general details that apply to all versions of this model."
>
- {isMUITheme ? : modelNameInput}
+
{hasModelNameError && (
@@ -70,11 +67,7 @@ const RegisterModelDetailsFormSection = ({
)}
- {isMUITheme ? (
-
- ) : (
- modelDescriptionInput
- )}
+
);
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegisteredModelSelector.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegisteredModelSelector.tsx
index 0c7fda3a00..ab2157f005 100644
--- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegisteredModelSelector.tsx
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegisteredModelSelector.tsx
@@ -3,7 +3,6 @@ import { FormGroup, TextInput } from '@patternfly/react-core';
import { RegisteredModel } from '~/app/types';
import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
import TypeaheadSelect, { TypeaheadSelectOption } from '~/shared/components/TypeaheadSelect';
-import { useThemeContext } from '~/app/ThemeContext';
type RegisteredModelSelectorProps = {
registeredModels: RegisteredModel[];
@@ -18,7 +17,6 @@ const RegisteredModelSelector: React.FC = ({
setRegisteredModelId,
isDisabled,
}) => {
- const { isMUITheme } = useThemeContext();
const options: TypeaheadSelectOption[] = React.useMemo(
() =>
registeredModels.map(({ name, id }) => ({
@@ -49,11 +47,7 @@ const RegisteredModelSelector: React.FC = ({
*/
return (
- {isMUITheme ? (
-
- ) : (
- modelNameInput
- )}
+
);
}
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegistrationCommonFormSections.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegistrationCommonFormSections.tsx
index 8b1b02bb64..188a9b9807 100644
--- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegistrationCommonFormSections.tsx
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisterModel/RegistrationCommonFormSections.tsx
@@ -17,7 +17,6 @@ import { UpdateObjectAtPropAndValue } from '~/shared/types';
import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
import FormSection from '~/shared/components/pf-overrides/FormSection';
import { ModelVersion } from '~/app/types';
-import { useThemeContext } from '~/app/ThemeContext';
import { ModelLocationType, RegistrationCommonFormData } from './useRegisterModelData';
import { isNameValid } from './utils';
import { MR_CHARACTER_LIMIT } from './const';
@@ -41,8 +40,6 @@ const RegistrationCommonFormSections = ({
// const [isAutofillModalOpen, setAutofillModalOpen] = React.useState(false);
const isVersionNameValid = isNameValid(formData.versionName);
- const { isMUITheme } = useThemeContext();
-
// const connectionDataMap: Record<
// string,
// keyof Pick<
@@ -185,11 +182,7 @@ const RegistrationCommonFormSections = ({
}
>
- {isMUITheme ? (
-
- ) : (
- versionNameInput
- )}
+
{latestVersion && (
@@ -206,28 +199,16 @@ const RegistrationCommonFormSections = ({
- {isMUITheme ? (
-
- ) : (
- versionDescriptionInput
- )}
+
- {isMUITheme ? (
-
- ) : (
- sourceModelFormatInput
- )}
+
- {isMUITheme ? (
-
- ) : (
- sourceModelFormatVersionInput
- )}
+
({
isRequired
fieldId="location-endpoint"
>
- {isMUITheme ? (
-
- ) : (
- endpointInput
- )}
+
- {isMUITheme ? : bucketInput}
+
- {isMUITheme ? : regionInput}
+
({
isRequired
fieldId="location-path"
>
- {isMUITheme ? : pathInput}
+
Enter a path to a model or folder. This path cannot point to a root folder.
@@ -304,7 +281,7 @@ const RegistrationCommonFormSections = ({
{modelLocationType === ModelLocationType.URI && (
<>
- {isMUITheme ? : uriInput}
+
>
)}
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisteredModels/RegisteredModelListView.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisteredModels/RegisteredModelListView.tsx
index 521a810b22..4d664d66b5 100644
--- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisteredModels/RegisteredModelListView.tsx
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisteredModels/RegisteredModelListView.tsx
@@ -1,11 +1,5 @@
import * as React from 'react';
-import {
- SearchInput,
- TextInput,
- ToolbarFilter,
- ToolbarGroup,
- ToolbarItem,
-} from '@patternfly/react-core';
+import { ToolbarFilter, ToolbarGroup, ToolbarItem } from '@patternfly/react-core';
import { FilterIcon } from '@patternfly/react-icons';
import { useNavigate } from 'react-router-dom';
import { ModelVersion, RegisteredModel } from '~/app/types';
@@ -18,11 +12,10 @@ import {
registerModelUrl,
} from '~/app/pages/modelRegistry/screens/routeUtils';
import EmptyModelRegistryState from '~/app/pages/modelRegistry/screens/components/EmptyModelRegistryState';
-import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
import { filterRegisteredModels } from '~/app/pages/modelRegistry/screens/utils';
import { asEnumMember } from '~/shared/utilities/utils';
import { filterArchiveModels, filterLiveModels } from '~/app/utils';
-import { useThemeContext } from '~/app/ThemeContext';
+import ThemeAwareSearchInput from '~/app/pages/modelRegistry/screens/components/ThemeAwareSearchInput';
import RegisteredModelTable from './RegisteredModelTable';
import RegisteredModelsTableToolbar from './RegisteredModelsTableToolbar';
@@ -44,7 +37,6 @@ const RegisteredModelListView: React.FC = ({
const unfilteredRegisteredModels = filterLiveModels(registeredModels);
const archiveRegisteredModels = filterArchiveModels(registeredModels);
const searchTypes = React.useMemo(() => [SearchType.KEYWORD, SearchType.OWNER], []);
- const { isMUITheme } = useThemeContext();
if (unfilteredRegisteredModels.length === 0) {
return (
@@ -109,35 +101,16 @@ const RegisteredModelListView: React.FC = ({
/>
- {isMUITheme ? (
- {
- setSearch(searchValue);
- }}
- style={{ minWidth: '200px' }}
- data-testid="registered-model-table-search"
- aria-label="Search"
- />
- }
- field={`Find by ${searchType.toLowerCase()}`}
- />
- ) : (
- {
- setSearch(searchValue);
- }}
- onClear={resetFilters}
- style={{ minWidth: '200px' }}
- data-testid="registered-model-table-search"
- />
- )}
+
);
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisteredModelsArchive/RegisteredModelsArchiveListView.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisteredModelsArchive/RegisteredModelsArchiveListView.tsx
index e65967d1ee..c47e5f25b7 100644
--- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisteredModelsArchive/RegisteredModelsArchiveListView.tsx
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/RegisteredModelsArchive/RegisteredModelsArchiveListView.tsx
@@ -1,7 +1,5 @@
import * as React from 'react';
import {
- SearchInput,
- TextInput,
ToolbarContent,
ToolbarFilter,
ToolbarGroup,
@@ -15,8 +13,7 @@ import { filterRegisteredModels } from '~/app/pages/modelRegistry/screens/utils'
import EmptyModelRegistryState from '~/app/pages/modelRegistry/screens/components/EmptyModelRegistryState';
import SimpleSelect from '~/shared/components/SimpleSelect';
import { asEnumMember } from '~/shared/utilities/utils';
-import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
-import { useThemeContext } from '~/app/ThemeContext';
+import ThemeAwareSearchInput from '~/app/pages/modelRegistry/screens/components/ThemeAwareSearchInput';
import RegisteredModelsArchiveTable from './RegisteredModelsArchiveTable';
type RegisteredModelsArchiveListViewProps = {
@@ -33,8 +30,6 @@ const RegisteredModelsArchiveListView: React.FC(SearchType.KEYWORD);
const [search, setSearch] = React.useState('');
- const { isMUITheme } = useThemeContext();
-
const searchTypes = [SearchType.KEYWORD, SearchType.OWNER];
const filteredRegisteredModels = filterRegisteredModels(
unfilteredRegisteredModels,
@@ -55,10 +50,12 @@ const RegisteredModelsArchiveListView: React.FC setSearch('');
+
return (
setSearch('')}
+ clearFilters={resetFilters}
registeredModels={filteredRegisteredModels}
toolbarContent={
@@ -66,8 +63,8 @@ const RegisteredModelsArchiveListView: React.FC
setSearch('')}
- deleteLabelGroup={() => setSearch('')}
+ deleteLabel={resetFilters}
+ deleteLabelGroup={resetFilters}
categoryName="Keyword"
>
- {isMUITheme ? (
- {
- setSearch(searchValue);
- }}
- style={{ minWidth: '200px' }}
- data-testid="registered-models-archive-table-search"
- aria-label="Search"
- />
- }
- field={`Find by ${searchType.toLowerCase()}`}
- />
- ) : (
- {
- setSearch(searchValue);
- }}
- onClear={() => setSearch('')}
- style={{ minWidth: '200px' }}
- data-testid="registered-models-archive-table-search"
- />
- )}
+
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/FormFieldset.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/FormFieldset.tsx
index 8869aef304..6b51d1a326 100644
--- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/FormFieldset.tsx
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/FormFieldset.tsx
@@ -1,4 +1,5 @@
import React, { ReactNode } from 'react';
+import { useThemeContext } from '~/app/ThemeContext';
interface FormFieldsetProps {
component: ReactNode;
@@ -6,17 +7,25 @@ interface FormFieldsetProps {
className?: string;
}
-const FormFieldset: React.FC = ({ component, field, className }) => (
-
- {component}
-
-
-);
+const FormFieldset: React.FC = ({ component, field, className }) => {
+ const { isMUITheme } = useThemeContext();
+
+ if (!isMUITheme) {
+ return <>{component}>;
+ }
+
+ return (
+
+ {component}
+
+
+ );
+};
export default FormFieldset;
diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ThemeAwareSearchInput.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ThemeAwareSearchInput.tsx
new file mode 100644
index 0000000000..30cdd73081
--- /dev/null
+++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ThemeAwareSearchInput.tsx
@@ -0,0 +1,70 @@
+import * as React from 'react';
+import { SearchInput, SearchInputProps, TextInput } from '@patternfly/react-core';
+import { useThemeContext } from '~/app/ThemeContext';
+import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
+
+type ThemeAwareSearchInputProps = Omit & {
+ onChange: (value: string) => void; // Simplified onChange signature
+ onClear?: () => void; // Simplified optional onClear signature
+ fieldLabel?: string; // Additional prop for MUI FormFieldset label
+ 'data-testid'?: string;
+};
+
+const ThemeAwareSearchInput: React.FC = ({
+ value,
+ onChange,
+ onClear,
+ fieldLabel,
+ placeholder,
+ isDisabled,
+ className,
+ style,
+ 'aria-label': ariaLabel = 'Search',
+ 'data-testid': dataTestId,
+ ...rest
+}) => {
+ const { isMUITheme } = useThemeContext();
+
+ if (isMUITheme) {
+ // Render MUI version using TextInput + FormFieldset
+ return (
+ onChange(newValue)} // Adapt signature
+ isDisabled={isDisabled}
+ aria-label={ariaLabel}
+ data-testid={dataTestId}
+ style={style}
+ />
+ }
+ />
+ );
+ }
+
+ // Render PF version using SearchInput
+ return (
+ onChange(newValue)} // Adapt signature
+ onClear={(event) => {
+ event.stopPropagation();
+ onChange('');
+ onClear?.(); // Adapt signature
+ }}
+ />
+ );
+};
+
+export default ThemeAwareSearchInput;
diff --git a/clients/ui/frontend/src/app/pages/settings/ModelRegistryCreateModal.tsx b/clients/ui/frontend/src/app/pages/settings/ModelRegistryCreateModal.tsx
index e8b153865c..df65442a06 100644
--- a/clients/ui/frontend/src/app/pages/settings/ModelRegistryCreateModal.tsx
+++ b/clients/ui/frontend/src/app/pages/settings/ModelRegistryCreateModal.tsx
@@ -6,16 +6,16 @@ import {
HelperText,
HelperTextItem,
TextInput,
+ Alert,
} from '@patternfly/react-core';
import { Modal } from '@patternfly/react-core/deprecated';
import { useNavigate } from 'react-router';
import ModelRegistryCreateModalFooter from '~/app/pages/settings/ModelRegistryCreateModalFooter';
-import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
import FormSection from '~/shared/components/pf-overrides/FormSection';
import ModelRegistryDatabasePassword from '~/app/pages/settings/ModelRegistryDatabasePassword';
import K8sNameDescriptionField from '~/concepts/k8s/K8sNameDescriptionField/K8sNameDescriptionField';
-import { useThemeContext } from '~/app/ThemeContext';
+import ThemeAwareFormGroupWrapper from './components/ThemeAwareFormGroupWrapper';
type CreateModalProps = {
onClose: () => void;
@@ -28,7 +28,6 @@ const CreateModal: React.FC = ({
// refresh,
// modelRegistry,
}) => {
- const { isMUITheme } = useThemeContext();
const [error, setError] = React.useState();
const [host, setHost] = React.useState('');
@@ -36,7 +35,6 @@ const CreateModal: React.FC = ({
const [username, setUsername] = React.useState('');
const [password, setPassword] = React.useState('');
const [database, setDatabase] = React.useState('');
- // const [addSecureDB, setAddSecureDB] = React.useState(false);
const [isHostTouched, setIsHostTouched] = React.useState(false);
const [isPortTouched, setIsPortTouched] = React.useState(false);
const [isUsernameTouched, setIsUsernameTouched] = React.useState(false);
@@ -47,9 +45,7 @@ const CreateModal: React.FC = ({
const navigate = useNavigate();
const onBeforeClose = () => {
- // setIsSubmitting(false);
setError(undefined);
-
setHost('');
setPort('');
setUsername('');
@@ -67,17 +63,11 @@ const CreateModal: React.FC = ({
const hasContent = (value: string): boolean => !!value.trim().length;
const canSubmit = () =>
- // TODO: implement once we have the endpoint
- // !isSubmitting &&
- // isValidK8sName(nameDesc.k8sName.value || translateDisplayNameForK8s(nameDesc.name))
- // &&
hasContent(host) &&
hasContent(password) &&
hasContent(port) &&
hasContent(username) &&
hasContent(database);
- // &&
- // (!addSecureDB || (secureDBInfo.isValid && !configSecretsError))
const onSubmit = () => {
navigate(`/model-registry-settings`);
@@ -93,7 +83,6 @@ const CreateModal: React.FC = ({
value={host}
onBlur={() => setIsHostTouched(true)}
onChange={(_e, value) => setHost(value)}
- validated={isHostTouched && !hasContent(host) ? 'error' : 'default'}
/>
);
@@ -105,20 +94,6 @@ const CreateModal: React.FC = ({
);
- const hostFormGroup = (
- <>
-
-
-
- {hostHelperText}
- >
- );
-
const portInput = (
= ({
value={port}
onBlur={() => setIsPortTouched(true)}
onChange={(_e, value) => setPort(value)}
- validated={isPortTouched && !hasContent(port) ? 'error' : 'default'}
/>
);
@@ -140,20 +114,6 @@ const CreateModal: React.FC = ({
);
- const portFormGroup = (
- <>
-
-
-
- {portHelperText}
- >
- );
-
const userNameInput = (
= ({
value={username}
onBlur={() => setIsUsernameTouched(true)}
onChange={(_e, value) => setUsername(value)}
- validated={isUsernameTouched && !hasContent(username) ? 'error' : 'default'}
/>
);
@@ -175,20 +134,6 @@ const CreateModal: React.FC = ({
);
- const usernameFormGroup = (
- <>
-
-
-
- {usernameHelperText}
- >
- );
-
const passwordInput = (
= ({
isPasswordTouched={isPasswordTouched}
setIsPasswordTouched={setIsPasswordTouched}
showPassword={showPassword}
- // editRegistry={mr}
/>
);
@@ -208,20 +152,6 @@ const CreateModal: React.FC = ({
);
- const passwordFormGroup = (
- <>
-
-
-
- {passwordHelperText}
- >
- );
-
const databaseInput = (
= ({
value={database}
onBlur={() => setIsDatabaseTouched(true)}
onChange={(_e, value) => setDatabase(value)}
- validated={isDatabaseTouched && !hasContent(database) ? 'error' : 'default'}
/>
);
@@ -243,20 +172,6 @@ const CreateModal: React.FC = ({
);
- const databaseFormGroup = (
- <>
-
-
-
- {databaseHelperText}
- >
- );
-
return (
= ({
onCancel={onBeforeClose}
onSubmit={onSubmit}
submitLabel="Create"
- // isSubmitLoading={isSubmitting}
isSubmitDisabled={!canSubmit()}
error={error}
alertTitle={`Error ${'creating'} model registry`}
@@ -293,93 +207,59 @@ const CreateModal: React.FC = ({
title="Connect to external MySQL database"
description="This external database is where model data is stored."
>
- {isMUITheme ? (
- hostFormGroup
- ) : (
- <>
-
- {hostInput}
- {hostHelperText}
-
- >
- )}
- {isMUITheme ? (
- portFormGroup
- ) : (
- <>
-
- {portInput}
- {portHelperText}
-
- >
- )}
- {isMUITheme ? (
- usernameFormGroup
- ) : (
- <>
-
- {userNameInput}
- {usernameHelperText}
-
- >
- )}
- {isMUITheme ? (
- passwordFormGroup
- ) : (
- <>
-
- {passwordInput}
- {passwordHelperText}
-
- >
- )}
- {isMUITheme ? (
- databaseFormGroup
- ) : (
- <>
-
- {databaseInput}
- {databaseFormGroup}
-
- >
- )}
- {/* {secureDbEnabled && (
- <>
-
- setAddSecureDB(value)}
- id="add-secure-db"
- data-testid="add-secure-db-mr-checkbox"
- name="add-secure-db"
- />
-
- {addSecureDB &&
- (!configSecretsLoaded && !configSecretsError ? (
-
- ) : configSecretsLoaded ? (
-
- ) : (
-
- {configSecretsError?.message}
-
- ))}
- >
- )} */}
+
+ {hostInput}
+
+
+
+ {portInput}
+
+
+
+ {userNameInput}
+
+
+
+ {passwordInput}
+
+
+
+ {databaseInput}
+
+
+ {/* ... Optional TLS section ... */}
+
+ {error && (
+
+
+
+ )}
);
diff --git a/clients/ui/frontend/src/app/pages/settings/ModelRegistrySettings.tsx b/clients/ui/frontend/src/app/pages/settings/ModelRegistrySettings.tsx
index 3ca709a20f..db2b913fe9 100644
--- a/clients/ui/frontend/src/app/pages/settings/ModelRegistrySettings.tsx
+++ b/clients/ui/frontend/src/app/pages/settings/ModelRegistrySettings.tsx
@@ -1,5 +1,12 @@
import React from 'react';
-import { Divider, EmptyState, EmptyStateBody, EmptyStateVariant } from '@patternfly/react-core';
+import {
+ Divider,
+ EmptyState,
+ EmptyStateBody,
+ EmptyStateVariant,
+ Stack,
+ StackItem,
+} from '@patternfly/react-core';
import { PlusCircleIcon } from '@patternfly/react-icons';
import ApplicationsPage from '~/shared/components/ApplicationsPage';
import useModelRegistries from '~/app/hooks/useModelRegistries';
@@ -7,7 +14,6 @@ import useQueryParamNamespaces from '~/shared/hooks/useQueryParamNamespaces';
import TitleWithIcon from '~/shared/components/design/TitleWithIcon';
import { ProjectObjectType } from '~/shared/components/design/utils';
// import { ModelRegistrySelectorContext } from '~/app/context/ModelRegistrySelectorContext';
-import { useThemeContext } from '~/app/ThemeContext';
import ModelRegistriesTable from './ModelRegistriesTable';
import CreateModal from './ModelRegistryCreateModal';
@@ -19,7 +25,6 @@ const ModelRegistrySettings: React.FC = () => {
loadError,
// refreshModelRegistries
] = useModelRegistries(queryParams);
- const { isMUITheme } = useThemeContext();
const [createModalOpen, setCreateModalOpen] = React.useState(false);
// TODO: [Midstream] Implement this when adding logic for rules review
// const { refreshRulesReview } = React.useContext(ModelRegistrySelectorContext);
@@ -36,21 +41,20 @@ const ModelRegistrySettings: React.FC = () => {
<>
- ) : (
- 'Model Registry Settings'
- )
+
}
description={
- !isMUITheme ? (
- 'Manage model registry settings for all users in your organization.'
- ) : (
-
- )
+
+
+ Manage model registry settings for all users in your organization.
+
+
+
+
+
}
loaded={loaded}
loadError={loadError}
diff --git a/clients/ui/frontend/src/app/pages/settings/components/ThemeAwareFormGroupWrapper.tsx b/clients/ui/frontend/src/app/pages/settings/components/ThemeAwareFormGroupWrapper.tsx
new file mode 100644
index 0000000000..4345c9bf58
--- /dev/null
+++ b/clients/ui/frontend/src/app/pages/settings/components/ThemeAwareFormGroupWrapper.tsx
@@ -0,0 +1,61 @@
+import * as React from 'react';
+import { FormGroup } from '@patternfly/react-core';
+import { useThemeContext } from '~/app/ThemeContext';
+import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
+
+// Props required by this wrapper component
+type ThemeAwareFormGroupWrapperProps = {
+ children: React.ReactNode; // The input component
+ label: string;
+ fieldId: string;
+ isRequired?: boolean;
+ helperTextNode?: React.ReactNode; // The pre-rendered HelperText component or null
+ className?: string; // Optional className for the outer FormGroup
+};
+
+const ThemeAwareFormGroupWrapper: React.FC = ({
+ children,
+ label,
+ fieldId,
+ isRequired,
+ helperTextNode,
+ className,
+}) => {
+ const { isMUITheme } = useThemeContext();
+ const hasError = !!helperTextNode; // Determine error state based on helper text presence
+
+ if (isMUITheme) {
+ // For MUI theme, render FormGroup -> FormFieldset -> Input
+ // Helper text is rendered *after* the FormGroup wrapper
+ return (
+ <>
+
+
+
+ {helperTextNode}
+ >
+ );
+ }
+
+ // For PF theme, render standard FormGroup
+ return (
+ <>
+
+ {children}
+ {helperTextNode}
+
+ >
+ );
+};
+
+export default ThemeAwareFormGroupWrapper;
diff --git a/clients/ui/frontend/src/shared/components/EditableTextDescriptionListGroup.tsx b/clients/ui/frontend/src/shared/components/EditableTextDescriptionListGroup.tsx
index 3fba50421e..584e9465b7 100644
--- a/clients/ui/frontend/src/shared/components/EditableTextDescriptionListGroup.tsx
+++ b/clients/ui/frontend/src/shared/components/EditableTextDescriptionListGroup.tsx
@@ -4,7 +4,6 @@ import DashboardDescriptionListGroup, {
DashboardDescriptionListGroupProps,
} from '~/shared/components/DashboardDescriptionListGroup';
import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
-import { useThemeContext } from '~/app/ThemeContext';
type EditableTextDescriptionListGroupProps = Pick<
DashboardDescriptionListGroupProps,
@@ -30,7 +29,6 @@ const EditableTextDescriptionListGroup: React.FC : editableTextArea
- }
+ contentWhenEditing={}
onEditClick={() => {
setUnsavedValue(value);
setIsEditing(true);
diff --git a/clients/ui/frontend/src/shared/style/MUI-theme.scss b/clients/ui/frontend/src/shared/style/MUI-theme.scss
index 007e1d328e..f191191114 100644
--- a/clients/ui/frontend/src/shared/style/MUI-theme.scss
+++ b/clients/ui/frontend/src/shared/style/MUI-theme.scss
@@ -462,7 +462,7 @@
display: none;
}
-.pf-v6-c-helper-text__item.pf-m-error {
+.mui-theme .pf-v6-c-helper-text__item.pf-m-error {
--pf-v6-c-helper-text__item-text--Color: var(--mui-palette-error-main);
--pf-v6-c-helper-text__item-text--FontWeight: var(--mui-helper-text__item--FontWeight);
margin-left: 14px;
diff --git a/go.mod b/go.mod
index 661708f46d..72a2b69e59 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ require (
github.com/go-chi/chi/v5 v5.2.1
github.com/go-chi/cors v1.2.1
github.com/go-logr/logr v1.4.2
- github.com/golang/glog v1.2.4
+ github.com/golang/glog v1.2.5
github.com/kserve/kserve v0.15.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 v2.23.4
@@ -22,6 +22,7 @@ require (
k8s.io/api v0.32.3
k8s.io/apimachinery v0.32.3
k8s.io/client-go v0.32.3
+ knative.dev/pkg v0.0.0-20250117084104-c43477f0052b
sigs.k8s.io/controller-runtime v0.20.4
)
@@ -135,7 +136,6 @@ require (
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e // indirect
knative.dev/networking v0.0.0-20250117155906-67d1c274ba6a // indirect
- knative.dev/pkg v0.0.0-20250117084104-c43477f0052b // indirect
knative.dev/serving v0.44.0 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
diff --git a/go.sum b/go.sum
index 47cb024aea..9205e05177 100644
--- a/go.sum
+++ b/go.sum
@@ -161,8 +161,8 @@ github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlnd
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 v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc=
-github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
+github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I=
+github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=
diff --git a/internal/converter/generated/mlmd_openapi_converter.gen.go b/internal/converter/generated/mlmd_openapi_converter.gen.go
index b58c32bfb6..11ea754799 100644
--- a/internal/converter/generated/mlmd_openapi_converter.gen.go
+++ b/internal/converter/generated/mlmd_openapi_converter.gen.go
@@ -26,11 +26,6 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertDocArtifact(source *proto.Artifact)
xstring := *(*source).ExternalId
openapiDocArtifact.ExternalId = &xstring
}
- if (*source).Uri != nil {
- xstring2 := *(*source).Uri
- openapiDocArtifact.Uri = &xstring2
- }
- openapiDocArtifact.State = converter.MapMLMDArtifactState((*source).State)
openapiDocArtifact.Name = converter.MapNameFromOwned((*source).Name)
openapiDocArtifact.Id = converter.Int64ToString((*source).Id)
openapiDocArtifact.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
@@ -40,6 +35,11 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertDocArtifact(source *proto.Artifact)
return nil, fmt.Errorf("error setting field ArtifactType: %w", err)
}
openapiDocArtifact.ArtifactType = pString
+ if (*source).Uri != nil {
+ xstring2 := *(*source).Uri
+ openapiDocArtifact.Uri = &xstring2
+ }
+ openapiDocArtifact.State = converter.MapMLMDArtifactState((*source).State)
pOpenapiDocArtifact = &openapiDocArtifact
}
return pOpenapiDocArtifact, nil
@@ -85,11 +85,6 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertModelArtifact(source *proto.Artifact
xstring := *(*source).ExternalId
openapiModelArtifact.ExternalId = &xstring
}
- if (*source).Uri != nil {
- xstring2 := *(*source).Uri
- openapiModelArtifact.Uri = &xstring2
- }
- openapiModelArtifact.State = converter.MapMLMDArtifactState((*source).State)
openapiModelArtifact.Name = converter.MapNameFromOwned((*source).Name)
openapiModelArtifact.Id = converter.Int64ToString((*source).Id)
openapiModelArtifact.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
@@ -109,6 +104,11 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertModelArtifact(source *proto.Artifact
openapiModelArtifact.ModelSourceGroup = converter.MapModelArtifactModelSourceGroup((*source).Properties)
openapiModelArtifact.ModelSourceId = converter.MapModelArtifactModelSourceId((*source).Properties)
openapiModelArtifact.ModelSourceName = converter.MapModelArtifactModelSourceName((*source).Properties)
+ if (*source).Uri != nil {
+ xstring2 := *(*source).Uri
+ openapiModelArtifact.Uri = &xstring2
+ }
+ openapiModelArtifact.State = converter.MapMLMDArtifactState((*source).State)
pOpenapiModelArtifact = &openapiModelArtifact
}
return pOpenapiModelArtifact, nil
@@ -172,7 +172,6 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertServeModel(source *proto.Execution)
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, fmt.Errorf("error setting field CustomProperties: %w", err)
@@ -187,6 +186,7 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertServeModel(source *proto.Execution)
openapiServeModel.Id = converter.Int64ToString((*source).Id)
openapiServeModel.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch)
openapiServeModel.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch)
+ openapiServeModel.LastKnownState = converter.MapMLMDServeModelLastKnownState((*source).LastKnownState)
openapiServeModel.ModelVersionId = converter.MapPropertyModelVersionIdAsValue((*source).Properties)
pOpenapiServeModel = &openapiServeModel
}
diff --git a/internal/converter/generated/openapi_converter.gen.go b/internal/converter/generated/openapi_converter.gen.go
index ed94216c8d..86f29b61ba 100644
--- a/internal/converter/generated/openapi_converter.gen.go
+++ b/internal/converter/generated/openapi_converter.gen.go
@@ -69,9 +69,13 @@ func (c *OpenAPIConverterImpl) ConvertDocArtifactCreate(source *openapi.DocArtif
xstring2 := *(*source).ExternalId
openapiDocArtifact.ExternalId = &xstring2
}
+ if (*source).Name != nil {
+ xstring3 := *(*source).Name
+ openapiDocArtifact.Name = &xstring3
+ }
if (*source).Uri != nil {
- xstring3 := *(*source).Uri
- openapiDocArtifact.Uri = &xstring3
+ xstring4 := *(*source).Uri
+ openapiDocArtifact.Uri = &xstring4
}
if (*source).State != nil {
openapiArtifactState, err := c.openapiArtifactStateToOpenapiArtifactState(*(*source).State)
@@ -80,10 +84,6 @@ func (c *OpenAPIConverterImpl) ConvertDocArtifactCreate(source *openapi.DocArtif
}
openapiDocArtifact.State = &openapiArtifactState
}
- if (*source).Name != nil {
- xstring4 := *(*source).Name
- openapiDocArtifact.Name = &xstring4
- }
pOpenapiDocArtifact = &openapiDocArtifact
}
return pOpenapiDocArtifact, nil
@@ -235,60 +235,60 @@ func (c *OpenAPIConverterImpl) ConvertModelArtifactCreate(source *openapi.ModelA
xstring2 := *(*source).ExternalId
openapiModelArtifact.ExternalId = &xstring2
}
- if (*source).Uri != nil {
- xstring3 := *(*source).Uri
- openapiModelArtifact.Uri = &xstring3
- }
- if (*source).State != nil {
- openapiArtifactState, err := c.openapiArtifactStateToOpenapiArtifactState(*(*source).State)
- if err != nil {
- return nil, fmt.Errorf("error setting field State: %w", err)
- }
- openapiModelArtifact.State = &openapiArtifactState
- }
if (*source).Name != nil {
- xstring4 := *(*source).Name
- openapiModelArtifact.Name = &xstring4
+ xstring3 := *(*source).Name
+ openapiModelArtifact.Name = &xstring3
}
if (*source).ModelFormatName != nil {
- xstring5 := *(*source).ModelFormatName
- openapiModelArtifact.ModelFormatName = &xstring5
+ xstring4 := *(*source).ModelFormatName
+ openapiModelArtifact.ModelFormatName = &xstring4
}
if (*source).StorageKey != nil {
- xstring6 := *(*source).StorageKey
- openapiModelArtifact.StorageKey = &xstring6
+ xstring5 := *(*source).StorageKey
+ openapiModelArtifact.StorageKey = &xstring5
}
if (*source).StoragePath != nil {
- xstring7 := *(*source).StoragePath
- openapiModelArtifact.StoragePath = &xstring7
+ xstring6 := *(*source).StoragePath
+ openapiModelArtifact.StoragePath = &xstring6
}
if (*source).ModelFormatVersion != nil {
- xstring8 := *(*source).ModelFormatVersion
- openapiModelArtifact.ModelFormatVersion = &xstring8
+ xstring7 := *(*source).ModelFormatVersion
+ openapiModelArtifact.ModelFormatVersion = &xstring7
}
if (*source).ServiceAccountName != nil {
- xstring9 := *(*source).ServiceAccountName
- openapiModelArtifact.ServiceAccountName = &xstring9
+ xstring8 := *(*source).ServiceAccountName
+ openapiModelArtifact.ServiceAccountName = &xstring8
}
if (*source).ModelSourceKind != nil {
- xstring10 := *(*source).ModelSourceKind
- openapiModelArtifact.ModelSourceKind = &xstring10
+ xstring9 := *(*source).ModelSourceKind
+ openapiModelArtifact.ModelSourceKind = &xstring9
}
if (*source).ModelSourceClass != nil {
- xstring11 := *(*source).ModelSourceClass
- openapiModelArtifact.ModelSourceClass = &xstring11
+ xstring10 := *(*source).ModelSourceClass
+ openapiModelArtifact.ModelSourceClass = &xstring10
}
if (*source).ModelSourceGroup != nil {
- xstring12 := *(*source).ModelSourceGroup
- openapiModelArtifact.ModelSourceGroup = &xstring12
+ xstring11 := *(*source).ModelSourceGroup
+ openapiModelArtifact.ModelSourceGroup = &xstring11
}
if (*source).ModelSourceId != nil {
- xstring13 := *(*source).ModelSourceId
- openapiModelArtifact.ModelSourceId = &xstring13
+ xstring12 := *(*source).ModelSourceId
+ openapiModelArtifact.ModelSourceId = &xstring12
}
if (*source).ModelSourceName != nil {
- xstring14 := *(*source).ModelSourceName
- openapiModelArtifact.ModelSourceName = &xstring14
+ xstring13 := *(*source).ModelSourceName
+ openapiModelArtifact.ModelSourceName = &xstring13
+ }
+ if (*source).Uri != nil {
+ xstring14 := *(*source).Uri
+ openapiModelArtifact.Uri = &xstring14
+ }
+ if (*source).State != nil {
+ openapiArtifactState, err := c.openapiArtifactStateToOpenapiArtifactState(*(*source).State)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field State: %w", err)
+ }
+ openapiModelArtifact.State = &openapiArtifactState
}
pOpenapiModelArtifact = &openapiModelArtifact
}
@@ -316,56 +316,56 @@ func (c *OpenAPIConverterImpl) ConvertModelArtifactUpdate(source *openapi.ModelA
xstring2 := *(*source).ExternalId
openapiModelArtifact.ExternalId = &xstring2
}
- if (*source).Uri != nil {
- xstring3 := *(*source).Uri
- openapiModelArtifact.Uri = &xstring3
- }
- if (*source).State != nil {
- openapiArtifactState, err := c.openapiArtifactStateToOpenapiArtifactState(*(*source).State)
- if err != nil {
- return nil, fmt.Errorf("error setting field State: %w", err)
- }
- openapiModelArtifact.State = &openapiArtifactState
- }
if (*source).ModelFormatName != nil {
- xstring4 := *(*source).ModelFormatName
- openapiModelArtifact.ModelFormatName = &xstring4
+ xstring3 := *(*source).ModelFormatName
+ openapiModelArtifact.ModelFormatName = &xstring3
}
if (*source).StorageKey != nil {
- xstring5 := *(*source).StorageKey
- openapiModelArtifact.StorageKey = &xstring5
+ xstring4 := *(*source).StorageKey
+ openapiModelArtifact.StorageKey = &xstring4
}
if (*source).StoragePath != nil {
- xstring6 := *(*source).StoragePath
- openapiModelArtifact.StoragePath = &xstring6
+ xstring5 := *(*source).StoragePath
+ openapiModelArtifact.StoragePath = &xstring5
}
if (*source).ModelFormatVersion != nil {
- xstring7 := *(*source).ModelFormatVersion
- openapiModelArtifact.ModelFormatVersion = &xstring7
+ xstring6 := *(*source).ModelFormatVersion
+ openapiModelArtifact.ModelFormatVersion = &xstring6
}
if (*source).ServiceAccountName != nil {
- xstring8 := *(*source).ServiceAccountName
- openapiModelArtifact.ServiceAccountName = &xstring8
+ xstring7 := *(*source).ServiceAccountName
+ openapiModelArtifact.ServiceAccountName = &xstring7
}
if (*source).ModelSourceKind != nil {
- xstring9 := *(*source).ModelSourceKind
- openapiModelArtifact.ModelSourceKind = &xstring9
+ xstring8 := *(*source).ModelSourceKind
+ openapiModelArtifact.ModelSourceKind = &xstring8
}
if (*source).ModelSourceClass != nil {
- xstring10 := *(*source).ModelSourceClass
- openapiModelArtifact.ModelSourceClass = &xstring10
+ xstring9 := *(*source).ModelSourceClass
+ openapiModelArtifact.ModelSourceClass = &xstring9
}
if (*source).ModelSourceGroup != nil {
- xstring11 := *(*source).ModelSourceGroup
- openapiModelArtifact.ModelSourceGroup = &xstring11
+ xstring10 := *(*source).ModelSourceGroup
+ openapiModelArtifact.ModelSourceGroup = &xstring10
}
if (*source).ModelSourceId != nil {
- xstring12 := *(*source).ModelSourceId
- openapiModelArtifact.ModelSourceId = &xstring12
+ xstring11 := *(*source).ModelSourceId
+ openapiModelArtifact.ModelSourceId = &xstring11
}
if (*source).ModelSourceName != nil {
- xstring13 := *(*source).ModelSourceName
- openapiModelArtifact.ModelSourceName = &xstring13
+ xstring12 := *(*source).ModelSourceName
+ openapiModelArtifact.ModelSourceName = &xstring12
+ }
+ if (*source).Uri != nil {
+ xstring13 := *(*source).Uri
+ openapiModelArtifact.Uri = &xstring13
+ }
+ if (*source).State != nil {
+ openapiArtifactState, err := c.openapiArtifactStateToOpenapiArtifactState(*(*source).State)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field State: %w", err)
+ }
+ openapiModelArtifact.State = &openapiArtifactState
}
pOpenapiModelArtifact = &openapiModelArtifact
}
@@ -526,13 +526,6 @@ func (c *OpenAPIConverterImpl) ConvertServeModelCreate(source *openapi.ServeMode
var pOpenapiServeModel *openapi.ServeModel
if source != nil {
var openapiServeModel openapi.ServeModel
- if (*source).LastKnownState != nil {
- openapiExecutionState, err := c.openapiExecutionStateToOpenapiExecutionState(*(*source).LastKnownState)
- if err != nil {
- return nil, fmt.Errorf("error setting field LastKnownState: %w", err)
- }
- openapiServeModel.LastKnownState = &openapiExecutionState
- }
if (*source).CustomProperties != nil {
var mapStringOpenapiMetadataValue map[string]openapi.MetadataValue
if (*(*source).CustomProperties) != nil {
@@ -555,6 +548,13 @@ func (c *OpenAPIConverterImpl) ConvertServeModelCreate(source *openapi.ServeMode
xstring3 := *(*source).Name
openapiServeModel.Name = &xstring3
}
+ if (*source).LastKnownState != nil {
+ openapiExecutionState, err := c.openapiExecutionStateToOpenapiExecutionState(*(*source).LastKnownState)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field LastKnownState: %w", err)
+ }
+ openapiServeModel.LastKnownState = &openapiExecutionState
+ }
openapiServeModel.ModelVersionId = (*source).ModelVersionId
pOpenapiServeModel = &openapiServeModel
}
@@ -564,13 +564,6 @@ func (c *OpenAPIConverterImpl) ConvertServeModelUpdate(source *openapi.ServeMode
var pOpenapiServeModel *openapi.ServeModel
if source != nil {
var openapiServeModel openapi.ServeModel
- if (*source).LastKnownState != nil {
- openapiExecutionState, err := c.openapiExecutionStateToOpenapiExecutionState(*(*source).LastKnownState)
- if err != nil {
- return nil, fmt.Errorf("error setting field LastKnownState: %w", err)
- }
- openapiServeModel.LastKnownState = &openapiExecutionState
- }
if (*source).CustomProperties != nil {
var mapStringOpenapiMetadataValue map[string]openapi.MetadataValue
if (*(*source).CustomProperties) != nil {
@@ -589,6 +582,13 @@ func (c *OpenAPIConverterImpl) ConvertServeModelUpdate(source *openapi.ServeMode
xstring2 := *(*source).ExternalId
openapiServeModel.ExternalId = &xstring2
}
+ if (*source).LastKnownState != nil {
+ openapiExecutionState, err := c.openapiExecutionStateToOpenapiExecutionState(*(*source).LastKnownState)
+ if err != nil {
+ return nil, fmt.Errorf("error setting field LastKnownState: %w", err)
+ }
+ openapiServeModel.LastKnownState = &openapiExecutionState
+ }
pOpenapiServeModel = &openapiServeModel
}
return pOpenapiServeModel, nil
diff --git a/internal/converter/generated/openapi_reconciler.gen.go b/internal/converter/generated/openapi_reconciler.gen.go
index 6ef3311e9d..088c71aa42 100644
--- a/internal/converter/generated/openapi_reconciler.gen.go
+++ b/internal/converter/generated/openapi_reconciler.gen.go
@@ -159,102 +159,102 @@ func (c *OpenAPIReconcilerImpl) UpdateExistingModelArtifact(source converter.Ope
}
var pString3 *string
if source.Update != nil {
- pString3 = source.Update.Uri
+ pString3 = source.Update.ModelFormatName
}
if pString3 != nil {
xstring3 := *pString3
- openapiModelArtifact.Uri = &xstring3
- }
- var pOpenapiArtifactState *openapi.ArtifactState
- if source.Update != nil {
- pOpenapiArtifactState = source.Update.State
- }
- if pOpenapiArtifactState != nil {
- openapiArtifactState, err := c.openapiArtifactStateToOpenapiArtifactState(*pOpenapiArtifactState)
- if err != nil {
- return openapiModelArtifact, fmt.Errorf("error setting field State: %w", err)
- }
- openapiModelArtifact.State = &openapiArtifactState
+ openapiModelArtifact.ModelFormatName = &xstring3
}
var pString4 *string
if source.Update != nil {
- pString4 = source.Update.ModelFormatName
+ pString4 = source.Update.StorageKey
}
if pString4 != nil {
xstring4 := *pString4
- openapiModelArtifact.ModelFormatName = &xstring4
+ openapiModelArtifact.StorageKey = &xstring4
}
var pString5 *string
if source.Update != nil {
- pString5 = source.Update.StorageKey
+ pString5 = source.Update.StoragePath
}
if pString5 != nil {
xstring5 := *pString5
- openapiModelArtifact.StorageKey = &xstring5
+ openapiModelArtifact.StoragePath = &xstring5
}
var pString6 *string
if source.Update != nil {
- pString6 = source.Update.StoragePath
+ pString6 = source.Update.ModelFormatVersion
}
if pString6 != nil {
xstring6 := *pString6
- openapiModelArtifact.StoragePath = &xstring6
+ openapiModelArtifact.ModelFormatVersion = &xstring6
}
var pString7 *string
if source.Update != nil {
- pString7 = source.Update.ModelFormatVersion
+ pString7 = source.Update.ServiceAccountName
}
if pString7 != nil {
xstring7 := *pString7
- openapiModelArtifact.ModelFormatVersion = &xstring7
+ openapiModelArtifact.ServiceAccountName = &xstring7
}
var pString8 *string
if source.Update != nil {
- pString8 = source.Update.ServiceAccountName
+ pString8 = source.Update.ModelSourceKind
}
if pString8 != nil {
xstring8 := *pString8
- openapiModelArtifact.ServiceAccountName = &xstring8
+ openapiModelArtifact.ModelSourceKind = &xstring8
}
var pString9 *string
if source.Update != nil {
- pString9 = source.Update.ModelSourceKind
+ pString9 = source.Update.ModelSourceClass
}
if pString9 != nil {
xstring9 := *pString9
- openapiModelArtifact.ModelSourceKind = &xstring9
+ openapiModelArtifact.ModelSourceClass = &xstring9
}
var pString10 *string
if source.Update != nil {
- pString10 = source.Update.ModelSourceClass
+ pString10 = source.Update.ModelSourceGroup
}
if pString10 != nil {
xstring10 := *pString10
- openapiModelArtifact.ModelSourceClass = &xstring10
+ openapiModelArtifact.ModelSourceGroup = &xstring10
}
var pString11 *string
if source.Update != nil {
- pString11 = source.Update.ModelSourceGroup
+ pString11 = source.Update.ModelSourceId
}
if pString11 != nil {
xstring11 := *pString11
- openapiModelArtifact.ModelSourceGroup = &xstring11
+ openapiModelArtifact.ModelSourceId = &xstring11
}
var pString12 *string
if source.Update != nil {
- pString12 = source.Update.ModelSourceId
+ pString12 = source.Update.ModelSourceName
}
if pString12 != nil {
xstring12 := *pString12
- openapiModelArtifact.ModelSourceId = &xstring12
+ openapiModelArtifact.ModelSourceName = &xstring12
}
var pString13 *string
if source.Update != nil {
- pString13 = source.Update.ModelSourceName
+ pString13 = source.Update.Uri
}
if pString13 != nil {
xstring13 := *pString13
- openapiModelArtifact.ModelSourceName = &xstring13
+ openapiModelArtifact.Uri = &xstring13
+ }
+ var pOpenapiArtifactState *openapi.ArtifactState
+ if source.Update != nil {
+ pOpenapiArtifactState = source.Update.State
+ }
+ if pOpenapiArtifactState != nil {
+ openapiArtifactState, err := c.openapiArtifactStateToOpenapiArtifactState(*pOpenapiArtifactState)
+ if err != nil {
+ return openapiModelArtifact, fmt.Errorf("error setting field State: %w", err)
+ }
+ openapiModelArtifact.State = &openapiArtifactState
}
return openapiModelArtifact, nil
}
@@ -366,17 +366,6 @@ func (c *OpenAPIReconcilerImpl) UpdateExistingRegisteredModel(source converter.O
}
func (c *OpenAPIReconcilerImpl) UpdateExistingServeModel(source converter.OpenapiUpdateWrapper[openapi.ServeModel]) (openapi.ServeModel, error) {
openapiServeModel := converter.InitWithExisting(source)
- var pOpenapiExecutionState *openapi.ExecutionState
- if source.Update != nil {
- pOpenapiExecutionState = source.Update.LastKnownState
- }
- if pOpenapiExecutionState != nil {
- openapiExecutionState, err := c.openapiExecutionStateToOpenapiExecutionState(*pOpenapiExecutionState)
- if err != nil {
- return openapiServeModel, fmt.Errorf("error setting field LastKnownState: %w", err)
- }
- openapiServeModel.LastKnownState = &openapiExecutionState
- }
var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue
if source.Update != nil {
pMapStringOpenapiMetadataValue = source.Update.CustomProperties
@@ -407,6 +396,17 @@ func (c *OpenAPIReconcilerImpl) UpdateExistingServeModel(source converter.Openap
xstring2 := *pString2
openapiServeModel.ExternalId = &xstring2
}
+ var pOpenapiExecutionState *openapi.ExecutionState
+ if source.Update != nil {
+ pOpenapiExecutionState = source.Update.LastKnownState
+ }
+ if pOpenapiExecutionState != nil {
+ openapiExecutionState, err := c.openapiExecutionStateToOpenapiExecutionState(*pOpenapiExecutionState)
+ if err != nil {
+ return openapiServeModel, fmt.Errorf("error setting field LastKnownState: %w", err)
+ }
+ openapiServeModel.LastKnownState = &openapiExecutionState
+ }
return openapiServeModel, nil
}
func (c *OpenAPIReconcilerImpl) UpdateExistingServingEnvironment(source converter.OpenapiUpdateWrapper[openapi.ServingEnvironment]) (openapi.ServingEnvironment, error) {
diff --git a/internal/server/openapi/.openapi-generator/FILES b/internal/server/openapi/.openapi-generator/FILES
index 3b916e2313..b7f294ba29 100644
--- a/internal/server/openapi/.openapi-generator/FILES
+++ b/internal/server/openapi/.openapi-generator/FILES
@@ -9,12 +9,6 @@ model_artifact_create.go
model_artifact_list.go
model_artifact_state.go
model_artifact_update.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
diff --git a/internal/server/openapi/type_asserts.go b/internal/server/openapi/type_asserts.go
index a3dc15d519..dba8faf3eb 100644
--- a/internal/server/openapi/type_asserts.go
+++ b/internal/server/openapi/type_asserts.go
@@ -83,66 +83,6 @@ func AssertArtifactUpdateRequired(obj model.ArtifactUpdate) error {
return nil
}
-// AssertBaseArtifactConstraints checks if the values respects the defined constraints
-func AssertBaseArtifactConstraints(obj model.BaseArtifact) error {
- return nil
-}
-
-// AssertBaseArtifactCreateConstraints checks if the values respects the defined constraints
-func AssertBaseArtifactCreateConstraints(obj model.BaseArtifactCreate) error {
- return nil
-}
-
-// AssertBaseArtifactCreateRequired checks if the required fields are not zero-ed
-func AssertBaseArtifactCreateRequired(obj model.BaseArtifactCreate) error {
- return nil
-}
-
-// AssertBaseArtifactRequired checks if the required fields are not zero-ed
-func AssertBaseArtifactRequired(obj model.BaseArtifact) error {
- return nil
-}
-
-// AssertBaseArtifactUpdateConstraints checks if the values respects the defined constraints
-func AssertBaseArtifactUpdateConstraints(obj model.BaseArtifactUpdate) error {
- return nil
-}
-
-// AssertBaseArtifactUpdateRequired checks if the required fields are not zero-ed
-func AssertBaseArtifactUpdateRequired(obj model.BaseArtifactUpdate) error {
- return nil
-}
-
-// AssertBaseExecutionConstraints checks if the values respects the defined constraints
-func AssertBaseExecutionConstraints(obj model.BaseExecution) error {
- return nil
-}
-
-// AssertBaseExecutionCreateConstraints checks if the values respects the defined constraints
-func AssertBaseExecutionCreateConstraints(obj model.BaseExecutionCreate) error {
- return nil
-}
-
-// AssertBaseExecutionCreateRequired checks if the required fields are not zero-ed
-func AssertBaseExecutionCreateRequired(obj model.BaseExecutionCreate) error {
- return nil
-}
-
-// AssertBaseExecutionRequired checks if the required fields are not zero-ed
-func AssertBaseExecutionRequired(obj model.BaseExecution) error {
- return nil
-}
-
-// AssertBaseExecutionUpdateConstraints checks if the values respects the defined constraints
-func AssertBaseExecutionUpdateConstraints(obj model.BaseExecutionUpdate) error {
- return nil
-}
-
-// AssertBaseExecutionUpdateRequired checks if the required fields are not zero-ed
-func AssertBaseExecutionUpdateRequired(obj model.BaseExecutionUpdate) error {
- return nil
-}
-
// AssertBaseResourceConstraints checks if the values respects the defined constraints
func AssertBaseResourceConstraints(obj model.BaseResource) error {
return nil
diff --git a/manifests/kustomize/README.md b/manifests/kustomize/README.md
index 6aab1c2931..65d478754a 100644
--- a/manifests/kustomize/README.md
+++ b/manifests/kustomize/README.md
@@ -11,26 +11,34 @@ This is the full installation guide, for a quick install in an existing Kubeflow
These instructions assume that you've installed Kubeflow from the [manifests](https://github.com/kubeflow/manifests/), if you're using a distribution consult its documentation instead.
-Kubeflow Central Dashboard uses [Profiles](https://www.kubeflow.org/docs/components/central-dash/profiles/) to handle user namespaces and permissions. By default, the manifests deploy the Model Registry instance in the `kubeflow` namespace, to install a compatible version of Model Registry for Kubeflow, you should deploy a separate instance of Model Registry in the profile's namespace. For that just run:
+Kubeflow Central Dashboard uses [profiles](https://www.kubeflow.org/docs/components/central-dash/profiles/) to handle user namespaces and permissions. You will need to deploy Model Registry into a profile namespace.
+
+> **🛈 Note:** If you're not sure of the profile name, you can find it in the name space drop-down on the Kubeflow Dashboard.
+
+The commands in this section assume that you've defined an environment variable with the target profile namespace:
```sh
PROFILE_NAME=
-for DIR in options/istio overlays/db ; do (cd $DIR; kustomize edit set namespace $PROFILE_NAME; kubectl apply -k .); done
```
-> **⚠️ Warning:** If you're not sure of the profile name, you can find it in the name space drop-down on the Kubeflow Dashboard.
+Deploy Model Registry:
-Check everything is up and running:
+```sh
+kubectl apply -k overlays/db -n $PROFILE_NAME
+kubectl apply -k options/istio -n $PROFILE_NAME
+```
+
+Check that everything is up and running:
```bash
-kubectl wait --for=condition=available-n ${PROFILE_NAME} deployment/model-registry-deployment --timeout=2m
-kubectl logs -n ${PROFILE_NAME} deployment/model-registry-deployment
+kubectl wait --for=condition=available-n $PROFILE_NAME deployment/model-registry-deployment --timeout=2m
+kubectl logs -n $PROFILE_NAME deployment/model-registry-deployment
```
Now, to install the Model Registry UI as a Kubeflow component, you need first to deploy the Model Registry UI:
```bash
-kubectl apply -k options/ui/overlays/istio -n kubeflow
+kubectl apply -k options/ui/overlays/istio
```
And then to make it accessible through Kubeflow Central Dashboard, you need to edit the `centraldashboard-config` ConfigMap to add the Model Registry UI link to the Central Dashboard by running the following command:
@@ -69,25 +77,25 @@ To uninstall the Kubeflow Model Registry run:
```bash
# Uninstall Model Registry Instance
PROFILE_NAME=
-for DIR in options/istio overlays/db ; do (cd $DIR; kustomize edit set namespace $PROFILE_NAME; kubectl delete -k .); done
+kubectl delete -k overlays/db -n $PROFILE_NAME
+kubectl delete -k options/istio -n $PROFILE_NAME
# Uninstall Model Registry UI
-kubectl delete -k options/ui/overlays/istio -n kubeflow
+kubectl delete -k options/ui/overlays/istio
```
-
## Model Registry as a separate component Installation
The following instructions will summarize how to deploy Model Registry as separate component in the context of a default Kubeflow >=1.9 installation.
```bash
-kubectl apply -k overlays/db
+kubectl apply -k overlays/db -n kubeflow
```
As the default Kubeflow installation provides an Istio mesh, apply the necessary manifests:
```bash
-kubectl apply -k options/istio
+kubectl apply -k options/istio -n kubeflow
```
Check everything is up and running:
@@ -121,8 +129,8 @@ To uninstall the Kubeflow Model Registry run:
```bash
# Delete istio options
-kubectl delete -k options/istio
+kubectl delete -k options/istio -n kubeflow
# Delete model registry db and deployment
-kubectl delete -k overlays/db
+kubectl delete -k overlays/db -n kubeflow
```
diff --git a/manifests/kustomize/base/model-registry-deployment.yaml b/manifests/kustomize/base/model-registry-deployment.yaml
index 43f021931e..8b2f307830 100644
--- a/manifests/kustomize/base/model-registry-deployment.yaml
+++ b/manifests/kustomize/base/model-registry-deployment.yaml
@@ -91,7 +91,7 @@ spec:
args: ["--grpc_port=9090",
"--mysql_config_database=$(MYSQL_DATABASE)",
"--mysql_config_host=$(MYSQL_HOST)",
- "--mysql_config_port=$(MYSQL_PORT)",
+ "--mysql_config_port=MYSQL_PORT_PLACEHOLDER",
"--mysql_config_user=$(DBCONFIG_USER)",
"--mysql_config_password=$(DBCONFIG_PASSWORD)",
"--enable_database_upgrade=true"
diff --git a/manifests/kustomize/options/istio/kustomization.yaml b/manifests/kustomize/options/istio/kustomization.yaml
index 91263f9b24..029a6937ca 100644
--- a/manifests/kustomize/options/istio/kustomization.yaml
+++ b/manifests/kustomize/options/istio/kustomization.yaml
@@ -1,6 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
-namespace: kubeflow
resources:
- istio-authorization-policy.yaml
diff --git a/manifests/kustomize/overlays/db/kustomization.yaml b/manifests/kustomize/overlays/db/kustomization.yaml
index cf53e41695..0323d5b37c 100644
--- a/manifests/kustomize/overlays/db/kustomization.yaml
+++ b/manifests/kustomize/overlays/db/kustomization.yaml
@@ -1,6 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
-namespace: kubeflow
resources:
- model-registry-db-pvc.yaml
@@ -8,8 +7,6 @@ resources:
- model-registry-db-service.yaml
- ../../base
-patchesStrategicMerge:
-- patches/model-registry-deployment.yaml
configMapGenerator:
- envs:
@@ -28,18 +25,45 @@ images:
newName: mysql
newTag: 8.0.39
-vars:
-- fieldref:
+patches:
+- path: patches/model-registry-deployment.yaml
+replacements:
+- source:
fieldPath: metadata.name
- name: MLMD_DB_HOST
- objref:
- apiVersion: v1
kind: Service
name: model-registry-db
-- name: MYSQL_PORT
- objref:
+ version: v1
+ targets:
+ - fieldPaths:
+ - spec.template.spec.containers.1.args.1
+ options:
+ delimiter: =
+ index: 1
+ select:
+ group: apps
+ kind: Deployment
+ name: model-registry-deployment
+ version: v1
+- source:
+ fieldPath: data.MYSQL_PORT
kind: ConfigMap
name: model-registry-db-parameters
- apiVersion: v1
- fieldref:
- fieldpath: data.MYSQL_PORT
+ version: v1
+ targets:
+ - fieldPaths:
+ - spec.template.spec.containers.1.args.3
+ options:
+ delimiter: =
+ index: 1
+ select:
+ group: apps
+ kind: Deployment
+ name: model-registry-deployment
+ version: v1
+ - fieldPaths:
+ - spec.template.metadata.annotations.[traffic.sidecar.istio.io/excludeOutboundPorts]
+ select:
+ group: apps
+ kind: Deployment
+ name: model-registry-deployment
+ version: v1
diff --git a/manifests/kustomize/overlays/db/patches/model-registry-deployment.yaml b/manifests/kustomize/overlays/db/patches/model-registry-deployment.yaml
index b6eca64de9..0d61bf30fa 100644
--- a/manifests/kustomize/overlays/db/patches/model-registry-deployment.yaml
+++ b/manifests/kustomize/overlays/db/patches/model-registry-deployment.yaml
@@ -7,7 +7,7 @@ spec:
metadata:
annotations:
# db doesn't use istio
- traffic.sidecar.istio.io/excludeOutboundPorts: $(MYSQL_PORT)
+ traffic.sidecar.istio.io/excludeOutboundPorts: MYSQL_PORT_PLACEHOLDER
spec:
containers:
- name: rest-container
@@ -35,8 +35,8 @@ spec:
- configMapRef:
name: model-registry-configmap
args: ["--grpc_port=$(MODEL_REGISTRY_GRPC_SERVICE_PORT)",
- "--mysql_config_host=$(MLMD_DB_HOST)",
+ "--mysql_config_host=MLMD_DB_HOST_PLACEHOLDER",
"--mysql_config_database=$(MYSQL_DATABASE)",
- "--mysql_config_port=$(MYSQL_PORT)",
+ "--mysql_config_port=MYSQL_PORT_PLACEHOLDER",
"--mysql_config_user=$(MYSQL_USER_NAME)",
"--mysql_config_password=$(MYSQL_ROOT_PASSWORD)"]
diff --git a/manifests/kustomize/overlays/postgres/kustomization.yaml b/manifests/kustomize/overlays/postgres/kustomization.yaml
index 6a3822d8b0..0f81c89a43 100644
--- a/manifests/kustomize/overlays/postgres/kustomization.yaml
+++ b/manifests/kustomize/overlays/postgres/kustomization.yaml
@@ -1,25 +1,21 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
-namespace: kubeflow
-bases:
-- ../../base
resources:
- model-registry-db-pvc.yaml
- model-registry-db-deployment.yaml
- model-registry-db-service.yaml
+- ../../base
-patchesStrategicMerge:
-- patches/model-registry-deployment.yaml
configMapGenerator:
-- name: metadata-registry-db-parameters
- envs:
+- envs:
- params.env
+ name: metadata-registry-db-parameters
secretGenerator:
-- name: metadata-registry-db-secrets
- envs:
+- envs:
- secrets.env
+ name: metadata-registry-db-secrets
generatorOptions:
disableNameSuffixHash: true
@@ -28,18 +24,45 @@ images:
newName: postgres
newTag: 14.7-alpine3.17
-vars:
-- name: MLMD_DB_HOST
- objref:
+patches:
+- path: patches/model-registry-deployment.yaml
+replacements:
+- source:
+ fieldPath: metadata.name
kind: Service
name: metadata-postgres-db
- apiVersion: v1
- fieldref:
- fieldpath: metadata.name
-- name: POSTGRES_PORT
- objref:
+ version: v1
+ targets:
+ - fieldPaths:
+ - spec.template.spec.containers.0.args.2
+ options:
+ delimiter: =
+ index: 1
+ select:
+ group: apps
+ kind: Deployment
+ name: model-registry-deployment
+ version: v1
+- source:
+ fieldPath: data.POSTGRES_PORT
kind: ConfigMap
name: metadata-registry-db-parameters
- apiVersion: v1
- fieldref:
- fieldpath: data.POSTGRES_PORT
+ version: v1
+ targets:
+ - fieldPaths:
+ - spec.template.metadata.annotations.[traffic.sidecar.istio.io/excludeOutboundPorts]
+ select:
+ group: apps
+ kind: Deployment
+ name: model-registry-deployment
+ version: v1
+ - fieldPaths:
+ - spec.template.spec.containers.0.args.3
+ options:
+ delimiter: =
+ index: 1
+ select:
+ group: apps
+ kind: Deployment
+ name: model-registry-deployment
+ version: v1
diff --git a/manifests/kustomize/overlays/postgres/patches/model-registry-deployment.yaml b/manifests/kustomize/overlays/postgres/patches/model-registry-deployment.yaml
index 9844feaaef..1dec4cd75a 100644
--- a/manifests/kustomize/overlays/postgres/patches/model-registry-deployment.yaml
+++ b/manifests/kustomize/overlays/postgres/patches/model-registry-deployment.yaml
@@ -7,7 +7,7 @@ spec:
metadata:
annotations:
# db doesn't use istio
- traffic.sidecar.istio.io/excludeOutboundPorts: $(POSTGRES_PORT)
+ traffic.sidecar.istio.io/excludeOutboundPorts: POSTGRES_PORT_PLACEHOLDER
spec:
containers:
- name: grpc-container
@@ -23,8 +23,8 @@ spec:
name: model-registry-configmap
args: ["--grpc_port=$(MODEL_REGISTRY_GRPC_SERVICE_PORT)",
"--metadata_source_config_type=postgresql",
- "--postgres_config_host=$(MLMD_DB_HOST)",
- "--postgres_config_port=$(POSTGRES_PORT)",
+ "--postgres_config_host=MLMD_DB_HOST_PLACEHOLDER",
+ "--postgres_config_port=POSTGRES_PORT_PLACEHOLDER",
"--postgres_config_dbname=$(POSTGRES_DBNAME)",
"--postgres_config_user=$(POSTGRES_USER)",
"--postgres_config_password=$(POSTGRES_PASSWORD)",
diff --git a/pkg/inferenceservice-controller/controller.go b/pkg/inferenceservice-controller/controller.go
index 60986a92d7..ae1779a436 100644
--- a/pkg/inferenceservice-controller/controller.go
+++ b/pkg/inferenceservice-controller/controller.go
@@ -166,6 +166,27 @@ func (r *InferenceServiceController) Reconcile(ctx context.Context, req ctrl.Req
if err != nil {
return ctrl.Result{}, fmt.Errorf("unable to find InferenceService with id %s in model registry: %w", mrIsvcId, err)
}
+
+ mrCurrentIvcUrl := ""
+
+ if mrIs.CustomProperties != nil {
+ mrCurrentIvcUrl = (*mrIs.CustomProperties)["url"].MetadataStringValue.GetStringValue()
+ }
+
+ urlAreDiff := r.checkURLDiff(isvc, mrCurrentIvcUrl)
+ if urlAreDiff {
+ err := r.updateMRInferenceService(
+ mrApiCtx,
+ log,
+ mrApi,
+ isvc,
+ mrIs,
+ )
+ if err != nil {
+ return ctrl.Result{}, err
+ }
+ }
+
} else if okRegisteredModelId {
// No corresponding InferenceService in model registry, create new one
mrIs, err = r.createMRInferenceService(mrApiCtx, log, mrApi, isvc, *servingEnvironment.Id, registeredModelId, modelVersionId)
@@ -225,6 +246,18 @@ func (r *InferenceServiceController) SetupWithManager(mgr ctrl.Manager) error {
return builder.Complete(r)
}
+func (r *InferenceServiceController) checkURLDiff(isvc *kservev1beta1.InferenceService, mrIsvcUrl string) bool {
+ if mrIsvcUrl == "" && isvc.Status.URL == nil {
+ return false
+ }
+
+ if isvc.Status.URL == nil {
+ return true
+ }
+
+ return mrIsvcUrl != isvc.Status.URL.String()
+}
+
func (r *InferenceServiceController) initModelRegistryService(ctx context.Context, log logr.Logger, name, namespace, url string) (*openapi.APIClient, error) {
var err error
@@ -334,19 +367,59 @@ func (r *InferenceServiceController) createMRInferenceService(
if err != nil {
log.Info("Creating new model registry InferenceService", "name", isName, "registeredModelId", registeredModelId, "modelVersionId", modelVersionId)
- is, _, err = mr.ModelRegistryServiceAPI.CreateInferenceService(ctx).InferenceServiceCreate(openapi.InferenceServiceCreate{
+ isCreate := openapi.InferenceServiceCreate{
DesiredState: openapi.INFERENCESERVICESTATE_DEPLOYED.Ptr(),
ModelVersionId: modelVersionIdPtr,
Name: &isName,
RegisteredModelId: registeredModelId,
Runtime: isvc.Spec.Predictor.Model.Runtime,
ServingEnvironmentId: servingEnvironmentId,
- }).Execute()
+ }
+
+ if isvc.Status.URL != nil {
+ isCreate.CustomProperties = &map[string]openapi.MetadataValue{}
+
+ (*isCreate.CustomProperties)["url"] = openapi.MetadataValue{
+ MetadataStringValue: openapi.NewMetadataStringValue(isvc.Status.URL.String(), "MetadataStringValue"),
+ }
+ }
+
+ is, _, err = mr.ModelRegistryServiceAPI.CreateInferenceService(ctx).InferenceServiceCreate(isCreate).Execute()
}
return is, err
}
+func (r *InferenceServiceController) updateMRInferenceService(
+ ctx context.Context,
+ log logr.Logger,
+ mr *openapi.APIClient,
+ isvc *kservev1beta1.InferenceService,
+ mrIsvc *openapi.InferenceService,
+) error {
+ log.Info("Updating model registry InferenceService..")
+
+ url := ""
+
+ if isvc.Status.URL != nil {
+ url = isvc.Status.URL.String()
+ }
+
+ if mrIsvc.CustomProperties == nil {
+ mrIsvc.CustomProperties = &map[string]openapi.MetadataValue{}
+ }
+
+ (*mrIsvc.CustomProperties)["url"] = openapi.MetadataValue{
+ MetadataStringValue: openapi.NewMetadataStringValue(url, "MetadataStringValue"),
+ }
+
+ _, _, err := mr.ModelRegistryServiceAPI.UpdateInferenceService(ctx, *mrIsvc.Id).InferenceServiceUpdate(openapi.InferenceServiceUpdate{
+ CustomProperties: mrIsvc.CustomProperties,
+ }).Execute()
+
+ return err
+}
+
func (r *InferenceServiceController) getOrCreateServingEnvironment(ctx context.Context, log logr.Logger, mr *openapi.APIClient, namespace string) (*openapi.ServingEnvironment, error) {
servingEnvironment, _, err := mr.ModelRegistryServiceAPI.FindServingEnvironment(ctx).Name(namespace).Execute()
if err != nil {
diff --git a/pkg/inferenceservice-controller/controller_test.go b/pkg/inferenceservice-controller/controller_test.go
index 7945971e84..c7d0ac7e0b 100644
--- a/pkg/inferenceservice-controller/controller_test.go
+++ b/pkg/inferenceservice-controller/controller_test.go
@@ -1,12 +1,16 @@
package inferenceservicecontroller_test
import (
+ "encoding/json"
"fmt"
+ "io"
"time"
kservev1beta1 "github.com/kserve/kserve/pkg/apis/serving/v1beta1"
+ "github.com/kubeflow/model-registry/pkg/openapi"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
+ "knative.dev/pkg/apis"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
@@ -237,4 +241,331 @@ var _ = Describe("InferenceService Controller", func() {
}, 10*time.Second, 1*time.Second).Should(Succeed())
})
})
+
+ When("An InferenceService have a status.url defined", func() {
+ It("Should get reconciled in the model registry InferenceService resource", func() {
+ const InferenceServiceMissingNamePath = "./testdata/inferenceservices/inference-service-missing-name.yaml"
+ const ModelRegistrySVCPath = "./testdata/deploy/model-registry-svc.yaml"
+ const namespace = "url-reconcile"
+ const mrUrl = "http://model-registry.svc.cluster.local:8080"
+
+ ns := &corev1.Namespace{}
+
+ ns.SetName(namespace)
+
+ if err := cli.Create(ctx, ns); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ mrSvc := &corev1.Service{}
+ Expect(ConvertFileToStructuredResource(ModelRegistrySVCPath, mrSvc)).To(Succeed())
+
+ mrSvc.SetNamespace(namespace)
+
+ if err := cli.Create(ctx, mrSvc); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ inferenceService := &kservev1beta1.InferenceService{}
+ Expect(ConvertFileToStructuredResource(InferenceServiceMissingNamePath, inferenceService)).To(Succeed())
+
+ inferenceService.SetNamespace(namespace)
+
+ inferenceService.Labels[namespaceLabel] = namespace
+
+ if err := cli.Create(ctx, inferenceService); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ Eventually(func() error {
+ isvc := &kservev1beta1.InferenceService{}
+ err := cli.Get(ctx, types.NamespacedName{
+ Name: inferenceService.Name,
+ Namespace: inferenceService.Namespace,
+ }, isvc)
+ if err != nil {
+ return err
+ }
+
+ if isvc.Labels[inferenceServiceIDLabel] != "1" {
+ return fmt.Errorf("Label for InferenceServiceID is not set, got %s", isvc.Labels[inferenceServiceIDLabel])
+ }
+
+ return nil
+ }, 10*time.Second, 1*time.Second).Should(Succeed())
+
+ restIsvc := &openapi.InferenceService{}
+
+ resp, err := mrMockServer.Client().Get(mrUrl + "/api/model_registry/v1alpha3/inference_services/1")
+ Expect(err).To(BeNil())
+
+ //nolint:errcheck
+ defer resp.Body.Close()
+
+ body, err := io.ReadAll(resp.Body)
+ Expect(err).To(BeNil())
+
+ err = json.Unmarshal(body, &restIsvc)
+ Expect(err).To(BeNil())
+ Expect(restIsvc.CustomProperties).To(BeNil())
+
+ url, err := apis.ParseURL("https://example.com")
+ Expect(err).To(BeNil())
+
+ err = cli.Get(ctx, types.NamespacedName{Name: inferenceService.Name, Namespace: inferenceService.Namespace}, inferenceService)
+ Expect(err).To(BeNil())
+
+ inferenceService.Status.URL = url
+
+ if err := cli.Status().Update(ctx, inferenceService); err != nil {
+ Fail(err.Error())
+ }
+
+ Eventually(func() error {
+ resp, err := mrMockServer.Client().Get(mrUrl + "/api/model_registry/v1alpha3/inference_services/1")
+ Expect(err).To(BeNil())
+
+ //nolint:errcheck
+ defer resp.Body.Close()
+
+ body, err := io.ReadAll(resp.Body)
+ Expect(err).To(BeNil())
+
+ err = json.Unmarshal(body, &restIsvc)
+ Expect(err).To(BeNil())
+
+ if restIsvc.CustomProperties == nil {
+ return fmt.Errorf("InferenceService URL is not set")
+ }
+
+ if (*restIsvc.CustomProperties)["url"].MetadataStringValue.GetStringValue() != url.String() {
+ return fmt.Errorf("InferenceService URL is not set correctly, got %s, want %s", (*restIsvc.CustomProperties)["url"].MetadataStringValue.GetStringValue(), url.String())
+ }
+
+ return nil
+ }, 20*time.Second, 1*time.Second).Should(Succeed())
+ })
+
+ It("Should not set the model registry InferenceService url if the status.url is nil", func() {
+ const InferenceServiceMissingNamePath = "./testdata/inferenceservices/inference-service-missing-name.yaml"
+ const ModelRegistrySVCPath = "./testdata/deploy/model-registry-svc.yaml"
+ const namespace = "url-reconcile-empty-status-url"
+ const mrUrl = "http://model-registry.svc.cluster.local:8080"
+
+ ns := &corev1.Namespace{}
+
+ ns.SetName(namespace)
+
+ if err := cli.Create(ctx, ns); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ mrSvc := &corev1.Service{}
+ Expect(ConvertFileToStructuredResource(ModelRegistrySVCPath, mrSvc)).To(Succeed())
+
+ mrSvc.SetNamespace(namespace)
+
+ if err := cli.Create(ctx, mrSvc); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ inferenceService := &kservev1beta1.InferenceService{}
+ Expect(ConvertFileToStructuredResource(InferenceServiceMissingNamePath, inferenceService)).To(Succeed())
+
+ inferenceService.SetNamespace(namespace)
+
+ inferenceService.Labels[namespaceLabel] = namespace
+
+ if err := cli.Create(ctx, inferenceService); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ Eventually(func() error {
+ isvc := &kservev1beta1.InferenceService{}
+ err := cli.Get(ctx, types.NamespacedName{
+ Name: inferenceService.Name,
+ Namespace: inferenceService.Namespace,
+ }, isvc)
+ if err != nil {
+ return err
+ }
+
+ if isvc.Labels[inferenceServiceIDLabel] != "1" {
+ return fmt.Errorf("Label for InferenceServiceID is not set, got %s", isvc.Labels[inferenceServiceIDLabel])
+ }
+
+ return nil
+ }, 10*time.Second, 1*time.Second).Should(Succeed())
+
+ restIsvc := &openapi.InferenceService{}
+
+ err := cli.Get(ctx, types.NamespacedName{Name: inferenceService.Name, Namespace: inferenceService.Namespace}, inferenceService)
+ Expect(err).To(BeNil())
+
+ inferenceService.Status.URL = nil
+
+ if err := cli.Status().Update(ctx, inferenceService); err != nil {
+ Fail(err.Error())
+ }
+
+ Eventually(func() error {
+ resp, err := mrMockServer.Client().Get(mrUrl + "/api/model_registry/v1alpha3/inference_services/1")
+ Expect(err).To(BeNil())
+
+ //nolint:errcheck
+ defer resp.Body.Close()
+
+ body, err := io.ReadAll(resp.Body)
+ Expect(err).To(BeNil())
+
+ err = json.Unmarshal(body, &restIsvc)
+ Expect(err).To(BeNil())
+
+ if restIsvc.CustomProperties != nil {
+ return fmt.Errorf("InferenceService URL should not be set")
+ }
+
+ return nil
+ }, 20*time.Second, 1*time.Second).Should(Succeed())
+ })
+
+ It("Should update the model registry InferenceService url if the status.url is updated", func() {
+ const InferenceServiceMissingNamePath = "./testdata/inferenceservices/inference-service-missing-name.yaml"
+ const ModelRegistrySVCPath = "./testdata/deploy/model-registry-svc.yaml"
+ const namespace = "url-reconcile-update-status-url"
+ const mrUrl = "http://model-registry.svc.cluster.local:8080"
+
+ ns := &corev1.Namespace{}
+
+ ns.SetName(namespace)
+
+ if err := cli.Create(ctx, ns); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ mrSvc := &corev1.Service{}
+ Expect(ConvertFileToStructuredResource(ModelRegistrySVCPath, mrSvc)).To(Succeed())
+
+ mrSvc.SetNamespace(namespace)
+
+ if err := cli.Create(ctx, mrSvc); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ inferenceService := &kservev1beta1.InferenceService{}
+ Expect(ConvertFileToStructuredResource(InferenceServiceMissingNamePath, inferenceService)).To(Succeed())
+
+ inferenceService.SetNamespace(namespace)
+
+ inferenceService.Labels[namespaceLabel] = namespace
+
+ if err := cli.Create(ctx, inferenceService); err != nil && !errors.IsAlreadyExists(err) {
+ Fail(err.Error())
+ }
+
+ Eventually(func() error {
+ isvc := &kservev1beta1.InferenceService{}
+ err := cli.Get(ctx, types.NamespacedName{
+ Name: inferenceService.Name,
+ Namespace: inferenceService.Namespace,
+ }, isvc)
+ if err != nil {
+ return err
+ }
+
+ if isvc.Labels[inferenceServiceIDLabel] != "1" {
+ return fmt.Errorf("Label for InferenceServiceID is not set, got %s", isvc.Labels[inferenceServiceIDLabel])
+ }
+
+ return nil
+ }, 10*time.Second, 1*time.Second).Should(Succeed())
+
+ restIsvc := &openapi.InferenceService{}
+
+ resp, err := mrMockServer.Client().Get(mrUrl + "/api/model_registry/v1alpha3/inference_services/1")
+ Expect(err).To(BeNil())
+
+ //nolint:errcheck
+ defer resp.Body.Close()
+
+ body, err := io.ReadAll(resp.Body)
+ Expect(err).To(BeNil())
+
+ err = json.Unmarshal(body, &restIsvc)
+ Expect(err).To(BeNil())
+ Expect(restIsvc.CustomProperties).To(BeNil())
+
+ url, err := apis.ParseURL("https://example.com")
+ Expect(err).To(BeNil())
+
+ err = cli.Get(ctx, types.NamespacedName{Name: inferenceService.Name, Namespace: inferenceService.Namespace}, inferenceService)
+ Expect(err).To(BeNil())
+
+ inferenceService.Status.URL = url
+
+ if err := cli.Status().Update(ctx, inferenceService); err != nil {
+ Fail(err.Error())
+ }
+
+ Eventually(func() error {
+ resp, err := mrMockServer.Client().Get(mrUrl + "/api/model_registry/v1alpha3/inference_services/1")
+ Expect(err).To(BeNil())
+
+ //nolint:errcheck
+ defer resp.Body.Close()
+
+ body, err := io.ReadAll(resp.Body)
+ Expect(err).To(BeNil())
+
+ err = json.Unmarshal(body, &restIsvc)
+ Expect(err).To(BeNil())
+
+ if restIsvc.CustomProperties == nil {
+ return fmt.Errorf("InferenceService URL is not set")
+ }
+
+ if (*restIsvc.CustomProperties)["url"].MetadataStringValue.GetStringValue() != url.String() {
+ return fmt.Errorf("InferenceService URL is not set correctly, got %s, want %s", (*restIsvc.CustomProperties)["url"].MetadataStringValue.GetStringValue(), url.String())
+ }
+
+ return nil
+ }, 20*time.Second, 1*time.Second).Should(Succeed())
+
+ url, err = apis.ParseURL("https://example-updated.com")
+ Expect(err).To(BeNil())
+
+ err = cli.Get(ctx, types.NamespacedName{Name: inferenceService.Name, Namespace: inferenceService.Namespace}, inferenceService)
+ Expect(err).To(BeNil())
+
+ inferenceService.Status.URL = url
+
+ if err := cli.Status().Update(ctx, inferenceService); err != nil {
+ Fail(err.Error())
+ }
+
+ Eventually(func() error {
+ resp, err := mrMockServer.Client().Get(mrUrl + "/api/model_registry/v1alpha3/inference_services/1")
+ Expect(err).To(BeNil())
+
+ //nolint:errcheck
+ defer resp.Body.Close()
+
+ body, err := io.ReadAll(resp.Body)
+ Expect(err).To(BeNil())
+
+ err = json.Unmarshal(body, &restIsvc)
+ Expect(err).To(BeNil())
+
+ if restIsvc.CustomProperties == nil {
+ return fmt.Errorf("InferenceService URL is not set")
+ }
+
+ if (*restIsvc.CustomProperties)["url"].MetadataStringValue.GetStringValue() != url.String() {
+ return fmt.Errorf("InferenceService URL is not set correctly, got %s, want %s", (*restIsvc.CustomProperties)["url"].MetadataStringValue.GetStringValue(), url.String())
+ }
+
+ return nil
+ }, 20*time.Second, 1*time.Second).Should(Succeed())
+ })
+ })
})
diff --git a/pkg/inferenceservice-controller/suite_test.go b/pkg/inferenceservice-controller/suite_test.go
index cf0798bb5f..1b40cd6b83 100644
--- a/pkg/inferenceservice-controller/suite_test.go
+++ b/pkg/inferenceservice-controller/suite_test.go
@@ -2,6 +2,7 @@ package inferenceservicecontroller_test
import (
"context"
+ "encoding/json"
"fmt"
"io"
"net/http"
@@ -15,6 +16,7 @@ import (
kservev1beta1 "github.com/kserve/kserve/pkg/apis/serving/v1beta1"
inferenceservicecontroller "github.com/kubeflow/model-registry/pkg/inferenceservice-controller"
+ "github.com/kubeflow/model-registry/pkg/openapi"
"go.uber.org/zap/zapcore"
corev1 "k8s.io/api/core/v1"
authv1 "k8s.io/api/rbac/v1"
@@ -177,6 +179,9 @@ var _ = AfterSuite(func() {
func ModelRegistryDefaultMockServer() *httptest.Server {
handler := http.NewServeMux()
+ servingEnvironments := make(map[string]*openapi.ServingEnvironment)
+ inferenceServices := make(map[string]*openapi.InferenceService)
+
handler.HandleFunc("/api/model_registry/v1alpha3/serving_environments", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
@@ -187,14 +192,35 @@ func ModelRegistryDefaultMockServer() *httptest.Server {
}
if r.Method == http.MethodPost {
+ id := "1"
+
+ senv := &openapi.ServingEnvironment{}
+
+ senvJson, err := io.ReadAll(r.Body)
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+ }
+
+ if err := json.Unmarshal(senvJson, &senv); err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+
+ return
+ }
+
+ senv.Id = &id
+
+ servingEnvironments[id] = senv
+
w.WriteHeader(http.StatusCreated)
- res := `{
- "id": "1",
- "name": "default"
- }`
+ res, err := json.Marshal(senv)
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+
+ return
+ }
- _, err := w.Write([]byte(res))
+ _, err = w.Write([]byte(res))
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
}
@@ -207,14 +233,66 @@ func ModelRegistryDefaultMockServer() *httptest.Server {
handler.HandleFunc("/api/model_registry/v1alpha3/inference_services/1", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
+ id := "1"
+
+ if r.Method == http.MethodGet {
+ isvc, ok := inferenceServices[id]
+ if !ok {
+ w.WriteHeader(http.StatusNotFound)
+
+ return
+ }
+
+ res, err := json.Marshal(isvc)
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+
+ return
+ }
+
+ _, err = w.Write([]byte(res))
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+
+ return
+ }
+
+ return
+ }
+
+ if r.Method == http.MethodPatch {
+ isvc := &openapi.InferenceService{}
+
+ isvcvJson, err := io.ReadAll(r.Body)
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+ }
+
+ if err := json.Unmarshal(isvcvJson, &isvc); err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+
+ return
+ }
+
+ isvc.Id = &id
+
+ inferenceServices[id] = isvc
- res := `{
- "id": "1"
- }`
+ w.WriteHeader(http.StatusCreated)
+
+ res, err := json.Marshal(isvc)
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+
+ return
+ }
+
+ _, err = w.Write([]byte(res))
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+ }
- _, err := w.Write([]byte(res))
- if err != nil {
- w.WriteHeader(http.StatusInternalServerError)
+ return
}
})
@@ -228,13 +306,35 @@ func ModelRegistryDefaultMockServer() *httptest.Server {
}
if r.Method == http.MethodPost {
+ id := "1"
+
+ isvc := &openapi.InferenceService{}
+
+ isvcvJson, err := io.ReadAll(r.Body)
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+ }
+
+ if err := json.Unmarshal(isvcvJson, &isvc); err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+
+ return
+ }
+
+ isvc.Id = &id
+
+ inferenceServices[id] = isvc
+
w.WriteHeader(http.StatusCreated)
- res := `{
- "id": "1"
- }`
+ res, err := json.Marshal(isvc)
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+
+ return
+ }
- _, err := w.Write([]byte(res))
+ _, err = w.Write([]byte(res))
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
}
diff --git a/pkg/openapi/.openapi-generator/FILES b/pkg/openapi/.openapi-generator/FILES
index 8a56f21b24..2532c997e9 100644
--- a/pkg/openapi/.openapi-generator/FILES
+++ b/pkg/openapi/.openapi-generator/FILES
@@ -6,12 +6,6 @@ model_artifact_create.go
model_artifact_list.go
model_artifact_state.go
model_artifact_update.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
diff --git a/pkg/openapi/model_base_artifact.go b/pkg/openapi/model_base_artifact.go
deleted file mode 100644
index c6bd888f12..0000000000
--- a/pkg/openapi/model_base_artifact.go
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
-Model Registry REST API
-
-REST API for Model Registry to create and manage ML model metadata
-
-API version: v1alpha3
-*/
-
-// 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"`
- // 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"`
-}
-
-// 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() *BaseArtifact {
- this := BaseArtifact{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
- 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
-}
-
-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
- }
- 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
deleted file mode 100644
index 75e99cfacc..0000000000
--- a/pkg/openapi/model_base_artifact_create.go
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
-Model Registry REST API
-
-REST API for Model Registry to create and manage ML model metadata
-
-API version: v1alpha3
-*/
-
-// 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
deleted file mode 100644
index 2042402bc9..0000000000
--- a/pkg/openapi/model_base_artifact_update.go
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
-Model Registry REST API
-
-REST API for Model Registry to create and manage ML model metadata
-
-API version: v1alpha3
-*/
-
-// 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
deleted file mode 100644
index b491dbb5a7..0000000000
--- a/pkg/openapi/model_base_execution.go
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
-Model Registry REST API
-
-REST API for Model Registry to create and manage ML model metadata
-
-API version: v1alpha3
-*/
-
-// 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"`
- // 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
deleted file mode 100644
index e2f8d40593..0000000000
--- a/pkg/openapi/model_base_execution_create.go
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
-Model Registry REST API
-
-REST API for Model Registry to create and manage ML model metadata
-
-API version: v1alpha3
-*/
-
-// 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
deleted file mode 100644
index aab74c8ed3..0000000000
--- a/pkg/openapi/model_base_execution_update.go
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
-Model Registry REST API
-
-REST API for Model Registry to create and manage ML model metadata
-
-API version: v1alpha3
-*/
-
-// 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_doc_artifact.go b/pkg/openapi/model_doc_artifact.go
index cd8b058bde..4ef81fc108 100644
--- a/pkg/openapi/model_doc_artifact.go
+++ b/pkg/openapi/model_doc_artifact.go
@@ -25,9 +25,6 @@ type DocArtifact struct {
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"`
// The unique server generated id of the resource.
@@ -37,6 +34,9 @@ type DocArtifact struct {
// Output only. Last update time of the resource since epoch in millisecond since epoch.
LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
ArtifactType *string `json:"artifactType,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"`
}
// NewDocArtifact instantiates a new DocArtifact object
@@ -45,10 +45,10 @@ type DocArtifact struct {
// will change when the set of required properties is changed
func NewDocArtifact() *DocArtifact {
this := DocArtifact{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "doc-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -57,10 +57,10 @@ func NewDocArtifact() *DocArtifact {
// but it doesn't guarantee that properties required by API are set
func NewDocArtifactWithDefaults() *DocArtifact {
this := DocArtifact{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "doc-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -160,70 +160,6 @@ func (o *DocArtifact) SetExternalId(v string) {
o.ExternalId = &v
}
-// GetUri returns the Uri field value if set, zero value otherwise.
-func (o *DocArtifact) 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 *DocArtifact) 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 *DocArtifact) 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 *DocArtifact) SetUri(v string) {
- o.Uri = &v
-}
-
-// GetState returns the State field value if set, zero value otherwise.
-func (o *DocArtifact) 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 *DocArtifact) 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 *DocArtifact) 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 *DocArtifact) SetState(v ArtifactState) {
- o.State = &v
-}
-
// GetName returns the Name field value if set, zero value otherwise.
func (o *DocArtifact) GetName() string {
if o == nil || IsNil(o.Name) {
@@ -384,6 +320,70 @@ func (o *DocArtifact) SetArtifactType(v string) {
o.ArtifactType = &v
}
+// GetUri returns the Uri field value if set, zero value otherwise.
+func (o *DocArtifact) 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 *DocArtifact) 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 *DocArtifact) 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 *DocArtifact) SetUri(v string) {
+ o.Uri = &v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *DocArtifact) 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 *DocArtifact) 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 *DocArtifact) 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 *DocArtifact) SetState(v ArtifactState) {
+ o.State = &v
+}
+
func (o DocArtifact) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -403,12 +403,6 @@ func (o DocArtifact) ToMap() (map[string]interface{}, error) {
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
}
@@ -424,6 +418,12 @@ func (o DocArtifact) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ArtifactType) {
toSerialize["artifactType"] = o.ArtifactType
}
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
return toSerialize, nil
}
diff --git a/pkg/openapi/model_doc_artifact_create.go b/pkg/openapi/model_doc_artifact_create.go
index b8e4761d49..920b680a3c 100644
--- a/pkg/openapi/model_doc_artifact_create.go
+++ b/pkg/openapi/model_doc_artifact_create.go
@@ -25,12 +25,12 @@ type DocArtifactCreate struct {
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"`
ArtifactType *string `json:"artifactType,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"`
}
// NewDocArtifactCreate instantiates a new DocArtifactCreate object
@@ -39,10 +39,10 @@ type DocArtifactCreate struct {
// will change when the set of required properties is changed
func NewDocArtifactCreate() *DocArtifactCreate {
this := DocArtifactCreate{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "doc-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -51,10 +51,10 @@ func NewDocArtifactCreate() *DocArtifactCreate {
// but it doesn't guarantee that properties required by API are set
func NewDocArtifactCreateWithDefaults() *DocArtifactCreate {
this := DocArtifactCreate{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "doc-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -154,132 +154,132 @@ func (o *DocArtifactCreate) SetExternalId(v string) {
o.ExternalId = &v
}
-// GetUri returns the Uri field value if set, zero value otherwise.
-func (o *DocArtifactCreate) GetUri() string {
- if o == nil || IsNil(o.Uri) {
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *DocArtifactCreate) GetName() string {
+ if o == nil || IsNil(o.Name) {
var ret string
return ret
}
- return *o.Uri
+ return *o.Name
}
-// GetUriOk returns a tuple with the Uri field value if set, nil otherwise
+// 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 *DocArtifactCreate) GetUriOk() (*string, bool) {
- if o == nil || IsNil(o.Uri) {
+func (o *DocArtifactCreate) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
return nil, false
}
- return o.Uri, true
+ return o.Name, true
}
-// HasUri returns a boolean if a field has been set.
-func (o *DocArtifactCreate) HasUri() bool {
- if o != nil && !IsNil(o.Uri) {
+// HasName returns a boolean if a field has been set.
+func (o *DocArtifactCreate) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
return true
}
return false
}
-// SetUri gets a reference to the given string and assigns it to the Uri field.
-func (o *DocArtifactCreate) SetUri(v string) {
- o.Uri = &v
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *DocArtifactCreate) SetName(v string) {
+ o.Name = &v
}
-// GetState returns the State field value if set, zero value otherwise.
-func (o *DocArtifactCreate) GetState() ArtifactState {
- if o == nil || IsNil(o.State) {
- var ret ArtifactState
+// GetArtifactType returns the ArtifactType field value if set, zero value otherwise.
+func (o *DocArtifactCreate) GetArtifactType() string {
+ if o == nil || IsNil(o.ArtifactType) {
+ var ret string
return ret
}
- return *o.State
+ return *o.ArtifactType
}
-// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// GetArtifactTypeOk returns a tuple with the ArtifactType field value if set, nil otherwise
// and a boolean to check if the value has been set.
-func (o *DocArtifactCreate) GetStateOk() (*ArtifactState, bool) {
- if o == nil || IsNil(o.State) {
+func (o *DocArtifactCreate) GetArtifactTypeOk() (*string, bool) {
+ if o == nil || IsNil(o.ArtifactType) {
return nil, false
}
- return o.State, true
+ return o.ArtifactType, true
}
-// HasState returns a boolean if a field has been set.
-func (o *DocArtifactCreate) HasState() bool {
- if o != nil && !IsNil(o.State) {
+// HasArtifactType returns a boolean if a field has been set.
+func (o *DocArtifactCreate) HasArtifactType() bool {
+ if o != nil && !IsNil(o.ArtifactType) {
return true
}
return false
}
-// SetState gets a reference to the given ArtifactState and assigns it to the State field.
-func (o *DocArtifactCreate) SetState(v ArtifactState) {
- o.State = &v
+// SetArtifactType gets a reference to the given string and assigns it to the ArtifactType field.
+func (o *DocArtifactCreate) SetArtifactType(v string) {
+ o.ArtifactType = &v
}
-// GetName returns the Name field value if set, zero value otherwise.
-func (o *DocArtifactCreate) GetName() string {
- if o == nil || IsNil(o.Name) {
+// GetUri returns the Uri field value if set, zero value otherwise.
+func (o *DocArtifactCreate) GetUri() string {
+ if o == nil || IsNil(o.Uri) {
var ret string
return ret
}
- return *o.Name
+ return *o.Uri
}
-// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// 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 *DocArtifactCreate) GetNameOk() (*string, bool) {
- if o == nil || IsNil(o.Name) {
+func (o *DocArtifactCreate) GetUriOk() (*string, bool) {
+ if o == nil || IsNil(o.Uri) {
return nil, false
}
- return o.Name, true
+ return o.Uri, true
}
-// HasName returns a boolean if a field has been set.
-func (o *DocArtifactCreate) HasName() bool {
- if o != nil && !IsNil(o.Name) {
+// HasUri returns a boolean if a field has been set.
+func (o *DocArtifactCreate) HasUri() bool {
+ if o != nil && !IsNil(o.Uri) {
return true
}
return false
}
-// SetName gets a reference to the given string and assigns it to the Name field.
-func (o *DocArtifactCreate) SetName(v string) {
- o.Name = &v
+// SetUri gets a reference to the given string and assigns it to the Uri field.
+func (o *DocArtifactCreate) SetUri(v string) {
+ o.Uri = &v
}
-// GetArtifactType returns the ArtifactType field value if set, zero value otherwise.
-func (o *DocArtifactCreate) GetArtifactType() string {
- if o == nil || IsNil(o.ArtifactType) {
- var ret string
+// GetState returns the State field value if set, zero value otherwise.
+func (o *DocArtifactCreate) GetState() ArtifactState {
+ if o == nil || IsNil(o.State) {
+ var ret ArtifactState
return ret
}
- return *o.ArtifactType
+ return *o.State
}
-// GetArtifactTypeOk returns a tuple with the ArtifactType field value if set, nil otherwise
+// 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 *DocArtifactCreate) GetArtifactTypeOk() (*string, bool) {
- if o == nil || IsNil(o.ArtifactType) {
+func (o *DocArtifactCreate) GetStateOk() (*ArtifactState, bool) {
+ if o == nil || IsNil(o.State) {
return nil, false
}
- return o.ArtifactType, true
+ return o.State, true
}
-// HasArtifactType returns a boolean if a field has been set.
-func (o *DocArtifactCreate) HasArtifactType() bool {
- if o != nil && !IsNil(o.ArtifactType) {
+// HasState returns a boolean if a field has been set.
+func (o *DocArtifactCreate) HasState() bool {
+ if o != nil && !IsNil(o.State) {
return true
}
return false
}
-// SetArtifactType gets a reference to the given string and assigns it to the ArtifactType field.
-func (o *DocArtifactCreate) SetArtifactType(v string) {
- o.ArtifactType = &v
+// SetState gets a reference to the given ArtifactState and assigns it to the State field.
+func (o *DocArtifactCreate) SetState(v ArtifactState) {
+ o.State = &v
}
func (o DocArtifactCreate) MarshalJSON() ([]byte, error) {
@@ -301,18 +301,18 @@ func (o DocArtifactCreate) ToMap() (map[string]interface{}, error) {
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.ArtifactType) {
toSerialize["artifactType"] = o.ArtifactType
}
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
return toSerialize, nil
}
diff --git a/pkg/openapi/model_doc_artifact_update.go b/pkg/openapi/model_doc_artifact_update.go
index 697e036bc9..2f4197a7a5 100644
--- a/pkg/openapi/model_doc_artifact_update.go
+++ b/pkg/openapi/model_doc_artifact_update.go
@@ -24,11 +24,11 @@ type DocArtifactUpdate struct {
// 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"`
+ ExternalId *string `json:"externalId,omitempty"`
+ ArtifactType *string `json:"artifactType,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"`
- ArtifactType *string `json:"artifactType,omitempty"`
+ Uri *string `json:"uri,omitempty"`
+ State *ArtifactState `json:"state,omitempty"`
}
// NewDocArtifactUpdate instantiates a new DocArtifactUpdate object
@@ -37,10 +37,10 @@ type DocArtifactUpdate struct {
// will change when the set of required properties is changed
func NewDocArtifactUpdate() *DocArtifactUpdate {
this := DocArtifactUpdate{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "doc-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -49,10 +49,10 @@ func NewDocArtifactUpdate() *DocArtifactUpdate {
// but it doesn't guarantee that properties required by API are set
func NewDocArtifactUpdateWithDefaults() *DocArtifactUpdate {
this := DocArtifactUpdate{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "doc-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -152,6 +152,38 @@ func (o *DocArtifactUpdate) SetExternalId(v string) {
o.ExternalId = &v
}
+// GetArtifactType returns the ArtifactType field value if set, zero value otherwise.
+func (o *DocArtifactUpdate) GetArtifactType() string {
+ if o == nil || IsNil(o.ArtifactType) {
+ var ret string
+ return ret
+ }
+ return *o.ArtifactType
+}
+
+// GetArtifactTypeOk returns a tuple with the ArtifactType field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DocArtifactUpdate) GetArtifactTypeOk() (*string, bool) {
+ if o == nil || IsNil(o.ArtifactType) {
+ return nil, false
+ }
+ return o.ArtifactType, true
+}
+
+// HasArtifactType returns a boolean if a field has been set.
+func (o *DocArtifactUpdate) HasArtifactType() bool {
+ if o != nil && !IsNil(o.ArtifactType) {
+ return true
+ }
+
+ return false
+}
+
+// SetArtifactType gets a reference to the given string and assigns it to the ArtifactType field.
+func (o *DocArtifactUpdate) SetArtifactType(v string) {
+ o.ArtifactType = &v
+}
+
// GetUri returns the Uri field value if set, zero value otherwise.
func (o *DocArtifactUpdate) GetUri() string {
if o == nil || IsNil(o.Uri) {
@@ -216,38 +248,6 @@ func (o *DocArtifactUpdate) SetState(v ArtifactState) {
o.State = &v
}
-// GetArtifactType returns the ArtifactType field value if set, zero value otherwise.
-func (o *DocArtifactUpdate) GetArtifactType() string {
- if o == nil || IsNil(o.ArtifactType) {
- var ret string
- return ret
- }
- return *o.ArtifactType
-}
-
-// GetArtifactTypeOk returns a tuple with the ArtifactType field value if set, nil otherwise
-// and a boolean to check if the value has been set.
-func (o *DocArtifactUpdate) GetArtifactTypeOk() (*string, bool) {
- if o == nil || IsNil(o.ArtifactType) {
- return nil, false
- }
- return o.ArtifactType, true
-}
-
-// HasArtifactType returns a boolean if a field has been set.
-func (o *DocArtifactUpdate) HasArtifactType() bool {
- if o != nil && !IsNil(o.ArtifactType) {
- return true
- }
-
- return false
-}
-
-// SetArtifactType gets a reference to the given string and assigns it to the ArtifactType field.
-func (o *DocArtifactUpdate) SetArtifactType(v string) {
- o.ArtifactType = &v
-}
-
func (o DocArtifactUpdate) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -267,15 +267,15 @@ func (o DocArtifactUpdate) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
+ if !IsNil(o.ArtifactType) {
+ toSerialize["artifactType"] = o.ArtifactType
+ }
if !IsNil(o.Uri) {
toSerialize["uri"] = o.Uri
}
if !IsNil(o.State) {
toSerialize["state"] = o.State
}
- if !IsNil(o.ArtifactType) {
- toSerialize["artifactType"] = o.ArtifactType
- }
return toSerialize, nil
}
diff --git a/pkg/openapi/model_model_artifact.go b/pkg/openapi/model_model_artifact.go
index 614c0c7cb6..7c5b9178f0 100644
--- a/pkg/openapi/model_model_artifact.go
+++ b/pkg/openapi/model_model_artifact.go
@@ -25,9 +25,6 @@ type ModelArtifact struct {
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"`
// The unique server generated id of the resource.
@@ -57,6 +54,9 @@ type ModelArtifact struct {
ModelSourceId *string `json:"modelSourceId,omitempty"`
// A human-readable name for the source model. E.g. `my-project/1`, `ibm-granite/granite-3.1-8b-base:2.1.2`.
ModelSourceName *string `json:"modelSourceName,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"`
}
// NewModelArtifact instantiates a new ModelArtifact object
@@ -65,10 +65,10 @@ type ModelArtifact struct {
// will change when the set of required properties is changed
func NewModelArtifact() *ModelArtifact {
this := ModelArtifact{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "model-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -77,10 +77,10 @@ func NewModelArtifact() *ModelArtifact {
// 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
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -180,70 +180,6 @@ 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) {
@@ -724,6 +660,70 @@ func (o *ModelArtifact) SetModelSourceName(v string) {
o.ModelSourceName = &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
+}
+
func (o ModelArtifact) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -743,12 +743,6 @@ func (o ModelArtifact) ToMap() (map[string]interface{}, error) {
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
}
@@ -794,6 +788,12 @@ func (o ModelArtifact) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ModelSourceName) {
toSerialize["modelSourceName"] = o.ModelSourceName
}
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
return toSerialize, nil
}
diff --git a/pkg/openapi/model_model_artifact_create.go b/pkg/openapi/model_model_artifact_create.go
index 821786fd3f..28c081fb30 100644
--- a/pkg/openapi/model_model_artifact_create.go
+++ b/pkg/openapi/model_model_artifact_create.go
@@ -26,9 +26,6 @@ type ModelArtifactCreate struct {
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.
@@ -51,6 +48,9 @@ type ModelArtifactCreate struct {
ModelSourceId *string `json:"modelSourceId,omitempty"`
// A human-readable name for the source model. E.g. `my-project/1`, `ibm-granite/granite-3.1-8b-base:2.1.2`.
ModelSourceName *string `json:"modelSourceName,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"`
}
// NewModelArtifactCreate instantiates a new ModelArtifactCreate object
@@ -59,10 +59,10 @@ type ModelArtifactCreate struct {
// will change when the set of required properties is changed
func NewModelArtifactCreate() *ModelArtifactCreate {
this := ModelArtifactCreate{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "model-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -206,70 +206,6 @@ 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) {
@@ -622,6 +558,70 @@ func (o *ModelArtifactCreate) SetModelSourceName(v string) {
o.ModelSourceName = &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
+}
+
func (o ModelArtifactCreate) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -644,12 +644,6 @@ func (o ModelArtifactCreate) ToMap() (map[string]interface{}, error) {
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
}
@@ -683,6 +677,12 @@ func (o ModelArtifactCreate) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ModelSourceName) {
toSerialize["modelSourceName"] = o.ModelSourceName
}
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
return toSerialize, nil
}
diff --git a/pkg/openapi/model_model_artifact_update.go b/pkg/openapi/model_model_artifact_update.go
index 1a9e151077..09f92415cc 100644
--- a/pkg/openapi/model_model_artifact_update.go
+++ b/pkg/openapi/model_model_artifact_update.go
@@ -24,11 +24,8 @@ type ModelArtifactUpdate struct {
// 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"`
- ArtifactType *string `json:"artifactType,omitempty"`
+ ExternalId *string `json:"externalId,omitempty"`
+ ArtifactType *string `json:"artifactType,omitempty"`
// Name of the model format.
ModelFormatName *string `json:"modelFormatName,omitempty"`
// Storage secret name.
@@ -49,6 +46,9 @@ type ModelArtifactUpdate struct {
ModelSourceId *string `json:"modelSourceId,omitempty"`
// A human-readable name for the source model. E.g. `my-project/1`, `ibm-granite/granite-3.1-8b-base:2.1.2`.
ModelSourceName *string `json:"modelSourceName,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"`
}
// NewModelArtifactUpdate instantiates a new ModelArtifactUpdate object
@@ -57,10 +57,10 @@ type ModelArtifactUpdate struct {
// will change when the set of required properties is changed
func NewModelArtifactUpdate() *ModelArtifactUpdate {
this := ModelArtifactUpdate{}
- var state ArtifactState = ARTIFACTSTATE_UNKNOWN
- this.State = &state
var artifactType string = "model-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -69,10 +69,10 @@ func NewModelArtifactUpdate() *ModelArtifactUpdate {
// 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
var artifactType string = "model-artifact"
this.ArtifactType = &artifactType
+ var state ArtifactState = ARTIFACTSTATE_UNKNOWN
+ this.State = &state
return &this
}
@@ -172,70 +172,6 @@ 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
-}
-
// GetArtifactType returns the ArtifactType field value if set, zero value otherwise.
func (o *ModelArtifactUpdate) GetArtifactType() string {
if o == nil || IsNil(o.ArtifactType) {
@@ -588,6 +524,70 @@ func (o *ModelArtifactUpdate) SetModelSourceName(v string) {
o.ModelSourceName = &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
+}
+
func (o ModelArtifactUpdate) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -607,12 +607,6 @@ func (o ModelArtifactUpdate) ToMap() (map[string]interface{}, error) {
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.ArtifactType) {
toSerialize["artifactType"] = o.ArtifactType
}
@@ -646,6 +640,12 @@ func (o ModelArtifactUpdate) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ModelSourceName) {
toSerialize["modelSourceName"] = o.ModelSourceName
}
+ if !IsNil(o.Uri) {
+ toSerialize["uri"] = o.Uri
+ }
+ if !IsNil(o.State) {
+ toSerialize["state"] = o.State
+ }
return toSerialize, nil
}
diff --git a/pkg/openapi/model_serve_model.go b/pkg/openapi/model_serve_model.go
index 2a5bed2492..30a3b5bed8 100644
--- a/pkg/openapi/model_serve_model.go
+++ b/pkg/openapi/model_serve_model.go
@@ -19,7 +19,6 @@ 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.
@@ -33,7 +32,8 @@ type ServeModel struct {
// 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"`
+ LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
// ID of the `ModelVersion` that was served in `InferenceService`.
ModelVersionId string `json:"modelVersionId"`
}
@@ -60,38 +60,6 @@ func NewServeModelWithDefaults() *ServeModel {
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) {
@@ -316,6 +284,38 @@ func (o *ServeModel) SetLastUpdateTimeSinceEpoch(v string) {
o.LastUpdateTimeSinceEpoch = &v
}
+// 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
+}
+
// GetModelVersionId returns the ModelVersionId field value
func (o *ServeModel) GetModelVersionId() string {
if o == nil {
@@ -350,9 +350,6 @@ func (o ServeModel) MarshalJSON() ([]byte, error) {
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
}
@@ -374,6 +371,9 @@ func (o ServeModel) ToMap() (map[string]interface{}, error) {
if !IsNil(o.LastUpdateTimeSinceEpoch) {
toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
}
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
toSerialize["modelVersionId"] = o.ModelVersionId
return toSerialize, nil
}
diff --git a/pkg/openapi/model_serve_model_create.go b/pkg/openapi/model_serve_model_create.go
index b4ea488096..00ea932e82 100644
--- a/pkg/openapi/model_serve_model_create.go
+++ b/pkg/openapi/model_serve_model_create.go
@@ -19,7 +19,6 @@ 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.
@@ -27,7 +26,8 @@ type ServeModelCreate struct {
// 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"`
+ Name *string `json:"name,omitempty"`
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
// ID of the `ModelVersion` that was served in `InferenceService`.
ModelVersionId string `json:"modelVersionId"`
}
@@ -54,38 +54,6 @@ func NewServeModelCreateWithDefaults() *ServeModelCreate {
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) {
@@ -214,6 +182,38 @@ func (o *ServeModelCreate) SetName(v string) {
o.Name = &v
}
+// 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
+}
+
// GetModelVersionId returns the ModelVersionId field value
func (o *ServeModelCreate) GetModelVersionId() string {
if o == nil {
@@ -248,9 +248,6 @@ func (o ServeModelCreate) MarshalJSON() ([]byte, error) {
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
}
@@ -263,6 +260,9 @@ func (o ServeModelCreate) ToMap() (map[string]interface{}, error) {
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
toSerialize["modelVersionId"] = o.ModelVersionId
return toSerialize, nil
}
diff --git a/pkg/openapi/model_serve_model_update.go b/pkg/openapi/model_serve_model_update.go
index f7d826aaaa..5e9a8a305e 100644
--- a/pkg/openapi/model_serve_model_update.go
+++ b/pkg/openapi/model_serve_model_update.go
@@ -19,13 +19,13 @@ 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"`
+ ExternalId *string `json:"externalId,omitempty"`
+ LastKnownState *ExecutionState `json:"lastKnownState,omitempty"`
}
// NewServeModelUpdate instantiates a new ServeModelUpdate object
@@ -49,38 +49,6 @@ func NewServeModelUpdateWithDefaults() *ServeModelUpdate {
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) {
@@ -177,6 +145,38 @@ func (o *ServeModelUpdate) SetExternalId(v string) {
o.ExternalId = &v
}
+// 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
+}
+
func (o ServeModelUpdate) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -187,9 +187,6 @@ func (o ServeModelUpdate) MarshalJSON() ([]byte, error) {
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
}
@@ -199,6 +196,9 @@ func (o ServeModelUpdate) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
+ if !IsNil(o.LastKnownState) {
+ toSerialize["lastKnownState"] = o.LastKnownState
+ }
return toSerialize, nil
}
diff --git a/scripts/deploy_on_kind.sh b/scripts/deploy_on_kind.sh
index 3bd306cd43..c8cc63ba25 100755
--- a/scripts/deploy_on_kind.sh
+++ b/scripts/deploy_on_kind.sh
@@ -35,14 +35,14 @@ else
kubectl create namespace "$MR_NAMESPACE"
fi
-kubectl apply -k manifests/kustomize/overlays/db
+kubectl apply -k manifests/kustomize/overlays/db -n "$MR_NAMESPACE"
kubectl patch deployment -n "$MR_NAMESPACE" model-registry-deployment \
--patch '{"spec": {"template": {"spec": {"containers": [{"name": "rest-container", "image": "'$IMG'", "imagePullPolicy": "IfNotPresent"}]}}}}'
if ! kubectl wait --for=condition=available -n "$MR_NAMESPACE" deployment/model-registry-db --timeout=5m ; then
kubectl events -A
- kubectl describe deployment/model-registry-db -n kubeflow
- kubectl logs deployment/model-registry-db -n kubeflow
+ kubectl describe deployment/model-registry-db -n "$MR_NAMESPACE"
+ kubectl logs deployment/model-registry-db -n "$MR_NAMESPACE"
exit 1
fi
diff --git a/test/robot/UserStory.robot b/test/robot/UserStory.robot
index c4dea1c12e..1fdf1a735b 100644
--- a/test/robot/UserStory.robot
+++ b/test/robot/UserStory.robot
@@ -100,6 +100,7 @@ As a MLOps engineer I would like to store an owner for the RegisteredModel
And Should be equal ${r["owner"]} My owner
As a MLOps engineer I want to track a Model from an S3 bucket Data Connection
+ # MIGRATED TO test_register_model_with_s3_data_connection in pytest
${data_connection_name} Set Variable aws-connection-my-data-connection
${s3_bucket} Set Variable my-bucket
${s3_path} Set Variable my-path
|