This affects
specification/cognitiveservices/AnomalyDetector
specification/storage/Microsoft.QueueStorage
specification/frontdoor/resource-manager/Microsoft.Network/FrontDoor
Errors:
#1:
error[E0432]: unresolved import `crate::univariate::generated::models::UnivariateEntireDetectionResult`
--> spec\AnomalyDetector\src\univariate\generated\clients\anomaly_detector_univariate_client.rs:11:33
|
11 | UnivariateDetectionOptions, UnivariateEntireDetectionResult, UnivariateLastDetectionResult,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| no `UnivariateEntireDetectionResult` in `univariate::generated::models`
| help: a similar name exists in the module: `UnivariateLastDetectionResult`
#2:
error[E0432]: unresolved import `crate::models::SentMessage`
--> spec\QueueStorage\src\generated\clients\queue_client.rs:16:5
|
16 | models::SentMessage,
| ^^^^^^^^^^^^^^^^^^^ no `SentMessage` in `generated::models`
#3:
error[E0432]: unresolved import `super::RouteConfiguration`
--> spec\rmFrontDoor\src\generated\models\models.rs:9:928
|
9 | ...sioningState, ResourceType, RouteConfiguration, RoutingRuleEnabledState, RuleType, RulesEngineMatchVariable, RulesEngineOperator, Scrubbing...
| ^^^^^^^^^^^^^^^^^^
| |
| no `RouteConfiguration` in `generated::models`
| help: a similar name exists in the module: `CacheConfiguration`
error[E0432]: unresolved import `super::RouteConfiguration`
--> spec\rmFrontDoor\src\generated\models\models_impl.rs:8:1262
|
8 | ...ers, RedirectConfiguration, RouteConfiguration, RulesEngine, RulesEngineListResult, TagsObject, ValidateCustomDomainInput, WebApplicationFi...
| ^^^^^^^^^^^^^^^^^^
| |
| no `RouteConfiguration` in `generated::models`
| help: a similar name exists in the module: `CacheConfiguration`
error[E0432]: unresolved import `super::RouteConfiguration`
--> spec\rmFrontDoor\src\generated\models\unions_serde.rs:7:61
|
7 | use super::{ForwardingConfiguration, RedirectConfiguration, RouteConfiguration, UnknownRouteConfigurationodatatype, };
| ^^^^^^^^^^^^^^^^^^
| |
| no `RouteConfiguration` in `generated::models`
| help: a similar name exists in the module: `CacheConfiguration`
They are being used in those files where the import fails, i.e.
#1:
#[tracing::function("AnomalyDetector.Univariate.detectUnivariateEntireSeries")]
pub async fn detect_univariate_entire_series(
&self,
options_param: RequestContent<UnivariateDetectionOptions>,
options: Option<AnomalyDetectorUnivariateClientDetectUnivariateEntireSeriesOptions<'_>>,
) -> Result<Response<UnivariateEntireDetectionResult>> {
#2:
#[tracing::function("Storage.Queues.QueueClient.sendMessage")]
pub async fn send_message(
&self,
queue_message: RequestContent<QueueMessage, XmlFormat>,
options: Option<QueueClientSendMessageOptions<'_>>,
) -> Result<Response<SentMessage, XmlFormat>> {
#3:
// models.rs
/// The JSON object that contains the properties required to create a routing rule.
#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
pub struct RoutingRuleProperties {
...
/// A reference to the routing configuration.
#[serde(rename = "routeConfiguration", skip_serializing_if = "Option::is_none")]
pub route_configuration: Option<RouteConfiguration>,
}
/// One or more actions that will execute, modifying the request and/or response.
#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
pub struct RulesEngineAction {
...
/// Override the route configuration.
#[serde(rename = "routeConfigurationOverride", skip_serializing_if = "Option::is_none")]
pub route_configuration_override: Option<RouteConfiguration>,
}
// models_impl.rs
impl From<ForwardingConfiguration> for RouteConfiguration {
fn from(value: ForwardingConfiguration) -> Self {
Self::ForwardingConfiguration(value)
}
}
impl From<RedirectConfiguration> for RouteConfiguration {
fn from(value: RedirectConfiguration) -> Self {
Self::RedirectConfiguration(value)
}
}
// unions_serde.rs
impl Serialize for RouteConfiguration {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
match self {
RouteConfiguration::ForwardingConfiguration(forwarding_configuration) => {
ForwardingConfiguration::serialize(forwarding_configuration, serializer)
},
RouteConfiguration::RedirectConfiguration(redirect_configuration) => {
RedirectConfiguration::serialize(redirect_configuration, serializer)
},
RouteConfiguration::Unknown@odata.type {odata_type, } => {
UnknownRouteConfigurationodatatype::serialize(&UnknownRouteConfigurationodatatype { odata_type }, serializer)
},
}
}
For the first case, UnivariateEntireDetectionResult is nowhere to be found.
For the second case, it also does not exist, but there is a SentMessageInternal type:
#2:
// models.rs
/// The object returned in the QueueMessageList array when calling Put Message on a
/// Queue
#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
#[non_exhaustive]
pub struct SentMessageInternal {
/// The time that the Message will expire and be automatically deleted.
#[serde(
default,
rename = "ExpirationTime",
skip_serializing_if = "Option::is_none",
with = "azure_core::time::rfc7231::option"
)]
pub expiration_time: Option<OffsetDateTime>,
/// The time the Message was inserted into the Queue.
#[serde(
default,
rename = "InsertionTime",
skip_serializing_if = "Option::is_none",
with = "azure_core::time::rfc7231::option"
)]
pub insertion_time: Option<OffsetDateTime>,
/// The Id of the Message.
#[serde(rename = "MessageId", skip_serializing_if = "Option::is_none")]
pub message_id: Option<String>,
/// This value is required to delete the Message. If deletion fails using this
/// PopReceipt then the message has been dequeued by another client.
#[serde(rename = "PopReceipt", skip_serializing_if = "Option::is_none")]
pub pop_receipt: Option<String>,
/// The time that the message will again become visible in the Queue.
#[serde(
default,
rename = "TimeNextVisible",
skip_serializing_if = "Option::is_none",
with = "azure_core::time::rfc7231::option"
)]
pub time_next_visible: Option<OffsetDateTime>,
}
For the third case, the definition can be found in unions.rs:
#3:
#[doc = r#"Base class for all types of Route."#]
#[derive(Clone, Deserialize, SafeDebug)]
#[serde(tag = "@odata.type")]
pub enum RouteConfiguration {
#[serde(rename = "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration")]
ForwardingConfiguration(ForwardingConfiguration),
#[serde(rename = "#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration")]
RedirectConfiguration(RedirectConfiguration),
#[serde(untagged)]
Unknown@odata.type {
odata_type: Option<String>,
},
}
TSPs:
#1
@doc("Response of the entire anomaly detection.")
model UnivariateEntireDetectionResult {
@doc("""
Frequency extracted from the series. Zero means no recurrent pattern has been
found.
""")
period: int32;
@doc("""
Expected value for each input point. The index of the
array is consistent with the input series.
""")
expectedValues: float32[];
@doc("""
Upper margin of each input point. UpperMargin is used to
calculate upperBoundary, which is equal to expectedValue + (100 -
marginScale)*upperMargin. Anomalies in the response can be filtered by
upperBoundary and lowerBoundary. Adjusting the marginScale value can help filter less
significant anomalies on the client side. The index of the array is
consistent with the input series.
""")
upperMargins: float32[];
@doc("""
Lower margin of each input point. LowerMargin is used to
calculate lowerBoundary, which is equal to expectedValue - (100 -
marginScale)*lowerMargin. Points between the boundary can be marked as normal
ones on the client side. The index of the array is consistent with the input
series.
""")
lowerMargins: float32[];
@doc("""
Anomaly properties for each input point. True means an
anomaly (either negative or positive) has been detected. The index of the array
is consistent with the input series.
""")
isAnomaly: boolean[];
@doc("""
Anomaly status in a negative direction for each input
point. True means a negative anomaly has been detected. A negative anomaly
means the point is detected as an anomaly and its real value is smaller than
the expected one. The index of the array is consistent with the input series.
""")
isNegativeAnomaly: boolean[];
@doc("""
Anomaly status in a positive direction for each input
point. True means a positive anomaly has been detected. A positive anomaly
means the point is detected as an anomaly and its real value is larger than the
expected one. The index of the array is consistent with the input series.
""")
isPositiveAnomaly: boolean[];
@doc("""
Severity score for each input point. The larger the value is, the more
severe the anomaly is. For normal points, the severity is always 0.
""")
severity?: float32[];
}
...
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Azure core RpcOperation does not support custom error response"
// https://github.com/Azure/typespec-azure/issues/2795
@route("timeseries/entire/detect")
@summary("Detect anomalies for the entire series in batch.")
@doc("""
This operation generates a model with an entire series. Each point is detected
with the same model. With this method, points before and after a certain point
are used to determine whether it's an anomaly. The entire detection can give the
user an overall status of the time series.
""")
op detectUnivariateEntireSeries is UnivariateServiceAction<
// TParams
{
@doc("Method of univariate anomaly detection.")
@bodyRoot
options: UnivariateDetectionOptions;
},
// TResponse
UnivariateEntireDetectionResult
>;
#2:
@@clientName(Storage.Queues.SentMessage, "SentMessageInternal", "rust");
@@alternateType(Storage.Queues.ListOfSentMessage,
{
identity: "crate::models::SentMessage",
},
"rust"
);
...
/**
* List wrapper for EnqueuedMessage array
*/
@Xml.name("QueueMessagesList")
model ListOfSentMessage {
/**
* The list of enqueued messages.
*/
@Xml.unwrapped
@Xml.name("QueueMessage")
items: Array<SentMessage>;
}
/**
* The object returned in the QueueMessageList array when calling Put Message on a
* Queue
*/
model SentMessage {
/**
* The Id of the Message.
*/
@Xml.name("MessageId") messageId: string;
/**
* The time the Message was inserted into the Queue.
*/
@Xml.name("InsertionTime")
@encode("rfc7231")
insertionTime: utcDateTime;
/**
* The time that the Message will expire and be automatically deleted.
*/
@Xml.name("ExpirationTime")
@encode("rfc7231")
expirationTime: utcDateTime;
/**
* This value is required to delete the Message. If deletion fails using this
* PopReceipt then the message has been dequeued by another client.
*/
@Xml.name("PopReceipt") popReceipt: string;
/**
* The time that the message will again become visible in the Queue.
*/
@Xml.name("TimeNextVisible")
@encode("rfc7231")
timeNextVisible: utcDateTime;
}
/**
* The Enqueue operation adds a new message to the back of the message queue. A
* visibility timeout can also be specified to make the message invisible until
* the visibility timeout expires. A message must be in a format that can be
* included in an XML request with UTF-8 encoding. The encoded message can be up
* to 64 KB in size for versions 2011-08-18 and newer, or 8 KB in size for
* previous versions.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Existing API"
#suppress "@azure-tools/typespec-azure-core/operation-missing-api-version" "Existing API. Storage API version parameter pre-dates current guidance."
@post
@route("messages")
sendMessage is StorageOperation<
{
...VisibilityTimeoutParameter;
/**
* Optional. Specifies the time-to-live interval for the message, in seconds.
* Prior to version 2017-07-29, the maximum time-to-live allowed is 7 days. For
* version 2017-07-29 or later, the maximum time-to-live can be any positive
* number, as well as -1 indicating that the message does not expire. If this
* parameter is omitted, the default time-to-live is 7 days.
*/
@minValue(-1)
@query("messagettl")
messageTimeToLive?: int32;
...TimeoutParameter;
/** A Message object which can be stored in a Queue */
@bodyRoot
queueMessage: QueueMessage;
},
{
@statusCode statusCode: 201;
@bodyRoot body: ListOfSentMessage;
}
>;
#3:
/**
* One or more actions that will execute, modifying the request and/or response.
*/
model RulesEngineAction {
/**
* A list of header actions to apply from the request from AFD to the origin.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
requestHeaderActions?: HeaderAction[];
/**
* A list of header actions to apply from the response from AFD to the client.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
responseHeaderActions?: HeaderAction[];
/**
* Override the route configuration.
*/
routeConfigurationOverride?: RouteConfiguration;
}
...
/**
* Base class for all types of Route.
*/
@discriminator("@odata.type")
model RouteConfiguration {
#suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
#suppress "@azure-tools/typespec-azure-core/no-string-discriminator" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
`@odata.type`: string;
}
...
/**
* Routing rules to apply to an endpoint
*/
model RoutingRuleUpdateParameters {
/**
* Frontend endpoints associated with this rule
*/
frontendEndpoints?: SubResource[];
/**
* Protocol schemes to match for this rule
*/
acceptedProtocols?: FrontDoorProtocol[];
/**
* The route patterns of the rule.
*/
patternsToMatch?: string[];
/**
* Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
*/
enabledState?: RoutingRuleEnabledState;
/**
* A reference to the routing configuration.
*/
routeConfiguration?: RouteConfiguration;
/**
* A reference to a specific Rules Engine Configuration to apply to this route.
*/
rulesEngine?: SubResource;
/**
* Defines the Web Application Firewall policy for each routing rule (if applicable)
*/
webApplicationFirewallPolicyLink?: RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink;
}
...
/**
* Describes Forwarding Route.
*/
model ForwardingConfiguration extends RouteConfiguration {
/**
* A custom path used to rewrite resource paths matched by this rule. Leave empty to use incoming path.
*/
customForwardingPath?: string;
/**
* Protocol this rule will use when forwarding traffic to backends.
*/
forwardingProtocol?: FrontDoorForwardingProtocol;
/**
* The caching configuration associated with this rule.
*/
cacheConfiguration?: CacheConfiguration;
/**
* A reference to the BackendPool which this rule routes to.
*/
backendPool?: SubResource;
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
`@odata.type`: "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration";
}
...
/**
* Describes Redirect Route.
*/
model RedirectConfiguration extends RouteConfiguration {
/**
* The redirect type the rule will use when redirecting traffic.
*/
redirectType?: FrontDoorRedirectType;
/**
* The protocol of the destination to where the traffic is redirected
*/
redirectProtocol?: FrontDoorRedirectProtocol;
/**
* Host to redirect. Leave empty to use the incoming host as the destination host.
*/
customHost?: string;
/**
* The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.
*/
customPath?: string;
/**
* Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.
*/
customFragment?: string;
/**
* The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. The first ? and & will be added automatically so do not include them in the front, but do separate multiple query strings with &.
*/
customQueryString?: string;
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
`@odata.type`: "#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration";
}
This affects
specification/cognitiveservices/AnomalyDetectorspecification/storage/Microsoft.QueueStoragespecification/frontdoor/resource-manager/Microsoft.Network/FrontDoorErrors:
#1:#2:#3:They are being used in those files where the import fails, i.e.
#1:#2:#3:For the first case,
UnivariateEntireDetectionResultis nowhere to be found.For the second case, it also does not exist, but there is a
SentMessageInternaltype:#2:For the third case, the definition can be found in
unions.rs:#3:TSPs:
#1#2:#3: