@@ -75,12 +75,12 @@ module Compute {
7575 /**
7676 * Returns the network profile object for the virtual machine.
7777 */
78- NetworkProfile getNetworkProfile ( ) { result = this .getProperty ( "networkProfile" ) }
78+ NetworkingProfiles :: NetworkProfile getNetworkProfile ( ) { result = this .getProperty ( "networkProfile" ) }
7979
8080 /**
8181 * Returns the OS profile object for the virtual machine.
8282 */
83- Compute :: Profiles :: OsProfile getOsProfile ( ) { result = this .getProperty ( "osProfile" ) }
83+ OsProfiles :: OsProfile getOsProfile ( ) { result = this .getProperty ( "osProfile" ) }
8484
8585 override string toString ( ) {
8686 result = "VirtualMachinesProperties[" + virtualMachines .getName ( ) + "]"
@@ -108,171 +108,5 @@ module Compute {
108108 */
109109 Expr getVmSize ( ) { result = this .getProperty ( "vmSize" ) }
110110 }
111-
112- /**
113- * Represents a network profile for the Microsoft.Compute/virtualMachines type.
114- */
115- class NetworkProfile extends Object {
116- private Properties properties ;
117-
118- /**
119- * Constructs a NetworkProfile object for the given properties.
120- */
121- NetworkProfile ( ) { this = properties .getProperty ( "networkProfile" ) }
122-
123- /**
124- * Returns a string representation of the network profile.
125- */
126- string toString ( ) { result = "NetworkProfile" }
127-
128- /**
129- * Returns the network interfaces for the virtual machine.
130- */
131- Network:: NetworkInterfaces getNetworkInterfaces ( ) {
132- result = resolveResource ( this .getNetworkInterfacesObject ( ) )
133- }
134-
135- /**
136- * Returns the networkInterfaces property as an object array.
137- */
138- private Object getNetworkInterfacesObject ( ) {
139- result = this .getProperty ( "networkInterfaces" ) .( Array ) .getElements ( )
140- }
141- }
142-
143- /**
144- * Represents the storage profile for the Microsoft.Compute/virtualMachines type.
145- */
146- class StorageProfile extends Object {
147- private Properties properties ;
148-
149- /**
150- * Constructs a StorageProfile object for the given properties.
151- */
152- StorageProfile ( ) { this = properties .getProperty ( "storageProfile" ) }
153-
154- /**
155- * Returns the image reference for the storage profile.
156- */
157- ImageReference getImageReference ( ) { result = this .getProperty ( "imageReference" ) }
158- }
159-
160- /**
161- * Represents an image reference for the Microsoft.Compute/virtualMachines type.
162- * See: https://learn.microsoft.com/en-us/azure/templates/microsoft.compute/virtualmachines?pivots=deployment-language-bicep#imagereference
163- */
164- class ImageReference extends Object {
165- private StorageProfile storageProfile ;
166-
167- /**
168- * Constructs an ImageReference object for the given storage profile.
169- */
170- ImageReference ( ) { this = storageProfile .getProperty ( "imageReference" ) }
171-
172- /**
173- * Returns the publisher property of the image reference.
174- */
175- Expr getPublisher ( ) { result = this .getProperty ( "publisher" ) }
176-
177- /**
178- * Returns the offer property of the image reference.
179- */
180- Expr getOffer ( ) { result = this .getProperty ( "offer" ) }
181-
182- /**
183- * Returns the sku property of the image reference.
184- */
185- Expr getSku ( ) { result = this .getProperty ( "sku" ) }
186-
187- /**
188- * Returns the version property of the image reference.
189- */
190- Expr getVersion ( ) { result = this .getProperty ( "version" ) }
191- }
192- }
193-
194- module Profiles {
195- /**
196- * Represents the OS profile for the Microsoft.Compute/virtualMachines type.
197- */
198- class OsProfile extends Object {
199- private ResourceProperties properties ;
200- private string profileType ;
201- /**
202- * Constructs an OsProfile object for the given properties.
203- */
204- OsProfile ( ) {
205- this = properties .getProperty ( "osProfile" ) and profileType = "general"
206- or
207- this = properties .getProperty ( "linuxProfile" ) and profileType = "linux"
208- or
209- this = properties .getProperty ( "windowsProfile" ) and profileType = "windows"
210- }
211-
212- /**
213- * Returns the computerName property of the OS profile.
214- */
215- Expr getComputerName ( ) { result = this .getProperty ( "computerName" ) }
216-
217- string osType ( ) {
218- result = profileType
219- }
220-
221- /**
222- * Returns the adminUsername property of the OS profile.
223- */
224- Expr getAdminUsername ( ) { result = this .getProperty ( "adminUsername" ) }
225-
226- /**
227- * Returns the adminPassword property of the OS profile.
228- */
229- Expr getAdminPassword ( ) { result = this .getProperty ( "adminPassword" ) }
230-
231- SshConfig getSshConfig ( ) {
232- result = this .getProperty ( "ssh" )
233- }
234-
235- string toString ( ) {
236- result = "OsProfile[" + profileType + "]"
237- }
238- }
239-
240- class SshConfig extends Object {
241- private OsProfile osProfile ;
242-
243- /**
244- * Constructs an SshConfig object for the given OS profile.
245- */
246- SshConfig ( ) { this = osProfile .getProperty ( "ssh" ) }
247-
248- /**
249- * Returns the publicKeys property of the SSH configuration.
250- */
251- SshPublicKey getPublicKeys ( ) { result = this .getProperty ( "publicKeys" ) .( Array ) .getElements ( ) }
252-
253- /**
254- * Returns a string representation of the SSH configuration.
255- */
256- string toString ( ) { result = "SshConfig" }
257- }
258-
259- class SshPublicKey extends Object {
260- private SshConfig sshConfig ;
261-
262- /**
263- * Constructs an SshConfigPublicKey object for the given SSH configuration.
264- */
265- SshPublicKey ( ) { this = sshConfig .getProperty ( "publicKeys" ) .( Array ) .getElements ( ) }
266-
267- /**
268- * Returns the keyData property of the SSH public key.
269- */
270- Expr getKeyData ( ) { result = this .getProperty ( "keyData" ) }
271-
272- /**
273- * Returns a string representation of the SSH public key.
274- */
275- string toString ( ) { result = "SshConfigPublicKey" }
276- }
277111 }
278112}
0 commit comments