Skip to content

Commit

Permalink
Revert optional/required params to match ve-common and hope the Updat…
Browse files Browse the repository at this point in the history
…e<T> model handles it correctly.
  • Loading branch information
tgoodyear committed Mar 7, 2025
1 parent 654d20a commit 2ad3ee7
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ union ActionPerformed {
@doc("Request Metadata for approvals request.")
model RequestMetadata {
@doc("Resource Action of the item being approved or declined.")
resourceAction?: string;
resourceAction: string;

@doc("Approval status.")
approvalStatus?: ApprovalStatus;
Expand Down Expand Up @@ -90,7 +90,7 @@ model ApprovalProperties {
parent2?: string;

@doc("Request metadata for the approval request.")
requestMetadata?: RequestMetadata;
requestMetadata: RequestMetadata;

@added(Microsoft.Mission.Versions.v2024_12_01_preview)
@OpenAPI.extension("x-ms-identifiers", #["approverEntraId"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ model CommunityEndpointProperties {
@added(Microsoft.Mission.Versions.v2024_06_01_preview)
@extension("x-ms-identifiers", #[])
@doc("Community Endpoint Rule Collection.")
ruleCollection?: CommunityEndpointDestinationRule[];
ruleCollection: CommunityEndpointDestinationRule[];

#suppress "@azure-tools/typespec-providerhub/non-breaking-versioning" "New version does not have any breaking change."
@removed(Microsoft.Mission.Versions.v2024_06_01_preview)
@extension("x-ms-identifiers", #["name"])
@doc("Destination Rule Collection.")
destinationRuleCollection?: DestinationRule[];
destinationRuleCollection: DestinationRule[];

@added(Microsoft.Mission.Versions.v2024_06_01_preview)
@doc("List of resource ids created by community endpoint.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ model EnclaveConnectionProperties {
state?: EnclaveConnectionState;

@doc("Community Resource Id.")
communityResourceId?: CommunityResourceId;
communityResourceId: CommunityResourceId;

@doc("Source Resource Id.")
sourceResourceId?: EnclaveConnectionSourceResourceId;
sourceResourceId: EnclaveConnectionSourceResourceId;

@doc("Source CIDR.")
sourceCidr?: string;
Expand All @@ -59,7 +59,7 @@ model EnclaveConnectionProperties {
ipGroup?: IPGroupResourceId;

@doc("Destination Endpoint Resource Id.")
destinationEndpointId?: DestinationEndpointResourceId;
destinationEndpointId: DestinationEndpointResourceId;

@doc("Provisioning State.")
@visibility(Lifecycle.Read)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ model EnclaveEndpointProperties {
@added(Microsoft.Mission.Versions.v2024_06_01_preview)
@extension("x-ms-identifiers", #[])
@doc("Enclave Endpoint Rule Collection.")
ruleCollection?: EnclaveEndpointDestinationRule[];
ruleCollection: EnclaveEndpointDestinationRule[];

#suppress "@azure-tools/typespec-providerhub/non-breaking-versioning" "New version does not have any breaking change."
@removed(Microsoft.Mission.Versions.v2024_06_01_preview)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ model ExternalConnectionProperties {
state?: ExternalConnectionState;

@doc("Community Resource Id.")
communityResourceId?: CommunityResourceId;
communityResourceId: CommunityResourceId;

@doc("The enclaves' resource IDs.")
enclaveIds?: VirtualEnclaveResourceId[];
enclaveIds: VirtualEnclaveResourceId[];

@doc("The external CIDR IP addresses.")
externalCidrs?: string[];
externalCidrs: string[];

@doc("List of resource ids modified by externalConnections.")
resourceCollection?: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,25 @@ model InternalConnectionProperties {
provisioningState?: ProvisioningState;

@doc("Specifies the type of internal connection. \n Possible values are:\n PrivateLink \n NetworkSecurityGroup")
connectionType?: InternalConnectionType;
connectionType: InternalConnectionType;

@doc("The state of the internalConnection.")
state?: InternalConnectionState;

@doc("Community Resource Id.")
communityResourceId?: CommunityResourceId;
communityResourceId: CommunityResourceId;

@doc("The destination enclave's resource ID.")
destinationEnclaveId?: VirtualEnclaveResourceId;
destinationEnclaveId: VirtualEnclaveResourceId;

@doc("The destination endpoint's resource ID.")
destinationEndpointId?: EndpointResourceId;
destinationEndpointId: EndpointResourceId;

@doc("The source enclave's resource ID.")
sourceEnclaveId?: VirtualEnclaveResourceId;
sourceEnclaveId: VirtualEnclaveResourceId;

@doc("The source CIDR IP addresses.")
sourceCidrs?: string[];
sourceCidrs: string[];

@doc("List of resource ids modified by internalConnections.")
resourceCollection?: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ model EnclaveAddressSpaces {
@doc("Maintenance Mode")
model MaintenanceModeConfiguration {
@doc("Current mode of Maintenance Mode Configuration")
mode?: "On" | "CanNotDelete" | "Off" | string;
mode: "On" | "CanNotDelete" | "Off" | string;

@doc("The user, group or service principal object affected by Maintenance Mode")
principals?: Principal[];
Expand All @@ -133,25 +133,20 @@ model MaintenanceModeConfiguration {

@doc("Virtual Enclave Resource properties")
model VirtualEnclaveProperties {
#suppress "@azure-tools/typespec-providerhub/non-breaking-versioning" "New version does not have any breaking change."
@removed(Microsoft.Mission.Versions.v2024_06_01_preview)
@doc("Virtual Enclave Description.")
description?: string;

@doc("Provisioning State.")
@visibility(Lifecycle.Read)
provisioningState?: ProvisioningState;

@doc("Virtual Network.")
enclaveVirtualNetwork?: EnclaveVirtualNetwork;
enclaveVirtualNetwork: EnclaveVirtualNetwork;

@added(Microsoft.Mission.Versions.v2024_06_01_preview)
@visibility(Lifecycle.Read)
@doc("Enclave Address Spaces")
enclaveAddressSpaces?: EnclaveAddressSpaces;

@doc("Community Resource Id.")
communityResourceId?: CommunityResourceId;
communityResourceId: CommunityResourceId;

@doc("Default Settings")
enclaveDefaultSettings?: EnclaveDefaultSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ model WorkloadProperties {
@added(Microsoft.Mission.Versions.v2024_06_01_preview)
@removed(Microsoft.Mission.Versions.v2024_06_01_preview)
@doc("Managed resource group configuration.")
managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration;
managedResourceGroupConfiguration: ManagedResourceGroupConfiguration;

#suppress "@azure-tools/typespec-providerhub/non-breaking-versioning" "New version does not have any breaking change."
@added(Microsoft.Mission.Versions.v2024_06_01_preview)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4378,7 +4378,10 @@
"$ref": "#/definitions/RequestMetadata",
"description": "Request metadata for the approval request."
}
}
},
"required": [
"requestMetadata"
]
},
"ApprovalResource": {
"type": "object",
Expand Down Expand Up @@ -4560,7 +4563,10 @@
"type": "boolean",
"description": "Whether approval is needed for the connection (True or False)."
}
}
},
"required": [
"ruleCollection"
]
},
"CommunityEndpointProtocol": {
"type": "string",
Expand Down Expand Up @@ -4925,7 +4931,12 @@
"type": "string"
}
}
}
},
"required": [
"communityResourceId",
"sourceResourceId",
"destinationEndpointId"
]
},
"EnclaveConnectionResource": {
"type": "object",
Expand Down Expand Up @@ -5128,7 +5139,10 @@
"type": "boolean",
"description": "Whether approval is needed for the connection (True or False)."
}
}
},
"required": [
"ruleCollection"
]
},
"EnclaveEndpointProtocol": {
"type": "string",
Expand Down Expand Up @@ -5538,7 +5552,12 @@
"type": "string"
}
}
}
},
"required": [
"communityResourceId",
"enclaveIds",
"externalCidrs"
]
},
"ExternalConnectionState": {
"type": "string",
Expand Down Expand Up @@ -5770,7 +5789,15 @@
"type": "string"
}
}
}
},
"required": [
"connectionType",
"communityResourceId",
"destinationEnclaveId",
"destinationEndpointId",
"sourceEnclaveId",
"sourceCidrs"
]
},
"InternalConnectionState": {
"type": "string",
Expand Down Expand Up @@ -5897,7 +5924,10 @@
"modelAsString": true
}
}
}
},
"required": [
"mode"
]
},
"ManagedResourceGroupConfiguration": {
"type": "object",
Expand Down Expand Up @@ -6040,7 +6070,10 @@
"$ref": "#/definitions/ApprovalStatus",
"description": "Approval status."
}
}
},
"required": [
"resourceAction"
]
},
"ServiceIdentifier": {
"type": "string",
Expand Down Expand Up @@ -6410,7 +6443,10 @@
"$ref": "#/definitions/RequestMetadata",
"description": "Request metadata for the approval request."
}
}
},
"required": [
"requestMetadata"
]
},
"UpdateCommunityEndpointPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6440,7 +6476,10 @@
"type": "boolean",
"description": "Whether approval is needed for the connection (True or False)."
}
}
},
"required": [
"ruleCollection"
]
},
"UpdateCommunityPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6522,7 +6561,12 @@
"type": "string"
}
}
}
},
"required": [
"communityResourceId",
"sourceResourceId",
"destinationEndpointId"
]
},
"UpdateEnclaveEndpointPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6552,7 +6596,10 @@
"type": "boolean",
"description": "Whether approval is needed for the connection (True or False)."
}
}
},
"required": [
"ruleCollection"
]
},
"UpdateEndpointPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6613,7 +6660,12 @@
"type": "string"
}
}
}
},
"required": [
"communityResourceId",
"enclaveIds",
"externalCidrs"
]
},
"UpdateInternalConnectionProperties": {
"type": "object",
Expand Down Expand Up @@ -6662,7 +6714,15 @@
"type": "string"
}
}
}
},
"required": [
"connectionType",
"communityResourceId",
"destinationEnclaveId",
"destinationEndpointId",
"sourceEnclaveId",
"sourceCidrs"
]
},
"UpdateTransitHubPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6735,7 +6795,11 @@
"type": "boolean",
"description": "Deploy Bastion service (True or False)."
}
}
},
"required": [
"enclaveVirtualNetwork",
"communityResourceId"
]
},
"UpdateWorkloadPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6821,7 +6885,11 @@
"type": "boolean",
"description": "Deploy Bastion service (True or False)."
}
}
},
"required": [
"enclaveVirtualNetwork",
"communityResourceId"
]
},
"VirtualEnclaveResourceId": {
"type": "string",
Expand Down
Loading

0 comments on commit 2ad3ee7

Please sign in to comment.