Skip to content

Commit

Permalink
[EG] mark internal all (Azure#29366)
Browse files Browse the repository at this point in the history
* internal csharp

* remove - apply to all

* update - js doesnt recognize internal?

* try this

* tsp format

* update

* update version
  • Loading branch information
l0lawrence authored Jun 7, 2024
1 parent e90dc8b commit 25afa22
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
32 changes: 30 additions & 2 deletions specification/eventgrid/Azure.Messaging.EventGrid/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -118,31 +118,59 @@ namespace Customizations {

// All Language customizations

// publishCloudEvent access level
//Operation Access Level
@@access(publishCloudEvent, Access.internal, "python");
@@access(publishCloudEvent, Access.internal, "csharp");
@@access(publishCloudEvent, Access.internal, "java");
@@access(publishCloudEvent, Access.internal, "javascript");

// publishCloudEvents access level
@@access(publishCloudEvents, Access.internal, "python");
@@access(publishCloudEvents, Access.internal, "csharp");
@@access(publishCloudEvents, Access.internal, "java");
@@access(publishCloudEvents, Access.internal, "javascript");

@@access(receiveCloudEvents, Access.internal, "python");
@@access(acknowledgeCloudEvents, Access.internal, "python");
@@access(releaseCloudEvents, Access.internal, "python");
@@access(rejectCloudEvents, Access.internal, "python");
@@access(renewCloudEventLocks, Access.internal, "python");

@@access(receiveCloudEvents, Access.internal, "csharp");
@@access(acknowledgeCloudEvents, Access.internal, "csharp");
@@access(releaseCloudEvents, Access.internal, "csharp");
@@access(rejectCloudEvents, Access.internal, "csharp");
@@access(renewCloudEventLocks, Access.internal, "csharp");

@@access(receiveCloudEvents, Access.internal, "java");
@@access(acknowledgeCloudEvents, Access.internal, "java");
@@access(releaseCloudEvents, Access.internal, "java");
@@access(rejectCloudEvents, Access.internal, "java");
@@access(renewCloudEventLocks, Access.internal, "java");

@@access(receiveCloudEvents, Access.internal, "javascript");
@@access(acknowledgeCloudEvents, Access.internal, "javascript");
@@access(releaseCloudEvents, Access.internal, "javascript");
@@access(rejectCloudEvents, Access.internal, "javascript");
@@access(renewCloudEventLocks, Access.internal, "javascript");

//Mark models as public (except ReceiveResult, PublishResult)
//BUG: Bypassing Go for now as it marks all models as internal
@@access(AcknowledgeResult, Access.public);
@@access(ReleaseResult, Access.public);
@@access(RejectResult, Access.public);
@@access(RenewCloudEventLocksResult, Access.public);
@@access(ReleaseDelay, Access.public);
@@access(FailedLockToken, Access.public);

//Rename Enum
@@clientName(ReleaseDelay.By0Seconds, "NoDelay");
@@clientName(ReleaseDelay.By10Seconds, "TenSeconds");
@@clientName(ReleaseDelay.By3600Seconds, "OneHour");
@@clientName(ReleaseDelay.By600Seconds, "TenMinutes");
@@clientName(ReleaseDelay.By60Seconds, "OneMinute");

//Rename RenewLocksResult
@@clientName(RenewCloudEventLocksResult, "RenewLocksResult");

//Rename value to details (ReceiveResult internal)
@@clientName(ReceiveResult.value, "details");
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ options:
azure-resource-provider-folder: "data-plane"
"@azure-tools/typespec-python":
package-pprint-name: '"Azure Event Grid"'
package-version: 4.12.0b1
package-version: 4.20.0
package-dir: "azure-eventgrid"
package-name: "{package-dir}"
emitter-output-dir: "{project-root}/{service-dir}/{package-name}"
Expand Down

0 comments on commit 25afa22

Please sign in to comment.