@@ -63,7 +63,7 @@ module Web {
63
63
/**
64
64
* Returns the kind of App Service as a string.
65
65
*/
66
- string kind ( ) {
66
+ string kind ( ) {
67
67
exists ( StringLiteral kind | kind = this .getKind ( ) and result = kind .getValue ( ) )
68
68
}
69
69
@@ -75,22 +75,17 @@ module Web {
75
75
/**
76
76
* Checks if the site is a regular web app.
77
77
*/
78
- predicate isWebApp ( ) {
78
+ predicate isWebApp ( ) {
79
79
this .kind ( ) .regexpMatch ( ".*app.*" ) and
80
80
not this .isFunctionApp ( )
81
81
}
82
82
83
- /**
84
- * Gets the HTTPS-only flag for the App Service.
85
- */
86
- BooleanLiteral getHttpsOnly ( ) { result = this .getProperty ( "httpsOnly" ) }
87
-
88
83
/**
89
84
* Returns true if HTTPS-only setting is enabled.
90
85
*/
91
86
predicate isHttpsOnly ( ) {
92
87
exists ( BooleanLiteral httpsOnly |
93
- httpsOnly = this .getHttpsOnly ( ) and
88
+ httpsOnly = this .getProperties ( ) . getHttpsOnly ( ) and
94
89
httpsOnly .getBool ( ) = true
95
90
)
96
91
}
@@ -158,7 +153,9 @@ module Web {
158
153
/**
159
154
* Gets the keyVaultReferenceIdentity.
160
155
*/
161
- StringLiteral getKeyVaultReferenceIdentity ( ) { result = this .getProperty ( "keyVaultReferenceIdentity" ) }
156
+ StringLiteral getKeyVaultReferenceIdentity ( ) {
157
+ result = this .getProperty ( "keyVaultReferenceIdentity" )
158
+ }
162
159
163
160
/**
164
161
* Gets the redundancyMode.
@@ -168,7 +165,9 @@ module Web {
168
165
/**
169
166
* Gets the storageAccountRequired flag.
170
167
*/
171
- BooleanLiteral getStorageAccountRequired ( ) { result = this .getProperty ( "storageAccountRequired" ) }
168
+ BooleanLiteral getStorageAccountRequired ( ) {
169
+ result = this .getProperty ( "storageAccountRequired" )
170
+ }
172
171
173
172
/**
174
173
* Returns true if a storage account is required.
@@ -183,7 +182,9 @@ module Web {
183
182
/**
184
183
* Gets the virtualNetworkSubnetId.
185
184
*/
186
- StringLiteral getVirtualNetworkSubnetId ( ) { result = this .getProperty ( "virtualNetworkSubnetId" ) }
185
+ StringLiteral getVirtualNetworkSubnetId ( ) {
186
+ result = this .getProperty ( "virtualNetworkSubnetId" )
187
+ }
187
188
188
189
override string toString ( ) { result = "AppService[" + this .getIdentifier ( ) .getName ( ) + "]" }
189
190
}
@@ -296,7 +297,7 @@ module Web {
296
297
*/
297
298
string getParentSiteName ( ) {
298
299
// Parse from the resource name which is in the format "siteName/slotName"
299
- exists ( string fullName |
300
+ exists ( string fullName |
300
301
fullName = this .getName ( ) and
301
302
result = fullName .regexpCapture ( "([^/]+)/.*" , 1 )
302
303
)
@@ -307,7 +308,7 @@ module Web {
307
308
*/
308
309
string getSlotName ( ) {
309
310
// Parse from the resource name which is in the format "siteName/slotName"
310
- exists ( string fullName |
311
+ exists ( string fullName |
311
312
fullName = this .getName ( ) and
312
313
result = fullName .regexpCapture ( "[^/]+/(.*)" , 1 )
313
314
)
@@ -352,12 +353,16 @@ module Web {
352
353
/**
353
354
* Constructs a HostingEnvironmentsResource for Microsoft.Web/hostingEnvironments resources.
354
355
*/
355
- HostingEnvironmentsResource ( ) { this .getResourceType ( ) .regexpMatch ( "^Microsoft.Web/hostingEnvironments@.*" ) }
356
+ HostingEnvironmentsResource ( ) {
357
+ this .getResourceType ( ) .regexpMatch ( "^Microsoft.Web/hostingEnvironments@.*" )
358
+ }
356
359
357
360
/**
358
361
* Gets the properties object for the App Service Environment.
359
362
*/
360
- HostingEnvironmentsProperties:: Properties getProperties ( ) { result = this .getProperty ( "properties" ) }
363
+ HostingEnvironmentsProperties:: Properties getProperties ( ) {
364
+ result = this .getProperty ( "properties" )
365
+ }
361
366
362
367
/**
363
368
* Gets the kind of the App Service Environment.
@@ -369,7 +374,9 @@ module Web {
369
374
*/
370
375
string kind ( ) { result = this .getKind ( ) .getValue ( ) }
371
376
372
- override string toString ( ) { result = "AppServiceEnvironment[" + this .getIdentifier ( ) .getName ( ) + "]" }
377
+ override string toString ( ) {
378
+ result = "AppServiceEnvironment[" + this .getIdentifier ( ) .getName ( ) + "]"
379
+ }
373
380
}
374
381
375
382
/**
@@ -400,17 +407,26 @@ module Web {
400
407
/**
401
408
* Gets the hostingEnvironmentProfile.
402
409
*/
403
- Object getHostingEnvironmentProfile ( ) { result = this .getProperty ( "hostingEnvironmentProfile" ) }
410
+ Object getHostingEnvironmentProfile ( ) {
411
+ result = this .getProperty ( "hostingEnvironmentProfile" )
412
+ }
404
413
405
414
/**
406
415
* Gets the public network access setting.
407
416
*/
408
417
StringLiteral getPublicNetworkAccess ( ) { result = this .getProperty ( "publicNetworkAccess" ) }
409
418
419
+ /**
420
+ * Gets the HTTPS-only flag for the App Service.
421
+ */
422
+ BooleanLiteral getHttpsOnly ( ) { result = this .getProperty ( "httpsOnly" ) }
423
+
410
424
/**
411
425
* Gets the virtualNetworkSubnetId.
412
426
*/
413
- StringLiteral getVirtualNetworkSubnetId ( ) { result = this .getProperty ( "virtualNetworkSubnetId" ) }
427
+ StringLiteral getVirtualNetworkSubnetId ( ) {
428
+ result = this .getProperty ( "virtualNetworkSubnetId" )
429
+ }
414
430
415
431
/**
416
432
* Gets the enabled value.
@@ -431,7 +447,7 @@ module Web {
431
447
* Gets the client certificate mode.
432
448
*/
433
449
StringLiteral getClientCertMode ( ) { result = this .getProperty ( "clientCertMode" ) }
434
-
450
+
435
451
/**
436
452
* Returns true if client certificate is required.
437
453
*/
@@ -445,7 +461,9 @@ module Web {
445
461
/**
446
462
* Gets the client certificate exclusion paths.
447
463
*/
448
- StringLiteral getClientCertExclusionPaths ( ) { result = this .getProperty ( "clientCertExclusionPaths" ) }
464
+ StringLiteral getClientCertExclusionPaths ( ) {
465
+ result = this .getProperty ( "clientCertExclusionPaths" )
466
+ }
449
467
450
468
/**
451
469
* Gets the container size.
@@ -455,7 +473,9 @@ module Web {
455
473
/**
456
474
* Gets the custom domain verification ID.
457
475
*/
458
- StringLiteral getCustomDomainVerificationId ( ) { result = this .getProperty ( "customDomainVerificationId" ) }
476
+ StringLiteral getCustomDomainVerificationId ( ) {
477
+ result = this .getProperty ( "customDomainVerificationId" )
478
+ }
459
479
460
480
/**
461
481
* Gets the daily memory time quota.
@@ -509,7 +529,9 @@ module Web {
509
529
/**
510
530
* Gets whether remote debugging is enabled.
511
531
*/
512
- BooleanLiteral getRemoteDebuggingEnabled ( ) { result = this .getProperty ( "remoteDebuggingEnabled" ) }
532
+ BooleanLiteral getRemoteDebuggingEnabled ( ) {
533
+ result = this .getProperty ( "remoteDebuggingEnabled" )
534
+ }
513
535
514
536
/**
515
537
* Returns true if remote debugging is enabled.
@@ -524,7 +546,9 @@ module Web {
524
546
/**
525
547
* Gets the remote debugging version.
526
548
*/
527
- StringLiteral getRemoteDebuggingVersion ( ) { result = this .getProperty ( "remoteDebuggingVersion" ) }
549
+ StringLiteral getRemoteDebuggingVersion ( ) {
550
+ result = this .getProperty ( "remoteDebuggingVersion" )
551
+ }
528
552
529
553
/**
530
554
* Gets whether HTTP 2.0 is enabled.
@@ -546,6 +570,11 @@ module Web {
546
570
*/
547
571
BooleanLiteral getAlwaysOn ( ) { result = this .getProperty ( "alwaysOn" ) }
548
572
573
+ /**
574
+ * Returns the Always On setting as a boolean.
575
+ */
576
+ boolean alwaysOn ( ) { result = this .getAlwaysOn ( ) .getBool ( ) }
577
+
549
578
/**
550
579
* Returns true if Always On is enabled.
551
580
*/
@@ -657,9 +686,7 @@ module Web {
657
686
/**
658
687
* Gets a certificate by index.
659
688
*/
660
- Object getCertificate ( int index ) {
661
- result = this .getElement ( index )
662
- }
689
+ Object getCertificate ( int index ) { result = this .getElement ( index ) }
663
690
664
691
string toString ( ) { result = "HttpsCertificates" }
665
692
}
@@ -728,12 +755,16 @@ module Web {
728
755
/**
729
756
* Gets the staging environment policy.
730
757
*/
731
- StringLiteral getStagingEnvironmentPolicy ( ) { result = this .getProperty ( "stagingEnvironmentPolicy" ) }
758
+ StringLiteral getStagingEnvironmentPolicy ( ) {
759
+ result = this .getProperty ( "stagingEnvironmentPolicy" )
760
+ }
732
761
733
762
/**
734
763
* Gets whether private endpoint connections are allowed.
735
764
*/
736
- BooleanLiteral getAllowConfigFileUpdates ( ) { result = this .getProperty ( "allowConfigFileUpdates" ) }
765
+ BooleanLiteral getAllowConfigFileUpdates ( ) {
766
+ result = this .getProperty ( "allowConfigFileUpdates" )
767
+ }
737
768
738
769
/**
739
770
* Returns true if config file updates are allowed.
@@ -763,7 +794,9 @@ module Web {
763
794
/**
764
795
* Gets whether private endpoint connections are allowed.
765
796
*/
766
- BooleanLiteral getAllowPrivateEndpoints ( ) { result = this .getProperty ( "allowPrivateEndpoints" ) }
797
+ BooleanLiteral getAllowPrivateEndpoints ( ) {
798
+ result = this .getProperty ( "allowPrivateEndpoints" )
799
+ }
767
800
768
801
/**
769
802
* Returns true if private endpoints are allowed.
@@ -817,7 +850,9 @@ module Web {
817
850
/**
818
851
* Gets the internal load balancing mode.
819
852
*/
820
- StringLiteral getInternalLoadBalancingMode ( ) { result = this .getProperty ( "internalLoadBalancingMode" ) }
853
+ StringLiteral getInternalLoadBalancingMode ( ) {
854
+ result = this .getProperty ( "internalLoadBalancingMode" )
855
+ }
821
856
822
857
/**
823
858
* Gets the cluster settings.
@@ -827,7 +862,9 @@ module Web {
827
862
/**
828
863
* Gets the virtual network configuration.
829
864
*/
830
- VnetConfiguration getVirtualNetworkProfile ( ) { result = this .getProperty ( "virtualNetworkProfile" ) }
865
+ VnetConfiguration getVirtualNetworkProfile ( ) {
866
+ result = this .getProperty ( "virtualNetworkProfile" )
867
+ }
831
868
832
869
override string toString ( ) { result = "HostingEnvironmentProperties" }
833
870
}
@@ -960,7 +997,9 @@ module Web {
960
997
/**
961
998
* Gets the maximum number of workers.
962
999
*/
963
- Number getMaximumElasticWorkerCount ( ) { result = this .getProperty ( "maximumElasticWorkerCount" ) }
1000
+ Number getMaximumElasticWorkerCount ( ) {
1001
+ result = this .getProperty ( "maximumElasticWorkerCount" )
1002
+ }
964
1003
965
1004
/**
966
1005
* Returns the maximum number of workers as an integer.
@@ -970,4 +1009,4 @@ module Web {
970
1009
override string toString ( ) { result = "ServerFarmProperties" }
971
1010
}
972
1011
}
973
- }
1012
+ }
0 commit comments