88import com .azure .core .http .HttpClient ;
99import com .azure .core .http .HttpPipeline ;
1010import com .azure .core .http .HttpPipelineBuilder ;
11+ import com .azure .core .http .HttpPipelinePosition ;
1112import com .azure .core .http .policy .AddDatePolicy ;
1213import com .azure .core .http .policy .HttpLogOptions ;
1314import com .azure .core .http .policy .HttpLoggingPolicy ;
3435import com .azure .resourcemanager .security .implementation .ComplianceResultsImpl ;
3536import com .azure .resourcemanager .security .implementation .CompliancesImpl ;
3637import com .azure .resourcemanager .security .implementation .ConnectorsImpl ;
38+ import com .azure .resourcemanager .security .implementation .CustomAssessmentAutomationsImpl ;
39+ import com .azure .resourcemanager .security .implementation .CustomEntityStoreAssignmentsImpl ;
3740import com .azure .resourcemanager .security .implementation .DeviceSecurityGroupsImpl ;
38- import com .azure .resourcemanager .security .implementation .DevicesForHubsImpl ;
39- import com .azure .resourcemanager .security .implementation .DevicesForSubscriptionsImpl ;
40- import com .azure .resourcemanager .security .implementation .DevicesImpl ;
4141import com .azure .resourcemanager .security .implementation .DiscoveredSecuritySolutionsImpl ;
4242import com .azure .resourcemanager .security .implementation .ExternalSecuritySolutionsImpl ;
4343import com .azure .resourcemanager .security .implementation .InformationProtectionPoliciesImpl ;
4444import com .azure .resourcemanager .security .implementation .IngestionSettingsImpl ;
45- import com .azure .resourcemanager .security .implementation .IotAlertTypesImpl ;
46- import com .azure .resourcemanager .security .implementation .IotAlertsImpl ;
47- import com .azure .resourcemanager .security .implementation .IotDefenderSettingsImpl ;
48- import com .azure .resourcemanager .security .implementation .IotRecommendationTypesImpl ;
49- import com .azure .resourcemanager .security .implementation .IotRecommendationsImpl ;
5045import com .azure .resourcemanager .security .implementation .IotSecuritySolutionAnalyticsImpl ;
5146import com .azure .resourcemanager .security .implementation .IotSecuritySolutionsAnalyticsAggregatedAlertsImpl ;
5247import com .azure .resourcemanager .security .implementation .IotSecuritySolutionsAnalyticsRecommendationsImpl ;
5348import com .azure .resourcemanager .security .implementation .IotSecuritySolutionsImpl ;
54- import com .azure .resourcemanager .security .implementation .IotSensorsImpl ;
55- import com .azure .resourcemanager .security .implementation .IotSitesImpl ;
5649import com .azure .resourcemanager .security .implementation .JitNetworkAccessPoliciesImpl ;
5750import com .azure .resourcemanager .security .implementation .LocationsImpl ;
58- import com .azure .resourcemanager .security .implementation .OnPremiseIotSensorsImpl ;
51+ import com .azure .resourcemanager .security .implementation .MdeOnboardingsImpl ;
5952import com .azure .resourcemanager .security .implementation .OperationsImpl ;
6053import com .azure .resourcemanager .security .implementation .PricingsImpl ;
6154import com .azure .resourcemanager .security .implementation .RegulatoryComplianceAssessmentsImpl ;
6558import com .azure .resourcemanager .security .implementation .SecureScoreControlsImpl ;
6659import com .azure .resourcemanager .security .implementation .SecureScoresImpl ;
6760import com .azure .resourcemanager .security .implementation .SecurityCenterBuilder ;
61+ import com .azure .resourcemanager .security .implementation .SecurityConnectorsImpl ;
6862import com .azure .resourcemanager .security .implementation .SecurityContactsImpl ;
6963import com .azure .resourcemanager .security .implementation .SecuritySolutionsImpl ;
7064import com .azure .resourcemanager .security .implementation .SecuritySolutionsReferenceDatasImpl ;
9185import com .azure .resourcemanager .security .models .ComplianceResults ;
9286import com .azure .resourcemanager .security .models .Compliances ;
9387import com .azure .resourcemanager .security .models .Connectors ;
88+ import com .azure .resourcemanager .security .models .CustomAssessmentAutomations ;
89+ import com .azure .resourcemanager .security .models .CustomEntityStoreAssignments ;
9490import com .azure .resourcemanager .security .models .DeviceSecurityGroups ;
95- import com .azure .resourcemanager .security .models .Devices ;
96- import com .azure .resourcemanager .security .models .DevicesForHubs ;
97- import com .azure .resourcemanager .security .models .DevicesForSubscriptions ;
9891import com .azure .resourcemanager .security .models .DiscoveredSecuritySolutions ;
9992import com .azure .resourcemanager .security .models .ExternalSecuritySolutions ;
10093import com .azure .resourcemanager .security .models .InformationProtectionPolicies ;
10194import com .azure .resourcemanager .security .models .IngestionSettings ;
102- import com .azure .resourcemanager .security .models .IotAlertTypes ;
103- import com .azure .resourcemanager .security .models .IotAlerts ;
104- import com .azure .resourcemanager .security .models .IotDefenderSettings ;
105- import com .azure .resourcemanager .security .models .IotRecommendationTypes ;
106- import com .azure .resourcemanager .security .models .IotRecommendations ;
10795import com .azure .resourcemanager .security .models .IotSecuritySolutionAnalytics ;
10896import com .azure .resourcemanager .security .models .IotSecuritySolutions ;
10997import com .azure .resourcemanager .security .models .IotSecuritySolutionsAnalyticsAggregatedAlerts ;
11098import com .azure .resourcemanager .security .models .IotSecuritySolutionsAnalyticsRecommendations ;
111- import com .azure .resourcemanager .security .models .IotSensors ;
112- import com .azure .resourcemanager .security .models .IotSites ;
11399import com .azure .resourcemanager .security .models .JitNetworkAccessPolicies ;
114100import com .azure .resourcemanager .security .models .Locations ;
115- import com .azure .resourcemanager .security .models .OnPremiseIotSensors ;
101+ import com .azure .resourcemanager .security .models .MdeOnboardings ;
116102import com .azure .resourcemanager .security .models .Operations ;
117103import com .azure .resourcemanager .security .models .Pricings ;
118104import com .azure .resourcemanager .security .models .RegulatoryComplianceAssessments ;
121107import com .azure .resourcemanager .security .models .SecureScoreControlDefinitions ;
122108import com .azure .resourcemanager .security .models .SecureScoreControls ;
123109import com .azure .resourcemanager .security .models .SecureScores ;
110+ import com .azure .resourcemanager .security .models .SecurityConnectors ;
124111import com .azure .resourcemanager .security .models .SecurityContacts ;
125112import com .azure .resourcemanager .security .models .SecuritySolutions ;
126113import com .azure .resourcemanager .security .models .SecuritySolutionsReferenceDatas ;
139126import java .util .ArrayList ;
140127import java .util .List ;
141128import java .util .Objects ;
129+ import java .util .stream .Collectors ;
142130
143131/** Entry point to SecurityManager. API spec for Microsoft.Security (Azure Security Center) resource provider. */
144132public final class SecurityManager {
133+ private MdeOnboardings mdeOnboardings ;
134+
135+ private CustomAssessmentAutomations customAssessmentAutomations ;
136+
137+ private CustomEntityStoreAssignments customEntityStoreAssignments ;
138+
145139 private ComplianceResults complianceResults ;
146140
147141 private Pricings pricings ;
@@ -224,28 +218,6 @@ public final class SecurityManager {
224218
225219 private SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules ;
226220
227- private IotDefenderSettings iotDefenderSettings ;
228-
229- private IotSensors iotSensors ;
230-
231- private DevicesForSubscriptions devicesForSubscriptions ;
232-
233- private DevicesForHubs devicesForHubs ;
234-
235- private Devices devices ;
236-
237- private OnPremiseIotSensors onPremiseIotSensors ;
238-
239- private IotSites iotSites ;
240-
241- private IotAlerts iotAlerts ;
242-
243- private IotAlertTypes iotAlertTypes ;
244-
245- private IotRecommendations iotRecommendations ;
246-
247- private IotRecommendationTypes iotRecommendationTypes ;
248-
249221 private Alerts alerts ;
250222
251223 private Settings settings ;
@@ -254,6 +226,8 @@ public final class SecurityManager {
254226
255227 private SoftwareInventories softwareInventories ;
256228
229+ private SecurityConnectors securityConnectors ;
230+
257231 private final SecurityCenter clientObject ;
258232
259233 private SecurityManager (HttpPipeline httpPipeline , AzureProfile profile , Duration defaultPollInterval ) {
@@ -413,11 +387,24 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro
413387 List <HttpPipelinePolicy > policies = new ArrayList <>();
414388 policies .add (new UserAgentPolicy (userAgentBuilder .toString ()));
415389 policies .add (new RequestIdPolicy ());
390+ policies
391+ .addAll (
392+ this
393+ .policies
394+ .stream ()
395+ .filter (p -> p .getPipelinePosition () == HttpPipelinePosition .PER_CALL )
396+ .collect (Collectors .toList ()));
416397 HttpPolicyProviders .addBeforeRetryPolicies (policies );
417398 policies .add (retryPolicy );
418399 policies .add (new AddDatePolicy ());
419400 policies .add (new ArmChallengeAuthenticationPolicy (credential , scopes .toArray (new String [0 ])));
420- policies .addAll (this .policies );
401+ policies
402+ .addAll (
403+ this
404+ .policies
405+ .stream ()
406+ .filter (p -> p .getPipelinePosition () == HttpPipelinePosition .PER_RETRY )
407+ .collect (Collectors .toList ()));
421408 HttpPolicyProviders .addAfterRetryPolicies (policies );
422409 policies .add (new HttpLoggingPolicy (httpLogOptions ));
423410 HttpPipeline httpPipeline =
@@ -429,6 +416,32 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro
429416 }
430417 }
431418
419+ /** @return Resource collection API of MdeOnboardings. */
420+ public MdeOnboardings mdeOnboardings () {
421+ if (this .mdeOnboardings == null ) {
422+ this .mdeOnboardings = new MdeOnboardingsImpl (clientObject .getMdeOnboardings (), this );
423+ }
424+ return mdeOnboardings ;
425+ }
426+
427+ /** @return Resource collection API of CustomAssessmentAutomations. */
428+ public CustomAssessmentAutomations customAssessmentAutomations () {
429+ if (this .customAssessmentAutomations == null ) {
430+ this .customAssessmentAutomations =
431+ new CustomAssessmentAutomationsImpl (clientObject .getCustomAssessmentAutomations (), this );
432+ }
433+ return customAssessmentAutomations ;
434+ }
435+
436+ /** @return Resource collection API of CustomEntityStoreAssignments. */
437+ public CustomEntityStoreAssignments customEntityStoreAssignments () {
438+ if (this .customEntityStoreAssignments == null ) {
439+ this .customEntityStoreAssignments =
440+ new CustomEntityStoreAssignmentsImpl (clientObject .getCustomEntityStoreAssignments (), this );
441+ }
442+ return customEntityStoreAssignments ;
443+ }
444+
432445 /** @return Resource collection API of ComplianceResults. */
433446 public ComplianceResults complianceResults () {
434447 if (this .complianceResults == null ) {
@@ -782,96 +795,6 @@ public SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselin
782795 return sqlVulnerabilityAssessmentBaselineRules ;
783796 }
784797
785- /** @return Resource collection API of IotDefenderSettings. */
786- public IotDefenderSettings iotDefenderSettings () {
787- if (this .iotDefenderSettings == null ) {
788- this .iotDefenderSettings = new IotDefenderSettingsImpl (clientObject .getIotDefenderSettings (), this );
789- }
790- return iotDefenderSettings ;
791- }
792-
793- /** @return Resource collection API of IotSensors. */
794- public IotSensors iotSensors () {
795- if (this .iotSensors == null ) {
796- this .iotSensors = new IotSensorsImpl (clientObject .getIotSensors (), this );
797- }
798- return iotSensors ;
799- }
800-
801- /** @return Resource collection API of DevicesForSubscriptions. */
802- public DevicesForSubscriptions devicesForSubscriptions () {
803- if (this .devicesForSubscriptions == null ) {
804- this .devicesForSubscriptions =
805- new DevicesForSubscriptionsImpl (clientObject .getDevicesForSubscriptions (), this );
806- }
807- return devicesForSubscriptions ;
808- }
809-
810- /** @return Resource collection API of DevicesForHubs. */
811- public DevicesForHubs devicesForHubs () {
812- if (this .devicesForHubs == null ) {
813- this .devicesForHubs = new DevicesForHubsImpl (clientObject .getDevicesForHubs (), this );
814- }
815- return devicesForHubs ;
816- }
817-
818- /** @return Resource collection API of Devices. */
819- public Devices devices () {
820- if (this .devices == null ) {
821- this .devices = new DevicesImpl (clientObject .getDevices (), this );
822- }
823- return devices ;
824- }
825-
826- /** @return Resource collection API of OnPremiseIotSensors. */
827- public OnPremiseIotSensors onPremiseIotSensors () {
828- if (this .onPremiseIotSensors == null ) {
829- this .onPremiseIotSensors = new OnPremiseIotSensorsImpl (clientObject .getOnPremiseIotSensors (), this );
830- }
831- return onPremiseIotSensors ;
832- }
833-
834- /** @return Resource collection API of IotSites. */
835- public IotSites iotSites () {
836- if (this .iotSites == null ) {
837- this .iotSites = new IotSitesImpl (clientObject .getIotSites (), this );
838- }
839- return iotSites ;
840- }
841-
842- /** @return Resource collection API of IotAlerts. */
843- public IotAlerts iotAlerts () {
844- if (this .iotAlerts == null ) {
845- this .iotAlerts = new IotAlertsImpl (clientObject .getIotAlerts (), this );
846- }
847- return iotAlerts ;
848- }
849-
850- /** @return Resource collection API of IotAlertTypes. */
851- public IotAlertTypes iotAlertTypes () {
852- if (this .iotAlertTypes == null ) {
853- this .iotAlertTypes = new IotAlertTypesImpl (clientObject .getIotAlertTypes (), this );
854- }
855- return iotAlertTypes ;
856- }
857-
858- /** @return Resource collection API of IotRecommendations. */
859- public IotRecommendations iotRecommendations () {
860- if (this .iotRecommendations == null ) {
861- this .iotRecommendations = new IotRecommendationsImpl (clientObject .getIotRecommendations (), this );
862- }
863- return iotRecommendations ;
864- }
865-
866- /** @return Resource collection API of IotRecommendationTypes. */
867- public IotRecommendationTypes iotRecommendationTypes () {
868- if (this .iotRecommendationTypes == null ) {
869- this .iotRecommendationTypes =
870- new IotRecommendationTypesImpl (clientObject .getIotRecommendationTypes (), this );
871- }
872- return iotRecommendationTypes ;
873- }
874-
875798 /** @return Resource collection API of Alerts. */
876799 public Alerts alerts () {
877800 if (this .alerts == null ) {
@@ -904,6 +827,14 @@ public SoftwareInventories softwareInventories() {
904827 return softwareInventories ;
905828 }
906829
830+ /** @return Resource collection API of SecurityConnectors. */
831+ public SecurityConnectors securityConnectors () {
832+ if (this .securityConnectors == null ) {
833+ this .securityConnectors = new SecurityConnectorsImpl (clientObject .getSecurityConnectors (), this );
834+ }
835+ return securityConnectors ;
836+ }
837+
907838 /**
908839 * @return Wrapped service client SecurityCenter providing direct access to the underlying auto-generated API
909840 * implementation, based on Azure REST API.
0 commit comments