|
15 | 15 | from .._model_base import rest_discriminator, rest_field |
16 | 16 | from ._enums import ( |
17 | 17 | AuthenticationType, |
| 18 | + OpenApiAuthType, |
18 | 19 | RunStepType, |
19 | 20 | VectorStoreChunkingStrategyRequestType, |
20 | 21 | VectorStoreChunkingStrategyResponseType, |
@@ -501,7 +502,7 @@ class ToolDefinition(_model_base.Model): |
501 | 502 | You probably want to use the sub-classes and not this class directly. Known sub-classes are: |
502 | 503 | AzureAISearchToolDefinition, BingGroundingToolDefinition, CodeInterpreterToolDefinition, |
503 | 504 | MicrosoftFabricToolDefinition, FileSearchToolDefinition, FunctionToolDefinition, |
504 | | - SharepointToolDefinition |
| 505 | + OpenApiToolDefinition, SharepointToolDefinition |
505 | 506 |
|
506 | 507 |
|
507 | 508 | :ivar type: The object type. Required. Default value is None. |
@@ -2871,6 +2872,271 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: |
2871 | 2872 | self.object: Literal["list"] = "list" |
2872 | 2873 |
|
2873 | 2874 |
|
| 2875 | +class OpenApiAuthDetails(_model_base.Model): |
| 2876 | + """authentication details for OpenApiFunctionDefinition. |
| 2877 | +
|
| 2878 | + You probably want to use the sub-classes and not this class directly. Known sub-classes are: |
| 2879 | + OpenApiAnonymousAuthDetails, OpenApiConnectionAuthDetails, OpenApiManagedAuthDetails |
| 2880 | +
|
| 2881 | +
|
| 2882 | + :ivar type: The type of authentication, must be anonymous/connection/managed_identity. |
| 2883 | + Required. Known values are: "anonymous", "connection", and "managed_identity". |
| 2884 | + :vartype type: str or ~azure.ai.projects.models.OpenApiAuthType |
| 2885 | + """ |
| 2886 | + |
| 2887 | + __mapping__: Dict[str, _model_base.Model] = {} |
| 2888 | + type: str = rest_discriminator(name="type") |
| 2889 | + """The type of authentication, must be anonymous/connection/managed_identity. Required. Known |
| 2890 | + values are: \"anonymous\", \"connection\", and \"managed_identity\".""" |
| 2891 | + |
| 2892 | + @overload |
| 2893 | + def __init__( |
| 2894 | + self, |
| 2895 | + *, |
| 2896 | + type: str, |
| 2897 | + ) -> None: ... |
| 2898 | + |
| 2899 | + @overload |
| 2900 | + def __init__(self, mapping: Mapping[str, Any]) -> None: |
| 2901 | + """ |
| 2902 | + :param mapping: raw JSON to initialize the model. |
| 2903 | + :type mapping: Mapping[str, Any] |
| 2904 | + """ |
| 2905 | + |
| 2906 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 2907 | + super().__init__(*args, **kwargs) |
| 2908 | + |
| 2909 | + |
| 2910 | +class OpenApiAnonymousAuthDetails(OpenApiAuthDetails, discriminator="anonymous"): |
| 2911 | + """Security details for OpenApi anonymous authentication. |
| 2912 | +
|
| 2913 | +
|
| 2914 | + :ivar type: The object type, which is always 'anonymous'. Required. |
| 2915 | + :vartype type: str or ~azure.ai.projects.models.ANONYMOUS |
| 2916 | + """ |
| 2917 | + |
| 2918 | + type: Literal[OpenApiAuthType.ANONYMOUS] = rest_discriminator(name="type") # type: ignore |
| 2919 | + """The object type, which is always 'anonymous'. Required.""" |
| 2920 | + |
| 2921 | + @overload |
| 2922 | + def __init__( |
| 2923 | + self, |
| 2924 | + ) -> None: ... |
| 2925 | + |
| 2926 | + @overload |
| 2927 | + def __init__(self, mapping: Mapping[str, Any]) -> None: |
| 2928 | + """ |
| 2929 | + :param mapping: raw JSON to initialize the model. |
| 2930 | + :type mapping: Mapping[str, Any] |
| 2931 | + """ |
| 2932 | + |
| 2933 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 2934 | + super().__init__(*args, type=OpenApiAuthType.ANONYMOUS, **kwargs) |
| 2935 | + |
| 2936 | + |
| 2937 | +class OpenApiConnectionAuthDetails(OpenApiAuthDetails, discriminator="connection"): |
| 2938 | + """Security details for OpenApi connection authentication. |
| 2939 | +
|
| 2940 | +
|
| 2941 | + :ivar type: The object type, which is always 'connection'. Required. |
| 2942 | + :vartype type: str or ~azure.ai.projects.models.CONNECTION |
| 2943 | + :ivar security_scheme: Connection auth security details. Required. |
| 2944 | + :vartype security_scheme: ~azure.ai.projects.models.OpenApiConnectionSecurityScheme |
| 2945 | + """ |
| 2946 | + |
| 2947 | + type: Literal[OpenApiAuthType.CONNECTION] = rest_discriminator(name="type") # type: ignore |
| 2948 | + """The object type, which is always 'connection'. Required.""" |
| 2949 | + security_scheme: "_models.OpenApiConnectionSecurityScheme" = rest_field() |
| 2950 | + """Connection auth security details. Required.""" |
| 2951 | + |
| 2952 | + @overload |
| 2953 | + def __init__( |
| 2954 | + self, |
| 2955 | + *, |
| 2956 | + security_scheme: "_models.OpenApiConnectionSecurityScheme", |
| 2957 | + ) -> None: ... |
| 2958 | + |
| 2959 | + @overload |
| 2960 | + def __init__(self, mapping: Mapping[str, Any]) -> None: |
| 2961 | + """ |
| 2962 | + :param mapping: raw JSON to initialize the model. |
| 2963 | + :type mapping: Mapping[str, Any] |
| 2964 | + """ |
| 2965 | + |
| 2966 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 2967 | + super().__init__(*args, type=OpenApiAuthType.CONNECTION, **kwargs) |
| 2968 | + |
| 2969 | + |
| 2970 | +class OpenApiConnectionSecurityScheme(_model_base.Model): |
| 2971 | + """Security scheme for OpenApi managed_identity authentication. |
| 2972 | +
|
| 2973 | +
|
| 2974 | + :ivar connection_id: Connection id for Connection auth type. Required. |
| 2975 | + :vartype connection_id: str |
| 2976 | + """ |
| 2977 | + |
| 2978 | + connection_id: str = rest_field() |
| 2979 | + """Connection id for Connection auth type. Required.""" |
| 2980 | + |
| 2981 | + @overload |
| 2982 | + def __init__( |
| 2983 | + self, |
| 2984 | + *, |
| 2985 | + connection_id: str, |
| 2986 | + ) -> None: ... |
| 2987 | + |
| 2988 | + @overload |
| 2989 | + def __init__(self, mapping: Mapping[str, Any]) -> None: |
| 2990 | + """ |
| 2991 | + :param mapping: raw JSON to initialize the model. |
| 2992 | + :type mapping: Mapping[str, Any] |
| 2993 | + """ |
| 2994 | + |
| 2995 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 2996 | + super().__init__(*args, **kwargs) |
| 2997 | + |
| 2998 | + |
| 2999 | +class OpenApiFunctionDefinition(_model_base.Model): |
| 3000 | + """The input definition information for an openapi function. |
| 3001 | +
|
| 3002 | +
|
| 3003 | + :ivar name: The name of the function to be called. Required. |
| 3004 | + :vartype name: str |
| 3005 | + :ivar description: A description of what the function does, used by the model to choose when |
| 3006 | + and how to call the function. |
| 3007 | + :vartype description: str |
| 3008 | + :ivar spec: The openapi function shape, described as a JSON Schema object. Required. |
| 3009 | + :vartype spec: any |
| 3010 | + :ivar auth: Open API authentication details. Required. |
| 3011 | + :vartype auth: ~azure.ai.projects.models.OpenApiAuthDetails |
| 3012 | + """ |
| 3013 | + |
| 3014 | + name: str = rest_field() |
| 3015 | + """The name of the function to be called. Required.""" |
| 3016 | + description: Optional[str] = rest_field() |
| 3017 | + """A description of what the function does, used by the model to choose when and how to call the |
| 3018 | + function.""" |
| 3019 | + spec: Any = rest_field() |
| 3020 | + """The openapi function shape, described as a JSON Schema object. Required.""" |
| 3021 | + auth: "_models.OpenApiAuthDetails" = rest_field() |
| 3022 | + """Open API authentication details. Required.""" |
| 3023 | + |
| 3024 | + @overload |
| 3025 | + def __init__( |
| 3026 | + self, |
| 3027 | + *, |
| 3028 | + name: str, |
| 3029 | + spec: Any, |
| 3030 | + auth: "_models.OpenApiAuthDetails", |
| 3031 | + description: Optional[str] = None, |
| 3032 | + ) -> None: ... |
| 3033 | + |
| 3034 | + @overload |
| 3035 | + def __init__(self, mapping: Mapping[str, Any]) -> None: |
| 3036 | + """ |
| 3037 | + :param mapping: raw JSON to initialize the model. |
| 3038 | + :type mapping: Mapping[str, Any] |
| 3039 | + """ |
| 3040 | + |
| 3041 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 3042 | + super().__init__(*args, **kwargs) |
| 3043 | + |
| 3044 | + |
| 3045 | +class OpenApiManagedAuthDetails(OpenApiAuthDetails, discriminator="managed_identity"): |
| 3046 | + """Security details for OpenApi managed_identity authentication. |
| 3047 | +
|
| 3048 | +
|
| 3049 | + :ivar type: The object type, which is always 'managed_identity'. Required. |
| 3050 | + :vartype type: str or ~azure.ai.projects.models.MANAGED_IDENTITY |
| 3051 | + :ivar security_scheme: Connection auth security details. Required. |
| 3052 | + :vartype security_scheme: ~azure.ai.projects.models.OpenApiManagedSecurityScheme |
| 3053 | + """ |
| 3054 | + |
| 3055 | + type: Literal[OpenApiAuthType.MANAGED_IDENTITY] = rest_discriminator(name="type") # type: ignore |
| 3056 | + """The object type, which is always 'managed_identity'. Required.""" |
| 3057 | + security_scheme: "_models.OpenApiManagedSecurityScheme" = rest_field() |
| 3058 | + """Connection auth security details. Required.""" |
| 3059 | + |
| 3060 | + @overload |
| 3061 | + def __init__( |
| 3062 | + self, |
| 3063 | + *, |
| 3064 | + security_scheme: "_models.OpenApiManagedSecurityScheme", |
| 3065 | + ) -> None: ... |
| 3066 | + |
| 3067 | + @overload |
| 3068 | + def __init__(self, mapping: Mapping[str, Any]) -> None: |
| 3069 | + """ |
| 3070 | + :param mapping: raw JSON to initialize the model. |
| 3071 | + :type mapping: Mapping[str, Any] |
| 3072 | + """ |
| 3073 | + |
| 3074 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 3075 | + super().__init__(*args, type=OpenApiAuthType.MANAGED_IDENTITY, **kwargs) |
| 3076 | + |
| 3077 | + |
| 3078 | +class OpenApiManagedSecurityScheme(_model_base.Model): |
| 3079 | + """Security scheme for OpenApi managed_identity authentication. |
| 3080 | +
|
| 3081 | +
|
| 3082 | + :ivar audience: Authentication scope for managed_identity auth type. Required. |
| 3083 | + :vartype audience: str |
| 3084 | + """ |
| 3085 | + |
| 3086 | + audience: str = rest_field() |
| 3087 | + """Authentication scope for managed_identity auth type. Required.""" |
| 3088 | + |
| 3089 | + @overload |
| 3090 | + def __init__( |
| 3091 | + self, |
| 3092 | + *, |
| 3093 | + audience: str, |
| 3094 | + ) -> None: ... |
| 3095 | + |
| 3096 | + @overload |
| 3097 | + def __init__(self, mapping: Mapping[str, Any]) -> None: |
| 3098 | + """ |
| 3099 | + :param mapping: raw JSON to initialize the model. |
| 3100 | + :type mapping: Mapping[str, Any] |
| 3101 | + """ |
| 3102 | + |
| 3103 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 3104 | + super().__init__(*args, **kwargs) |
| 3105 | + |
| 3106 | + |
| 3107 | +class OpenApiToolDefinition(ToolDefinition, discriminator="openapi"): |
| 3108 | + """The input definition information for an OpenAPI tool as used to configure an agent. |
| 3109 | +
|
| 3110 | +
|
| 3111 | + :ivar type: The object type, which is always 'openapi'. Required. Default value is "openapi". |
| 3112 | + :vartype type: str |
| 3113 | + :ivar openapi: The openapi function definition. Required. |
| 3114 | + :vartype openapi: ~azure.ai.projects.models.OpenApiFunctionDefinition |
| 3115 | + """ |
| 3116 | + |
| 3117 | + type: Literal["openapi"] = rest_discriminator(name="type") # type: ignore |
| 3118 | + """The object type, which is always 'openapi'. Required. Default value is \"openapi\".""" |
| 3119 | + openapi: "_models.OpenApiFunctionDefinition" = rest_field() |
| 3120 | + """The openapi function definition. Required.""" |
| 3121 | + |
| 3122 | + @overload |
| 3123 | + def __init__( |
| 3124 | + self, |
| 3125 | + *, |
| 3126 | + openapi: "_models.OpenApiFunctionDefinition", |
| 3127 | + ) -> None: ... |
| 3128 | + |
| 3129 | + @overload |
| 3130 | + def __init__(self, mapping: Mapping[str, Any]) -> None: |
| 3131 | + """ |
| 3132 | + :param mapping: raw JSON to initialize the model. |
| 3133 | + :type mapping: Mapping[str, Any] |
| 3134 | + """ |
| 3135 | + |
| 3136 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 3137 | + super().__init__(*args, type="openapi", **kwargs) |
| 3138 | + |
| 3139 | + |
2874 | 3140 | class RecurrenceSchedule(_model_base.Model): |
2875 | 3141 | """RecurrenceSchedule Definition. |
2876 | 3142 |
|
|
0 commit comments