-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathJobVersion.tsp
More file actions
80 lines (71 loc) · 2.15 KB
/
Copy pathJobVersion.tsp
File metadata and controls
80 lines (71 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Job.tsp";
using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
namespace Microsoft.Sql;
// FIXME: JobVersion has no properties property
/**
* A job version.
*/
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@parentResource(Job)
@Azure.ResourceManager.Legacy.feature(Features.JobVersions)
model JobVersion is Azure.ResourceManager.ProxyResource<never> {
...ResourceNameParameter<
Resource = JobVersion,
KeyName = "jobVersion",
SegmentName = "versions",
NamePattern = ""
>;
}
alias JobVersionOps = Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter;
...SubscriptionIdParameter;
...ResourceGroupParameter;
...Azure.ResourceManager.Legacy.Provider;
/** The name of the server. */
@path
@segment("servers")
@key
serverName: string;
/** The name of the job agent. */
@path
@segment("jobAgents")
@key
jobAgentName: string;
/** The name of the job. */
@path
@segment("jobs")
@key
jobName: string;
},
{
/** The version of the job to get. */
@path
@segment("versions")
@key
@Azure.ClientGenerator.Core.alternateType(string) // The jobVersion is name of the resource JobVersion which must be a string, but the swagger defines it as int32, so we need to use alternateType to make it backwards compatible with the swagger definition.
jobVersion: int32;
}
>;
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@armResourceOperations
@Azure.ResourceManager.Legacy.feature(Features.JobVersions)
interface JobVersions {
/**
* Gets a job version.
*/
get is JobVersionOps.Read<JobVersion>;
/**
* Gets all versions of a job.
*/
listByJob is ArmResourceListByParent<JobVersion>;
}
@@doc(JobVersion.name, "The version of the job to get.");