Skip to content

Commit 1720b24

Browse files
committed
Add Create Job Schedule operation override
1 parent 9e9b440 commit 1720b24

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

specification/batch/Azure.Batch/client.tsp

-4
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ interface BatchClient {
166166
"terminateJobScheduleInternal",
167167
"java"
168168
);
169-
@@clientName(BatchClient.createJobSchedule,
170-
"createJobScheduleInternal",
171-
"java"
172-
);
173169
@@clientName(BatchClient.listJobSchedules, "listJobSchedulesInternal", "java");
174170

175171
@@clientName(BatchClient.createTask, "createTaskInternal", "java");

specification/batch/Azure.Batch/java-client.tsp

+24
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,27 @@ op getJobTaskCountsCustomization is Azure.Batch.ReadOperationNew<
286286
getJobTaskCountsCustomization,
287287
"java"
288288
);
289+
290+
// Create Job Schedule Operation
291+
@doc("Optional parameters for Create Job Schedule operation.")
292+
model CreateBatchJobScheduleOptions {
293+
...Azure.Batch.CommonJsonParameters;
294+
}
295+
296+
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" ""
297+
@doc("Custom override for Create Job Schedule operation.")
298+
@route("/jobschedules")
299+
op createJobScheduleCustomization is Azure.Batch.CreateOperationNew<
300+
{
301+
...Azure.Batch.CreateJobScheduleParameters;
302+
303+
@doc("Optional parameters for Create Job Schedule operation.")
304+
options?: CreateBatchJobScheduleOptions;
305+
},
306+
void
307+
>;
308+
309+
@@override(Azure.Batch.JobSchedules.createJobSchedule,
310+
createJobScheduleCustomization,
311+
"java"
312+
);

specification/batch/Azure.Batch/routes.tsp

+11-5
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,14 @@ interface Jobs {
749749
>;
750750
}
751751

752+
// Job Schedule Parameter Aliases
753+
alias CreateJobScheduleParameters = {
754+
@doc("The Job Schedule to be created.")
755+
@bodyRoot
756+
jobSchedule: BatchJobScheduleCreateContent;
757+
};
758+
759+
// Job Schedule Interface
752760
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" ""
753761
#suppress "@azure-tools/typespec-azure-core/no-response-body" ""
754762
#suppress "@azure-tools/typespec-azure-core/no-error-status-codes" ""
@@ -907,12 +915,10 @@ interface JobSchedules {
907915
@summary("Creates a Job Schedule to the specified Account.")
908916
@doc("Creates a Job Schedule to the specified Account.")
909917
@route("/jobschedules")
910-
@clientName("createJobScheduleInternal", "java")
911-
createJobSchedule is CreateOperation<
918+
createJobSchedule is CreateOperationNew<
912919
{
913-
@doc("The Job Schedule to be created.")
914-
@bodyRoot
915-
jobSchedule: BatchJobScheduleCreateContent;
920+
...CommonJsonParameters;
921+
...CreateJobScheduleParameters;
916922
},
917923
{}
918924
>;

0 commit comments

Comments
 (0)