Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-resourcemanager-securityinsights] Bug Fix: Correcting sourceType field for 2022-01-01-preview API version for Watchlist #13800

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2022-04-06)

- Azure Resource Manager SecurityInsights client library for Java. This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-04. 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager SecurityInsights client library for Java.

This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-securityinsights</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
380 changes: 177 additions & 203 deletions sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for SecurityInsights Management</name>
<description>This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-01.</description>
<description>This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-04.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public SecurityInsightsManager authenticate(TokenCredential credential, AzurePro
.append("-")
.append("com.azure.resourcemanager.securityinsights")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,38 @@

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

import com.azure.core.annotation.Immutable;
import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.securityinsights.models.EntityProviders;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** EntityAnalytics property bag. */
@Immutable
@Fluent
public final class EntityAnalyticsProperties {
/*
* Determines whether the setting is enable or disabled.
* The relevant entity providers that are synced
*/
@JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isEnabled;
@JsonProperty(value = "entityProviders")
private List<EntityProviders> entityProviders;

/**
* Get the isEnabled property: Determines whether the setting is enable or disabled.
* Get the entityProviders property: The relevant entity providers that are synced.
*
* @return the isEnabled value.
* @return the entityProviders value.
*/
public Boolean isEnabled() {
return this.isEnabled;
public List<EntityProviders> entityProviders() {
return this.entityProviders;
}

/**
* Set the entityProviders property: The relevant entity providers that are synced.
*
* @param entityProviders the entityProviders value to set.
* @return the EntityAnalyticsProperties object itself.
*/
public EntityAnalyticsProperties withEntityProviders(List<EntityProviders> entityProviders) {
this.entityProviders = entityProviders;
return this;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package com.azure.resourcemanager.securityinsights.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.securityinsights.models.ProvisioningState;
import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag;
import com.azure.resourcemanager.securityinsights.models.SourceType;
import com.azure.resourcemanager.securityinsights.models.UserInfo;
Expand Down Expand Up @@ -455,31 +454,6 @@ public WatchlistInner withRawContent(String rawContent) {
return this;
}

/**
* Get the sasUri property: The Shared Access Signature (SAS) URI under which the large csv watchlist file is
* located and from which the watchlist and its items will be created.
*
* @return the sasUri value.
*/
public String sasUri() {
return this.innerProperties() == null ? null : this.innerProperties().sasUri();
}

/**
* Set the sasUri property: The Shared Access Signature (SAS) URI under which the large csv watchlist file is
* located and from which the watchlist and its items will be created.
*
* @param sasUri the sasUri value to set.
* @return the WatchlistInner object itself.
*/
public WatchlistInner withSasUri(String sasUri) {
if (this.innerProperties() == null) {
this.innerProperties = new WatchlistProperties();
}
this.innerProperties().withSasUri(sasUri);
return this;
}

/**
* Get the itemsSearchKey property: The search key is used to optimize query performance when using watchlists for
* joins with other data. For example, enable a column with IP addresses to be the designated SearchKey field, then
Expand Down Expand Up @@ -555,15 +529,6 @@ public WatchlistInner withUploadStatus(String uploadStatus) {
return this;
}

/**
* Get the provisioningState property: The provisioning state of the watchlist resource.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}

/**
* Validates the instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.securityinsights.models.ProvisioningState;
import com.azure.resourcemanager.securityinsights.models.SourceType;
import com.azure.resourcemanager.securityinsights.models.UserInfo;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down Expand Up @@ -127,14 +126,6 @@ public final class WatchlistProperties {
@JsonProperty(value = "rawContent")
private String rawContent;

/*
* The Shared Access Signature (SAS) URI under which the large csv
* watchlist file is located and from which the watchlist and its items
* will be created
*/
@JsonProperty(value = "sasUri")
private String sasUri;

/*
* The search key is used to optimize query performance when using
* watchlists for joins with other data. For example, enable a column with
Expand All @@ -158,12 +149,6 @@ public final class WatchlistProperties {
@JsonProperty(value = "uploadStatus")
private String uploadStatus;

/*
* The provisioning state of the watchlist resource.
*/
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisioningState provisioningState;

/**
* Get the watchlistId property: The id (a Guid) of the watchlist.
*
Expand Down Expand Up @@ -526,28 +511,6 @@ public WatchlistProperties withRawContent(String rawContent) {
return this;
}

/**
* Get the sasUri property: The Shared Access Signature (SAS) URI under which the large csv watchlist file is
* located and from which the watchlist and its items will be created.
*
* @return the sasUri value.
*/
public String sasUri() {
return this.sasUri;
}

/**
* Set the sasUri property: The Shared Access Signature (SAS) URI under which the large csv watchlist file is
* located and from which the watchlist and its items will be created.
*
* @param sasUri the sasUri value to set.
* @return the WatchlistProperties object itself.
*/
public WatchlistProperties withSasUri(String sasUri) {
this.sasUri = sasUri;
return this;
}

/**
* Get the itemsSearchKey property: The search key is used to optimize query performance when using watchlists for
* joins with other data. For example, enable a column with IP addresses to be the designated SearchKey field, then
Expand Down Expand Up @@ -614,15 +577,6 @@ public WatchlistProperties withUploadStatus(String uploadStatus) {
return this;
}

/**
* Get the provisioningState property: The provisioning state of the watchlist resource.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.provisioningState;
}

/**
* Validates the instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
this.apiVersion = "2022-01-01-preview";
this.apiVersion = "2022-04-01-preview";
this.alertRules = new AlertRulesClientImpl(this);
this.actions = new ActionsClientImpl(this);
this.alertRuleTemplates = new AlertRuleTemplatesClientImpl(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner;
import com.azure.resourcemanager.securityinsights.models.ProvisioningState;
import com.azure.resourcemanager.securityinsights.models.SourceType;
import com.azure.resourcemanager.securityinsights.models.UserInfo;
import com.azure.resourcemanager.securityinsights.models.Watchlist;
Expand Down Expand Up @@ -118,10 +117,6 @@ public String rawContent() {
return this.innerModel().rawContent();
}

public String sasUri() {
return this.innerModel().sasUri();
}

public String itemsSearchKey() {
return this.innerModel().itemsSearchKey();
}
Expand All @@ -134,10 +129,6 @@ public String uploadStatus() {
return this.innerModel().uploadStatus();
}

public ProvisioningState provisioningState() {
return this.innerModel().provisioningState();
}

public WatchlistInner innerModel() {
return this.innerObject;
}
Expand Down Expand Up @@ -336,11 +327,6 @@ public WatchlistImpl withRawContent(String rawContent) {
return this;
}

public WatchlistImpl withSasUri(String sasUri) {
this.innerModel().withSasUri(sasUri);
return this;
}

public WatchlistImpl withItemsSearchKey(String itemsSearchKey) {
this.innerModel().withItemsSearchKey(itemsSearchKey);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** Settings with single toggle. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
Expand Down Expand Up @@ -39,12 +40,26 @@ public EntityAnalytics withEtag(String etag) {
}

/**
* Get the isEnabled property: Determines whether the setting is enable or disabled.
* Get the entityProviders property: The relevant entity providers that are synced.
*
* @return the isEnabled value.
* @return the entityProviders value.
*/
public Boolean isEnabled() {
return this.innerProperties() == null ? null : this.innerProperties().isEnabled();
public List<EntityProviders> entityProviders() {
return this.innerProperties() == null ? null : this.innerProperties().entityProviders();
}

/**
* Set the entityProviders property: The relevant entity providers that are synced.
*
* @param entityProviders the entityProviders value to set.
* @return the EntityAnalytics object itself.
*/
public EntityAnalytics withEntityProviders(List<EntityProviders> entityProviders) {
if (this.innerProperties() == null) {
this.innerProperties = new EntityAnalyticsProperties();
}
this.innerProperties().withEntityProviders(entityProviders);
return this;
}

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

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Defines values for EntityProviders. */
public final class EntityProviders extends ExpandableStringEnum<EntityProviders> {
/** Static value ActiveDirectory for EntityProviders. */
public static final EntityProviders ACTIVE_DIRECTORY = fromString("ActiveDirectory");

/** Static value AzureActiveDirectory for EntityProviders. */
public static final EntityProviders AZURE_ACTIVE_DIRECTORY = fromString("AzureActiveDirectory");

/**
* Creates or finds a EntityProviders from its string representation.
*
* @param name a name to look for.
* @return the corresponding EntityProviders.
*/
@JsonCreator
public static EntityProviders fromString(String name) {
return fromString(name, EntityProviders.class);
}

/** @return known EntityProviders values. */
public static Collection<EntityProviders> values() {
return values(EntityProviders.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class IncidentOwnerInfo {
/*
* The type of the owner the incident is assigned to.
*/
@JsonProperty(value = "ownerType", access = JsonProperty.Access.WRITE_ONLY)
@JsonProperty(value = "ownerType")
private OwnerType ownerType;

/**
Expand Down Expand Up @@ -130,6 +130,17 @@ public OwnerType ownerType() {
return this.ownerType;
}

/**
* Set the ownerType property: The type of the owner the incident is assigned to.
*
* @param ownerType the ownerType value to set.
* @return the IncidentOwnerInfo object itself.
*/
public IncidentOwnerInfo withOwnerType(OwnerType ownerType) {
this.ownerType = ownerType;
return this;
}

/**
* Validates the instance.
*
Expand Down
Loading