Skip to content

Commit

Permalink
Add ID properties to invoke results (#387)
Browse files Browse the repository at this point in the history
* Generation code

* Schema

* Node.js

* Python

* .NET

* Go
  • Loading branch information
mikhailshilkov authored Dec 11, 2020
1 parent 62ae495 commit 93ea374
Show file tree
Hide file tree
Showing 20,350 changed files with 142,246 additions and 5,125 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4,907 changes: 4,902 additions & 5 deletions provider/cmd/pulumi-resource-azure-nextgen/schema.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions provider/pkg/gen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ func (g *packageGenerator) genResources(prov, typeName string, resource *openapi

gen.escapeCSharpNames(typeName, resourceResponse)

// Id is a property of the base Custom Resource, we don't want to introduce it on derived resources.
delete(resourceResponse.specs, "id")
resourceResponse.requiredSpecs.Delete("id")

// Add an alias for each API version that has the same path in it.
var aliases []pschema.AliasSpec
for _, version := range resource.CompatibleVersions {
Expand Down Expand Up @@ -753,10 +757,6 @@ func (m *moduleGenerator) genResponse(statusCodeResponses map[int]spec.Response,
continue
}

// Id is a property of the base Custom Resource, we don't want to introduce it on derived resources.
delete(result.specs, "id")
result.requiredSpecs.Delete("id")

// Special case the 'properties' output property as required.
// This should be gone when we apply flattening.
if _, ok := result.specs["properties"]; ok {
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/Latest/GetAuthorization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public sealed class GetAuthorizationResult
/// </summary>
public readonly string ExpressRouteAuthorizationKey;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -72,6 +76,8 @@ private GetAuthorizationResult(

string expressRouteAuthorizationKey,

string id,

string name,

string provisioningState,
Expand All @@ -80,6 +86,7 @@ private GetAuthorizationResult(
{
ExpressRouteAuthorizationId = expressRouteAuthorizationId;
ExpressRouteAuthorizationKey = expressRouteAuthorizationKey;
Id = id;
Name = name;
ProvisioningState = provisioningState;
Type = type;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/Latest/GetCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public sealed class GetClusterResult
/// </summary>
public readonly ImmutableArray<string> Hosts;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -82,6 +86,8 @@ private GetClusterResult(

ImmutableArray<string> hosts,

string id,

string name,

string provisioningState,
Expand All @@ -93,6 +99,7 @@ private GetClusterResult(
ClusterId = clusterId;
ClusterSize = clusterSize;
Hosts = hosts;
Id = id;
Name = name;
ProvisioningState = provisioningState;
Sku = sku;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/Latest/GetHcxEnterpriseSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public sealed class GetHcxEnterpriseSiteResult
/// </summary>
public readonly string ActivationKey;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -66,13 +70,16 @@ public sealed class GetHcxEnterpriseSiteResult
private GetHcxEnterpriseSiteResult(
string activationKey,

string id,

string name,

string status,

string type)
{
ActivationKey = activationKey;
Id = id;
Name = name;
Status = status;
Type = type;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/Latest/GetPrivateCloud.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public sealed class GetPrivateCloudResult
/// </summary>
public readonly Outputs.EndpointsResponse Endpoints;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// vCenter Single Sign On Identity Sources
/// </summary>
public readonly ImmutableArray<Outputs.IdentitySourceResponse> IdentitySources;
Expand Down Expand Up @@ -122,6 +126,8 @@ private GetPrivateCloudResult(

Outputs.EndpointsResponse endpoints,

string id,

ImmutableArray<Outputs.IdentitySourceResponse> identitySources,

string? internet,
Expand Down Expand Up @@ -158,6 +164,7 @@ private GetPrivateCloudResult(
{
Circuit = circuit;
Endpoints = endpoints;
Id = id;
IdentitySources = identitySources;
Internet = internet;
Location = location;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20190809Preview/GetCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public GetClusterArgs()
[OutputType]
public sealed class GetClusterResult
{
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
Expand All @@ -60,12 +64,15 @@ public sealed class GetClusterResult

[OutputConstructor]
private GetClusterResult(
string id,

string name,

Outputs.ClusterPropertiesResponse properties,

string type)
{
Id = id;
Name = name;
Properties = properties;
Type = type;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20190809Preview/GetPrivateCloud.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public GetPrivateCloudArgs()
[OutputType]
public sealed class GetPrivateCloudResult
{
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource location
/// </summary>
Expand Down Expand Up @@ -66,6 +70,8 @@ public sealed class GetPrivateCloudResult

[OutputConstructor]
private GetPrivateCloudResult(
string id,

string? location,

string name,
Expand All @@ -78,6 +84,7 @@ private GetPrivateCloudResult(

string type)
{
Id = id;
Location = location;
Name = name;
Properties = properties;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20200320/GetAuthorization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public sealed class GetAuthorizationResult
/// </summary>
public readonly string ExpressRouteAuthorizationKey;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -72,6 +76,8 @@ private GetAuthorizationResult(

string expressRouteAuthorizationKey,

string id,

string name,

string provisioningState,
Expand All @@ -80,6 +86,7 @@ private GetAuthorizationResult(
{
ExpressRouteAuthorizationId = expressRouteAuthorizationId;
ExpressRouteAuthorizationKey = expressRouteAuthorizationKey;
Id = id;
Name = name;
ProvisioningState = provisioningState;
Type = type;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20200320/GetCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public sealed class GetClusterResult
/// </summary>
public readonly ImmutableArray<string> Hosts;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -82,6 +86,8 @@ private GetClusterResult(

ImmutableArray<string> hosts,

string id,

string name,

string provisioningState,
Expand All @@ -93,6 +99,7 @@ private GetClusterResult(
ClusterId = clusterId;
ClusterSize = clusterSize;
Hosts = hosts;
Id = id;
Name = name;
ProvisioningState = provisioningState;
Sku = sku;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20200320/GetHcxEnterpriseSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public sealed class GetHcxEnterpriseSiteResult
/// </summary>
public readonly string ActivationKey;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -66,13 +70,16 @@ public sealed class GetHcxEnterpriseSiteResult
private GetHcxEnterpriseSiteResult(
string activationKey,

string id,

string name,

string status,

string type)
{
ActivationKey = activationKey;
Id = id;
Name = name;
Status = status;
Type = type;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20200320/GetPrivateCloud.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public sealed class GetPrivateCloudResult
/// </summary>
public readonly Outputs.EndpointsResponse Endpoints;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// vCenter Single Sign On Identity Sources
/// </summary>
public readonly ImmutableArray<Outputs.IdentitySourceResponse> IdentitySources;
Expand Down Expand Up @@ -122,6 +126,8 @@ private GetPrivateCloudResult(

Outputs.EndpointsResponse endpoints,

string id,

ImmutableArray<Outputs.IdentitySourceResponse> identitySources,

string? internet,
Expand Down Expand Up @@ -158,6 +164,7 @@ private GetPrivateCloudResult(
{
Circuit = circuit;
Endpoints = endpoints;
Id = id;
IdentitySources = identitySources;
Internet = internet;
Location = location;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20200717Preview/GetAuthorization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public sealed class GetAuthorizationResult
/// </summary>
public readonly string ExpressRouteAuthorizationKey;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -72,6 +76,8 @@ private GetAuthorizationResult(

string expressRouteAuthorizationKey,

string id,

string name,

string provisioningState,
Expand All @@ -80,6 +86,7 @@ private GetAuthorizationResult(
{
ExpressRouteAuthorizationId = expressRouteAuthorizationId;
ExpressRouteAuthorizationKey = expressRouteAuthorizationKey;
Id = id;
Name = name;
ProvisioningState = provisioningState;
Type = type;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20200717Preview/GetCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public sealed class GetClusterResult
/// </summary>
public readonly ImmutableArray<string> Hosts;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -82,6 +86,8 @@ private GetClusterResult(

ImmutableArray<string> hosts,

string id,

string name,

string provisioningState,
Expand All @@ -93,6 +99,7 @@ private GetClusterResult(
ClusterId = clusterId;
ClusterSize = clusterSize;
Hosts = hosts;
Id = id;
Name = name;
ProvisioningState = provisioningState;
Sku = sku;
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/AVS/V20200717Preview/GetGlobalReachConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public sealed class GetGlobalReachConnectionResult
/// </summary>
public readonly string CircuitConnectionStatus;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string Id;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
Expand All @@ -82,6 +86,8 @@ private GetGlobalReachConnectionResult(

string circuitConnectionStatus,

string id,

string name,

string? peerExpressRouteCircuit,
Expand All @@ -93,6 +99,7 @@ private GetGlobalReachConnectionResult(
AddressPrefix = addressPrefix;
AuthorizationKey = authorizationKey;
CircuitConnectionStatus = circuitConnectionStatus;
Id = id;
Name = name;
PeerExpressRouteCircuit = peerExpressRouteCircuit;
ProvisioningState = provisioningState;
Expand Down
Loading

0 comments on commit 93ea374

Please sign in to comment.