Skip to content

Commit

Permalink
CodeGen from PR 23397 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge b3b9c96b5e74c8da5d0ef4b8ef2e12ead40f57b6 into 351c8598465737e5a64dd4b65b57738dc8cf9bf7
  • Loading branch information
SDKAuto committed Apr 18, 2023
1 parent ec9f1fb commit e3e293b
Show file tree
Hide file tree
Showing 568 changed files with 2,030 additions and 26,800 deletions.
4 changes: 3 additions & 1 deletion sdk/security/azure-resourcemanager-security/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.6 (Unreleased)
## 1.0.0-beta.1 (2023-04-18)

- Azure Resource Manager Security client library for Java. This package contains Microsoft Azure SDK for Security Management SDK. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/security/azure-resourcemanager-security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-security</artifactId>
<version>1.0.0-beta.5</version>
<version>1.0.0-beta.6</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
82 changes: 82 additions & 0 deletions sdk/security/azure-resourcemanager-security/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@
- [Get](#regulatorycompliancestandards_get)
- [List](#regulatorycompliancestandards_list)

## ResourceProvider

- [GetSensitivitySettings](#resourceprovider_getsensitivitysettings)
- [UpdateSensitivitySettings](#resourceprovider_updatesensitivitysettings)

## SecureScoreControlDefinitions

- [List](#securescorecontroldefinitions_list)
Expand Down Expand Up @@ -320,6 +325,10 @@
- [List](#securitysolutionsreferencedata_list)
- [ListByHomeRegion](#securitysolutionsreferencedata_listbyhomeregion)

## SensitivitySettings

- [List](#sensitivitysettings_list)

## ServerVulnerabilityAssessment

- [CreateOrUpdate](#servervulnerabilityassessment_createorupdate)
Expand Down Expand Up @@ -4784,6 +4793,60 @@ public final class RegulatoryComplianceStandardsListSamples {
}
```

### ResourceProvider_GetSensitivitySettings

```java
/** Samples for ResourceProvider GetSensitivitySettings. */
public final class ResourceProviderGetSensitivitySettingsSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/SensitivitySettings/GetSensitivitySettings_example.json
*/
/**
* Sample code: Get sensitivity settings.
*
* @param manager Entry point to SecurityManager.
*/
public static void getSensitivitySettings(com.azure.resourcemanager.security.SecurityManager manager) {
manager.resourceProviders().getSensitivitySettingsWithResponse(com.azure.core.util.Context.NONE);
}
}
```

### ResourceProvider_UpdateSensitivitySettings

```java
import com.azure.resourcemanager.security.models.UpdateSensitivitySettingsRequest;
import java.util.Arrays;
import java.util.UUID;

/** Samples for ResourceProvider UpdateSensitivitySettings. */
public final class ResourceProviderUpdateSensitivitySettingsSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/SensitivitySettings/PutSensitivitySettings_example.json
*/
/**
* Sample code: Update sensitivity settings.
*
* @param manager Entry point to SecurityManager.
*/
public static void updateSensitivitySettings(com.azure.resourcemanager.security.SecurityManager manager) {
manager
.resourceProviders()
.updateSensitivitySettingsWithResponse(
new UpdateSensitivitySettingsRequest()
.withSensitiveInfoTypesIds(
Arrays
.asList(
UUID.fromString("f2f8a7a1-28c0-404b-9ab4-30a0a7af18cb"),
UUID.fromString("b452f22b-f87d-4f48-8490-ecf0873325b5"),
UUID.fromString("d59ee8b6-2618-404b-a5e7-aa377cd67543")))
.withSensitivityThresholdLabelOrder(2.0F)
.withSensitivityThresholdLabelId(UUID.fromString("f2f8a7a1-28c0-404b-9ab4-30a0a7af18cb")),
com.azure.core.util.Context.NONE);
}
}
```

### SecureScoreControlDefinitions_List

```java
Expand Down Expand Up @@ -5497,6 +5560,25 @@ public final class SecuritySolutionsReferenceDataListByHomeRegionSamples {
}
```

### SensitivitySettings_List

```java
/** Samples for SensitivitySettings List. */
public final class SensitivitySettingsListSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/SensitivitySettings/GetSensitivitySettingsList_example.json
*/
/**
* Sample code: Get sensitivity settings list.
*
* @param manager Entry point to SecurityManager.
*/
public static void getSensitivitySettingsList(com.azure.resourcemanager.security.SecurityManager manager) {
manager.sensitivitySettings().listWithResponse(com.azure.core.util.Context.NONE);
}
}
```

### ServerVulnerabilityAssessment_CreateOrUpdate

```java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import com.azure.resourcemanager.security.implementation.RegulatoryComplianceAssessmentsImpl;
import com.azure.resourcemanager.security.implementation.RegulatoryComplianceControlsImpl;
import com.azure.resourcemanager.security.implementation.RegulatoryComplianceStandardsImpl;
import com.azure.resourcemanager.security.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.security.implementation.SecureScoreControlDefinitionsImpl;
import com.azure.resourcemanager.security.implementation.SecureScoreControlsImpl;
import com.azure.resourcemanager.security.implementation.SecureScoresImpl;
Expand All @@ -76,6 +77,7 @@
import com.azure.resourcemanager.security.implementation.SecurityOperatorsImpl;
import com.azure.resourcemanager.security.implementation.SecuritySolutionsImpl;
import com.azure.resourcemanager.security.implementation.SecuritySolutionsReferenceDatasImpl;
import com.azure.resourcemanager.security.implementation.SensitivitySettingsImpl;
import com.azure.resourcemanager.security.implementation.ServerVulnerabilityAssessmentsImpl;
import com.azure.resourcemanager.security.implementation.SettingsImpl;
import com.azure.resourcemanager.security.implementation.SoftwareInventoriesImpl;
Expand Down Expand Up @@ -127,6 +129,7 @@
import com.azure.resourcemanager.security.models.RegulatoryComplianceAssessments;
import com.azure.resourcemanager.security.models.RegulatoryComplianceControls;
import com.azure.resourcemanager.security.models.RegulatoryComplianceStandards;
import com.azure.resourcemanager.security.models.ResourceProviders;
import com.azure.resourcemanager.security.models.SecureScoreControlDefinitions;
import com.azure.resourcemanager.security.models.SecureScoreControls;
import com.azure.resourcemanager.security.models.SecureScores;
Expand All @@ -137,6 +140,7 @@
import com.azure.resourcemanager.security.models.SecurityOperators;
import com.azure.resourcemanager.security.models.SecuritySolutions;
import com.azure.resourcemanager.security.models.SecuritySolutionsReferenceDatas;
import com.azure.resourcemanager.security.models.SensitivitySettings;
import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessments;
import com.azure.resourcemanager.security.models.Settings;
import com.azure.resourcemanager.security.models.SoftwareInventories;
Expand Down Expand Up @@ -238,6 +242,10 @@ public final class SecurityManager {

private Connectors connectors;

private ResourceProviders resourceProviders;

private SensitivitySettings sensitivitySettings;

private Alerts alerts;

private Settings settings;
Expand Down Expand Up @@ -443,7 +451,7 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro
.append("-")
.append("com.azure.resourcemanager.security")
.append("/")
.append("1.0.0-beta.5");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -1014,6 +1022,30 @@ public Connectors connectors() {
return connectors;
}

/**
* Gets the resource collection API of ResourceProviders.
*
* @return Resource collection API of ResourceProviders.
*/
public ResourceProviders resourceProviders() {
if (this.resourceProviders == null) {
this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
}
return resourceProviders;
}

/**
* Gets the resource collection API of SensitivitySettings.
*
* @return Resource collection API of SensitivitySettings.
*/
public SensitivitySettings sensitivitySettings() {
if (this.sensitivitySettings == null) {
this.sensitivitySettings = new SensitivitySettingsImpl(clientObject.getSensitivitySettings(), this);
}
return sensitivitySettings;
}

/**
* Gets the resource collection API of Alerts.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.security.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner;
import com.azure.resourcemanager.security.models.UpdateSensitivitySettingsRequest;

/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
public interface ResourceProvidersClient {
/**
* Updates data sensitivity settings for sensitive data discovery.
*
* @param sensitivitySettings The data sensitivity settings to update.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return data sensitivity settings for sensitive data discovery along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<GetSensitivitySettingsResponseInner> updateSensitivitySettingsWithResponse(
UpdateSensitivitySettingsRequest sensitivitySettings, Context context);

/**
* Updates data sensitivity settings for sensitive data discovery.
*
* @param sensitivitySettings The data sensitivity settings to update.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return data sensitivity settings for sensitive data discovery.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
GetSensitivitySettingsResponseInner updateSensitivitySettings(UpdateSensitivitySettingsRequest sensitivitySettings);

/**
* Gets data sensitivity settings for sensitive data discovery.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return data sensitivity settings for sensitive data discovery along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<GetSensitivitySettingsResponseInner> getSensitivitySettingsWithResponse(Context context);

/**
* Gets data sensitivity settings for sensitive data discovery.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return data sensitivity settings for sensitive data discovery.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
GetSensitivitySettingsResponseInner getSensitivitySettings();
}
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,20 @@ public interface SecurityCenter {
*/
ConnectorsClient getConnectors();

/**
* Gets the ResourceProvidersClient object to access its operations.
*
* @return the ResourceProvidersClient object.
*/
ResourceProvidersClient getResourceProviders();

/**
* Gets the SensitivitySettingsClient object to access its operations.
*
* @return the SensitivitySettingsClient object.
*/
SensitivitySettingsClient getSensitivitySettings();

/**
* Gets the AlertsClient object to access its operations.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.security.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsListResponseInner;

/** An instance of this class provides access to all the operations defined in SensitivitySettingsClient. */
public interface SensitivitySettingsClient {
/**
* Gets a list with a single sensitivity settings resource.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list with a single sensitivity settings resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<GetSensitivitySettingsListResponseInner> listWithResponse(Context context);

/**
* Gets a list with a single sensitivity settings resource.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list with a single sensitivity settings resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
GetSensitivitySettingsListResponseInner list();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.security.fluent.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** A list with a single sensitivity settings resource. */
@Fluent
public final class GetSensitivitySettingsListResponseInner {
/*
* The value property.
*/
@JsonProperty(value = "value")
private List<GetSensitivitySettingsResponseInner> value;

/** Creates an instance of GetSensitivitySettingsListResponseInner class. */
public GetSensitivitySettingsListResponseInner() {
}

/**
* Get the value property: The value property.
*
* @return the value value.
*/
public List<GetSensitivitySettingsResponseInner> value() {
return this.value;
}

/**
* Set the value property: The value property.
*
* @param value the value value to set.
* @return the GetSensitivitySettingsListResponseInner object itself.
*/
public GetSensitivitySettingsListResponseInner withValue(List<GetSensitivitySettingsResponseInner> value) {
this.value = value;
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (value() != null) {
value().forEach(e -> e.validate());
}
}
}
Loading

0 comments on commit e3e293b

Please sign in to comment.