diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java deleted file mode 100644 index 6868ca4ea727..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java +++ /dev/null @@ -1,822 +0,0 @@ -// 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; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.SecurityInsights; -import com.azure.resourcemanager.securityinsights.implementation.ActionsImpl; -import com.azure.resourcemanager.securityinsights.implementation.AlertRuleTemplatesImpl; -import com.azure.resourcemanager.securityinsights.implementation.AlertRulesImpl; -import com.azure.resourcemanager.securityinsights.implementation.AutomationRulesImpl; -import com.azure.resourcemanager.securityinsights.implementation.BookmarkOperationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.BookmarkRelationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.BookmarksImpl; -import com.azure.resourcemanager.securityinsights.implementation.DataConnectorsCheckRequirementsOperationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.DataConnectorsImpl; -import com.azure.resourcemanager.securityinsights.implementation.DomainWhoisImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntitiesGetTimelinesImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntitiesImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntitiesRelationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntityQueriesImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntityQueryTemplatesImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntityRelationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.FileImportsImpl; -import com.azure.resourcemanager.securityinsights.implementation.IncidentCommentsImpl; -import com.azure.resourcemanager.securityinsights.implementation.IncidentRelationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.IncidentsImpl; -import com.azure.resourcemanager.securityinsights.implementation.IpGeodatasImpl; -import com.azure.resourcemanager.securityinsights.implementation.MetadatasImpl; -import com.azure.resourcemanager.securityinsights.implementation.OfficeConsentsImpl; -import com.azure.resourcemanager.securityinsights.implementation.OperationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.ProductSettingsImpl; -import com.azure.resourcemanager.securityinsights.implementation.SecurityInsightsBuilder; -import com.azure.resourcemanager.securityinsights.implementation.SecurityMLAnalyticsSettingsImpl; -import com.azure.resourcemanager.securityinsights.implementation.SentinelOnboardingStatesImpl; -import com.azure.resourcemanager.securityinsights.implementation.SourceControlsImpl; -import com.azure.resourcemanager.securityinsights.implementation.SourceControlsOperationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorMetricsImpl; -import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsImpl; -import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsOperationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.WatchlistItemsImpl; -import com.azure.resourcemanager.securityinsights.implementation.WatchlistsImpl; -import com.azure.resourcemanager.securityinsights.models.Actions; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplates; -import com.azure.resourcemanager.securityinsights.models.AlertRules; -import com.azure.resourcemanager.securityinsights.models.AutomationRules; -import com.azure.resourcemanager.securityinsights.models.BookmarkOperations; -import com.azure.resourcemanager.securityinsights.models.BookmarkRelations; -import com.azure.resourcemanager.securityinsights.models.Bookmarks; -import com.azure.resourcemanager.securityinsights.models.DataConnectors; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirementsOperations; -import com.azure.resourcemanager.securityinsights.models.DomainWhois; -import com.azure.resourcemanager.securityinsights.models.Entities; -import com.azure.resourcemanager.securityinsights.models.EntitiesGetTimelines; -import com.azure.resourcemanager.securityinsights.models.EntitiesRelations; -import com.azure.resourcemanager.securityinsights.models.EntityQueries; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; -import com.azure.resourcemanager.securityinsights.models.EntityRelations; -import com.azure.resourcemanager.securityinsights.models.FileImports; -import com.azure.resourcemanager.securityinsights.models.IncidentComments; -import com.azure.resourcemanager.securityinsights.models.IncidentRelations; -import com.azure.resourcemanager.securityinsights.models.Incidents; -import com.azure.resourcemanager.securityinsights.models.IpGeodatas; -import com.azure.resourcemanager.securityinsights.models.Metadatas; -import com.azure.resourcemanager.securityinsights.models.OfficeConsents; -import com.azure.resourcemanager.securityinsights.models.Operations; -import com.azure.resourcemanager.securityinsights.models.ProductSettings; -import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettings; -import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStates; -import com.azure.resourcemanager.securityinsights.models.SourceControls; -import com.azure.resourcemanager.securityinsights.models.SourceControlsOperations; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorMetrics; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicators; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorsOperations; -import com.azure.resourcemanager.securityinsights.models.WatchlistItems; -import com.azure.resourcemanager.securityinsights.models.Watchlists; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to SecurityInsightsManager. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource - * provider. - */ -public final class SecurityInsightsManager { - private AlertRules alertRules; - - private Actions actions; - - private AlertRuleTemplates alertRuleTemplates; - - private AutomationRules automationRules; - - private Incidents incidents; - - private Bookmarks bookmarks; - - private BookmarkRelations bookmarkRelations; - - private BookmarkOperations bookmarkOperations; - - private IpGeodatas ipGeodatas; - - private DomainWhois domainWhois; - - private Entities entities; - - private EntitiesGetTimelines entitiesGetTimelines; - - private EntitiesRelations entitiesRelations; - - private EntityRelations entityRelations; - - private EntityQueries entityQueries; - - private EntityQueryTemplates entityQueryTemplates; - - private FileImports fileImports; - - private IncidentComments incidentComments; - - private IncidentRelations incidentRelations; - - private Metadatas metadatas; - - private OfficeConsents officeConsents; - - private SentinelOnboardingStates sentinelOnboardingStates; - - private SecurityMLAnalyticsSettings securityMLAnalyticsSettings; - - private ProductSettings productSettings; - - private SourceControls sourceControls; - - private SourceControlsOperations sourceControlsOperations; - - private ThreatIntelligenceIndicators threatIntelligenceIndicators; - - private ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations; - - private ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics; - - private Watchlists watchlists; - - private WatchlistItems watchlistItems; - - private DataConnectors dataConnectors; - - private DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations; - - private Operations operations; - - private final SecurityInsights clientObject; - - private SecurityInsightsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new SecurityInsightsBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of SecurityInsights service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the SecurityInsights service API instance. - */ - public static SecurityInsightsManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of SecurityInsights service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the SecurityInsights service API instance. - */ - public static SecurityInsightsManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new SecurityInsightsManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create SecurityInsightsManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new SecurityInsightsManager.Configurable(); - } - - /** The Configurable allowing configurations to be set. */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of SecurityInsights service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the SecurityInsights service API instance. - */ - public SecurityInsightsManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.securityinsights") - .append("/") - .append("1.0.0-beta.4"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new SecurityInsightsManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of AlertRules. - * - * @return Resource collection API of AlertRules. - */ - public AlertRules alertRules() { - if (this.alertRules == null) { - this.alertRules = new AlertRulesImpl(clientObject.getAlertRules(), this); - } - return alertRules; - } - - /** - * Gets the resource collection API of Actions. It manages ActionResponse. - * - * @return Resource collection API of Actions. - */ - public Actions actions() { - if (this.actions == null) { - this.actions = new ActionsImpl(clientObject.getActions(), this); - } - return actions; - } - - /** - * Gets the resource collection API of AlertRuleTemplates. - * - * @return Resource collection API of AlertRuleTemplates. - */ - public AlertRuleTemplates alertRuleTemplates() { - if (this.alertRuleTemplates == null) { - this.alertRuleTemplates = new AlertRuleTemplatesImpl(clientObject.getAlertRuleTemplates(), this); - } - return alertRuleTemplates; - } - - /** - * Gets the resource collection API of AutomationRules. It manages AutomationRule. - * - * @return Resource collection API of AutomationRules. - */ - public AutomationRules automationRules() { - if (this.automationRules == null) { - this.automationRules = new AutomationRulesImpl(clientObject.getAutomationRules(), this); - } - return automationRules; - } - - /** - * Gets the resource collection API of Incidents. It manages Incident. - * - * @return Resource collection API of Incidents. - */ - public Incidents incidents() { - if (this.incidents == null) { - this.incidents = new IncidentsImpl(clientObject.getIncidents(), this); - } - return incidents; - } - - /** - * Gets the resource collection API of Bookmarks. It manages Bookmark. - * - * @return Resource collection API of Bookmarks. - */ - public Bookmarks bookmarks() { - if (this.bookmarks == null) { - this.bookmarks = new BookmarksImpl(clientObject.getBookmarks(), this); - } - return bookmarks; - } - - /** - * Gets the resource collection API of BookmarkRelations. It manages Relation. - * - * @return Resource collection API of BookmarkRelations. - */ - public BookmarkRelations bookmarkRelations() { - if (this.bookmarkRelations == null) { - this.bookmarkRelations = new BookmarkRelationsImpl(clientObject.getBookmarkRelations(), this); - } - return bookmarkRelations; - } - - /** - * Gets the resource collection API of BookmarkOperations. - * - * @return Resource collection API of BookmarkOperations. - */ - public BookmarkOperations bookmarkOperations() { - if (this.bookmarkOperations == null) { - this.bookmarkOperations = new BookmarkOperationsImpl(clientObject.getBookmarkOperations(), this); - } - return bookmarkOperations; - } - - /** - * Gets the resource collection API of IpGeodatas. - * - * @return Resource collection API of IpGeodatas. - */ - public IpGeodatas ipGeodatas() { - if (this.ipGeodatas == null) { - this.ipGeodatas = new IpGeodatasImpl(clientObject.getIpGeodatas(), this); - } - return ipGeodatas; - } - - /** - * Gets the resource collection API of DomainWhois. - * - * @return Resource collection API of DomainWhois. - */ - public DomainWhois domainWhois() { - if (this.domainWhois == null) { - this.domainWhois = new DomainWhoisImpl(clientObject.getDomainWhois(), this); - } - return domainWhois; - } - - /** - * Gets the resource collection API of Entities. - * - * @return Resource collection API of Entities. - */ - public Entities entities() { - if (this.entities == null) { - this.entities = new EntitiesImpl(clientObject.getEntities(), this); - } - return entities; - } - - /** - * Gets the resource collection API of EntitiesGetTimelines. - * - * @return Resource collection API of EntitiesGetTimelines. - */ - public EntitiesGetTimelines entitiesGetTimelines() { - if (this.entitiesGetTimelines == null) { - this.entitiesGetTimelines = new EntitiesGetTimelinesImpl(clientObject.getEntitiesGetTimelines(), this); - } - return entitiesGetTimelines; - } - - /** - * Gets the resource collection API of EntitiesRelations. - * - * @return Resource collection API of EntitiesRelations. - */ - public EntitiesRelations entitiesRelations() { - if (this.entitiesRelations == null) { - this.entitiesRelations = new EntitiesRelationsImpl(clientObject.getEntitiesRelations(), this); - } - return entitiesRelations; - } - - /** - * Gets the resource collection API of EntityRelations. - * - * @return Resource collection API of EntityRelations. - */ - public EntityRelations entityRelations() { - if (this.entityRelations == null) { - this.entityRelations = new EntityRelationsImpl(clientObject.getEntityRelations(), this); - } - return entityRelations; - } - - /** - * Gets the resource collection API of EntityQueries. - * - * @return Resource collection API of EntityQueries. - */ - public EntityQueries entityQueries() { - if (this.entityQueries == null) { - this.entityQueries = new EntityQueriesImpl(clientObject.getEntityQueries(), this); - } - return entityQueries; - } - - /** - * Gets the resource collection API of EntityQueryTemplates. - * - * @return Resource collection API of EntityQueryTemplates. - */ - public EntityQueryTemplates entityQueryTemplates() { - if (this.entityQueryTemplates == null) { - this.entityQueryTemplates = new EntityQueryTemplatesImpl(clientObject.getEntityQueryTemplates(), this); - } - return entityQueryTemplates; - } - - /** - * Gets the resource collection API of FileImports. It manages FileImport. - * - * @return Resource collection API of FileImports. - */ - public FileImports fileImports() { - if (this.fileImports == null) { - this.fileImports = new FileImportsImpl(clientObject.getFileImports(), this); - } - return fileImports; - } - - /** - * Gets the resource collection API of IncidentComments. It manages IncidentComment. - * - * @return Resource collection API of IncidentComments. - */ - public IncidentComments incidentComments() { - if (this.incidentComments == null) { - this.incidentComments = new IncidentCommentsImpl(clientObject.getIncidentComments(), this); - } - return incidentComments; - } - - /** - * Gets the resource collection API of IncidentRelations. - * - * @return Resource collection API of IncidentRelations. - */ - public IncidentRelations incidentRelations() { - if (this.incidentRelations == null) { - this.incidentRelations = new IncidentRelationsImpl(clientObject.getIncidentRelations(), this); - } - return incidentRelations; - } - - /** - * Gets the resource collection API of Metadatas. It manages MetadataModel. - * - * @return Resource collection API of Metadatas. - */ - public Metadatas metadatas() { - if (this.metadatas == null) { - this.metadatas = new MetadatasImpl(clientObject.getMetadatas(), this); - } - return metadatas; - } - - /** - * Gets the resource collection API of OfficeConsents. - * - * @return Resource collection API of OfficeConsents. - */ - public OfficeConsents officeConsents() { - if (this.officeConsents == null) { - this.officeConsents = new OfficeConsentsImpl(clientObject.getOfficeConsents(), this); - } - return officeConsents; - } - - /** - * Gets the resource collection API of SentinelOnboardingStates. It manages SentinelOnboardingState. - * - * @return Resource collection API of SentinelOnboardingStates. - */ - public SentinelOnboardingStates sentinelOnboardingStates() { - if (this.sentinelOnboardingStates == null) { - this.sentinelOnboardingStates = - new SentinelOnboardingStatesImpl(clientObject.getSentinelOnboardingStates(), this); - } - return sentinelOnboardingStates; - } - - /** - * Gets the resource collection API of SecurityMLAnalyticsSettings. - * - * @return Resource collection API of SecurityMLAnalyticsSettings. - */ - public SecurityMLAnalyticsSettings securityMLAnalyticsSettings() { - if (this.securityMLAnalyticsSettings == null) { - this.securityMLAnalyticsSettings = - new SecurityMLAnalyticsSettingsImpl(clientObject.getSecurityMLAnalyticsSettings(), this); - } - return securityMLAnalyticsSettings; - } - - /** - * Gets the resource collection API of ProductSettings. - * - * @return Resource collection API of ProductSettings. - */ - public ProductSettings productSettings() { - if (this.productSettings == null) { - this.productSettings = new ProductSettingsImpl(clientObject.getProductSettings(), this); - } - return productSettings; - } - - /** - * Gets the resource collection API of SourceControls. - * - * @return Resource collection API of SourceControls. - */ - public SourceControls sourceControls() { - if (this.sourceControls == null) { - this.sourceControls = new SourceControlsImpl(clientObject.getSourceControls(), this); - } - return sourceControls; - } - - /** - * Gets the resource collection API of SourceControlsOperations. It manages SourceControl. - * - * @return Resource collection API of SourceControlsOperations. - */ - public SourceControlsOperations sourceControlsOperations() { - if (this.sourceControlsOperations == null) { - this.sourceControlsOperations = - new SourceControlsOperationsImpl(clientObject.getSourceControlsOperations(), this); - } - return sourceControlsOperations; - } - - /** - * Gets the resource collection API of ThreatIntelligenceIndicators. - * - * @return Resource collection API of ThreatIntelligenceIndicators. - */ - public ThreatIntelligenceIndicators threatIntelligenceIndicators() { - if (this.threatIntelligenceIndicators == null) { - this.threatIntelligenceIndicators = - new ThreatIntelligenceIndicatorsImpl(clientObject.getThreatIntelligenceIndicators(), this); - } - return threatIntelligenceIndicators; - } - - /** - * Gets the resource collection API of ThreatIntelligenceIndicatorsOperations. - * - * @return Resource collection API of ThreatIntelligenceIndicatorsOperations. - */ - public ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations() { - if (this.threatIntelligenceIndicatorsOperations == null) { - this.threatIntelligenceIndicatorsOperations = - new ThreatIntelligenceIndicatorsOperationsImpl( - clientObject.getThreatIntelligenceIndicatorsOperations(), this); - } - return threatIntelligenceIndicatorsOperations; - } - - /** - * Gets the resource collection API of ThreatIntelligenceIndicatorMetrics. - * - * @return Resource collection API of ThreatIntelligenceIndicatorMetrics. - */ - public ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics() { - if (this.threatIntelligenceIndicatorMetrics == null) { - this.threatIntelligenceIndicatorMetrics = - new ThreatIntelligenceIndicatorMetricsImpl(clientObject.getThreatIntelligenceIndicatorMetrics(), this); - } - return threatIntelligenceIndicatorMetrics; - } - - /** - * Gets the resource collection API of Watchlists. It manages Watchlist. - * - * @return Resource collection API of Watchlists. - */ - public Watchlists watchlists() { - if (this.watchlists == null) { - this.watchlists = new WatchlistsImpl(clientObject.getWatchlists(), this); - } - return watchlists; - } - - /** - * Gets the resource collection API of WatchlistItems. It manages WatchlistItem. - * - * @return Resource collection API of WatchlistItems. - */ - public WatchlistItems watchlistItems() { - if (this.watchlistItems == null) { - this.watchlistItems = new WatchlistItemsImpl(clientObject.getWatchlistItems(), this); - } - return watchlistItems; - } - - /** - * Gets the resource collection API of DataConnectors. - * - * @return Resource collection API of DataConnectors. - */ - public DataConnectors dataConnectors() { - if (this.dataConnectors == null) { - this.dataConnectors = new DataConnectorsImpl(clientObject.getDataConnectors(), this); - } - return dataConnectors; - } - - /** - * Gets the resource collection API of DataConnectorsCheckRequirementsOperations. - * - * @return Resource collection API of DataConnectorsCheckRequirementsOperations. - */ - public DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations() { - if (this.dataConnectorsCheckRequirementsOperations == null) { - this.dataConnectorsCheckRequirementsOperations = - new DataConnectorsCheckRequirementsOperationsImpl( - clientObject.getDataConnectorsCheckRequirementsOperations(), this); - } - return dataConnectorsCheckRequirementsOperations; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * @return Wrapped service client SecurityInsights providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. - */ - public SecurityInsights serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java deleted file mode 100644 index 1679ca2138ad..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java +++ /dev/null @@ -1,149 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; -import com.azure.resourcemanager.securityinsights.models.ActionRequest; - -/** An instance of this class provides access to all the operations defined in ActionsClient. */ -public interface ActionsClient { - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 all actions of alert rule as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAlertRule(String resourceGroupName, String workspaceName, String ruleId); - - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 all actions of alert rule as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAlertRule( - String resourceGroupName, String workspaceName, String ruleId, Context context); - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @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 the action of alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @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 the action of alert rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); - - /** - * Creates or updates the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param action The action. - * @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 action for alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); - - /** - * Creates or updates the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param action The action. - * @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 action for alert rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String ruleId, - String actionId, - ActionRequest action, - Context context); - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java deleted file mode 100644 index c568ee0f23fe..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; - -/** An instance of this class provides access to all the operations defined in AlertRuleTemplatesClient. */ -public interface AlertRuleTemplatesClient { - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all alert rule templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all alert rule templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @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 the alert rule template. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @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 the alert rule template along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java deleted file mode 100644 index d40ca296e5fc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java +++ /dev/null @@ -1,133 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; - -/** An instance of this class provides access to all the operations defined in AlertRulesClient. */ -public interface AlertRulesClient { - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all alert rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all alert rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 the alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 the alert rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context); - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @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 alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @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 alert rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId); - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java deleted file mode 100644 index 8bdfc546a32d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java +++ /dev/null @@ -1,137 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner; - -/** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ -public interface AutomationRulesClient { - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 the automation rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); - - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 the automation rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. - * @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 the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert, - Context context); - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all automation rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all automation rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java deleted file mode 100644 index 1d63a4251db1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java +++ /dev/null @@ -1,52 +0,0 @@ -// 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.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.securityinsights.fluent.models.BookmarkExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; - -/** An instance of this class provides access to all the operations defined in BookmarkOperationsClient. */ -public interface BookmarkOperationsClient { - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @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 the entity expansion result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkExpandResponseInner expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @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 the entity expansion result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java deleted file mode 100644 index e644d527b90a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java +++ /dev/null @@ -1,161 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** An instance of this class provides access to all the operations defined in BookmarkRelationsClient. */ -public interface BookmarkRelationsClient { - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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 all bookmark relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId); - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all bookmark relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @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 bookmark relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @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 bookmark relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @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 represents a relation between two resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, RelationInner relation); - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @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 represents a relation between two resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation, - Context context); - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java deleted file mode 100644 index 767fec60845b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java +++ /dev/null @@ -1,134 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; - -/** An instance of this class provides access to all the operations defined in BookmarksClient. */ -public interface BookmarksClient { - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all bookmarks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all bookmarks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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 bookmark. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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 bookmark along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); - - /** - * Creates or updates the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param bookmark The bookmark. - * @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 represents a bookmark in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); - - /** - * Creates or updates the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param bookmark The bookmark. - * @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 represents a bookmark in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId); - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java deleted file mode 100644 index 146c3f4c1793..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.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.securityinsights.fluent.models.DataConnectorRequirementsStateInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements; - -/** - * An instance of this class provides access to all the operations defined in - * DataConnectorsCheckRequirementsOperationsClient. - */ -public interface DataConnectorsCheckRequirementsOperationsClient { - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @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 requirements state for a data connector type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorRequirementsStateInner post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements); - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @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 requirements state for a data connector type along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response postWithResponse( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java deleted file mode 100644 index 78d1cc36c200..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java +++ /dev/null @@ -1,204 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; - -/** An instance of this class provides access to all the operations defined in DataConnectorsClient. */ -public interface DataConnectorsClient { - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all data connectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all data connectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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 data connector. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId); - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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 data connector along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context); - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @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 connector. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @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 connector along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorInner dataConnector, - Context context); - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String dataConnectorId); - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context); - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context); - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java deleted file mode 100644 index e9ae9d9fcfed..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.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.securityinsights.fluent.models.EnrichmentDomainWhoisInner; - -/** An instance of this class provides access to all the operations defined in DomainWhoisClient. */ -public interface DomainWhoisClient { - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @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 whois information for a single domain name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnrichmentDomainWhoisInner get(String resourceGroupName, String domain); - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @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 whois information for a single domain name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String domain, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java deleted file mode 100644 index 28404013fdcb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java +++ /dev/null @@ -1,185 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; - -/** An instance of this class provides access to all the operations defined in EntitiesClient. */ -public interface EntitiesClient { - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @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 an entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityInner get(String resourceGroupName, String workspaceName, String entityId); - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @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 an entity along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityId, Context context); - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @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 the entity expansion result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityExpandResponseInner expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @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 the entity expansion result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context); - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @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 insights and Activities for an entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GetQueriesResponseInner queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @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 insights and Activities for an entity along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context); - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @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 the Get Insights result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityGetInsightsResponseInner getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @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 the Get Insights result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java deleted file mode 100644 index bfa335c3065e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java +++ /dev/null @@ -1,52 +0,0 @@ -// 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.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.securityinsights.fluent.models.EntityTimelineResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; - -/** An instance of this class provides access to all the operations defined in EntitiesGetTimelinesClient. */ -public interface EntitiesGetTimelinesClient { - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @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 the entity timeline result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityTimelineResponseInner list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @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 the entity timeline result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java deleted file mode 100644 index 10130bd876ab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** An instance of this class provides access to all the operations defined in EntitiesRelationsClient. */ -public interface EntitiesRelationsClient { - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @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 all relations of an entity as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String entityId); - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all relations of an entity as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java deleted file mode 100644 index 68ba3c6be0c3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java +++ /dev/null @@ -1,142 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.models.CustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; - -/** An instance of this class provides access to all the operations defined in EntityQueriesClient. */ -public interface EntityQueriesClient { - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all entity queries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @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 all entity queries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @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 an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @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 an entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context); - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or 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 specific entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryInner createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or 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 specific entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context); - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String entityQueryId); - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java deleted file mode 100644 index 96c60a276dae..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java +++ /dev/null @@ -1,75 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; - -/** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ -public interface EntityQueryTemplatesClient { - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all entity query templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @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 all entity query templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @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 an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @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 an entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java deleted file mode 100644 index 9f6c0165269d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.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.securityinsights.fluent.models.RelationInner; - -/** An instance of this class provides access to all the operations defined in EntityRelationsClient. */ -public interface EntityRelationsClient { - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @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 an entity relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @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 an entity relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java deleted file mode 100644 index 91450d050bde..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java +++ /dev/null @@ -1,184 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; - -/** An instance of this class provides access to all the operations defined in FileImportsClient. */ -public interface FileImportsClient { - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all file imports as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all file imports as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 file import. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 file import along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context); - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @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 represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner create( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport); - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @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 represents a file import in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 the {@link SyncPoller} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FileImportInner> beginDelete( - String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 the {@link SyncPoller} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FileImportInner> beginDelete( - String resourceGroupName, String workspaceName, String fileImportId, Context context); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner delete(String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner delete(String resourceGroupName, String workspaceName, String fileImportId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java deleted file mode 100644 index c8f34adc3578..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java +++ /dev/null @@ -1,166 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; - -/** An instance of this class provides access to all the operations defined in IncidentCommentsClient. */ -public interface IncidentCommentsClient { - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident comments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all incident comments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @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 an incident comment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentCommentInner get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @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 an incident comment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); - - /** - * Creates or updates the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param incidentComment The incident comment. - * @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 represents an incident comment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentCommentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String incidentId, - String incidentCommentId, - IncidentCommentInner incidentComment); - - /** - * Creates or updates the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param incidentComment The incident comment. - * @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 represents an incident comment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - String incidentCommentId, - IncidentCommentInner incidentComment, - Context context); - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java deleted file mode 100644 index 8f2125a0506d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java +++ /dev/null @@ -1,161 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** An instance of this class provides access to all the operations defined in IncidentRelationsClient. */ -public interface IncidentRelationsClient { - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all incident relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @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 an incident relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName); - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @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 an incident relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @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 represents a relation between two resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @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 represents a relation between two resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation, - Context context); - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java deleted file mode 100644 index 12e0bda1f5e8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java +++ /dev/null @@ -1,315 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentAlertListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; - -/** An instance of this class provides access to all the operations defined in IncidentsClient. */ -public interface IncidentsClient { - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @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 any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @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 any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context); - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all incidents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all incidents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 an incident. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentInner get(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 an incident along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Creates or updates the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incident The incident. - * @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 represents an incident in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident); - - /** - * Creates or updates the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incident The incident. - * @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 represents an incident in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context); - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @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 describes team information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TeamInformationInner createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties); - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @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 describes team information along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context); - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident alerts. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident alerts along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listAlertsWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident bookmarks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident bookmarks along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listBookmarksWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident related entities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentEntitiesResponseInner listEntities(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident related entities along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java deleted file mode 100644 index 50c85d732cb8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.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.securityinsights.fluent.models.EnrichmentIpGeodataInner; - -/** An instance of this class provides access to all the operations defined in IpGeodatasClient. */ -public interface IpGeodatasClient { - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @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 geodata for a single IP address. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress); - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @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 geodata for a single IP address along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String ipAddress, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java deleted file mode 100644 index a42eaa9112f1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java +++ /dev/null @@ -1,188 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.MetadataPatch; - -/** An instance of this class provides access to all the operations defined in MetadatasClient. */ -public interface MetadatasClient { - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 list of all the metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @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 list of all the metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context); - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @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 Metadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName); - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @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 Metadata along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String metadataName); - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @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 metadata resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata); - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata 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 metadata resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataModelInner metadata, - Context context); - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @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 metadata resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch); - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @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 metadata resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataPatch metadataPatch, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java deleted file mode 100644 index 09ab2236789b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java +++ /dev/null @@ -1,101 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; - -/** An instance of this class provides access to all the operations defined in OfficeConsentsClient. */ -public interface OfficeConsentsClient { - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all office365 consents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all office365 consents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @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 an office365 consent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId); - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @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 an office365 consent along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String consentId); - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java deleted file mode 100644 index c6ad3c2c8036..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.OperationInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @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 lists the operations available in the SecurityInsights RP as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @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 lists the operations available in the SecurityInsights RP as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java deleted file mode 100644 index ddb0f006d6b3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java +++ /dev/null @@ -1,133 +0,0 @@ -// 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.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.securityinsights.fluent.models.SettingListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; - -/** An instance of this class provides access to all the operations defined in ProductSettingsClient. */ -public interface ProductSettingsClient { - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 list of all the settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SettingListInner list(String resourceGroupName, String workspaceName); - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 list of all the settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @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 setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SettingsInner get(String resourceGroupName, String workspaceName, String settingsName); - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @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 setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsName); - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @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 the Setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SettingsInner update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @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 the Setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java deleted file mode 100644 index 4d9c0b816c82..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java +++ /dev/null @@ -1,284 +0,0 @@ -// 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.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for SecurityInsights class. */ -public interface SecurityInsights { - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the AlertRulesClient object to access its operations. - * - * @return the AlertRulesClient object. - */ - AlertRulesClient getAlertRules(); - - /** - * Gets the ActionsClient object to access its operations. - * - * @return the ActionsClient object. - */ - ActionsClient getActions(); - - /** - * Gets the AlertRuleTemplatesClient object to access its operations. - * - * @return the AlertRuleTemplatesClient object. - */ - AlertRuleTemplatesClient getAlertRuleTemplates(); - - /** - * Gets the AutomationRulesClient object to access its operations. - * - * @return the AutomationRulesClient object. - */ - AutomationRulesClient getAutomationRules(); - - /** - * Gets the IncidentsClient object to access its operations. - * - * @return the IncidentsClient object. - */ - IncidentsClient getIncidents(); - - /** - * Gets the BookmarksClient object to access its operations. - * - * @return the BookmarksClient object. - */ - BookmarksClient getBookmarks(); - - /** - * Gets the BookmarkRelationsClient object to access its operations. - * - * @return the BookmarkRelationsClient object. - */ - BookmarkRelationsClient getBookmarkRelations(); - - /** - * Gets the BookmarkOperationsClient object to access its operations. - * - * @return the BookmarkOperationsClient object. - */ - BookmarkOperationsClient getBookmarkOperations(); - - /** - * Gets the IpGeodatasClient object to access its operations. - * - * @return the IpGeodatasClient object. - */ - IpGeodatasClient getIpGeodatas(); - - /** - * Gets the DomainWhoisClient object to access its operations. - * - * @return the DomainWhoisClient object. - */ - DomainWhoisClient getDomainWhois(); - - /** - * Gets the EntitiesClient object to access its operations. - * - * @return the EntitiesClient object. - */ - EntitiesClient getEntities(); - - /** - * Gets the EntitiesGetTimelinesClient object to access its operations. - * - * @return the EntitiesGetTimelinesClient object. - */ - EntitiesGetTimelinesClient getEntitiesGetTimelines(); - - /** - * Gets the EntitiesRelationsClient object to access its operations. - * - * @return the EntitiesRelationsClient object. - */ - EntitiesRelationsClient getEntitiesRelations(); - - /** - * Gets the EntityRelationsClient object to access its operations. - * - * @return the EntityRelationsClient object. - */ - EntityRelationsClient getEntityRelations(); - - /** - * Gets the EntityQueriesClient object to access its operations. - * - * @return the EntityQueriesClient object. - */ - EntityQueriesClient getEntityQueries(); - - /** - * Gets the EntityQueryTemplatesClient object to access its operations. - * - * @return the EntityQueryTemplatesClient object. - */ - EntityQueryTemplatesClient getEntityQueryTemplates(); - - /** - * Gets the FileImportsClient object to access its operations. - * - * @return the FileImportsClient object. - */ - FileImportsClient getFileImports(); - - /** - * Gets the IncidentCommentsClient object to access its operations. - * - * @return the IncidentCommentsClient object. - */ - IncidentCommentsClient getIncidentComments(); - - /** - * Gets the IncidentRelationsClient object to access its operations. - * - * @return the IncidentRelationsClient object. - */ - IncidentRelationsClient getIncidentRelations(); - - /** - * Gets the MetadatasClient object to access its operations. - * - * @return the MetadatasClient object. - */ - MetadatasClient getMetadatas(); - - /** - * Gets the OfficeConsentsClient object to access its operations. - * - * @return the OfficeConsentsClient object. - */ - OfficeConsentsClient getOfficeConsents(); - - /** - * Gets the SentinelOnboardingStatesClient object to access its operations. - * - * @return the SentinelOnboardingStatesClient object. - */ - SentinelOnboardingStatesClient getSentinelOnboardingStates(); - - /** - * Gets the SecurityMLAnalyticsSettingsClient object to access its operations. - * - * @return the SecurityMLAnalyticsSettingsClient object. - */ - SecurityMLAnalyticsSettingsClient getSecurityMLAnalyticsSettings(); - - /** - * Gets the ProductSettingsClient object to access its operations. - * - * @return the ProductSettingsClient object. - */ - ProductSettingsClient getProductSettings(); - - /** - * Gets the SourceControlsClient object to access its operations. - * - * @return the SourceControlsClient object. - */ - SourceControlsClient getSourceControls(); - - /** - * Gets the SourceControlsOperationsClient object to access its operations. - * - * @return the SourceControlsOperationsClient object. - */ - SourceControlsOperationsClient getSourceControlsOperations(); - - /** - * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorsClient object. - */ - ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators(); - - /** - * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorsOperationsClient object. - */ - ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations(); - - /** - * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorMetricsClient object. - */ - ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics(); - - /** - * Gets the WatchlistsClient object to access its operations. - * - * @return the WatchlistsClient object. - */ - WatchlistsClient getWatchlists(); - - /** - * Gets the WatchlistItemsClient object to access its operations. - * - * @return the WatchlistItemsClient object. - */ - WatchlistItemsClient getWatchlistItems(); - - /** - * Gets the DataConnectorsClient object to access its operations. - * - * @return the DataConnectorsClient object. - */ - DataConnectorsClient getDataConnectors(); - - /** - * Gets the DataConnectorsCheckRequirementsOperationsClient object to access its operations. - * - * @return the DataConnectorsCheckRequirementsOperationsClient object. - */ - DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckRequirementsOperations(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java deleted file mode 100644 index 421b46427588..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java +++ /dev/null @@ -1,142 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner; - -/** An instance of this class provides access to all the operations defined in SecurityMLAnalyticsSettingsClient. */ -public interface SecurityMLAnalyticsSettingsClient { - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all Security ML Analytics Settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all Security ML Analytics Settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @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 the Security ML Analytics Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @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 the Security ML Analytics Settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @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 security ML Analytics Setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @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 security ML Analytics Setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java deleted file mode 100644 index 10a75e9aee2e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java +++ /dev/null @@ -1,139 +0,0 @@ -// 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.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.securityinsights.fluent.models.SentinelOnboardingStateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStatesListInner; - -/** An instance of this class provides access to all the operations defined in SentinelOnboardingStatesClient. */ -public interface SentinelOnboardingStatesClient { - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 sentinel onboarding state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 sentinel onboarding state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 sentinel onboarding state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner create( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. - * @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 sentinel onboarding state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter, - Context context); - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all Sentinel onboarding states. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all Sentinel onboarding states along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java deleted file mode 100644 index df97d27b4605..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.azure.resourcemanager.securityinsights.models.RepoType; - -/** An instance of this class provides access to all the operations defined in SourceControlsClient. */ -public interface SourceControlsClient { - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @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 of repositories metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType); - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @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 of repositories metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRepositories( - String resourceGroupName, String workspaceName, RepoType repoType, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java deleted file mode 100644 index cbf7109c8ebb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java +++ /dev/null @@ -1,138 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; - -/** An instance of this class provides access to all the operations defined in SourceControlsOperationsClient. */ -public interface SourceControlsOperationsClient { - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all source controls, without source control items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all source controls, without source control items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @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 source control byt its identifier. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId); - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @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 source control byt its identifier along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sourceControlId); - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @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 represents a SourceControl in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner create( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl); - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @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 represents a SourceControl in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sourceControlId, - SourceControlInner sourceControl, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java deleted file mode 100644 index 326b9eedc2e1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.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.securityinsights.fluent.models.ThreatIntelligenceMetricsListInner; - -/** - * An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorMetricsClient. - */ -public interface ThreatIntelligenceIndicatorMetricsClient { - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); - - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java deleted file mode 100644 index 1e34a2b75f05..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java +++ /dev/null @@ -1,265 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; - -/** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */ -public interface ThreatIntelligenceIndicatorsClient { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and 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 threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and 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 threat intelligence information object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createIndicatorWithResponse( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context); - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @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 threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @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 threat intelligence information object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and 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 threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and 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 threat intelligence information object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context); - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @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 list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable queryIndicators( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria); - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @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 list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable queryIndicators( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria, - Context context); - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void appendTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response appendTagsWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @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 threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner replaceTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @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 threat intelligence information object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response replaceTagsWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java deleted file mode 100644 index bbb61deb6dee..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; - -/** - * An instance of this class provides access to all the operations defined in - * ThreatIntelligenceIndicatorsOperationsClient. - */ -public interface ThreatIntelligenceIndicatorsOperationsClient { - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all threat intelligence indicators as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all threat intelligence indicators as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java deleted file mode 100644 index 80ba49f0d3be..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java +++ /dev/null @@ -1,156 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; - -/** An instance of this class provides access to all the operations defined in WatchlistItemsClient. */ -public interface WatchlistItemsClient { - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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 all watchlist Items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias); - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all watchlist Items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @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 watchlist, without its watchlist items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistItemInner get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @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 watchlist, without its watchlist items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @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 the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); - - /** - * Creates or updates a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param watchlistItem The watchlist item. - * @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 represents a Watchlist item in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistItemInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - WatchlistItemInner watchlistItem); - - /** - * Creates or updates a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param watchlistItem The watchlist item. - * @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 represents a Watchlist item in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java deleted file mode 100644 index 10b174e1207f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java +++ /dev/null @@ -1,152 +0,0 @@ -// 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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; -import com.azure.resourcemanager.securityinsights.models.WatchlistsCreateOrUpdateResponse; -import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; - -/** An instance of this class provides access to all the operations defined in WatchlistsClient. */ -public interface WatchlistsClient { - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all watchlists, without watchlist items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all watchlists, without watchlist items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skipToken, Context context); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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 watchlist, without its watchlist items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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 watchlist, without its watchlist items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String watchlistAlias); - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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 the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); - - /** - * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and - * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS - * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing - * such large file can be polled through the URL returned in Azure-AsyncOperation header. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlist The watchlist. - * @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 represents a Watchlist in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistInner createOrUpdate( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); - - /** - * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and - * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS - * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing - * such large file can be polled through the URL returned in Azure-AsyncOperation header. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlist The watchlist. - * @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 represents a Watchlist in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java deleted file mode 100644 index ca6a6d8e19e0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** AAD (Azure Active Directory) requirements check properties. */ -@Fluent -public final class AadCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public AadCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java deleted file mode 100644 index be85a145cdd0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** AAD (Azure Active Directory) data connector properties. */ -@Fluent -public final class AadDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes") - private AlertsDataTypeOfDataConnector dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AadDataConnectorProperties object itself. - */ - public AadDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public AadDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() != null) { - dataTypes().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java deleted file mode 100644 index ee6d93cd9141..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** AATP (Azure Advanced Threat Protection) requirements check properties. */ -@Fluent -public final class AatpCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public AatpCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java deleted file mode 100644 index 3a0bdc1ed428..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** AATP (Azure Advanced Threat Protection) data connector properties. */ -@Fluent -public final class AatpDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes") - private AlertsDataTypeOfDataConnector dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AatpDataConnectorProperties object itself. - */ - public AatpDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public AatpDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() != null) { - dataTypes().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java deleted file mode 100644 index 22c53e70b336..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java +++ /dev/null @@ -1,211 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** Account entity property bag. */ -@Immutable -public final class AccountEntityProperties extends EntityCommonProperties { - /* - * The Azure Active Directory tenant id. - */ - @JsonProperty(value = "aadTenantId", access = JsonProperty.Access.WRITE_ONLY) - private String aadTenantId; - - /* - * The Azure Active Directory user id. - */ - @JsonProperty(value = "aadUserId", access = JsonProperty.Access.WRITE_ONLY) - private String aadUserId; - - /* - * The name of the account. This field should hold only the name without any domain added to it, i.e. - * administrator. - */ - @JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY) - private String accountName; - - /* - * The display name of the account. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * The Host entity id that contains the account in case it is a local account (not domain joined) - */ - @JsonProperty(value = "hostEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String hostEntityId; - - /* - * Determines whether this is a domain account. - */ - @JsonProperty(value = "isDomainJoined", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDomainJoined; - - /* - * The NetBIOS domain name as it appears in the alert format domain/username. Examples: NT AUTHORITY. - */ - @JsonProperty(value = "ntDomain", access = JsonProperty.Access.WRITE_ONLY) - private String ntDomain; - - /* - * The objectGUID attribute is a single-value attribute that is the unique identifier for the object, assigned by - * active directory. - */ - @JsonProperty(value = "objectGuid", access = JsonProperty.Access.WRITE_ONLY) - private UUID objectGuid; - - /* - * The Azure Active Directory Passport User ID. - */ - @JsonProperty(value = "puid", access = JsonProperty.Access.WRITE_ONLY) - private String puid; - - /* - * The account security identifier, e.g. S-1-5-18. - */ - @JsonProperty(value = "sid", access = JsonProperty.Access.WRITE_ONLY) - private String sid; - - /* - * The user principal name suffix for the account, in some cases it is also the domain name. Examples: contoso.com. - */ - @JsonProperty(value = "upnSuffix", access = JsonProperty.Access.WRITE_ONLY) - private String upnSuffix; - - /* - * The fully qualified domain DNS name. - */ - @JsonProperty(value = "dnsDomain", access = JsonProperty.Access.WRITE_ONLY) - private String dnsDomain; - - /** - * Get the aadTenantId property: The Azure Active Directory tenant id. - * - * @return the aadTenantId value. - */ - public String aadTenantId() { - return this.aadTenantId; - } - - /** - * Get the aadUserId property: The Azure Active Directory user id. - * - * @return the aadUserId value. - */ - public String aadUserId() { - return this.aadUserId; - } - - /** - * Get the accountName property: The name of the account. This field should hold only the name without any domain - * added to it, i.e. administrator. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Get the displayName property: The display name of the account. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the hostEntityId property: The Host entity id that contains the account in case it is a local account (not - * domain joined). - * - * @return the hostEntityId value. - */ - public String hostEntityId() { - return this.hostEntityId; - } - - /** - * Get the isDomainJoined property: Determines whether this is a domain account. - * - * @return the isDomainJoined value. - */ - public Boolean isDomainJoined() { - return this.isDomainJoined; - } - - /** - * Get the ntDomain property: The NetBIOS domain name as it appears in the alert format domain/username. Examples: - * NT AUTHORITY. - * - * @return the ntDomain value. - */ - public String ntDomain() { - return this.ntDomain; - } - - /** - * Get the objectGuid property: The objectGUID attribute is a single-value attribute that is the unique identifier - * for the object, assigned by active directory. - * - * @return the objectGuid value. - */ - public UUID objectGuid() { - return this.objectGuid; - } - - /** - * Get the puid property: The Azure Active Directory Passport User ID. - * - * @return the puid value. - */ - public String puid() { - return this.puid; - } - - /** - * Get the sid property: The account security identifier, e.g. S-1-5-18. - * - * @return the sid value. - */ - public String sid() { - return this.sid; - } - - /** - * Get the upnSuffix property: The user principal name suffix for the account, in some cases it is also the domain - * name. Examples: contoso.com. - * - * @return the upnSuffix value. - */ - public String upnSuffix() { - return this.upnSuffix; - } - - /** - * Get the dnsDomain property: The fully qualified domain DNS name. - * - * @return the dnsDomain value. - */ - public String dnsDomain() { - return this.dnsDomain; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java deleted file mode 100644 index 412a0c40b92e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java +++ /dev/null @@ -1,65 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.ActionPropertiesBase; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Action property bag. */ -@Fluent -public final class ActionRequestProperties extends ActionPropertiesBase { - /* - * Logic App Callback URL for this specific workflow. - */ - @JsonProperty(value = "triggerUri", required = true) - private String triggerUri; - - /** - * Get the triggerUri property: Logic App Callback URL for this specific workflow. - * - * @return the triggerUri value. - */ - public String triggerUri() { - return this.triggerUri; - } - - /** - * Set the triggerUri property: Logic App Callback URL for this specific workflow. - * - * @param triggerUri the triggerUri value to set. - * @return the ActionRequestProperties object itself. - */ - public ActionRequestProperties withTriggerUri(String triggerUri) { - this.triggerUri = triggerUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public ActionRequestProperties withLogicAppResourceId(String logicAppResourceId) { - super.withLogicAppResourceId(logicAppResourceId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (triggerUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property triggerUri in model ActionRequestProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ActionRequestProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java deleted file mode 100644 index 3122bbedd575..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java +++ /dev/null @@ -1,96 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Action for alert rule. */ -@Fluent -public final class ActionResponseInner extends ResourceWithEtag { - /* - * Action properties for get request - */ - @JsonProperty(value = "properties") - private ActionResponseProperties innerProperties; - - /** - * Get the innerProperties property: Action properties for get request. - * - * @return the innerProperties value. - */ - private ActionResponseProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ActionResponseInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the workflowId property: The name of the logic app's workflow. - * - * @return the workflowId value. - */ - public String workflowId() { - return this.innerProperties() == null ? null : this.innerProperties().workflowId(); - } - - /** - * Set the workflowId property: The name of the logic app's workflow. - * - * @param workflowId the workflowId value to set. - * @return the ActionResponseInner object itself. - */ - public ActionResponseInner withWorkflowId(String workflowId) { - if (this.innerProperties() == null) { - this.innerProperties = new ActionResponseProperties(); - } - this.innerProperties().withWorkflowId(workflowId); - return this; - } - - /** - * Get the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * - * @return the logicAppResourceId value. - */ - public String logicAppResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().logicAppResourceId(); - } - - /** - * Set the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * - * @param logicAppResourceId the logicAppResourceId value to set. - * @return the ActionResponseInner object itself. - */ - public ActionResponseInner withLogicAppResourceId(String logicAppResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new ActionResponseProperties(); - } - this.innerProperties().withLogicAppResourceId(logicAppResourceId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java deleted file mode 100644 index 0661a17d6444..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ActionPropertiesBase; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Action property bag. */ -@Fluent -public final class ActionResponseProperties extends ActionPropertiesBase { - /* - * The name of the logic app's workflow. - */ - @JsonProperty(value = "workflowId") - private String workflowId; - - /** - * Get the workflowId property: The name of the logic app's workflow. - * - * @return the workflowId value. - */ - public String workflowId() { - return this.workflowId; - } - - /** - * Set the workflowId property: The name of the logic app's workflow. - * - * @param workflowId the workflowId value to set. - * @return the ActionResponseProperties object itself. - */ - public ActionResponseProperties withWorkflowId(String workflowId) { - this.workflowId = workflowId; - return this; - } - - /** {@inheritDoc} */ - @Override - public ActionResponseProperties withLogicAppResourceId(String logicAppResourceId) { - super.withLogicAppResourceId(logicAppResourceId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java deleted file mode 100644 index e3017231f55d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java +++ /dev/null @@ -1,297 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Describes activity entity query properties. */ -@Fluent -public final class ActivityEntityQueriesProperties { - /* - * The entity query title - */ - @JsonProperty(value = "title") - private String title; - - /* - * The entity query content to display in timeline - */ - @JsonProperty(value = "content") - private String content; - - /* - * The entity query description - */ - @JsonProperty(value = "description") - private String description; - - /* - * The Activity query definitions - */ - @JsonProperty(value = "queryDefinitions") - private ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions; - - /* - * The type of the query's source entity - */ - @JsonProperty(value = "inputEntityType") - private EntityType inputEntityType; - - /* - * List of the fields of the source entity that are required to run the query - */ - @JsonProperty(value = "requiredInputFieldsSets") - private List> requiredInputFieldsSets; - - /* - * The query applied only to entities matching to all filters - */ - @JsonProperty(value = "entitiesFilter") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map> entitiesFilter; - - /* - * The template id this activity was created from - */ - @JsonProperty(value = "templateName") - private String templateName; - - /* - * Determines whether this activity is enabled or disabled. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The time the activity was created - */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - - /* - * The last time the activity was updated - */ - @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTimeUtc; - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions() { - return this.queryDefinitions; - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withQueryDefinitions( - ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions) { - this.queryDefinitions = queryDefinitions; - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.inputEntityType; - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withInputEntityType(EntityType inputEntityType) { - this.inputEntityType = inputEntityType; - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.requiredInputFieldsSets; - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - this.requiredInputFieldsSets = requiredInputFieldsSets; - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.entitiesFilter; - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withEntitiesFilter(Map> entitiesFilter) { - this.entitiesFilter = entitiesFilter; - return this; - } - - /** - * Get the templateName property: The template id this activity was created from. - * - * @return the templateName value. - */ - public String templateName() { - return this.templateName; - } - - /** - * Set the templateName property: The template id this activity was created from. - * - * @param templateName the templateName value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withTemplateName(String templateName) { - this.templateName = templateName; - return this; - } - - /** - * Get the enabled property: Determines whether this activity is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this activity is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the createdTimeUtc property: The time the activity was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the lastModifiedTimeUtc property: The last time the activity was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.lastModifiedTimeUtc; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queryDefinitions() != null) { - queryDefinitions().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java deleted file mode 100644 index f8483ae549dc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java +++ /dev/null @@ -1,245 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueryTemplatePropertiesQueryDefinitions; -import com.azure.resourcemanager.securityinsights.models.DataTypeDefinitions; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Describes activity entity query properties. */ -@Fluent -public final class ActivityEntityQueryTemplateProperties { - /* - * The entity query title - */ - @JsonProperty(value = "title") - private String title; - - /* - * The entity query content to display in timeline - */ - @JsonProperty(value = "content") - private String content; - - /* - * The entity query description - */ - @JsonProperty(value = "description") - private String description; - - /* - * The Activity query definitions - */ - @JsonProperty(value = "queryDefinitions") - private ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions; - - /* - * List of required data types for the given entity query template - */ - @JsonProperty(value = "dataTypes") - private List dataTypes; - - /* - * The type of the query's source entity - */ - @JsonProperty(value = "inputEntityType") - private EntityType inputEntityType; - - /* - * List of the fields of the source entity that are required to run the query - */ - @JsonProperty(value = "requiredInputFieldsSets") - private List> requiredInputFieldsSets; - - /* - * The query applied only to entities matching to all filters - */ - @JsonProperty(value = "entitiesFilter") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map> entitiesFilter; - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions() { - return this.queryDefinitions; - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withQueryDefinitions( - ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions) { - this.queryDefinitions = queryDefinitions; - return this; - } - - /** - * Get the dataTypes property: List of required data types for the given entity query template. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: List of required data types for the given entity query template. - * - * @param dataTypes the dataTypes value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withDataTypes(List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.inputEntityType; - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withInputEntityType(EntityType inputEntityType) { - this.inputEntityType = inputEntityType; - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.requiredInputFieldsSets; - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withRequiredInputFieldsSets( - List> requiredInputFieldsSets) { - this.requiredInputFieldsSets = requiredInputFieldsSets; - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.entitiesFilter; - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withEntitiesFilter(Map> entitiesFilter) { - this.entitiesFilter = entitiesFilter; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queryDefinitions() != null) { - queryDefinitions().validate(); - } - if (dataTypes() != null) { - dataTypes().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java deleted file mode 100644 index f3346f5f0a50..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.FusionAlertRule; -import com.azure.resourcemanager.securityinsights.models.MLBehaviorAnalyticsAlertRule; -import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRule; -import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAlertRule; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Alert rule. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = AlertRuleInner.class) -@JsonTypeName("AlertRule") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "MLBehaviorAnalytics", value = MLBehaviorAnalyticsAlertRule.class), - @JsonSubTypes.Type(name = "Fusion", value = FusionAlertRule.class), - @JsonSubTypes.Type(name = "ThreatIntelligence", value = ThreatIntelligenceAlertRule.class), - @JsonSubTypes.Type( - name = "MicrosoftSecurityIncidentCreation", - value = MicrosoftSecurityIncidentCreationAlertRule.class), - @JsonSubTypes.Type(name = "Scheduled", value = ScheduledAlertRule.class), - @JsonSubTypes.Type(name = "NRT", value = NrtAlertRule.class) -}) -@Fluent -public class AlertRuleInner extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public AlertRuleInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java deleted file mode 100644 index a3b8dba66899..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java +++ /dev/null @@ -1,62 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.models.FusionAlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.MLBehaviorAnalyticsAlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.NrtAlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAlertRuleTemplate; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Alert rule template. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = AlertRuleTemplateInner.class) -@JsonTypeName("AlertRuleTemplate") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "MLBehaviorAnalytics", value = MLBehaviorAnalyticsAlertRuleTemplate.class), - @JsonSubTypes.Type(name = "Fusion", value = FusionAlertRuleTemplate.class), - @JsonSubTypes.Type(name = "ThreatIntelligence", value = ThreatIntelligenceAlertRuleTemplate.class), - @JsonSubTypes.Type( - name = "MicrosoftSecurityIncidentCreation", - value = MicrosoftSecurityIncidentCreationAlertRuleTemplate.class), - @JsonSubTypes.Type(name = "Scheduled", value = ScheduledAlertRuleTemplate.class), - @JsonSubTypes.Type(name = "NRT", value = NrtAlertRuleTemplate.class) -}) -@Immutable -public class AlertRuleTemplateInner extends ProxyResource { - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java deleted file mode 100644 index 1dbd5f5a9d02..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Anomalies property bag. */ -@Immutable -public final class AnomaliesSettingsProperties { - /* - * Determines whether the setting is enable or disabled. - */ - @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEnabled; - - /** - * Get the isEnabled property: Determines whether the setting is enable or disabled. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java deleted file mode 100644 index 039d66c00674..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java +++ /dev/null @@ -1,420 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettingsDataSource; -import com.azure.resourcemanager.securityinsights.models.SettingsStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.UUID; - -/** AnomalySecurityMLAnalytics settings base property bag. */ -@Fluent -public final class AnomalySecurityMLAnalyticsSettingsProperties { - /* - * The description of the SecurityMLAnalyticsSettings. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The display name for settings created by this SecurityMLAnalyticsSettings. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * Determines whether this settings is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The last time that this SecurityMLAnalyticsSettings has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The required data sources for this SecurityMLAnalyticsSettings - */ - @JsonProperty(value = "requiredDataConnectors") - private List requiredDataConnectors; - - /* - * The tactics of the SecurityMLAnalyticsSettings - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * The techniques of the SecurityMLAnalyticsSettings - */ - @JsonProperty(value = "techniques") - private List techniques; - - /* - * The anomaly version of the AnomalySecurityMLAnalyticsSettings. - */ - @JsonProperty(value = "anomalyVersion", required = true) - private String anomalyVersion; - - /* - * The customizable observations of the AnomalySecurityMLAnalyticsSettings. - */ - @JsonProperty(value = "customizableObservations") - private Object customizableObservations; - - /* - * The frequency that this SecurityMLAnalyticsSettings will be run. - */ - @JsonProperty(value = "frequency", required = true) - private Duration frequency; - - /* - * The anomaly SecurityMLAnalyticsSettings status - */ - @JsonProperty(value = "settingsStatus", required = true) - private SettingsStatus settingsStatus; - - /* - * Determines whether this anomaly security ml analytics settings is a default settings - */ - @JsonProperty(value = "isDefaultSettings", required = true) - private boolean isDefaultSettings; - - /* - * The anomaly settings version of the Anomaly security ml analytics settings that dictates whether job version - * gets updated or not. - */ - @JsonProperty(value = "anomalySettingsVersion") - private Integer anomalySettingsVersion; - - /* - * The anomaly settings definition Id - */ - @JsonProperty(value = "settingsDefinitionId") - private UUID settingsDefinitionId; - - /** - * Get the description property: The description of the SecurityMLAnalyticsSettings. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the SecurityMLAnalyticsSettings. - * - * @param description the description value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The display name for settings created by this SecurityMLAnalyticsSettings. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for settings created by this SecurityMLAnalyticsSettings. - * - * @param displayName the displayName value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the enabled property: Determines whether this settings is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this settings is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this SecurityMLAnalyticsSettings has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this SecurityMLAnalyticsSettings. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.requiredDataConnectors; - } - - /** - * Set the requiredDataConnectors property: The required data sources for this SecurityMLAnalyticsSettings. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withRequiredDataConnectors( - List requiredDataConnectors) { - this.requiredDataConnectors = requiredDataConnectors; - return this; - } - - /** - * Get the tactics property: The tactics of the SecurityMLAnalyticsSettings. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the SecurityMLAnalyticsSettings. - * - * @param tactics the tactics value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the techniques property: The techniques of the SecurityMLAnalyticsSettings. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: The techniques of the SecurityMLAnalyticsSettings. - * - * @param techniques the techniques value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** - * Get the anomalyVersion property: The anomaly version of the AnomalySecurityMLAnalyticsSettings. - * - * @return the anomalyVersion value. - */ - public String anomalyVersion() { - return this.anomalyVersion; - } - - /** - * Set the anomalyVersion property: The anomaly version of the AnomalySecurityMLAnalyticsSettings. - * - * @param anomalyVersion the anomalyVersion value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withAnomalyVersion(String anomalyVersion) { - this.anomalyVersion = anomalyVersion; - return this; - } - - /** - * Get the customizableObservations property: The customizable observations of the - * AnomalySecurityMLAnalyticsSettings. - * - * @return the customizableObservations value. - */ - public Object customizableObservations() { - return this.customizableObservations; - } - - /** - * Set the customizableObservations property: The customizable observations of the - * AnomalySecurityMLAnalyticsSettings. - * - * @param customizableObservations the customizableObservations value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withCustomizableObservations(Object customizableObservations) { - this.customizableObservations = customizableObservations; - return this; - } - - /** - * Get the frequency property: The frequency that this SecurityMLAnalyticsSettings will be run. - * - * @return the frequency value. - */ - public Duration frequency() { - return this.frequency; - } - - /** - * Set the frequency property: The frequency that this SecurityMLAnalyticsSettings will be run. - * - * @param frequency the frequency value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withFrequency(Duration frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the settingsStatus property: The anomaly SecurityMLAnalyticsSettings status. - * - * @return the settingsStatus value. - */ - public SettingsStatus settingsStatus() { - return this.settingsStatus; - } - - /** - * Set the settingsStatus property: The anomaly SecurityMLAnalyticsSettings status. - * - * @param settingsStatus the settingsStatus value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withSettingsStatus(SettingsStatus settingsStatus) { - this.settingsStatus = settingsStatus; - return this; - } - - /** - * Get the isDefaultSettings property: Determines whether this anomaly security ml analytics settings is a default - * settings. - * - * @return the isDefaultSettings value. - */ - public boolean isDefaultSettings() { - return this.isDefaultSettings; - } - - /** - * Set the isDefaultSettings property: Determines whether this anomaly security ml analytics settings is a default - * settings. - * - * @param isDefaultSettings the isDefaultSettings value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withIsDefaultSettings(boolean isDefaultSettings) { - this.isDefaultSettings = isDefaultSettings; - return this; - } - - /** - * Get the anomalySettingsVersion property: The anomaly settings version of the Anomaly security ml analytics - * settings that dictates whether job version gets updated or not. - * - * @return the anomalySettingsVersion value. - */ - public Integer anomalySettingsVersion() { - return this.anomalySettingsVersion; - } - - /** - * Set the anomalySettingsVersion property: The anomaly settings version of the Anomaly security ml analytics - * settings that dictates whether job version gets updated or not. - * - * @param anomalySettingsVersion the anomalySettingsVersion value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withAnomalySettingsVersion(Integer anomalySettingsVersion) { - this.anomalySettingsVersion = anomalySettingsVersion; - return this; - } - - /** - * Get the settingsDefinitionId property: The anomaly settings definition Id. - * - * @return the settingsDefinitionId value. - */ - public UUID settingsDefinitionId() { - return this.settingsDefinitionId; - } - - /** - * Set the settingsDefinitionId property: The anomaly settings definition Id. - * - * @param settingsDefinitionId the settingsDefinitionId value to set. - * @return the AnomalySecurityMLAnalyticsSettingsProperties object itself. - */ - public AnomalySecurityMLAnalyticsSettingsProperties withSettingsDefinitionId(UUID settingsDefinitionId) { - this.settingsDefinitionId = settingsDefinitionId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model AnomalySecurityMLAnalyticsSettingsProperties")); - } - if (requiredDataConnectors() != null) { - requiredDataConnectors().forEach(e -> e.validate()); - } - if (anomalyVersion() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property anomalyVersion in model" - + " AnomalySecurityMLAnalyticsSettingsProperties")); - } - if (frequency() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property frequency in model AnomalySecurityMLAnalyticsSettingsProperties")); - } - if (settingsStatus() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property settingsStatus in model" - + " AnomalySecurityMLAnalyticsSettingsProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AnomalySecurityMLAnalyticsSettingsProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java deleted file mode 100644 index 4e31c9709d7d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingConfigProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents Codeless API Polling data connector. */ -@Fluent -public final class ApiPollingParameters { - /* - * Config to describe the instructions blade - */ - @JsonProperty(value = "connectorUiConfig") - private CodelessUiConnectorConfigProperties connectorUiConfig; - - /* - * Config to describe the polling instructions - */ - @JsonProperty(value = "pollingConfig") - private CodelessConnectorPollingConfigProperties pollingConfig; - - /** - * Get the connectorUiConfig property: Config to describe the instructions blade. - * - * @return the connectorUiConfig value. - */ - public CodelessUiConnectorConfigProperties connectorUiConfig() { - return this.connectorUiConfig; - } - - /** - * Set the connectorUiConfig property: Config to describe the instructions blade. - * - * @param connectorUiConfig the connectorUiConfig value to set. - * @return the ApiPollingParameters object itself. - */ - public ApiPollingParameters withConnectorUiConfig(CodelessUiConnectorConfigProperties connectorUiConfig) { - this.connectorUiConfig = connectorUiConfig; - return this; - } - - /** - * Get the pollingConfig property: Config to describe the polling instructions. - * - * @return the pollingConfig value. - */ - public CodelessConnectorPollingConfigProperties pollingConfig() { - return this.pollingConfig; - } - - /** - * Set the pollingConfig property: Config to describe the polling instructions. - * - * @param pollingConfig the pollingConfig value to set. - * @return the ApiPollingParameters object itself. - */ - public ApiPollingParameters withPollingConfig(CodelessConnectorPollingConfigProperties pollingConfig) { - this.pollingConfig = pollingConfig; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectorUiConfig() != null) { - connectorUiConfig().validate(); - } - if (pollingConfig() != null) { - pollingConfig().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java deleted file mode 100644 index c7755a357b32..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** ASC (Azure Security Center) requirements check properties. */ -@Fluent -public final class AscCheckRequirementsProperties { - /* - * The subscription id to connect to, and get the data from. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * Get the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AscCheckRequirementsProperties object itself. - */ - public AscCheckRequirementsProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java deleted file mode 100644 index 486d75131f91..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorWithAlertsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** ASC (Azure Security Center) data connector properties. */ -@Fluent -public final class AscDataConnectorProperties extends DataConnectorWithAlertsProperties { - /* - * The subscription id to connect to, and get the data from. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * Get the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AscDataConnectorProperties object itself. - */ - public AscDataConnectorProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** {@inheritDoc} */ - @Override - public AscDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - super.withDataTypes(dataTypes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java deleted file mode 100644 index 1880bf1f167c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java +++ /dev/null @@ -1,189 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; -import com.azure.resourcemanager.securityinsights.models.ClientInfo; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** The AutomationRule model. */ -@Fluent -public final class AutomationRuleInner extends ResourceWithEtag { - /* - * Automation rule properties - */ - @JsonProperty(value = "properties", required = true) - private AutomationRuleProperties innerProperties = new AutomationRuleProperties(); - - /** - * Get the innerProperties property: Automation rule properties. - * - * @return the innerProperties value. - */ - private AutomationRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public AutomationRuleInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the displayName property: The display name of the automation rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name of the automation rule. - * - * @param displayName the displayName value to set. - * @return the AutomationRuleInner object itself. - */ - public AutomationRuleInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new AutomationRuleProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the order property: The order of execution of the automation rule. - * - * @return the order value. - */ - public int order() { - return this.innerProperties() == null ? 0 : this.innerProperties().order(); - } - - /** - * Set the order property: The order of execution of the automation rule. - * - * @param order the order value to set. - * @return the AutomationRuleInner object itself. - */ - public AutomationRuleInner withOrder(int order) { - if (this.innerProperties() == null) { - this.innerProperties = new AutomationRuleProperties(); - } - this.innerProperties().withOrder(order); - return this; - } - - /** - * Get the triggeringLogic property: Describes automation rule triggering logic. - * - * @return the triggeringLogic value. - */ - public AutomationRuleTriggeringLogic triggeringLogic() { - return this.innerProperties() == null ? null : this.innerProperties().triggeringLogic(); - } - - /** - * Set the triggeringLogic property: Describes automation rule triggering logic. - * - * @param triggeringLogic the triggeringLogic value to set. - * @return the AutomationRuleInner object itself. - */ - public AutomationRuleInner withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic) { - if (this.innerProperties() == null) { - this.innerProperties = new AutomationRuleProperties(); - } - this.innerProperties().withTriggeringLogic(triggeringLogic); - return this; - } - - /** - * Get the actions property: The actions to execute when the automation rule is triggered. - * - * @return the actions value. - */ - public List actions() { - return this.innerProperties() == null ? null : this.innerProperties().actions(); - } - - /** - * Set the actions property: The actions to execute when the automation rule is triggered. - * - * @param actions the actions value to set. - * @return the AutomationRuleInner object itself. - */ - public AutomationRuleInner withActions(List actions) { - if (this.innerProperties() == null) { - this.innerProperties = new AutomationRuleProperties(); - } - this.innerProperties().withActions(actions); - return this; - } - - /** - * Get the lastModifiedTimeUtc property: The last time the automation rule was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - - /** - * Get the createdTimeUtc property: The time the automation rule was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the lastModifiedBy property: Information on the client (user or application) that made some action. - * - * @return the lastModifiedBy value. - */ - public ClientInfo lastModifiedBy() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedBy(); - } - - /** - * Get the createdBy property: Information on the client (user or application) that made some action. - * - * @return the createdBy value. - */ - public ClientInfo createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model AutomationRuleInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutomationRuleInner.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java deleted file mode 100644 index 7208c57ed3b7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java +++ /dev/null @@ -1,220 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; -import com.azure.resourcemanager.securityinsights.models.ClientInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Automation rule properties. */ -@Fluent -public final class AutomationRuleProperties { - /* - * The display name of the automation rule. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * The order of execution of the automation rule. - */ - @JsonProperty(value = "order", required = true) - private int order; - - /* - * Describes automation rule triggering logic. - */ - @JsonProperty(value = "triggeringLogic", required = true) - private AutomationRuleTriggeringLogic triggeringLogic; - - /* - * The actions to execute when the automation rule is triggered. - */ - @JsonProperty(value = "actions", required = true) - private List actions; - - /* - * The last time the automation rule was updated. - */ - @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTimeUtc; - - /* - * The time the automation rule was created. - */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - - /* - * Information on the client (user or application) that made some action - */ - @JsonProperty(value = "lastModifiedBy", access = JsonProperty.Access.WRITE_ONLY) - private ClientInfo lastModifiedBy; - - /* - * Information on the client (user or application) that made some action - */ - @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) - private ClientInfo createdBy; - - /** - * Get the displayName property: The display name of the automation rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the automation rule. - * - * @param displayName the displayName value to set. - * @return the AutomationRuleProperties object itself. - */ - public AutomationRuleProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the order property: The order of execution of the automation rule. - * - * @return the order value. - */ - public int order() { - return this.order; - } - - /** - * Set the order property: The order of execution of the automation rule. - * - * @param order the order value to set. - * @return the AutomationRuleProperties object itself. - */ - public AutomationRuleProperties withOrder(int order) { - this.order = order; - return this; - } - - /** - * Get the triggeringLogic property: Describes automation rule triggering logic. - * - * @return the triggeringLogic value. - */ - public AutomationRuleTriggeringLogic triggeringLogic() { - return this.triggeringLogic; - } - - /** - * Set the triggeringLogic property: Describes automation rule triggering logic. - * - * @param triggeringLogic the triggeringLogic value to set. - * @return the AutomationRuleProperties object itself. - */ - public AutomationRuleProperties withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic) { - this.triggeringLogic = triggeringLogic; - return this; - } - - /** - * Get the actions property: The actions to execute when the automation rule is triggered. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Set the actions property: The actions to execute when the automation rule is triggered. - * - * @param actions the actions value to set. - * @return the AutomationRuleProperties object itself. - */ - public AutomationRuleProperties withActions(List actions) { - this.actions = actions; - return this; - } - - /** - * Get the lastModifiedTimeUtc property: The last time the automation rule was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.lastModifiedTimeUtc; - } - - /** - * Get the createdTimeUtc property: The time the automation rule was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the lastModifiedBy property: Information on the client (user or application) that made some action. - * - * @return the lastModifiedBy value. - */ - public ClientInfo lastModifiedBy() { - return this.lastModifiedBy; - } - - /** - * Get the createdBy property: Information on the client (user or application) that made some action. - * - * @return the createdBy value. - */ - public ClientInfo createdBy() { - return this.createdBy; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model AutomationRuleProperties")); - } - if (triggeringLogic() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property triggeringLogic in model AutomationRuleProperties")); - } else { - triggeringLogic().validate(); - } - if (actions() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property actions in model AutomationRuleProperties")); - } else { - actions().forEach(e -> e.validate()); - } - if (lastModifiedBy() != null) { - lastModifiedBy().validate(); - } - if (createdBy() != null) { - createdBy().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutomationRuleProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java deleted file mode 100644 index 49ef9cc2defa..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AwsCloudTrailDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Amazon Web Services CloudTrail data connector properties. */ -@Fluent -public final class AwsCloudTrailDataConnectorProperties { - /* - * The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws account. - */ - @JsonProperty(value = "awsRoleArn") - private String awsRoleArn; - - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private AwsCloudTrailDataConnectorDataTypes dataTypes; - - /** - * Get the awsRoleArn property: The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws - * account. - * - * @return the awsRoleArn value. - */ - public String awsRoleArn() { - return this.awsRoleArn; - } - - /** - * Set the awsRoleArn property: The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws - * account. - * - * @param awsRoleArn the awsRoleArn value to set. - * @return the AwsCloudTrailDataConnectorProperties object itself. - */ - public AwsCloudTrailDataConnectorProperties withAwsRoleArn(String awsRoleArn) { - this.awsRoleArn = awsRoleArn; - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AwsCloudTrailDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AwsCloudTrailDataConnectorProperties object itself. - */ - public AwsCloudTrailDataConnectorProperties withDataTypes(AwsCloudTrailDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model AwsCloudTrailDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AwsCloudTrailDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java deleted file mode 100644 index fb81e27a8457..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java +++ /dev/null @@ -1,155 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AwsS3DataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Amazon Web Services S3 data connector properties. */ -@Fluent -public final class AwsS3DataConnectorProperties { - /* - * The logs destination table name in LogAnalytics. - */ - @JsonProperty(value = "destinationTable", required = true) - private String destinationTable; - - /* - * The AWS sqs urls for the connector. - */ - @JsonProperty(value = "sqsUrls", required = true) - private List sqsUrls; - - /* - * The Aws Role Arn that is used to access the Aws account. - */ - @JsonProperty(value = "roleArn", required = true) - private String roleArn; - - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private AwsS3DataConnectorDataTypes dataTypes; - - /** - * Get the destinationTable property: The logs destination table name in LogAnalytics. - * - * @return the destinationTable value. - */ - public String destinationTable() { - return this.destinationTable; - } - - /** - * Set the destinationTable property: The logs destination table name in LogAnalytics. - * - * @param destinationTable the destinationTable value to set. - * @return the AwsS3DataConnectorProperties object itself. - */ - public AwsS3DataConnectorProperties withDestinationTable(String destinationTable) { - this.destinationTable = destinationTable; - return this; - } - - /** - * Get the sqsUrls property: The AWS sqs urls for the connector. - * - * @return the sqsUrls value. - */ - public List sqsUrls() { - return this.sqsUrls; - } - - /** - * Set the sqsUrls property: The AWS sqs urls for the connector. - * - * @param sqsUrls the sqsUrls value to set. - * @return the AwsS3DataConnectorProperties object itself. - */ - public AwsS3DataConnectorProperties withSqsUrls(List sqsUrls) { - this.sqsUrls = sqsUrls; - return this; - } - - /** - * Get the roleArn property: The Aws Role Arn that is used to access the Aws account. - * - * @return the roleArn value. - */ - public String roleArn() { - return this.roleArn; - } - - /** - * Set the roleArn property: The Aws Role Arn that is used to access the Aws account. - * - * @param roleArn the roleArn value to set. - * @return the AwsS3DataConnectorProperties object itself. - */ - public AwsS3DataConnectorProperties withRoleArn(String roleArn) { - this.roleArn = roleArn; - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AwsS3DataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AwsS3DataConnectorProperties object itself. - */ - public AwsS3DataConnectorProperties withDataTypes(AwsS3DataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (destinationTable() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property destinationTable in model AwsS3DataConnectorProperties")); - } - if (sqsUrls() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sqsUrls in model AwsS3DataConnectorProperties")); - } - if (roleArn() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property roleArn in model AwsS3DataConnectorProperties")); - } - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model AwsS3DataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AwsS3DataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java deleted file mode 100644 index e73dcc2482d4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java +++ /dev/null @@ -1,53 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** AzureResource entity property bag. */ -@Immutable -public final class AzureResourceEntityProperties extends EntityCommonProperties { - /* - * The azure resource id of the resource - */ - @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) - private String resourceId; - - /* - * The subscription id of the resource - */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) - private String subscriptionId; - - /** - * Get the resourceId property: The azure resource id of the resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the subscriptionId property: The subscription id of the resource. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java deleted file mode 100644 index 24e6c6ae3a87..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponseValue; -import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The entity expansion result operation response. */ -@Fluent -public final class BookmarkExpandResponseInner { - /* - * The metadata from the expansion operation results. - */ - @JsonProperty(value = "metaData") - private ExpansionResultsMetadata metadata; - - /* - * The expansion result values. - */ - @JsonProperty(value = "value") - private BookmarkExpandResponseValue value; - - /** - * Get the metadata property: The metadata from the expansion operation results. - * - * @return the metadata value. - */ - public ExpansionResultsMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the expansion operation results. - * - * @param metadata the metadata value to set. - * @return the BookmarkExpandResponseInner object itself. - */ - public BookmarkExpandResponseInner withMetadata(ExpansionResultsMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the value property: The expansion result values. - * - * @return the value value. - */ - public BookmarkExpandResponseValue value() { - return this.value; - } - - /** - * Set the value property: The expansion result values. - * - * @param value the value value to set. - * @return the BookmarkExpandResponseInner object itself. - */ - public BookmarkExpandResponseInner withValue(BookmarkExpandResponseValue value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (value() != null) { - value().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java deleted file mode 100644 index 5d04c419ecc5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java +++ /dev/null @@ -1,422 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; -import com.azure.resourcemanager.securityinsights.models.IncidentInfo; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents a bookmark in Azure Security Insights. */ -@Fluent -public final class BookmarkInner extends ResourceWithEtag { - /* - * Bookmark properties - */ - @JsonProperty(value = "properties") - private BookmarkProperties innerProperties; - - /** - * Get the innerProperties property: Bookmark properties. - * - * @return the innerProperties value. - */ - private BookmarkProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public BookmarkInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the created property: The time the bookmark was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); - } - - /** - * Set the created property: The time the bookmark was created. - * - * @param created the created value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withCreated(OffsetDateTime created) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withCreated(created); - return this; - } - - /** - * Get the createdBy property: Describes a user that created the bookmark. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); - } - - /** - * Set the createdBy property: Describes a user that created the bookmark. - * - * @param createdBy the createdBy value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withCreatedBy(UserInfo createdBy) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withCreatedBy(createdBy); - return this; - } - - /** - * Get the displayName property: The display name of the bookmark. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name of the bookmark. - * - * @param displayName the displayName value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the labels property: List of labels relevant to this bookmark. - * - * @return the labels value. - */ - public List labels() { - return this.innerProperties() == null ? null : this.innerProperties().labels(); - } - - /** - * Set the labels property: List of labels relevant to this bookmark. - * - * @param labels the labels value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withLabels(List labels) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withLabels(labels); - return this; - } - - /** - * Get the notes property: The notes of the bookmark. - * - * @return the notes value. - */ - public String notes() { - return this.innerProperties() == null ? null : this.innerProperties().notes(); - } - - /** - * Set the notes property: The notes of the bookmark. - * - * @param notes the notes value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withNotes(String notes) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withNotes(notes); - return this; - } - - /** - * Get the query property: The query of the bookmark. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Set the query property: The query of the bookmark. - * - * @param query the query value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withQuery(query); - return this; - } - - /** - * Get the queryResult property: The query result of the bookmark. - * - * @return the queryResult value. - */ - public String queryResult() { - return this.innerProperties() == null ? null : this.innerProperties().queryResult(); - } - - /** - * Set the queryResult property: The query result of the bookmark. - * - * @param queryResult the queryResult value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withQueryResult(String queryResult) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withQueryResult(queryResult); - return this; - } - - /** - * Get the updated property: The last time the bookmark was updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.innerProperties() == null ? null : this.innerProperties().updated(); - } - - /** - * Set the updated property: The last time the bookmark was updated. - * - * @param updated the updated value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withUpdated(OffsetDateTime updated) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withUpdated(updated); - return this; - } - - /** - * Get the updatedBy property: Describes a user that updated the bookmark. - * - * @return the updatedBy value. - */ - public UserInfo updatedBy() { - return this.innerProperties() == null ? null : this.innerProperties().updatedBy(); - } - - /** - * Set the updatedBy property: Describes a user that updated the bookmark. - * - * @param updatedBy the updatedBy value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withUpdatedBy(UserInfo updatedBy) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withUpdatedBy(updatedBy); - return this; - } - - /** - * Get the eventTime property: The bookmark event time. - * - * @return the eventTime value. - */ - public OffsetDateTime eventTime() { - return this.innerProperties() == null ? null : this.innerProperties().eventTime(); - } - - /** - * Set the eventTime property: The bookmark event time. - * - * @param eventTime the eventTime value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withEventTime(OffsetDateTime eventTime) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withEventTime(eventTime); - return this; - } - - /** - * Get the queryStartTime property: The start time for the query. - * - * @return the queryStartTime value. - */ - public OffsetDateTime queryStartTime() { - return this.innerProperties() == null ? null : this.innerProperties().queryStartTime(); - } - - /** - * Set the queryStartTime property: The start time for the query. - * - * @param queryStartTime the queryStartTime value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withQueryStartTime(OffsetDateTime queryStartTime) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withQueryStartTime(queryStartTime); - return this; - } - - /** - * Get the queryEndTime property: The end time for the query. - * - * @return the queryEndTime value. - */ - public OffsetDateTime queryEndTime() { - return this.innerProperties() == null ? null : this.innerProperties().queryEndTime(); - } - - /** - * Set the queryEndTime property: The end time for the query. - * - * @param queryEndTime the queryEndTime value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withQueryEndTime(OffsetDateTime queryEndTime) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withQueryEndTime(queryEndTime); - return this; - } - - /** - * Get the incidentInfo property: Describes an incident that relates to bookmark. - * - * @return the incidentInfo value. - */ - public IncidentInfo incidentInfo() { - return this.innerProperties() == null ? null : this.innerProperties().incidentInfo(); - } - - /** - * Set the incidentInfo property: Describes an incident that relates to bookmark. - * - * @param incidentInfo the incidentInfo value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withIncidentInfo(IncidentInfo incidentInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withIncidentInfo(incidentInfo); - return this; - } - - /** - * Get the entityMappings property: Describes the entity mappings of the bookmark. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); - } - - /** - * Set the entityMappings property: Describes the entity mappings of the bookmark. - * - * @param entityMappings the entityMappings value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withEntityMappings(List entityMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withEntityMappings(entityMappings); - return this; - } - - /** - * Get the tactics property: A list of relevant mitre attacks. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: A list of relevant mitre attacks. - * - * @param tactics the tactics value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: A list of relevant mitre techniques. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: A list of relevant mitre techniques. - * - * @param techniques the techniques value to set. - * @return the BookmarkInner object itself. - */ - public BookmarkInner withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new BookmarkProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java deleted file mode 100644 index 44be7d59238a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java +++ /dev/null @@ -1,467 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; -import com.azure.resourcemanager.securityinsights.models.IncidentInfo; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Describes bookmark properties. */ -@Fluent -public final class BookmarkProperties { - /* - * The time the bookmark was created - */ - @JsonProperty(value = "created") - private OffsetDateTime created; - - /* - * Describes a user that created the bookmark - */ - @JsonProperty(value = "createdBy") - private UserInfo createdBy; - - /* - * The display name of the bookmark - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * List of labels relevant to this bookmark - */ - @JsonProperty(value = "labels") - private List labels; - - /* - * The notes of the bookmark - */ - @JsonProperty(value = "notes") - private String notes; - - /* - * The query of the bookmark. - */ - @JsonProperty(value = "query", required = true) - private String query; - - /* - * The query result of the bookmark. - */ - @JsonProperty(value = "queryResult") - private String queryResult; - - /* - * The last time the bookmark was updated - */ - @JsonProperty(value = "updated") - private OffsetDateTime updated; - - /* - * Describes a user that updated the bookmark - */ - @JsonProperty(value = "updatedBy") - private UserInfo updatedBy; - - /* - * The bookmark event time - */ - @JsonProperty(value = "eventTime") - private OffsetDateTime eventTime; - - /* - * The start time for the query - */ - @JsonProperty(value = "queryStartTime") - private OffsetDateTime queryStartTime; - - /* - * The end time for the query - */ - @JsonProperty(value = "queryEndTime") - private OffsetDateTime queryEndTime; - - /* - * Describes an incident that relates to bookmark - */ - @JsonProperty(value = "incidentInfo") - private IncidentInfo incidentInfo; - - /* - * Describes the entity mappings of the bookmark - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * A list of relevant mitre attacks - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * A list of relevant mitre techniques - */ - @JsonProperty(value = "techniques") - private List techniques; - - /** - * Get the created property: The time the bookmark was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Set the created property: The time the bookmark was created. - * - * @param created the created value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withCreated(OffsetDateTime created) { - this.created = created; - return this; - } - - /** - * Get the createdBy property: Describes a user that created the bookmark. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: Describes a user that created the bookmark. - * - * @param createdBy the createdBy value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withCreatedBy(UserInfo createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the displayName property: The display name of the bookmark. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the bookmark. - * - * @param displayName the displayName value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the labels property: List of labels relevant to this bookmark. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: List of labels relevant to this bookmark. - * - * @param labels the labels value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Get the notes property: The notes of the bookmark. - * - * @return the notes value. - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes property: The notes of the bookmark. - * - * @param notes the notes value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the query property: The query of the bookmark. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query of the bookmark. - * - * @param query the query value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the queryResult property: The query result of the bookmark. - * - * @return the queryResult value. - */ - public String queryResult() { - return this.queryResult; - } - - /** - * Set the queryResult property: The query result of the bookmark. - * - * @param queryResult the queryResult value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withQueryResult(String queryResult) { - this.queryResult = queryResult; - return this; - } - - /** - * Get the updated property: The last time the bookmark was updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.updated; - } - - /** - * Set the updated property: The last time the bookmark was updated. - * - * @param updated the updated value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withUpdated(OffsetDateTime updated) { - this.updated = updated; - return this; - } - - /** - * Get the updatedBy property: Describes a user that updated the bookmark. - * - * @return the updatedBy value. - */ - public UserInfo updatedBy() { - return this.updatedBy; - } - - /** - * Set the updatedBy property: Describes a user that updated the bookmark. - * - * @param updatedBy the updatedBy value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withUpdatedBy(UserInfo updatedBy) { - this.updatedBy = updatedBy; - return this; - } - - /** - * Get the eventTime property: The bookmark event time. - * - * @return the eventTime value. - */ - public OffsetDateTime eventTime() { - return this.eventTime; - } - - /** - * Set the eventTime property: The bookmark event time. - * - * @param eventTime the eventTime value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withEventTime(OffsetDateTime eventTime) { - this.eventTime = eventTime; - return this; - } - - /** - * Get the queryStartTime property: The start time for the query. - * - * @return the queryStartTime value. - */ - public OffsetDateTime queryStartTime() { - return this.queryStartTime; - } - - /** - * Set the queryStartTime property: The start time for the query. - * - * @param queryStartTime the queryStartTime value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withQueryStartTime(OffsetDateTime queryStartTime) { - this.queryStartTime = queryStartTime; - return this; - } - - /** - * Get the queryEndTime property: The end time for the query. - * - * @return the queryEndTime value. - */ - public OffsetDateTime queryEndTime() { - return this.queryEndTime; - } - - /** - * Set the queryEndTime property: The end time for the query. - * - * @param queryEndTime the queryEndTime value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withQueryEndTime(OffsetDateTime queryEndTime) { - this.queryEndTime = queryEndTime; - return this; - } - - /** - * Get the incidentInfo property: Describes an incident that relates to bookmark. - * - * @return the incidentInfo value. - */ - public IncidentInfo incidentInfo() { - return this.incidentInfo; - } - - /** - * Set the incidentInfo property: Describes an incident that relates to bookmark. - * - * @param incidentInfo the incidentInfo value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withIncidentInfo(IncidentInfo incidentInfo) { - this.incidentInfo = incidentInfo; - return this; - } - - /** - * Get the entityMappings property: Describes the entity mappings of the bookmark. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Describes the entity mappings of the bookmark. - * - * @param entityMappings the entityMappings value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the tactics property: A list of relevant mitre attacks. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: A list of relevant mitre attacks. - * - * @param tactics the tactics value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the techniques property: A list of relevant mitre techniques. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: A list of relevant mitre techniques. - * - * @param techniques the techniques value to set. - * @return the BookmarkProperties object itself. - */ - public BookmarkProperties withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (createdBy() != null) { - createdBy().validate(); - } - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property displayName in model BookmarkProperties")); - } - if (query() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property query in model BookmarkProperties")); - } - if (updatedBy() != null) { - updatedBy().validate(); - } - if (incidentInfo() != null) { - incidentInfo().validate(); - } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BookmarkProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java deleted file mode 100644 index 3b8a4b7b7a4e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java +++ /dev/null @@ -1,70 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** CloudApplication entity property bag. */ -@Immutable -public final class CloudApplicationEntityProperties extends EntityCommonProperties { - /* - * The technical identifier of the application. - */ - @JsonProperty(value = "appId", access = JsonProperty.Access.WRITE_ONLY) - private Integer appId; - - /* - * The name of the related cloud application. - */ - @JsonProperty(value = "appName", access = JsonProperty.Access.WRITE_ONLY) - private String appName; - - /* - * The user defined instance name of the cloud application. It is often used to distinguish between several - * applications of the same type that a customer has. - */ - @JsonProperty(value = "instanceName", access = JsonProperty.Access.WRITE_ONLY) - private String instanceName; - - /** - * Get the appId property: The technical identifier of the application. - * - * @return the appId value. - */ - public Integer appId() { - return this.appId; - } - - /** - * Get the appName property: The name of the related cloud application. - * - * @return the appName value. - */ - public String appName() { - return this.appName; - } - - /** - * Get the instanceName property: The user defined instance name of the cloud application. It is often used to - * distinguish between several applications of the same type that a customer has. - * - * @return the instanceName value. - */ - public String instanceName() { - return this.instanceName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java deleted file mode 100644 index ec2fa5baa272..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents Codeless UI data connector. */ -@Fluent -public final class CodelessParameters { - /* - * Config to describe the instructions blade - */ - @JsonProperty(value = "connectorUiConfig") - private CodelessUiConnectorConfigProperties connectorUiConfig; - - /** - * Get the connectorUiConfig property: Config to describe the instructions blade. - * - * @return the connectorUiConfig value. - */ - public CodelessUiConnectorConfigProperties connectorUiConfig() { - return this.connectorUiConfig; - } - - /** - * Set the connectorUiConfig property: Config to describe the instructions blade. - * - * @param connectorUiConfig the connectorUiConfig value to set. - * @return the CodelessParameters object itself. - */ - public CodelessParameters withConnectorUiConfig(CodelessUiConnectorConfigProperties connectorUiConfig) { - this.connectorUiConfig = connectorUiConfig; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectorUiConfig() != null) { - connectorUiConfig().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java deleted file mode 100644 index cfec062d1609..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AadDataConnector; -import com.azure.resourcemanager.securityinsights.models.AatpDataConnector; -import com.azure.resourcemanager.securityinsights.models.AscDataConnector; -import com.azure.resourcemanager.securityinsights.models.AwsCloudTrailDataConnector; -import com.azure.resourcemanager.securityinsights.models.AwsS3DataConnector; -import com.azure.resourcemanager.securityinsights.models.CodelessApiPollingDataConnector; -import com.azure.resourcemanager.securityinsights.models.CodelessUiDataConnector; -import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnector; -import com.azure.resourcemanager.securityinsights.models.IoTDataConnector; -import com.azure.resourcemanager.securityinsights.models.McasDataConnector; -import com.azure.resourcemanager.securityinsights.models.MdatpDataConnector; -import com.azure.resourcemanager.securityinsights.models.MstiDataConnector; -import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; -import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; -import com.azure.resourcemanager.securityinsights.models.OfficeAtpDataConnector; -import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector; -import com.azure.resourcemanager.securityinsights.models.OfficeIrmDataConnector; -import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.TIDataConnector; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnector; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Data connector. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = DataConnectorInner.class) -@JsonTypeName("DataConnector") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AzureActiveDirectory", value = AadDataConnector.class), - @JsonSubTypes.Type(name = "MicrosoftThreatIntelligence", value = MstiDataConnector.class), - @JsonSubTypes.Type(name = "MicrosoftThreatProtection", value = MtpDataConnector.class), - @JsonSubTypes.Type(name = "AzureAdvancedThreatProtection", value = AatpDataConnector.class), - @JsonSubTypes.Type(name = "AzureSecurityCenter", value = AscDataConnector.class), - @JsonSubTypes.Type(name = "AmazonWebServicesCloudTrail", value = AwsCloudTrailDataConnector.class), - @JsonSubTypes.Type(name = "AmazonWebServicesS3", value = AwsS3DataConnector.class), - @JsonSubTypes.Type(name = "MicrosoftCloudAppSecurity", value = McasDataConnector.class), - @JsonSubTypes.Type(name = "Dynamics365", value = Dynamics365DataConnector.class), - @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpDataConnector.class), - @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectDataConnector.class), - @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBIDataConnector.class), - @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmDataConnector.class), - @JsonSubTypes.Type(name = "MicrosoftDefenderAdvancedThreatProtection", value = MdatpDataConnector.class), - @JsonSubTypes.Type(name = "Office365", value = OfficeDataConnector.class), - @JsonSubTypes.Type(name = "ThreatIntelligence", value = TIDataConnector.class), - @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiDataConnector.class), - @JsonSubTypes.Type(name = "IOT", value = IoTDataConnector.class), - @JsonSubTypes.Type(name = "GenericUI", value = CodelessUiDataConnector.class), - @JsonSubTypes.Type(name = "APIPolling", value = CodelessApiPollingDataConnector.class) -}) -@Fluent -public class DataConnectorInner extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public DataConnectorInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java deleted file mode 100644 index 6fde14a69e47..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java +++ /dev/null @@ -1,75 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorAuthorizationState; -import com.azure.resourcemanager.securityinsights.models.DataConnectorLicenseState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Data connector requirements status. */ -@Fluent -public final class DataConnectorRequirementsStateInner { - /* - * Authorization state for this connector - */ - @JsonProperty(value = "authorizationState") - private DataConnectorAuthorizationState authorizationState; - - /* - * License state for this connector - */ - @JsonProperty(value = "licenseState") - private DataConnectorLicenseState licenseState; - - /** - * Get the authorizationState property: Authorization state for this connector. - * - * @return the authorizationState value. - */ - public DataConnectorAuthorizationState authorizationState() { - return this.authorizationState; - } - - /** - * Set the authorizationState property: Authorization state for this connector. - * - * @param authorizationState the authorizationState value to set. - * @return the DataConnectorRequirementsStateInner object itself. - */ - public DataConnectorRequirementsStateInner withAuthorizationState( - DataConnectorAuthorizationState authorizationState) { - this.authorizationState = authorizationState; - return this; - } - - /** - * Get the licenseState property: License state for this connector. - * - * @return the licenseState value. - */ - public DataConnectorLicenseState licenseState() { - return this.licenseState; - } - - /** - * Set the licenseState property: License state for this connector. - * - * @param licenseState the licenseState value to set. - * @return the DataConnectorRequirementsStateInner object itself. - */ - public DataConnectorRequirementsStateInner withLicenseState(DataConnectorLicenseState licenseState) { - this.licenseState = licenseState; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java deleted file mode 100644 index 5565c6456bf3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java +++ /dev/null @@ -1,84 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Dns entity property bag. */ -@Immutable -public final class DnsEntityProperties extends EntityCommonProperties { - /* - * An ip entity id for the dns server resolving the request - */ - @JsonProperty(value = "dnsServerIpEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String dnsServerIpEntityId; - - /* - * The name of the dns record associated with the alert - */ - @JsonProperty(value = "domainName", access = JsonProperty.Access.WRITE_ONLY) - private String domainName; - - /* - * An ip entity id for the dns request client - */ - @JsonProperty(value = "hostIpAddressEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String hostIpAddressEntityId; - - /* - * Ip entity identifiers for the resolved ip address. - */ - @JsonProperty(value = "ipAddressEntityIds", access = JsonProperty.Access.WRITE_ONLY) - private List ipAddressEntityIds; - - /** - * Get the dnsServerIpEntityId property: An ip entity id for the dns server resolving the request. - * - * @return the dnsServerIpEntityId value. - */ - public String dnsServerIpEntityId() { - return this.dnsServerIpEntityId; - } - - /** - * Get the domainName property: The name of the dns record associated with the alert. - * - * @return the domainName value. - */ - public String domainName() { - return this.domainName; - } - - /** - * Get the hostIpAddressEntityId property: An ip entity id for the dns request client. - * - * @return the hostIpAddressEntityId value. - */ - public String hostIpAddressEntityId() { - return this.hostIpAddressEntityId; - } - - /** - * Get the ipAddressEntityIds property: Ip entity identifiers for the resolved ip address. - * - * @return the ipAddressEntityIds value. - */ - public List ipAddressEntityIds() { - return this.ipAddressEntityIds; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java deleted file mode 100644 index e88e1fce95ed..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Dynamics365 requirements check properties. */ -@Fluent -public final class Dynamics365CheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public Dynamics365CheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java deleted file mode 100644 index bde2773bc7c9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Dynamics365 data connector properties. */ -@Fluent -public final class Dynamics365DataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private Dynamics365DataConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public Dynamics365DataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the Dynamics365DataConnectorProperties object itself. - */ - public Dynamics365DataConnectorProperties withDataTypes(Dynamics365DataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public Dynamics365DataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model Dynamics365DataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Dynamics365DataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java deleted file mode 100644 index 17b9864df9bb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java +++ /dev/null @@ -1,181 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhoisDetails; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Whois information for a given domain and associated metadata. */ -@Fluent -public final class EnrichmentDomainWhoisInner { - /* - * The domain for this whois record - */ - @JsonProperty(value = "domain") - private String domain; - - /* - * The hostname of this registrar's whois server - */ - @JsonProperty(value = "server") - private String server; - - /* - * The timestamp at which this record was created - */ - @JsonProperty(value = "created") - private OffsetDateTime created; - - /* - * The timestamp at which this record was last updated - */ - @JsonProperty(value = "updated") - private OffsetDateTime updated; - - /* - * The timestamp at which this record will expire - */ - @JsonProperty(value = "expires") - private OffsetDateTime expires; - - /* - * The whois record for a given domain - */ - @JsonProperty(value = "parsedWhois") - private EnrichmentDomainWhoisDetails parsedWhois; - - /** - * Get the domain property: The domain for this whois record. - * - * @return the domain value. - */ - public String domain() { - return this.domain; - } - - /** - * Set the domain property: The domain for this whois record. - * - * @param domain the domain value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withDomain(String domain) { - this.domain = domain; - return this; - } - - /** - * Get the server property: The hostname of this registrar's whois server. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Set the server property: The hostname of this registrar's whois server. - * - * @param server the server value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withServer(String server) { - this.server = server; - return this; - } - - /** - * Get the created property: The timestamp at which this record was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Set the created property: The timestamp at which this record was created. - * - * @param created the created value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withCreated(OffsetDateTime created) { - this.created = created; - return this; - } - - /** - * Get the updated property: The timestamp at which this record was last updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.updated; - } - - /** - * Set the updated property: The timestamp at which this record was last updated. - * - * @param updated the updated value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withUpdated(OffsetDateTime updated) { - this.updated = updated; - return this; - } - - /** - * Get the expires property: The timestamp at which this record will expire. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.expires; - } - - /** - * Set the expires property: The timestamp at which this record will expire. - * - * @param expires the expires value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withExpires(OffsetDateTime expires) { - this.expires = expires; - return this; - } - - /** - * Get the parsedWhois property: The whois record for a given domain. - * - * @return the parsedWhois value. - */ - public EnrichmentDomainWhoisDetails parsedWhois() { - return this.parsedWhois; - } - - /** - * Set the parsedWhois property: The whois record for a given domain. - * - * @param parsedWhois the parsedWhois value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withParsedWhois(EnrichmentDomainWhoisDetails parsedWhois) { - this.parsedWhois = parsedWhois; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parsedWhois() != null) { - parsedWhois().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java deleted file mode 100644 index 8fc05f9c066a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java +++ /dev/null @@ -1,468 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Geodata information for a given IP address. */ -@Fluent -public final class EnrichmentIpGeodataInner { - /* - * The autonomous system number associated with this IP address - */ - @JsonProperty(value = "asn") - private String asn; - - /* - * The name of the carrier for this IP address - */ - @JsonProperty(value = "carrier") - private String carrier; - - /* - * The city this IP address is located in - */ - @JsonProperty(value = "city") - private String city; - - /* - * A numeric rating of confidence that the value in the 'city' field is correct, on a scale of 0-100 - */ - @JsonProperty(value = "cityCf") - private Integer cityCf; - - /* - * The continent this IP address is located on - */ - @JsonProperty(value = "continent") - private String continent; - - /* - * The county this IP address is located in - */ - @JsonProperty(value = "country") - private String country; - - /* - * A numeric rating of confidence that the value in the 'country' field is correct on a scale of 0-100 - */ - @JsonProperty(value = "countryCf") - private Integer countryCf; - - /* - * The dotted-decimal or colon-separated string representation of the IP address - */ - @JsonProperty(value = "ipAddr") - private String ipAddr; - - /* - * A description of the connection type of this IP address - */ - @JsonProperty(value = "ipRoutingType") - private String ipRoutingType; - - /* - * The latitude of this IP address - */ - @JsonProperty(value = "latitude") - private String latitude; - - /* - * The longitude of this IP address - */ - @JsonProperty(value = "longitude") - private String longitude; - - /* - * The name of the organization for this IP address - */ - @JsonProperty(value = "organization") - private String organization; - - /* - * The type of the organization for this IP address - */ - @JsonProperty(value = "organizationType") - private String organizationType; - - /* - * The geographic region this IP address is located in - */ - @JsonProperty(value = "region") - private String region; - - /* - * The state this IP address is located in - */ - @JsonProperty(value = "state") - private String state; - - /* - * A numeric rating of confidence that the value in the 'state' field is correct on a scale of 0-100 - */ - @JsonProperty(value = "stateCf") - private Integer stateCf; - - /* - * The abbreviated name for the state this IP address is located in - */ - @JsonProperty(value = "stateCode") - private String stateCode; - - /** - * Get the asn property: The autonomous system number associated with this IP address. - * - * @return the asn value. - */ - public String asn() { - return this.asn; - } - - /** - * Set the asn property: The autonomous system number associated with this IP address. - * - * @param asn the asn value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withAsn(String asn) { - this.asn = asn; - return this; - } - - /** - * Get the carrier property: The name of the carrier for this IP address. - * - * @return the carrier value. - */ - public String carrier() { - return this.carrier; - } - - /** - * Set the carrier property: The name of the carrier for this IP address. - * - * @param carrier the carrier value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCarrier(String carrier) { - this.carrier = carrier; - return this; - } - - /** - * Get the city property: The city this IP address is located in. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: The city this IP address is located in. - * - * @param city the city value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the cityCf property: A numeric rating of confidence that the value in the 'city' field is correct, on a scale - * of 0-100. - * - * @return the cityCf value. - */ - public Integer cityCf() { - return this.cityCf; - } - - /** - * Set the cityCf property: A numeric rating of confidence that the value in the 'city' field is correct, on a scale - * of 0-100. - * - * @param cityCf the cityCf value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCityCf(Integer cityCf) { - this.cityCf = cityCf; - return this; - } - - /** - * Get the continent property: The continent this IP address is located on. - * - * @return the continent value. - */ - public String continent() { - return this.continent; - } - - /** - * Set the continent property: The continent this IP address is located on. - * - * @param continent the continent value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withContinent(String continent) { - this.continent = continent; - return this; - } - - /** - * Get the country property: The county this IP address is located in. - * - * @return the country value. - */ - public String country() { - return this.country; - } - - /** - * Set the country property: The county this IP address is located in. - * - * @param country the country value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the countryCf property: A numeric rating of confidence that the value in the 'country' field is correct on a - * scale of 0-100. - * - * @return the countryCf value. - */ - public Integer countryCf() { - return this.countryCf; - } - - /** - * Set the countryCf property: A numeric rating of confidence that the value in the 'country' field is correct on a - * scale of 0-100. - * - * @param countryCf the countryCf value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCountryCf(Integer countryCf) { - this.countryCf = countryCf; - return this; - } - - /** - * Get the ipAddr property: The dotted-decimal or colon-separated string representation of the IP address. - * - * @return the ipAddr value. - */ - public String ipAddr() { - return this.ipAddr; - } - - /** - * Set the ipAddr property: The dotted-decimal or colon-separated string representation of the IP address. - * - * @param ipAddr the ipAddr value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withIpAddr(String ipAddr) { - this.ipAddr = ipAddr; - return this; - } - - /** - * Get the ipRoutingType property: A description of the connection type of this IP address. - * - * @return the ipRoutingType value. - */ - public String ipRoutingType() { - return this.ipRoutingType; - } - - /** - * Set the ipRoutingType property: A description of the connection type of this IP address. - * - * @param ipRoutingType the ipRoutingType value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withIpRoutingType(String ipRoutingType) { - this.ipRoutingType = ipRoutingType; - return this; - } - - /** - * Get the latitude property: The latitude of this IP address. - * - * @return the latitude value. - */ - public String latitude() { - return this.latitude; - } - - /** - * Set the latitude property: The latitude of this IP address. - * - * @param latitude the latitude value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withLatitude(String latitude) { - this.latitude = latitude; - return this; - } - - /** - * Get the longitude property: The longitude of this IP address. - * - * @return the longitude value. - */ - public String longitude() { - return this.longitude; - } - - /** - * Set the longitude property: The longitude of this IP address. - * - * @param longitude the longitude value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withLongitude(String longitude) { - this.longitude = longitude; - return this; - } - - /** - * Get the organization property: The name of the organization for this IP address. - * - * @return the organization value. - */ - public String organization() { - return this.organization; - } - - /** - * Set the organization property: The name of the organization for this IP address. - * - * @param organization the organization value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withOrganization(String organization) { - this.organization = organization; - return this; - } - - /** - * Get the organizationType property: The type of the organization for this IP address. - * - * @return the organizationType value. - */ - public String organizationType() { - return this.organizationType; - } - - /** - * Set the organizationType property: The type of the organization for this IP address. - * - * @param organizationType the organizationType value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withOrganizationType(String organizationType) { - this.organizationType = organizationType; - return this; - } - - /** - * Get the region property: The geographic region this IP address is located in. - * - * @return the region value. - */ - public String region() { - return this.region; - } - - /** - * Set the region property: The geographic region this IP address is located in. - * - * @param region the region value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withRegion(String region) { - this.region = region; - return this; - } - - /** - * Get the state property: The state this IP address is located in. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: The state this IP address is located in. - * - * @param state the state value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withState(String state) { - this.state = state; - return this; - } - - /** - * Get the stateCf property: A numeric rating of confidence that the value in the 'state' field is correct on a - * scale of 0-100. - * - * @return the stateCf value. - */ - public Integer stateCf() { - return this.stateCf; - } - - /** - * Set the stateCf property: A numeric rating of confidence that the value in the 'state' field is correct on a - * scale of 0-100. - * - * @param stateCf the stateCf value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withStateCf(Integer stateCf) { - this.stateCf = stateCf; - return this; - } - - /** - * Get the stateCode property: The abbreviated name for the state this IP address is located in. - * - * @return the stateCode value. - */ - public String stateCode() { - return this.stateCode; - } - - /** - * Set the stateCode property: The abbreviated name for the state this IP address is located in. - * - * @param stateCode the stateCode value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withStateCode(String stateCode) { - this.stateCode = stateCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java deleted file mode 100644 index 286aa9d87ccc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.fluent.models; - -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. */ -@Fluent -public final class EntityAnalyticsProperties { - /* - * The relevant entity providers that are synced - */ - @JsonProperty(value = "entityProviders") - private List entityProviders; - - /** - * Get the entityProviders property: The relevant entity providers that are synced. - * - * @return the entityProviders value. - */ - public List 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) { - this.entityProviders = entityProviders; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java deleted file mode 100644 index 1526fff102b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityExpandResponseValue; -import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The entity expansion result operation response. */ -@Fluent -public final class EntityExpandResponseInner { - /* - * The metadata from the expansion operation results. - */ - @JsonProperty(value = "metaData") - private ExpansionResultsMetadata metadata; - - /* - * The expansion result values. - */ - @JsonProperty(value = "value") - private EntityExpandResponseValue value; - - /** - * Get the metadata property: The metadata from the expansion operation results. - * - * @return the metadata value. - */ - public ExpansionResultsMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the expansion operation results. - * - * @param metadata the metadata value to set. - * @return the EntityExpandResponseInner object itself. - */ - public EntityExpandResponseInner withMetadata(ExpansionResultsMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the value property: The expansion result values. - * - * @return the value value. - */ - public EntityExpandResponseValue value() { - return this.value; - } - - /** - * Set the value property: The expansion result values. - * - * @param value the value value to set. - * @return the EntityExpandResponseInner object itself. - */ - public EntityExpandResponseInner withValue(EntityExpandResponseValue value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (value() != null) { - value().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java deleted file mode 100644 index 0b2543093f8e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java +++ /dev/null @@ -1,81 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityInsightItem; -import com.azure.resourcemanager.securityinsights.models.GetInsightsResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The Get Insights result operation response. */ -@Fluent -public final class EntityGetInsightsResponseInner { - /* - * The metadata from the get insights operation results. - */ - @JsonProperty(value = "metaData") - private GetInsightsResultsMetadata metadata; - - /* - * The insights result values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the metadata property: The metadata from the get insights operation results. - * - * @return the metadata value. - */ - public GetInsightsResultsMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the get insights operation results. - * - * @param metadata the metadata value to set. - * @return the EntityGetInsightsResponseInner object itself. - */ - public EntityGetInsightsResponseInner withMetadata(GetInsightsResultsMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the value property: The insights result values. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The insights result values. - * - * @param value the value value to set. - * @return the EntityGetInsightsResponseInner object itself. - */ - public EntityGetInsightsResponseInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java deleted file mode 100644 index f829a29d3b07..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java +++ /dev/null @@ -1,92 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.models.AccountEntity; -import com.azure.resourcemanager.securityinsights.models.AzureResourceEntity; -import com.azure.resourcemanager.securityinsights.models.CloudApplicationEntity; -import com.azure.resourcemanager.securityinsights.models.DnsEntity; -import com.azure.resourcemanager.securityinsights.models.FileEntity; -import com.azure.resourcemanager.securityinsights.models.FileHashEntity; -import com.azure.resourcemanager.securityinsights.models.HostEntity; -import com.azure.resourcemanager.securityinsights.models.HuntingBookmark; -import com.azure.resourcemanager.securityinsights.models.IoTDeviceEntity; -import com.azure.resourcemanager.securityinsights.models.IpEntity; -import com.azure.resourcemanager.securityinsights.models.MailClusterEntity; -import com.azure.resourcemanager.securityinsights.models.MailMessageEntity; -import com.azure.resourcemanager.securityinsights.models.MailboxEntity; -import com.azure.resourcemanager.securityinsights.models.MalwareEntity; -import com.azure.resourcemanager.securityinsights.models.NicEntity; -import com.azure.resourcemanager.securityinsights.models.ProcessEntity; -import com.azure.resourcemanager.securityinsights.models.RegistryKeyEntity; -import com.azure.resourcemanager.securityinsights.models.RegistryValueEntity; -import com.azure.resourcemanager.securityinsights.models.SecurityAlert; -import com.azure.resourcemanager.securityinsights.models.SecurityGroupEntity; -import com.azure.resourcemanager.securityinsights.models.SubmissionMailEntity; -import com.azure.resourcemanager.securityinsights.models.UrlEntity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Specific entity. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityInner.class) -@JsonTypeName("Entity") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "SecurityAlert", value = SecurityAlert.class), - @JsonSubTypes.Type(name = "Bookmark", value = HuntingBookmark.class), - @JsonSubTypes.Type(name = "Account", value = AccountEntity.class), - @JsonSubTypes.Type(name = "AzureResource", value = AzureResourceEntity.class), - @JsonSubTypes.Type(name = "CloudApplication", value = CloudApplicationEntity.class), - @JsonSubTypes.Type(name = "DnsResolution", value = DnsEntity.class), - @JsonSubTypes.Type(name = "File", value = FileEntity.class), - @JsonSubTypes.Type(name = "FileHash", value = FileHashEntity.class), - @JsonSubTypes.Type(name = "Host", value = HostEntity.class), - @JsonSubTypes.Type(name = "IoTDevice", value = IoTDeviceEntity.class), - @JsonSubTypes.Type(name = "Ip", value = IpEntity.class), - @JsonSubTypes.Type(name = "Mailbox", value = MailboxEntity.class), - @JsonSubTypes.Type(name = "MailCluster", value = MailClusterEntity.class), - @JsonSubTypes.Type(name = "MailMessage", value = MailMessageEntity.class), - @JsonSubTypes.Type(name = "Malware", value = MalwareEntity.class), - @JsonSubTypes.Type(name = "Process", value = ProcessEntity.class), - @JsonSubTypes.Type(name = "RegistryKey", value = RegistryKeyEntity.class), - @JsonSubTypes.Type(name = "RegistryValue", value = RegistryValueEntity.class), - @JsonSubTypes.Type(name = "SecurityGroup", value = SecurityGroupEntity.class), - @JsonSubTypes.Type(name = "SubmissionMail", value = SubmissionMailEntity.class), - @JsonSubTypes.Type(name = "Url", value = UrlEntity.class), - @JsonSubTypes.Type(name = "Nic", value = NicEntity.class) -}) -@Immutable -public class EntityInner extends ProxyResource { - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java deleted file mode 100644 index f1bdc7049f0e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQuery; -import com.azure.resourcemanager.securityinsights.models.ExpansionEntityQuery; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Specific entity query. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityQueryInner.class) -@JsonTypeName("EntityQuery") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Expansion", value = ExpansionEntityQuery.class), - @JsonSubTypes.Type(name = "Activity", value = ActivityEntityQuery.class) -}) -@Fluent -public class EntityQueryInner extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public EntityQueryInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java deleted file mode 100644 index b0d7b460f1ae..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueryTemplate; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Specific entity query template. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityQueryTemplateInner.class) -@JsonTypeName("EntityQueryTemplate") -@JsonSubTypes({@JsonSubTypes.Type(name = "Activity", value = ActivityEntityQueryTemplate.class)}) -@Immutable -public class EntityQueryTemplateInner extends ProxyResource { - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java deleted file mode 100644 index 14d25888dac9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java +++ /dev/null @@ -1,81 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineItem; -import com.azure.resourcemanager.securityinsights.models.TimelineResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The entity timeline result operation response. */ -@Fluent -public final class EntityTimelineResponseInner { - /* - * The metadata from the timeline operation results. - */ - @JsonProperty(value = "metaData") - private TimelineResultsMetadata metadata; - - /* - * The timeline result values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the metadata property: The metadata from the timeline operation results. - * - * @return the metadata value. - */ - public TimelineResultsMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the timeline operation results. - * - * @param metadata the metadata value to set. - * @return the EntityTimelineResponseInner object itself. - */ - public EntityTimelineResponseInner withMetadata(TimelineResultsMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the value property: The timeline result values. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The timeline result values. - * - * @param value the value value to set. - * @return the EntityTimelineResponseInner object itself. - */ - public EntityTimelineResponseInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java deleted file mode 100644 index 5f1ff9e9d6f5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java +++ /dev/null @@ -1,178 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes expansion entity query properties. */ -@Fluent -public final class ExpansionEntityQueriesProperties { - /* - * List of the data sources that are required to run the query - */ - @JsonProperty(value = "dataSources") - private List dataSources; - - /* - * The query display name - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The type of the query's source entity - */ - @JsonProperty(value = "inputEntityType") - private EntityType inputEntityType; - - /* - * List of the fields of the source entity that are required to run the query - */ - @JsonProperty(value = "inputFields") - private List inputFields; - - /* - * List of the desired output types to be constructed from the result - */ - @JsonProperty(value = "outputEntityTypes") - private List outputEntityTypes; - - /* - * The template query string to be parsed and formatted - */ - @JsonProperty(value = "queryTemplate") - private String queryTemplate; - - /** - * Get the dataSources property: List of the data sources that are required to run the query. - * - * @return the dataSources value. - */ - public List dataSources() { - return this.dataSources; - } - - /** - * Set the dataSources property: List of the data sources that are required to run the query. - * - * @param dataSources the dataSources value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withDataSources(List dataSources) { - this.dataSources = dataSources; - return this; - } - - /** - * Get the displayName property: The query display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The query display name. - * - * @param displayName the displayName value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.inputEntityType; - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withInputEntityType(EntityType inputEntityType) { - this.inputEntityType = inputEntityType; - return this; - } - - /** - * Get the inputFields property: List of the fields of the source entity that are required to run the query. - * - * @return the inputFields value. - */ - public List inputFields() { - return this.inputFields; - } - - /** - * Set the inputFields property: List of the fields of the source entity that are required to run the query. - * - * @param inputFields the inputFields value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withInputFields(List inputFields) { - this.inputFields = inputFields; - return this; - } - - /** - * Get the outputEntityTypes property: List of the desired output types to be constructed from the result. - * - * @return the outputEntityTypes value. - */ - public List outputEntityTypes() { - return this.outputEntityTypes; - } - - /** - * Set the outputEntityTypes property: List of the desired output types to be constructed from the result. - * - * @param outputEntityTypes the outputEntityTypes value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withOutputEntityTypes(List outputEntityTypes) { - this.outputEntityTypes = outputEntityTypes; - return this; - } - - /** - * Get the queryTemplate property: The template query string to be parsed and formatted. - * - * @return the queryTemplate value. - */ - public String queryTemplate() { - return this.queryTemplate; - } - - /** - * Set the queryTemplate property: The template query string to be parsed and formatted. - * - * @param queryTemplate the queryTemplate value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withQueryTemplate(String queryTemplate) { - this.queryTemplate = queryTemplate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java deleted file mode 100644 index 90e3adfec3d7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** EyesOn property bag. */ -@Immutable -public final class EyesOnSettingsProperties { - /* - * Determines whether the setting is enable or disabled. - */ - @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEnabled; - - /** - * Get the isEnabled property: Determines whether the setting is enable or disabled. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java deleted file mode 100644 index 7588902fa603..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java +++ /dev/null @@ -1,84 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** File entity property bag. */ -@Immutable -public final class FileEntityProperties extends EntityCommonProperties { - /* - * The full path to the file. - */ - @JsonProperty(value = "directory", access = JsonProperty.Access.WRITE_ONLY) - private String directory; - - /* - * The file hash entity identifiers associated with this file - */ - @JsonProperty(value = "fileHashEntityIds", access = JsonProperty.Access.WRITE_ONLY) - private List fileHashEntityIds; - - /* - * The file name without path (some alerts might not include path). - */ - @JsonProperty(value = "fileName", access = JsonProperty.Access.WRITE_ONLY) - private String fileName; - - /* - * The Host entity id which the file belongs to - */ - @JsonProperty(value = "hostEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String hostEntityId; - - /** - * Get the directory property: The full path to the file. - * - * @return the directory value. - */ - public String directory() { - return this.directory; - } - - /** - * Get the fileHashEntityIds property: The file hash entity identifiers associated with this file. - * - * @return the fileHashEntityIds value. - */ - public List fileHashEntityIds() { - return this.fileHashEntityIds; - } - - /** - * Get the fileName property: The file name without path (some alerts might not include path). - * - * @return the fileName value. - */ - public String fileName() { - return this.fileName; - } - - /** - * Get the hostEntityId property: The Host entity id which the file belongs to. - * - * @return the hostEntityId value. - */ - public String hostEntityId() { - return this.hostEntityId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java deleted file mode 100644 index 8ebadc287860..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.FileHashAlgorithm; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** FileHash entity property bag. */ -@Immutable -public final class FileHashEntityProperties extends EntityCommonProperties { - /* - * The hash algorithm type. - */ - @JsonProperty(value = "algorithm", access = JsonProperty.Access.WRITE_ONLY) - private FileHashAlgorithm algorithm; - - /* - * The file hash value. - */ - @JsonProperty(value = "hashValue", access = JsonProperty.Access.WRITE_ONLY) - private String hashValue; - - /** - * Get the algorithm property: The hash algorithm type. - * - * @return the algorithm value. - */ - public FileHashAlgorithm algorithm() { - return this.algorithm; - } - - /** - * Get the hashValue property: The file hash value. - * - * @return the hashValue value. - */ - public String hashValue() { - return this.hashValue; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java deleted file mode 100644 index fe47f14b590c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java +++ /dev/null @@ -1,238 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileImportState; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; -import com.azure.resourcemanager.securityinsights.models.ValidationError; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents a file import in Azure Security Insights. */ -@Fluent -public final class FileImportInner extends ProxyResource { - /* - * File import properties - */ - @JsonProperty(value = "properties") - private FileImportProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: File import properties. - * - * @return the innerProperties value. - */ - private FileImportProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the ingestionMode property: Describes how to ingest the records in the file. - * - * @return the ingestionMode value. - */ - public IngestionMode ingestionMode() { - return this.innerProperties() == null ? null : this.innerProperties().ingestionMode(); - } - - /** - * Set the ingestionMode property: Describes how to ingest the records in the file. - * - * @param ingestionMode the ingestionMode value to set. - * @return the FileImportInner object itself. - */ - public FileImportInner withIngestionMode(IngestionMode ingestionMode) { - if (this.innerProperties() == null) { - this.innerProperties = new FileImportProperties(); - } - this.innerProperties().withIngestionMode(ingestionMode); - return this; - } - - /** - * Get the contentType property: The content type of this file. - * - * @return the contentType value. - */ - public FileImportContentType contentType() { - return this.innerProperties() == null ? null : this.innerProperties().contentType(); - } - - /** - * Set the contentType property: The content type of this file. - * - * @param contentType the contentType value to set. - * @return the FileImportInner object itself. - */ - public FileImportInner withContentType(FileImportContentType contentType) { - if (this.innerProperties() == null) { - this.innerProperties = new FileImportProperties(); - } - this.innerProperties().withContentType(contentType); - return this; - } - - /** - * Get the createdTimeUtc property: The time the file was imported. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the errorFile property: Represents the error file (if the import was ingested with errors or failed the - * validation). - * - * @return the errorFile value. - */ - public FileMetadata errorFile() { - return this.innerProperties() == null ? null : this.innerProperties().errorFile(); - } - - /** - * Get the errorsPreview property: An ordered list of some of the errors that were encountered during validation. - * - * @return the errorsPreview value. - */ - public List errorsPreview() { - return this.innerProperties() == null ? null : this.innerProperties().errorsPreview(); - } - - /** - * Get the importFile property: Represents the imported file. - * - * @return the importFile value. - */ - public FileMetadata importFile() { - return this.innerProperties() == null ? null : this.innerProperties().importFile(); - } - - /** - * Set the importFile property: Represents the imported file. - * - * @param importFile the importFile value to set. - * @return the FileImportInner object itself. - */ - public FileImportInner withImportFile(FileMetadata importFile) { - if (this.innerProperties() == null) { - this.innerProperties = new FileImportProperties(); - } - this.innerProperties().withImportFile(importFile); - return this; - } - - /** - * Get the ingestedRecordCount property: The number of records that have been successfully ingested. - * - * @return the ingestedRecordCount value. - */ - public Integer ingestedRecordCount() { - return this.innerProperties() == null ? null : this.innerProperties().ingestedRecordCount(); - } - - /** - * Get the source property: The source for the data in the file. - * - * @return the source value. - */ - public String source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: The source for the data in the file. - * - * @param source the source value to set. - * @return the FileImportInner object itself. - */ - public FileImportInner withSource(String source) { - if (this.innerProperties() == null) { - this.innerProperties = new FileImportProperties(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the state property: The state of the file import. - * - * @return the state value. - */ - public FileImportState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the totalRecordCount property: The number of records in the file. - * - * @return the totalRecordCount value. - */ - public Integer totalRecordCount() { - return this.innerProperties() == null ? null : this.innerProperties().totalRecordCount(); - } - - /** - * Get the validRecordCount property: The number of records that have passed validation. - * - * @return the validRecordCount value. - */ - public Integer validRecordCount() { - return this.innerProperties() == null ? null : this.innerProperties().validRecordCount(); - } - - /** - * Get the filesValidUntilTimeUtc property: The time the files associated with this import are deleted from the - * storage account. - * - * @return the filesValidUntilTimeUtc value. - */ - public OffsetDateTime filesValidUntilTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().filesValidUntilTimeUtc(); - } - - /** - * Get the importValidUntilTimeUtc property: The time the file import record is soft deleted from the database and - * history. - * - * @return the importValidUntilTimeUtc value. - */ - public OffsetDateTime importValidUntilTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().importValidUntilTimeUtc(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java deleted file mode 100644 index 1ae17de2e493..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java +++ /dev/null @@ -1,302 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileImportState; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; -import com.azure.resourcemanager.securityinsights.models.ValidationError; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Describes the FileImport's properties. */ -@Fluent -public final class FileImportProperties { - /* - * Describes how to ingest the records in the file. - */ - @JsonProperty(value = "ingestionMode", required = true) - private IngestionMode ingestionMode; - - /* - * The content type of this file. - */ - @JsonProperty(value = "contentType", required = true) - private FileImportContentType contentType; - - /* - * The time the file was imported. - */ - @JsonProperty(value = "createdTimeUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - - /* - * Represents the error file (if the import was ingested with errors or failed the validation). - */ - @JsonProperty(value = "errorFile", access = JsonProperty.Access.WRITE_ONLY) - private FileMetadata errorFile; - - /* - * An ordered list of some of the errors that were encountered during validation. - */ - @JsonProperty(value = "errorsPreview", access = JsonProperty.Access.WRITE_ONLY) - private List errorsPreview; - - /* - * Represents the imported file. - */ - @JsonProperty(value = "importFile", required = true) - private FileMetadata importFile; - - /* - * The number of records that have been successfully ingested. - */ - @JsonProperty(value = "ingestedRecordCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer ingestedRecordCount; - - /* - * The source for the data in the file. - */ - @JsonProperty(value = "source", required = true) - private String source; - - /* - * The state of the file import. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private FileImportState state; - - /* - * The number of records in the file. - */ - @JsonProperty(value = "totalRecordCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer totalRecordCount; - - /* - * The number of records that have passed validation. - */ - @JsonProperty(value = "validRecordCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer validRecordCount; - - /* - * The time the files associated with this import are deleted from the storage account. - */ - @JsonProperty(value = "filesValidUntilTimeUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime filesValidUntilTimeUtc; - - /* - * The time the file import record is soft deleted from the database and history. - */ - @JsonProperty(value = "importValidUntilTimeUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime importValidUntilTimeUtc; - - /** - * Get the ingestionMode property: Describes how to ingest the records in the file. - * - * @return the ingestionMode value. - */ - public IngestionMode ingestionMode() { - return this.ingestionMode; - } - - /** - * Set the ingestionMode property: Describes how to ingest the records in the file. - * - * @param ingestionMode the ingestionMode value to set. - * @return the FileImportProperties object itself. - */ - public FileImportProperties withIngestionMode(IngestionMode ingestionMode) { - this.ingestionMode = ingestionMode; - return this; - } - - /** - * Get the contentType property: The content type of this file. - * - * @return the contentType value. - */ - public FileImportContentType contentType() { - return this.contentType; - } - - /** - * Set the contentType property: The content type of this file. - * - * @param contentType the contentType value to set. - * @return the FileImportProperties object itself. - */ - public FileImportProperties withContentType(FileImportContentType contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the createdTimeUtc property: The time the file was imported. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the errorFile property: Represents the error file (if the import was ingested with errors or failed the - * validation). - * - * @return the errorFile value. - */ - public FileMetadata errorFile() { - return this.errorFile; - } - - /** - * Get the errorsPreview property: An ordered list of some of the errors that were encountered during validation. - * - * @return the errorsPreview value. - */ - public List errorsPreview() { - return this.errorsPreview; - } - - /** - * Get the importFile property: Represents the imported file. - * - * @return the importFile value. - */ - public FileMetadata importFile() { - return this.importFile; - } - - /** - * Set the importFile property: Represents the imported file. - * - * @param importFile the importFile value to set. - * @return the FileImportProperties object itself. - */ - public FileImportProperties withImportFile(FileMetadata importFile) { - this.importFile = importFile; - return this; - } - - /** - * Get the ingestedRecordCount property: The number of records that have been successfully ingested. - * - * @return the ingestedRecordCount value. - */ - public Integer ingestedRecordCount() { - return this.ingestedRecordCount; - } - - /** - * Get the source property: The source for the data in the file. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Set the source property: The source for the data in the file. - * - * @param source the source value to set. - * @return the FileImportProperties object itself. - */ - public FileImportProperties withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the state property: The state of the file import. - * - * @return the state value. - */ - public FileImportState state() { - return this.state; - } - - /** - * Get the totalRecordCount property: The number of records in the file. - * - * @return the totalRecordCount value. - */ - public Integer totalRecordCount() { - return this.totalRecordCount; - } - - /** - * Get the validRecordCount property: The number of records that have passed validation. - * - * @return the validRecordCount value. - */ - public Integer validRecordCount() { - return this.validRecordCount; - } - - /** - * Get the filesValidUntilTimeUtc property: The time the files associated with this import are deleted from the - * storage account. - * - * @return the filesValidUntilTimeUtc value. - */ - public OffsetDateTime filesValidUntilTimeUtc() { - return this.filesValidUntilTimeUtc; - } - - /** - * Get the importValidUntilTimeUtc property: The time the file import record is soft deleted from the database and - * history. - * - * @return the importValidUntilTimeUtc value. - */ - public OffsetDateTime importValidUntilTimeUtc() { - return this.importValidUntilTimeUtc; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ingestionMode() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property ingestionMode in model FileImportProperties")); - } - if (contentType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property contentType in model FileImportProperties")); - } - if (errorFile() != null) { - errorFile().validate(); - } - if (errorsPreview() != null) { - errorsPreview().forEach(e -> e.validate()); - } - if (importFile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property importFile in model FileImportProperties")); - } else { - importFile().validate(); - } - if (source() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property source in model FileImportProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FileImportProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java deleted file mode 100644 index 3ce589c95ac6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java +++ /dev/null @@ -1,236 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.FusionScenarioExclusionPattern; -import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Fusion alert rule base property bag. */ -@Fluent -public final class FusionAlertRuleProperties { - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName", required = true) - private String alertRuleTemplateName; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * Determines whether this alert rule is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * Configuration for all supported source signals in fusion detection. - */ - @JsonProperty(value = "sourceSettings") - private List sourceSettings; - - /* - * Configuration to exclude scenarios in fusion detection. - */ - @JsonProperty(value = "scenarioExclusionPatterns") - private List scenarioExclusionPatterns; - - /* - * The last time that this alert has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) - private AlertSeverity severity; - - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) - private List tactics; - - /* - * The techniques of the alert rule - */ - @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) - private List techniques; - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.alertRuleTemplateName; - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the FusionAlertRuleProperties object itself. - */ - public FusionAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the FusionAlertRuleProperties object itself. - */ - public FusionAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the sourceSettings property: Configuration for all supported source signals in fusion detection. - * - * @return the sourceSettings value. - */ - public List sourceSettings() { - return this.sourceSettings; - } - - /** - * Set the sourceSettings property: Configuration for all supported source signals in fusion detection. - * - * @param sourceSettings the sourceSettings value to set. - * @return the FusionAlertRuleProperties object itself. - */ - public FusionAlertRuleProperties withSourceSettings(List sourceSettings) { - this.sourceSettings = sourceSettings; - return this; - } - - /** - * Get the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. - * - * @return the scenarioExclusionPatterns value. - */ - public List scenarioExclusionPatterns() { - return this.scenarioExclusionPatterns; - } - - /** - * Set the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. - * - * @param scenarioExclusionPatterns the scenarioExclusionPatterns value to set. - * @return the FusionAlertRuleProperties object itself. - */ - public FusionAlertRuleProperties withScenarioExclusionPatterns( - List scenarioExclusionPatterns) { - this.scenarioExclusionPatterns = scenarioExclusionPatterns; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (alertRuleTemplateName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alertRuleTemplateName in model FusionAlertRuleProperties")); - } - if (sourceSettings() != null) { - sourceSettings().forEach(e -> e.validate()); - } - if (scenarioExclusionPatterns() != null) { - scenarioExclusionPatterns().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionAlertRuleProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java deleted file mode 100644 index 162717edb32f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java +++ /dev/null @@ -1,299 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.FusionTemplateSourceSetting; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Fusion alert rule template properties. */ -@Fluent -public final class FusionAlertRuleTemplateProperties { - /* - * the number of alert rules that were created by this template - */ - @JsonProperty(value = "alertRulesCreatedByTemplateCount") - private Integer alertRulesCreatedByTemplateCount; - - /* - * The time that this alert rule template has been added. - */ - @JsonProperty(value = "createdDateUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDateUtc; - - /* - * The time that this alert rule template was last updated. - */ - @JsonProperty(value = "lastUpdatedDateUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastUpdatedDateUtc; - - /* - * The description of the alert rule template. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The display name for alert rule template. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The required data connectors for this template - */ - @JsonProperty(value = "requiredDataConnectors") - private List requiredDataConnectors; - - /* - * The alert rule template status. - */ - @JsonProperty(value = "status") - private TemplateStatus status; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The tactics of the alert rule template - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * The techniques of the alert rule - */ - @JsonProperty(value = "techniques") - private List techniques; - - /* - * All supported source signal configurations consumed in fusion detection. - */ - @JsonProperty(value = "sourceSettings") - private List sourceSettings; - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.alertRulesCreatedByTemplateCount; - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - this.alertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - return this; - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.createdDateUtc; - } - - /** - * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.lastUpdatedDateUtc; - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the requiredDataConnectors property: The required data connectors for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.requiredDataConnectors; - } - - /** - * Set the requiredDataConnectors property: The required data connectors for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - this.requiredDataConnectors = requiredDataConnectors; - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.status; - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withStatus(TemplateStatus status) { - this.status = status; - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** - * Get the sourceSettings property: All supported source signal configurations consumed in fusion detection. - * - * @return the sourceSettings value. - */ - public List sourceSettings() { - return this.sourceSettings; - } - - /** - * Set the sourceSettings property: All supported source signal configurations consumed in fusion detection. - * - * @param sourceSettings the sourceSettings value to set. - * @return the FusionAlertRuleTemplateProperties object itself. - */ - public FusionAlertRuleTemplateProperties withSourceSettings(List sourceSettings) { - this.sourceSettings = sourceSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (requiredDataConnectors() != null) { - requiredDataConnectors().forEach(e -> e.validate()); - } - if (sourceSettings() != null) { - sourceSettings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java deleted file mode 100644 index d001a56c976d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java +++ /dev/null @@ -1,51 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityQueryItem; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Retrieve queries for entity result operation response. */ -@Fluent -public final class GetQueriesResponseInner { - /* - * The query result values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: The query result values. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The query result values. - * - * @param value the value value to set. - * @return the GetQueriesResponseInner object itself. - */ - public GetQueriesResponseInner withValue(List 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()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java deleted file mode 100644 index 16f676846108..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java +++ /dev/null @@ -1,173 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.OSFamily; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Host entity property bag. */ -@Fluent -public final class HostEntityProperties extends EntityCommonProperties { - /* - * The azure resource id of the VM. - */ - @JsonProperty(value = "azureID", access = JsonProperty.Access.WRITE_ONLY) - private String azureId; - - /* - * The DNS domain that this host belongs to. Should contain the compete DNS suffix for the domain - */ - @JsonProperty(value = "dnsDomain", access = JsonProperty.Access.WRITE_ONLY) - private String dnsDomain; - - /* - * The hostname without the domain suffix. - */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * Determines whether this host belongs to a domain. - */ - @JsonProperty(value = "isDomainJoined", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDomainJoined; - - /* - * The host name (pre-windows2000). - */ - @JsonProperty(value = "netBiosName", access = JsonProperty.Access.WRITE_ONLY) - private String netBiosName; - - /* - * The NT domain that this host belongs to. - */ - @JsonProperty(value = "ntDomain", access = JsonProperty.Access.WRITE_ONLY) - private String ntDomain; - - /* - * The OMS agent id, if the host has OMS agent installed. - */ - @JsonProperty(value = "omsAgentID", access = JsonProperty.Access.WRITE_ONLY) - private String omsAgentId; - - /* - * The operating system type. - */ - @JsonProperty(value = "osFamily") - private OSFamily osFamily; - - /* - * A free text representation of the operating system. This field is meant to hold specific versions the are more - * fine grained than OSFamily or future values not supported by OSFamily enumeration - */ - @JsonProperty(value = "osVersion", access = JsonProperty.Access.WRITE_ONLY) - private String osVersion; - - /** - * Get the azureId property: The azure resource id of the VM. - * - * @return the azureId value. - */ - public String azureId() { - return this.azureId; - } - - /** - * Get the dnsDomain property: The DNS domain that this host belongs to. Should contain the compete DNS suffix for - * the domain. - * - * @return the dnsDomain value. - */ - public String dnsDomain() { - return this.dnsDomain; - } - - /** - * Get the hostname property: The hostname without the domain suffix. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the isDomainJoined property: Determines whether this host belongs to a domain. - * - * @return the isDomainJoined value. - */ - public Boolean isDomainJoined() { - return this.isDomainJoined; - } - - /** - * Get the netBiosName property: The host name (pre-windows2000). - * - * @return the netBiosName value. - */ - public String netBiosName() { - return this.netBiosName; - } - - /** - * Get the ntDomain property: The NT domain that this host belongs to. - * - * @return the ntDomain value. - */ - public String ntDomain() { - return this.ntDomain; - } - - /** - * Get the omsAgentId property: The OMS agent id, if the host has OMS agent installed. - * - * @return the omsAgentId value. - */ - public String omsAgentId() { - return this.omsAgentId; - } - - /** - * Get the osFamily property: The operating system type. - * - * @return the osFamily value. - */ - public OSFamily osFamily() { - return this.osFamily; - } - - /** - * Set the osFamily property: The operating system type. - * - * @param osFamily the osFamily value to set. - * @return the HostEntityProperties object itself. - */ - public HostEntityProperties withOsFamily(OSFamily osFamily) { - this.osFamily = osFamily; - return this; - } - - /** - * Get the osVersion property: A free text representation of the operating system. This field is meant to hold - * specific versions the are more fine grained than OSFamily or future values not supported by OSFamily enumeration. - * - * @return the osVersion value. - */ - public String osVersion() { - return this.osVersion; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java deleted file mode 100644 index 5be6c7dc4e9b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java +++ /dev/null @@ -1,336 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.IncidentInfo; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Describes bookmark properties. */ -@Fluent -public final class HuntingBookmarkProperties extends EntityCommonProperties { - /* - * The time the bookmark was created - */ - @JsonProperty(value = "created") - private OffsetDateTime created; - - /* - * Describes a user that created the bookmark - */ - @JsonProperty(value = "createdBy") - private UserInfo createdBy; - - /* - * The display name of the bookmark - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * The time of the event - */ - @JsonProperty(value = "eventTime") - private OffsetDateTime eventTime; - - /* - * List of labels relevant to this bookmark - */ - @JsonProperty(value = "labels") - private List labels; - - /* - * The notes of the bookmark - */ - @JsonProperty(value = "notes") - private String notes; - - /* - * The query of the bookmark. - */ - @JsonProperty(value = "query", required = true) - private String query; - - /* - * The query result of the bookmark. - */ - @JsonProperty(value = "queryResult") - private String queryResult; - - /* - * The last time the bookmark was updated - */ - @JsonProperty(value = "updated") - private OffsetDateTime updated; - - /* - * Describes a user that updated the bookmark - */ - @JsonProperty(value = "updatedBy") - private UserInfo updatedBy; - - /* - * Describes an incident that relates to bookmark - */ - @JsonProperty(value = "incidentInfo") - private IncidentInfo incidentInfo; - - /** - * Get the created property: The time the bookmark was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Set the created property: The time the bookmark was created. - * - * @param created the created value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withCreated(OffsetDateTime created) { - this.created = created; - return this; - } - - /** - * Get the createdBy property: Describes a user that created the bookmark. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: Describes a user that created the bookmark. - * - * @param createdBy the createdBy value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withCreatedBy(UserInfo createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the displayName property: The display name of the bookmark. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the bookmark. - * - * @param displayName the displayName value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the eventTime property: The time of the event. - * - * @return the eventTime value. - */ - public OffsetDateTime eventTime() { - return this.eventTime; - } - - /** - * Set the eventTime property: The time of the event. - * - * @param eventTime the eventTime value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withEventTime(OffsetDateTime eventTime) { - this.eventTime = eventTime; - return this; - } - - /** - * Get the labels property: List of labels relevant to this bookmark. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: List of labels relevant to this bookmark. - * - * @param labels the labels value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Get the notes property: The notes of the bookmark. - * - * @return the notes value. - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes property: The notes of the bookmark. - * - * @param notes the notes value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the query property: The query of the bookmark. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query of the bookmark. - * - * @param query the query value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the queryResult property: The query result of the bookmark. - * - * @return the queryResult value. - */ - public String queryResult() { - return this.queryResult; - } - - /** - * Set the queryResult property: The query result of the bookmark. - * - * @param queryResult the queryResult value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withQueryResult(String queryResult) { - this.queryResult = queryResult; - return this; - } - - /** - * Get the updated property: The last time the bookmark was updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.updated; - } - - /** - * Set the updated property: The last time the bookmark was updated. - * - * @param updated the updated value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withUpdated(OffsetDateTime updated) { - this.updated = updated; - return this; - } - - /** - * Get the updatedBy property: Describes a user that updated the bookmark. - * - * @return the updatedBy value. - */ - public UserInfo updatedBy() { - return this.updatedBy; - } - - /** - * Set the updatedBy property: Describes a user that updated the bookmark. - * - * @param updatedBy the updatedBy value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withUpdatedBy(UserInfo updatedBy) { - this.updatedBy = updatedBy; - return this; - } - - /** - * Get the incidentInfo property: Describes an incident that relates to bookmark. - * - * @return the incidentInfo value. - */ - public IncidentInfo incidentInfo() { - return this.incidentInfo; - } - - /** - * Set the incidentInfo property: Describes an incident that relates to bookmark. - * - * @param incidentInfo the incidentInfo value to set. - * @return the HuntingBookmarkProperties object itself. - */ - public HuntingBookmarkProperties withIncidentInfo(IncidentInfo incidentInfo) { - this.incidentInfo = incidentInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (createdBy() != null) { - createdBy().validate(); - } - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model HuntingBookmarkProperties")); - } - if (query() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property query in model HuntingBookmarkProperties")); - } - if (updatedBy() != null) { - updatedBy().validate(); - } - if (incidentInfo() != null) { - incidentInfo().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HuntingBookmarkProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java deleted file mode 100644 index 18459e1b4f13..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java +++ /dev/null @@ -1,58 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.SecurityAlert; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of incident alerts. */ -@Fluent -public final class IncidentAlertListInner { - /* - * Array of incident alerts. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the value property: Array of incident alerts. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of incident alerts. - * - * @param value the value value to set. - * @return the IncidentAlertListInner object itself. - */ - public IncidentAlertListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model IncidentAlertListInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IncidentAlertListInner.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java deleted file mode 100644 index aa6aec92f588..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java +++ /dev/null @@ -1,58 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.HuntingBookmark; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of incident bookmarks. */ -@Fluent -public final class IncidentBookmarkListInner { - /* - * Array of incident bookmarks. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the value property: Array of incident bookmarks. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of incident bookmarks. - * - * @param value the value value to set. - * @return the IncidentBookmarkListInner object itself. - */ - public IncidentBookmarkListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model IncidentBookmarkListInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IncidentBookmarkListInner.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java deleted file mode 100644 index 5bde60b473fa..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java +++ /dev/null @@ -1,100 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ClientInfo; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Represents an incident comment. */ -@Fluent -public final class IncidentCommentInner extends ResourceWithEtag { - /* - * Incident comment properties - */ - @JsonProperty(value = "properties") - private IncidentCommentProperties innerProperties; - - /** - * Get the innerProperties property: Incident comment properties. - * - * @return the innerProperties value. - */ - private IncidentCommentProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public IncidentCommentInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the createdTimeUtc property: The time the comment was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the lastModifiedTimeUtc property: The time the comment was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - - /** - * Get the message property: The comment message. - * - * @return the message value. - */ - public String message() { - return this.innerProperties() == null ? null : this.innerProperties().message(); - } - - /** - * Set the message property: The comment message. - * - * @param message the message value to set. - * @return the IncidentCommentInner object itself. - */ - public IncidentCommentInner withMessage(String message) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentCommentProperties(); - } - this.innerProperties().withMessage(message); - return this; - } - - /** - * Get the author property: Describes the client that created the comment. - * - * @return the author value. - */ - public ClientInfo author() { - return this.innerProperties() == null ? null : this.innerProperties().author(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java deleted file mode 100644 index 6cc4d172a5e2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java +++ /dev/null @@ -1,105 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.ClientInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Incident comment property bag. */ -@Fluent -public final class IncidentCommentProperties { - /* - * The time the comment was created - */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - - /* - * The time the comment was updated - */ - @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTimeUtc; - - /* - * The comment message - */ - @JsonProperty(value = "message", required = true) - private String message; - - /* - * Describes the client that created the comment - */ - @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) - private ClientInfo author; - - /** - * Get the createdTimeUtc property: The time the comment was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the lastModifiedTimeUtc property: The time the comment was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.lastModifiedTimeUtc; - } - - /** - * Get the message property: The comment message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The comment message. - * - * @param message the message value to set. - * @return the IncidentCommentProperties object itself. - */ - public IncidentCommentProperties withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the author property: Describes the client that created the comment. - * - * @return the author value. - */ - public ClientInfo author() { - return this.author; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (message() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property message in model IncidentCommentProperties")); - } - if (author() != null) { - author().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IncidentCommentProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java deleted file mode 100644 index 3f6dbe089b16..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The incident related entities response. */ -@Fluent -public final class IncidentEntitiesResponseInner { - /* - * Array of the incident related entities. - */ - @JsonProperty(value = "entities") - private List entities; - - /* - * The metadata from the incident related entities results. - */ - @JsonProperty(value = "metaData") - private List metadata; - - /** - * Get the entities property: Array of the incident related entities. - * - * @return the entities value. - */ - public List entities() { - return this.entities; - } - - /** - * Set the entities property: Array of the incident related entities. - * - * @param entities the entities value to set. - * @return the IncidentEntitiesResponseInner object itself. - */ - public IncidentEntitiesResponseInner withEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the metadata property: The metadata from the incident related entities results. - * - * @return the metadata value. - */ - public List metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the incident related entities results. - * - * @param metadata the metadata value to set. - * @return the IncidentEntitiesResponseInner object itself. - */ - public IncidentEntitiesResponseInner withMetadata(List metadata) { - this.metadata = metadata; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entities() != null) { - entities().forEach(e -> e.validate()); - } - if (metadata() != null) { - metadata().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java deleted file mode 100644 index 7f44360a2ebd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java +++ /dev/null @@ -1,433 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.IncidentAdditionalData; -import com.azure.resourcemanager.securityinsights.models.IncidentClassification; -import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; -import com.azure.resourcemanager.securityinsights.models.IncidentLabel; -import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents an incident in Azure Security Insights. */ -@Fluent -public final class IncidentInner extends ResourceWithEtag { - /* - * Incident properties - */ - @JsonProperty(value = "properties") - private IncidentPropertiesInner innerProperties; - - /** - * Get the innerProperties property: Incident properties. - * - * @return the innerProperties value. - */ - private IncidentPropertiesInner innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public IncidentInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - public IncidentAdditionalData additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the classification property: The reason the incident was closed. - * - * @return the classification value. - */ - public IncidentClassification classification() { - return this.innerProperties() == null ? null : this.innerProperties().classification(); - } - - /** - * Set the classification property: The reason the incident was closed. - * - * @param classification the classification value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withClassification(IncidentClassification classification) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withClassification(classification); - return this; - } - - /** - * Get the classificationComment property: Describes the reason the incident was closed. - * - * @return the classificationComment value. - */ - public String classificationComment() { - return this.innerProperties() == null ? null : this.innerProperties().classificationComment(); - } - - /** - * Set the classificationComment property: Describes the reason the incident was closed. - * - * @param classificationComment the classificationComment value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withClassificationComment(String classificationComment) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withClassificationComment(classificationComment); - return this; - } - - /** - * Get the classificationReason property: The classification reason the incident was closed with. - * - * @return the classificationReason value. - */ - public IncidentClassificationReason classificationReason() { - return this.innerProperties() == null ? null : this.innerProperties().classificationReason(); - } - - /** - * Set the classificationReason property: The classification reason the incident was closed with. - * - * @param classificationReason the classificationReason value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withClassificationReason(IncidentClassificationReason classificationReason) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withClassificationReason(classificationReason); - return this; - } - - /** - * Get the createdTimeUtc property: The time the incident was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the description property: The description of the incident. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the incident. - * - * @param description the description value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @return the firstActivityTimeUtc value. - */ - public OffsetDateTime firstActivityTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().firstActivityTimeUtc(); - } - - /** - * Set the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withFirstActivityTimeUtc(firstActivityTimeUtc); - return this; - } - - /** - * Get the incidentUrl property: The deep-link url to the incident in Azure portal. - * - * @return the incidentUrl value. - */ - public String incidentUrl() { - return this.innerProperties() == null ? null : this.innerProperties().incidentUrl(); - } - - /** - * Get the incidentNumber property: A sequential number. - * - * @return the incidentNumber value. - */ - public Integer incidentNumber() { - return this.innerProperties() == null ? null : this.innerProperties().incidentNumber(); - } - - /** - * Get the labels property: List of labels relevant to this incident. - * - * @return the labels value. - */ - public List labels() { - return this.innerProperties() == null ? null : this.innerProperties().labels(); - } - - /** - * Set the labels property: List of labels relevant to this incident. - * - * @param labels the labels value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withLabels(List labels) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withLabels(labels); - return this; - } - - /** - * Get the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - public String providerName() { - return this.innerProperties() == null ? null : this.innerProperties().providerName(); - } - - /** - * Set the providerName property: The name of the source provider that generated the incident. - * - * @param providerName the providerName value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withProviderName(String providerName) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withProviderName(providerName); - return this; - } - - /** - * Get the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @return the providerIncidentId value. - */ - public String providerIncidentId() { - return this.innerProperties() == null ? null : this.innerProperties().providerIncidentId(); - } - - /** - * Set the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @param providerIncidentId the providerIncidentId value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withProviderIncidentId(String providerIncidentId) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withProviderIncidentId(providerIncidentId); - return this; - } - - /** - * Get the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @return the lastActivityTimeUtc value. - */ - public OffsetDateTime lastActivityTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastActivityTimeUtc(); - } - - /** - * Set the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @param lastActivityTimeUtc the lastActivityTimeUtc value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withLastActivityTimeUtc(lastActivityTimeUtc); - return this; - } - - /** - * Get the lastModifiedTimeUtc property: The last time the incident was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - - /** - * Get the owner property: Describes a user that the incident is assigned to. - * - * @return the owner value. - */ - public IncidentOwnerInfo owner() { - return this.innerProperties() == null ? null : this.innerProperties().owner(); - } - - /** - * Set the owner property: Describes a user that the incident is assigned to. - * - * @param owner the owner value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withOwner(IncidentOwnerInfo owner) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withOwner(owner); - return this; - } - - /** - * Get the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. - * - * @return the relatedAnalyticRuleIds value. - */ - public List relatedAnalyticRuleIds() { - return this.innerProperties() == null ? null : this.innerProperties().relatedAnalyticRuleIds(); - } - - /** - * Get the severity property: The severity of the incident. - * - * @return the severity value. - */ - public IncidentSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity of the incident. - * - * @param severity the severity value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withSeverity(IncidentSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the status property: The status of the incident. - * - * @return the status value. - */ - public IncidentStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The status of the incident. - * - * @param status the status value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withStatus(IncidentStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Get the teamInformation property: Describes a team for the incident. - * - * @return the teamInformation value. - */ - public TeamInformationInner teamInformation() { - return this.innerProperties() == null ? null : this.innerProperties().teamInformation(); - } - - /** - * Set the teamInformation property: Describes a team for the incident. - * - * @param teamInformation the teamInformation value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withTeamInformation(TeamInformationInner teamInformation) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withTeamInformation(teamInformation); - return this; - } - - /** - * Get the title property: The title of the incident. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The title of the incident. - * - * @param title the title value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withTitle(title); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java deleted file mode 100644 index 5262e2c3ba58..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java +++ /dev/null @@ -1,514 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.IncidentAdditionalData; -import com.azure.resourcemanager.securityinsights.models.IncidentClassification; -import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; -import com.azure.resourcemanager.securityinsights.models.IncidentLabel; -import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Describes incident properties. */ -@Fluent -public final class IncidentPropertiesInner { - /* - * Additional data on the incident - */ - @JsonProperty(value = "additionalData", access = JsonProperty.Access.WRITE_ONLY) - private IncidentAdditionalData additionalData; - - /* - * The reason the incident was closed - */ - @JsonProperty(value = "classification") - private IncidentClassification classification; - - /* - * Describes the reason the incident was closed - */ - @JsonProperty(value = "classificationComment") - private String classificationComment; - - /* - * The classification reason the incident was closed with - */ - @JsonProperty(value = "classificationReason") - private IncidentClassificationReason classificationReason; - - /* - * The time the incident was created - */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - - /* - * The description of the incident - */ - @JsonProperty(value = "description") - private String description; - - /* - * The time of the first activity in the incident - */ - @JsonProperty(value = "firstActivityTimeUtc") - private OffsetDateTime firstActivityTimeUtc; - - /* - * The deep-link url to the incident in Azure portal - */ - @JsonProperty(value = "incidentUrl", access = JsonProperty.Access.WRITE_ONLY) - private String incidentUrl; - - /* - * A sequential number - */ - @JsonProperty(value = "incidentNumber", access = JsonProperty.Access.WRITE_ONLY) - private Integer incidentNumber; - - /* - * List of labels relevant to this incident - */ - @JsonProperty(value = "labels") - private List labels; - - /* - * The name of the source provider that generated the incident - */ - @JsonProperty(value = "providerName") - private String providerName; - - /* - * The incident ID assigned by the incident provider - */ - @JsonProperty(value = "providerIncidentId") - private String providerIncidentId; - - /* - * The time of the last activity in the incident - */ - @JsonProperty(value = "lastActivityTimeUtc") - private OffsetDateTime lastActivityTimeUtc; - - /* - * The last time the incident was updated - */ - @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTimeUtc; - - /* - * Describes a user that the incident is assigned to - */ - @JsonProperty(value = "owner") - private IncidentOwnerInfo owner; - - /* - * List of resource ids of Analytic rules related to the incident - */ - @JsonProperty(value = "relatedAnalyticRuleIds", access = JsonProperty.Access.WRITE_ONLY) - private List relatedAnalyticRuleIds; - - /* - * The severity of the incident - */ - @JsonProperty(value = "severity", required = true) - private IncidentSeverity severity; - - /* - * The status of the incident - */ - @JsonProperty(value = "status", required = true) - private IncidentStatus status; - - /* - * Describes a team for the incident - */ - @JsonProperty(value = "teamInformation") - private TeamInformationInner teamInformation; - - /* - * The title of the incident - */ - @JsonProperty(value = "title", required = true) - private String title; - - /** - * Get the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - public IncidentAdditionalData additionalData() { - return this.additionalData; - } - - /** - * Get the classification property: The reason the incident was closed. - * - * @return the classification value. - */ - public IncidentClassification classification() { - return this.classification; - } - - /** - * Set the classification property: The reason the incident was closed. - * - * @param classification the classification value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withClassification(IncidentClassification classification) { - this.classification = classification; - return this; - } - - /** - * Get the classificationComment property: Describes the reason the incident was closed. - * - * @return the classificationComment value. - */ - public String classificationComment() { - return this.classificationComment; - } - - /** - * Set the classificationComment property: Describes the reason the incident was closed. - * - * @param classificationComment the classificationComment value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withClassificationComment(String classificationComment) { - this.classificationComment = classificationComment; - return this; - } - - /** - * Get the classificationReason property: The classification reason the incident was closed with. - * - * @return the classificationReason value. - */ - public IncidentClassificationReason classificationReason() { - return this.classificationReason; - } - - /** - * Set the classificationReason property: The classification reason the incident was closed with. - * - * @param classificationReason the classificationReason value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withClassificationReason(IncidentClassificationReason classificationReason) { - this.classificationReason = classificationReason; - return this; - } - - /** - * Get the createdTimeUtc property: The time the incident was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the description property: The description of the incident. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the incident. - * - * @param description the description value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @return the firstActivityTimeUtc value. - */ - public OffsetDateTime firstActivityTimeUtc() { - return this.firstActivityTimeUtc; - } - - /** - * Set the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { - this.firstActivityTimeUtc = firstActivityTimeUtc; - return this; - } - - /** - * Get the incidentUrl property: The deep-link url to the incident in Azure portal. - * - * @return the incidentUrl value. - */ - public String incidentUrl() { - return this.incidentUrl; - } - - /** - * Get the incidentNumber property: A sequential number. - * - * @return the incidentNumber value. - */ - public Integer incidentNumber() { - return this.incidentNumber; - } - - /** - * Get the labels property: List of labels relevant to this incident. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: List of labels relevant to this incident. - * - * @param labels the labels value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Get the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: The name of the source provider that generated the incident. - * - * @param providerName the providerName value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @return the providerIncidentId value. - */ - public String providerIncidentId() { - return this.providerIncidentId; - } - - /** - * Set the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @param providerIncidentId the providerIncidentId value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withProviderIncidentId(String providerIncidentId) { - this.providerIncidentId = providerIncidentId; - return this; - } - - /** - * Get the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @return the lastActivityTimeUtc value. - */ - public OffsetDateTime lastActivityTimeUtc() { - return this.lastActivityTimeUtc; - } - - /** - * Set the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @param lastActivityTimeUtc the lastActivityTimeUtc value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { - this.lastActivityTimeUtc = lastActivityTimeUtc; - return this; - } - - /** - * Get the lastModifiedTimeUtc property: The last time the incident was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.lastModifiedTimeUtc; - } - - /** - * Get the owner property: Describes a user that the incident is assigned to. - * - * @return the owner value. - */ - public IncidentOwnerInfo owner() { - return this.owner; - } - - /** - * Set the owner property: Describes a user that the incident is assigned to. - * - * @param owner the owner value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withOwner(IncidentOwnerInfo owner) { - this.owner = owner; - return this; - } - - /** - * Get the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. - * - * @return the relatedAnalyticRuleIds value. - */ - public List relatedAnalyticRuleIds() { - return this.relatedAnalyticRuleIds; - } - - /** - * Get the severity property: The severity of the incident. - * - * @return the severity value. - */ - public IncidentSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity of the incident. - * - * @param severity the severity value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withSeverity(IncidentSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the status property: The status of the incident. - * - * @return the status value. - */ - public IncidentStatus status() { - return this.status; - } - - /** - * Set the status property: The status of the incident. - * - * @param status the status value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withStatus(IncidentStatus status) { - this.status = status; - return this; - } - - /** - * Get the teamInformation property: Describes a team for the incident. - * - * @return the teamInformation value. - */ - public TeamInformationInner teamInformation() { - return this.teamInformation; - } - - /** - * Set the teamInformation property: Describes a team for the incident. - * - * @param teamInformation the teamInformation value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withTeamInformation(TeamInformationInner teamInformation) { - this.teamInformation = teamInformation; - return this; - } - - /** - * Get the title property: The title of the incident. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The title of the incident. - * - * @param title the title value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withTitle(String title) { - this.title = title; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (additionalData() != null) { - additionalData().validate(); - } - if (labels() != null) { - labels().forEach(e -> e.validate()); - } - if (owner() != null) { - owner().validate(); - } - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model IncidentPropertiesInner")); - } - if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property status in model IncidentPropertiesInner")); - } - if (teamInformation() != null) { - teamInformation().validate(); - } - if (title() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property title in model IncidentPropertiesInner")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IncidentPropertiesInner.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java deleted file mode 100644 index 63643c5077a2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** IoT requirements check properties. */ -@Fluent -public final class IoTCheckRequirementsProperties { - /* - * The subscription id to connect to, and get the data from. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * Get the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the IoTCheckRequirementsProperties object itself. - */ - public IoTCheckRequirementsProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java deleted file mode 100644 index 1917add910f9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorWithAlertsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** IoT data connector properties. */ -@Fluent -public final class IoTDataConnectorProperties extends DataConnectorWithAlertsProperties { - /* - * The subscription id to connect to, and get the data from. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * Get the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the IoTDataConnectorProperties object itself. - */ - public IoTDataConnectorProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** {@inheritDoc} */ - @Override - public IoTDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - super.withDataTypes(dataTypes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java deleted file mode 100644 index 971f9f13da46..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java +++ /dev/null @@ -1,461 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DeviceImportance; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligence; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** IoTDevice entity property bag. */ -@Fluent -public final class IoTDeviceEntityProperties extends EntityCommonProperties { - /* - * The ID of the IoT Device in the IoT Hub - */ - @JsonProperty(value = "deviceId", access = JsonProperty.Access.WRITE_ONLY) - private String deviceId; - - /* - * The friendly name of the device - */ - @JsonProperty(value = "deviceName", access = JsonProperty.Access.WRITE_ONLY) - private String deviceName; - - /* - * The source of the device - */ - @JsonProperty(value = "source", access = JsonProperty.Access.WRITE_ONLY) - private String source; - - /* - * The ID of the security agent running on the device - */ - @JsonProperty(value = "iotSecurityAgentId", access = JsonProperty.Access.WRITE_ONLY) - private UUID iotSecurityAgentId; - - /* - * The type of the device - */ - @JsonProperty(value = "deviceType", access = JsonProperty.Access.WRITE_ONLY) - private String deviceType; - - /* - * The vendor of the device - */ - @JsonProperty(value = "vendor", access = JsonProperty.Access.WRITE_ONLY) - private String vendor; - - /* - * The ID of the edge device - */ - @JsonProperty(value = "edgeId", access = JsonProperty.Access.WRITE_ONLY) - private String edgeId; - - /* - * The MAC address of the device - */ - @JsonProperty(value = "macAddress", access = JsonProperty.Access.WRITE_ONLY) - private String macAddress; - - /* - * The model of the device - */ - @JsonProperty(value = "model", access = JsonProperty.Access.WRITE_ONLY) - private String model; - - /* - * The serial number of the device - */ - @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String serialNumber; - - /* - * The firmware version of the device - */ - @JsonProperty(value = "firmwareVersion", access = JsonProperty.Access.WRITE_ONLY) - private String firmwareVersion; - - /* - * The operating system of the device - */ - @JsonProperty(value = "operatingSystem", access = JsonProperty.Access.WRITE_ONLY) - private String operatingSystem; - - /* - * The AzureResource entity id of the IoT Hub - */ - @JsonProperty(value = "iotHubEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String iotHubEntityId; - - /* - * The Host entity id of this device - */ - @JsonProperty(value = "hostEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String hostEntityId; - - /* - * The IP entity if of this device - */ - @JsonProperty(value = "ipAddressEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String ipAddressEntityId; - - /* - * A list of TI contexts attached to the IoTDevice entity. - */ - @JsonProperty(value = "threatIntelligence", access = JsonProperty.Access.WRITE_ONLY) - private List threatIntelligence; - - /* - * A list of protocols of the IoTDevice entity. - */ - @JsonProperty(value = "protocols", access = JsonProperty.Access.WRITE_ONLY) - private List protocols; - - /* - * A list of owners of the IoTDevice entity. - */ - @JsonProperty(value = "owners", access = JsonProperty.Access.WRITE_ONLY) - private List owners; - - /* - * A list of Nic entity ids of the IoTDevice entity. - */ - @JsonProperty(value = "nicEntityIds", access = JsonProperty.Access.WRITE_ONLY) - private List nicEntityIds; - - /* - * The site of the device - */ - @JsonProperty(value = "site", access = JsonProperty.Access.WRITE_ONLY) - private String site; - - /* - * The zone location of the device within a site - */ - @JsonProperty(value = "zone", access = JsonProperty.Access.WRITE_ONLY) - private String zone; - - /* - * The sensor the device is monitored by - */ - @JsonProperty(value = "sensor", access = JsonProperty.Access.WRITE_ONLY) - private String sensor; - - /* - * The subType of the device ('PLC', 'HMI', 'EWS', etc.) - */ - @JsonProperty(value = "deviceSubType", access = JsonProperty.Access.WRITE_ONLY) - private String deviceSubType; - - /* - * Device importance, determines if the device classified as 'crown jewel' - */ - @JsonProperty(value = "importance") - private DeviceImportance importance; - - /* - * The Purdue Layer of the device - */ - @JsonProperty(value = "purdueLayer", access = JsonProperty.Access.WRITE_ONLY) - private String purdueLayer; - - /* - * Determines whether the device classified as authorized device - */ - @JsonProperty(value = "isAuthorized", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isAuthorized; - - /* - * Determines whether the device classified as programming device - */ - @JsonProperty(value = "isProgramming", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isProgramming; - - /* - * Is the device classified as a scanner device - */ - @JsonProperty(value = "isScanner", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isScanner; - - /** - * Get the deviceId property: The ID of the IoT Device in the IoT Hub. - * - * @return the deviceId value. - */ - public String deviceId() { - return this.deviceId; - } - - /** - * Get the deviceName property: The friendly name of the device. - * - * @return the deviceName value. - */ - public String deviceName() { - return this.deviceName; - } - - /** - * Get the source property: The source of the device. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Get the iotSecurityAgentId property: The ID of the security agent running on the device. - * - * @return the iotSecurityAgentId value. - */ - public UUID iotSecurityAgentId() { - return this.iotSecurityAgentId; - } - - /** - * Get the deviceType property: The type of the device. - * - * @return the deviceType value. - */ - public String deviceType() { - return this.deviceType; - } - - /** - * Get the vendor property: The vendor of the device. - * - * @return the vendor value. - */ - public String vendor() { - return this.vendor; - } - - /** - * Get the edgeId property: The ID of the edge device. - * - * @return the edgeId value. - */ - public String edgeId() { - return this.edgeId; - } - - /** - * Get the macAddress property: The MAC address of the device. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Get the model property: The model of the device. - * - * @return the model value. - */ - public String model() { - return this.model; - } - - /** - * Get the serialNumber property: The serial number of the device. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Get the firmwareVersion property: The firmware version of the device. - * - * @return the firmwareVersion value. - */ - public String firmwareVersion() { - return this.firmwareVersion; - } - - /** - * Get the operatingSystem property: The operating system of the device. - * - * @return the operatingSystem value. - */ - public String operatingSystem() { - return this.operatingSystem; - } - - /** - * Get the iotHubEntityId property: The AzureResource entity id of the IoT Hub. - * - * @return the iotHubEntityId value. - */ - public String iotHubEntityId() { - return this.iotHubEntityId; - } - - /** - * Get the hostEntityId property: The Host entity id of this device. - * - * @return the hostEntityId value. - */ - public String hostEntityId() { - return this.hostEntityId; - } - - /** - * Get the ipAddressEntityId property: The IP entity if of this device. - * - * @return the ipAddressEntityId value. - */ - public String ipAddressEntityId() { - return this.ipAddressEntityId; - } - - /** - * Get the threatIntelligence property: A list of TI contexts attached to the IoTDevice entity. - * - * @return the threatIntelligence value. - */ - public List threatIntelligence() { - return this.threatIntelligence; - } - - /** - * Get the protocols property: A list of protocols of the IoTDevice entity. - * - * @return the protocols value. - */ - public List protocols() { - return this.protocols; - } - - /** - * Get the owners property: A list of owners of the IoTDevice entity. - * - * @return the owners value. - */ - public List owners() { - return this.owners; - } - - /** - * Get the nicEntityIds property: A list of Nic entity ids of the IoTDevice entity. - * - * @return the nicEntityIds value. - */ - public List nicEntityIds() { - return this.nicEntityIds; - } - - /** - * Get the site property: The site of the device. - * - * @return the site value. - */ - public String site() { - return this.site; - } - - /** - * Get the zone property: The zone location of the device within a site. - * - * @return the zone value. - */ - public String zone() { - return this.zone; - } - - /** - * Get the sensor property: The sensor the device is monitored by. - * - * @return the sensor value. - */ - public String sensor() { - return this.sensor; - } - - /** - * Get the deviceSubType property: The subType of the device ('PLC', 'HMI', 'EWS', etc.). - * - * @return the deviceSubType value. - */ - public String deviceSubType() { - return this.deviceSubType; - } - - /** - * Get the importance property: Device importance, determines if the device classified as 'crown jewel'. - * - * @return the importance value. - */ - public DeviceImportance importance() { - return this.importance; - } - - /** - * Set the importance property: Device importance, determines if the device classified as 'crown jewel'. - * - * @param importance the importance value to set. - * @return the IoTDeviceEntityProperties object itself. - */ - public IoTDeviceEntityProperties withImportance(DeviceImportance importance) { - this.importance = importance; - return this; - } - - /** - * Get the purdueLayer property: The Purdue Layer of the device. - * - * @return the purdueLayer value. - */ - public String purdueLayer() { - return this.purdueLayer; - } - - /** - * Get the isAuthorized property: Determines whether the device classified as authorized device. - * - * @return the isAuthorized value. - */ - public Boolean isAuthorized() { - return this.isAuthorized; - } - - /** - * Get the isProgramming property: Determines whether the device classified as programming device. - * - * @return the isProgramming value. - */ - public Boolean isProgramming() { - return this.isProgramming; - } - - /** - * Get the isScanner property: Is the device classified as a scanner device. - * - * @return the isScanner value. - */ - public Boolean isScanner() { - return this.isScanner; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (threatIntelligence() != null) { - threatIntelligence().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java deleted file mode 100644 index fa6b07dd783f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.GeoLocation; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligence; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Ip entity property bag. */ -@Immutable -public final class IpEntityProperties extends EntityCommonProperties { - /* - * The IP address as string, e.g. 127.0.0.1 (either in Ipv4 or Ipv6) - */ - @JsonProperty(value = "address", access = JsonProperty.Access.WRITE_ONLY) - private String address; - - /* - * The geo-location context attached to the ip entity - */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) - private GeoLocation location; - - /* - * A list of TI contexts attached to the ip entity. - */ - @JsonProperty(value = "threatIntelligence", access = JsonProperty.Access.WRITE_ONLY) - private List threatIntelligence; - - /** - * Get the address property: The IP address as string, e.g. 127.0.0.1 (either in Ipv4 or Ipv6). - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Get the location property: The geo-location context attached to the ip entity. - * - * @return the location value. - */ - public GeoLocation location() { - return this.location; - } - - /** - * Get the threatIntelligence property: A list of TI contexts attached to the ip entity. - * - * @return the threatIntelligence value. - */ - public List threatIntelligence() { - return this.threatIntelligence; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (location() != null) { - location().validate(); - } - if (threatIntelligence() != null) { - threatIntelligence().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java deleted file mode 100644 index 423fdf2974b6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java +++ /dev/null @@ -1,176 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** MLBehaviorAnalytics alert rule base property bag. */ -@Fluent -public final class MLBehaviorAnalyticsAlertRuleProperties { - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName", required = true) - private String alertRuleTemplateName; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * Determines whether this alert rule is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The last time that this alert rule has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) - private AlertSeverity severity; - - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) - private List tactics; - - /* - * The techniques of the alert rule - */ - @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) - private List techniques; - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.alertRuleTemplateName; - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the MLBehaviorAnalyticsAlertRuleProperties object itself. - */ - public MLBehaviorAnalyticsAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the MLBehaviorAnalyticsAlertRuleProperties object itself. - */ - public MLBehaviorAnalyticsAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert rule has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (alertRuleTemplateName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alertRuleTemplateName in model" - + " MLBehaviorAnalyticsAlertRuleProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLBehaviorAnalyticsAlertRuleProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java deleted file mode 100644 index c048baca3053..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** MLBehaviorAnalytics alert rule template properties. */ -@Fluent -public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", required = true) - private AlertSeverity severity; - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplateProperties object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withTactics(List tactics) { - super.withTactics(tactics); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withTechniques(List techniques) { - super.withTechniques(techniques); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withStatus(TemplateStatus status) { - super.withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model MLBehaviorAnalyticsAlertRuleTemplateProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLBehaviorAnalyticsAlertRuleTemplateProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java deleted file mode 100644 index 62c3cc3aec6a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java +++ /dev/null @@ -1,250 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Mail cluster entity property bag. */ -@Immutable -public final class MailClusterEntityProperties extends EntityCommonProperties { - /* - * The mail message IDs that are part of the mail cluster - */ - @JsonProperty(value = "networkMessageIds", access = JsonProperty.Access.WRITE_ONLY) - private List networkMessageIds; - - /* - * Count of mail messages by DeliveryStatus string representation - */ - @JsonProperty(value = "countByDeliveryStatus", access = JsonProperty.Access.WRITE_ONLY) - private Object countByDeliveryStatus; - - /* - * Count of mail messages by ThreatType string representation - */ - @JsonProperty(value = "countByThreatType", access = JsonProperty.Access.WRITE_ONLY) - private Object countByThreatType; - - /* - * Count of mail messages by ProtectionStatus string representation - */ - @JsonProperty(value = "countByProtectionStatus", access = JsonProperty.Access.WRITE_ONLY) - private Object countByProtectionStatus; - - /* - * The threats of mail messages that are part of the mail cluster - */ - @JsonProperty(value = "threats", access = JsonProperty.Access.WRITE_ONLY) - private List threats; - - /* - * The query that was used to identify the messages of the mail cluster - */ - @JsonProperty(value = "query", access = JsonProperty.Access.WRITE_ONLY) - private String query; - - /* - * The query time - */ - @JsonProperty(value = "queryTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime queryTime; - - /* - * The number of mail messages that are part of the mail cluster - */ - @JsonProperty(value = "mailCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer mailCount; - - /* - * Is this a volume anomaly mail cluster - */ - @JsonProperty(value = "isVolumeAnomaly", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isVolumeAnomaly; - - /* - * The source of the mail cluster (default is 'O365 ATP') - */ - @JsonProperty(value = "source", access = JsonProperty.Access.WRITE_ONLY) - private String source; - - /* - * The id of the cluster source - */ - @JsonProperty(value = "clusterSourceIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String clusterSourceIdentifier; - - /* - * The type of the cluster source - */ - @JsonProperty(value = "clusterSourceType", access = JsonProperty.Access.WRITE_ONLY) - private String clusterSourceType; - - /* - * The cluster query start time - */ - @JsonProperty(value = "clusterQueryStartTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime clusterQueryStartTime; - - /* - * The cluster query end time - */ - @JsonProperty(value = "clusterQueryEndTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime clusterQueryEndTime; - - /* - * The cluster group - */ - @JsonProperty(value = "clusterGroup", access = JsonProperty.Access.WRITE_ONLY) - private String clusterGroup; - - /** - * Get the networkMessageIds property: The mail message IDs that are part of the mail cluster. - * - * @return the networkMessageIds value. - */ - public List networkMessageIds() { - return this.networkMessageIds; - } - - /** - * Get the countByDeliveryStatus property: Count of mail messages by DeliveryStatus string representation. - * - * @return the countByDeliveryStatus value. - */ - public Object countByDeliveryStatus() { - return this.countByDeliveryStatus; - } - - /** - * Get the countByThreatType property: Count of mail messages by ThreatType string representation. - * - * @return the countByThreatType value. - */ - public Object countByThreatType() { - return this.countByThreatType; - } - - /** - * Get the countByProtectionStatus property: Count of mail messages by ProtectionStatus string representation. - * - * @return the countByProtectionStatus value. - */ - public Object countByProtectionStatus() { - return this.countByProtectionStatus; - } - - /** - * Get the threats property: The threats of mail messages that are part of the mail cluster. - * - * @return the threats value. - */ - public List threats() { - return this.threats; - } - - /** - * Get the query property: The query that was used to identify the messages of the mail cluster. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Get the queryTime property: The query time. - * - * @return the queryTime value. - */ - public OffsetDateTime queryTime() { - return this.queryTime; - } - - /** - * Get the mailCount property: The number of mail messages that are part of the mail cluster. - * - * @return the mailCount value. - */ - public Integer mailCount() { - return this.mailCount; - } - - /** - * Get the isVolumeAnomaly property: Is this a volume anomaly mail cluster. - * - * @return the isVolumeAnomaly value. - */ - public Boolean isVolumeAnomaly() { - return this.isVolumeAnomaly; - } - - /** - * Get the source property: The source of the mail cluster (default is 'O365 ATP'). - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Get the clusterSourceIdentifier property: The id of the cluster source. - * - * @return the clusterSourceIdentifier value. - */ - public String clusterSourceIdentifier() { - return this.clusterSourceIdentifier; - } - - /** - * Get the clusterSourceType property: The type of the cluster source. - * - * @return the clusterSourceType value. - */ - public String clusterSourceType() { - return this.clusterSourceType; - } - - /** - * Get the clusterQueryStartTime property: The cluster query start time. - * - * @return the clusterQueryStartTime value. - */ - public OffsetDateTime clusterQueryStartTime() { - return this.clusterQueryStartTime; - } - - /** - * Get the clusterQueryEndTime property: The cluster query end time. - * - * @return the clusterQueryEndTime value. - */ - public OffsetDateTime clusterQueryEndTime() { - return this.clusterQueryEndTime; - } - - /** - * Get the clusterGroup property: The cluster group. - * - * @return the clusterGroup value. - */ - public String clusterGroup() { - return this.clusterGroup; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java deleted file mode 100644 index e2d92d2606a6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java +++ /dev/null @@ -1,494 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AntispamMailDirection; -import com.azure.resourcemanager.securityinsights.models.DeliveryAction; -import com.azure.resourcemanager.securityinsights.models.DeliveryLocation; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.UUID; - -/** Mail message entity property bag. */ -@Fluent -public final class MailMessageEntityProperties extends EntityCommonProperties { - /* - * The File entity ids of this mail message's attachments - */ - @JsonProperty(value = "fileEntityIds", access = JsonProperty.Access.WRITE_ONLY) - private List fileEntityIds; - - /* - * The recipient of this mail message. Note that in case of multiple recipients the mail message is forked and each - * copy has one recipient - */ - @JsonProperty(value = "recipient", access = JsonProperty.Access.WRITE_ONLY) - private String recipient; - - /* - * The Urls contained in this mail message - */ - @JsonProperty(value = "urls", access = JsonProperty.Access.WRITE_ONLY) - private List urls; - - /* - * The threats of this mail message - */ - @JsonProperty(value = "threats", access = JsonProperty.Access.WRITE_ONLY) - private List threats; - - /* - * The p1 sender's email address - */ - @JsonProperty(value = "p1Sender", access = JsonProperty.Access.WRITE_ONLY) - private String p1Sender; - - /* - * The p1 sender's display name - */ - @JsonProperty(value = "p1SenderDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String p1SenderDisplayName; - - /* - * The p1 sender's domain - */ - @JsonProperty(value = "p1SenderDomain", access = JsonProperty.Access.WRITE_ONLY) - private String p1SenderDomain; - - /* - * The sender's IP address - */ - @JsonProperty(value = "senderIP", access = JsonProperty.Access.WRITE_ONLY) - private String senderIp; - - /* - * The p2 sender's email address - */ - @JsonProperty(value = "p2Sender", access = JsonProperty.Access.WRITE_ONLY) - private String p2Sender; - - /* - * The p2 sender's display name - */ - @JsonProperty(value = "p2SenderDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String p2SenderDisplayName; - - /* - * The p2 sender's domain - */ - @JsonProperty(value = "p2SenderDomain", access = JsonProperty.Access.WRITE_ONLY) - private String p2SenderDomain; - - /* - * The receive date of this message - */ - @JsonProperty(value = "receiveDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime receiveDate; - - /* - * The network message id of this mail message - */ - @JsonProperty(value = "networkMessageId", access = JsonProperty.Access.WRITE_ONLY) - private UUID networkMessageId; - - /* - * The internet message id of this mail message - */ - @JsonProperty(value = "internetMessageId", access = JsonProperty.Access.WRITE_ONLY) - private String internetMessageId; - - /* - * The subject of this mail message - */ - @JsonProperty(value = "subject", access = JsonProperty.Access.WRITE_ONLY) - private String subject; - - /* - * The language of this mail message - */ - @JsonProperty(value = "language", access = JsonProperty.Access.WRITE_ONLY) - private String language; - - /* - * The threat detection methods - */ - @JsonProperty(value = "threatDetectionMethods", access = JsonProperty.Access.WRITE_ONLY) - private List threatDetectionMethods; - - /* - * The bodyFingerprintBin1 - */ - @JsonProperty(value = "bodyFingerprintBin1") - private Integer bodyFingerprintBin1; - - /* - * The bodyFingerprintBin2 - */ - @JsonProperty(value = "bodyFingerprintBin2") - private Integer bodyFingerprintBin2; - - /* - * The bodyFingerprintBin3 - */ - @JsonProperty(value = "bodyFingerprintBin3") - private Integer bodyFingerprintBin3; - - /* - * The bodyFingerprintBin4 - */ - @JsonProperty(value = "bodyFingerprintBin4") - private Integer bodyFingerprintBin4; - - /* - * The bodyFingerprintBin5 - */ - @JsonProperty(value = "bodyFingerprintBin5") - private Integer bodyFingerprintBin5; - - /* - * The directionality of this mail message - */ - @JsonProperty(value = "antispamDirection") - private AntispamMailDirection antispamDirection; - - /* - * The delivery action of this mail message like Delivered, Blocked, Replaced etc - */ - @JsonProperty(value = "deliveryAction") - private DeliveryAction deliveryAction; - - /* - * The delivery location of this mail message like Inbox, JunkFolder etc - */ - @JsonProperty(value = "deliveryLocation") - private DeliveryLocation deliveryLocation; - - /** - * Get the fileEntityIds property: The File entity ids of this mail message's attachments. - * - * @return the fileEntityIds value. - */ - public List fileEntityIds() { - return this.fileEntityIds; - } - - /** - * Get the recipient property: The recipient of this mail message. Note that in case of multiple recipients the mail - * message is forked and each copy has one recipient. - * - * @return the recipient value. - */ - public String recipient() { - return this.recipient; - } - - /** - * Get the urls property: The Urls contained in this mail message. - * - * @return the urls value. - */ - public List urls() { - return this.urls; - } - - /** - * Get the threats property: The threats of this mail message. - * - * @return the threats value. - */ - public List threats() { - return this.threats; - } - - /** - * Get the p1Sender property: The p1 sender's email address. - * - * @return the p1Sender value. - */ - public String p1Sender() { - return this.p1Sender; - } - - /** - * Get the p1SenderDisplayName property: The p1 sender's display name. - * - * @return the p1SenderDisplayName value. - */ - public String p1SenderDisplayName() { - return this.p1SenderDisplayName; - } - - /** - * Get the p1SenderDomain property: The p1 sender's domain. - * - * @return the p1SenderDomain value. - */ - public String p1SenderDomain() { - return this.p1SenderDomain; - } - - /** - * Get the senderIp property: The sender's IP address. - * - * @return the senderIp value. - */ - public String senderIp() { - return this.senderIp; - } - - /** - * Get the p2Sender property: The p2 sender's email address. - * - * @return the p2Sender value. - */ - public String p2Sender() { - return this.p2Sender; - } - - /** - * Get the p2SenderDisplayName property: The p2 sender's display name. - * - * @return the p2SenderDisplayName value. - */ - public String p2SenderDisplayName() { - return this.p2SenderDisplayName; - } - - /** - * Get the p2SenderDomain property: The p2 sender's domain. - * - * @return the p2SenderDomain value. - */ - public String p2SenderDomain() { - return this.p2SenderDomain; - } - - /** - * Get the receiveDate property: The receive date of this message. - * - * @return the receiveDate value. - */ - public OffsetDateTime receiveDate() { - return this.receiveDate; - } - - /** - * Get the networkMessageId property: The network message id of this mail message. - * - * @return the networkMessageId value. - */ - public UUID networkMessageId() { - return this.networkMessageId; - } - - /** - * Get the internetMessageId property: The internet message id of this mail message. - * - * @return the internetMessageId value. - */ - public String internetMessageId() { - return this.internetMessageId; - } - - /** - * Get the subject property: The subject of this mail message. - * - * @return the subject value. - */ - public String subject() { - return this.subject; - } - - /** - * Get the language property: The language of this mail message. - * - * @return the language value. - */ - public String language() { - return this.language; - } - - /** - * Get the threatDetectionMethods property: The threat detection methods. - * - * @return the threatDetectionMethods value. - */ - public List threatDetectionMethods() { - return this.threatDetectionMethods; - } - - /** - * Get the bodyFingerprintBin1 property: The bodyFingerprintBin1. - * - * @return the bodyFingerprintBin1 value. - */ - public Integer bodyFingerprintBin1() { - return this.bodyFingerprintBin1; - } - - /** - * Set the bodyFingerprintBin1 property: The bodyFingerprintBin1. - * - * @param bodyFingerprintBin1 the bodyFingerprintBin1 value to set. - * @return the MailMessageEntityProperties object itself. - */ - public MailMessageEntityProperties withBodyFingerprintBin1(Integer bodyFingerprintBin1) { - this.bodyFingerprintBin1 = bodyFingerprintBin1; - return this; - } - - /** - * Get the bodyFingerprintBin2 property: The bodyFingerprintBin2. - * - * @return the bodyFingerprintBin2 value. - */ - public Integer bodyFingerprintBin2() { - return this.bodyFingerprintBin2; - } - - /** - * Set the bodyFingerprintBin2 property: The bodyFingerprintBin2. - * - * @param bodyFingerprintBin2 the bodyFingerprintBin2 value to set. - * @return the MailMessageEntityProperties object itself. - */ - public MailMessageEntityProperties withBodyFingerprintBin2(Integer bodyFingerprintBin2) { - this.bodyFingerprintBin2 = bodyFingerprintBin2; - return this; - } - - /** - * Get the bodyFingerprintBin3 property: The bodyFingerprintBin3. - * - * @return the bodyFingerprintBin3 value. - */ - public Integer bodyFingerprintBin3() { - return this.bodyFingerprintBin3; - } - - /** - * Set the bodyFingerprintBin3 property: The bodyFingerprintBin3. - * - * @param bodyFingerprintBin3 the bodyFingerprintBin3 value to set. - * @return the MailMessageEntityProperties object itself. - */ - public MailMessageEntityProperties withBodyFingerprintBin3(Integer bodyFingerprintBin3) { - this.bodyFingerprintBin3 = bodyFingerprintBin3; - return this; - } - - /** - * Get the bodyFingerprintBin4 property: The bodyFingerprintBin4. - * - * @return the bodyFingerprintBin4 value. - */ - public Integer bodyFingerprintBin4() { - return this.bodyFingerprintBin4; - } - - /** - * Set the bodyFingerprintBin4 property: The bodyFingerprintBin4. - * - * @param bodyFingerprintBin4 the bodyFingerprintBin4 value to set. - * @return the MailMessageEntityProperties object itself. - */ - public MailMessageEntityProperties withBodyFingerprintBin4(Integer bodyFingerprintBin4) { - this.bodyFingerprintBin4 = bodyFingerprintBin4; - return this; - } - - /** - * Get the bodyFingerprintBin5 property: The bodyFingerprintBin5. - * - * @return the bodyFingerprintBin5 value. - */ - public Integer bodyFingerprintBin5() { - return this.bodyFingerprintBin5; - } - - /** - * Set the bodyFingerprintBin5 property: The bodyFingerprintBin5. - * - * @param bodyFingerprintBin5 the bodyFingerprintBin5 value to set. - * @return the MailMessageEntityProperties object itself. - */ - public MailMessageEntityProperties withBodyFingerprintBin5(Integer bodyFingerprintBin5) { - this.bodyFingerprintBin5 = bodyFingerprintBin5; - return this; - } - - /** - * Get the antispamDirection property: The directionality of this mail message. - * - * @return the antispamDirection value. - */ - public AntispamMailDirection antispamDirection() { - return this.antispamDirection; - } - - /** - * Set the antispamDirection property: The directionality of this mail message. - * - * @param antispamDirection the antispamDirection value to set. - * @return the MailMessageEntityProperties object itself. - */ - public MailMessageEntityProperties withAntispamDirection(AntispamMailDirection antispamDirection) { - this.antispamDirection = antispamDirection; - return this; - } - - /** - * Get the deliveryAction property: The delivery action of this mail message like Delivered, Blocked, Replaced etc. - * - * @return the deliveryAction value. - */ - public DeliveryAction deliveryAction() { - return this.deliveryAction; - } - - /** - * Set the deliveryAction property: The delivery action of this mail message like Delivered, Blocked, Replaced etc. - * - * @param deliveryAction the deliveryAction value to set. - * @return the MailMessageEntityProperties object itself. - */ - public MailMessageEntityProperties withDeliveryAction(DeliveryAction deliveryAction) { - this.deliveryAction = deliveryAction; - return this; - } - - /** - * Get the deliveryLocation property: The delivery location of this mail message like Inbox, JunkFolder etc. - * - * @return the deliveryLocation value. - */ - public DeliveryLocation deliveryLocation() { - return this.deliveryLocation; - } - - /** - * Set the deliveryLocation property: The delivery location of this mail message like Inbox, JunkFolder etc. - * - * @param deliveryLocation the deliveryLocation value to set. - * @return the MailMessageEntityProperties object itself. - */ - public MailMessageEntityProperties withDeliveryLocation(DeliveryLocation deliveryLocation) { - this.deliveryLocation = deliveryLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java deleted file mode 100644 index c0ec6c6fdaee..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** Mailbox entity property bag. */ -@Immutable -public final class MailboxEntityProperties extends EntityCommonProperties { - /* - * The mailbox's primary address - */ - @JsonProperty(value = "mailboxPrimaryAddress", access = JsonProperty.Access.WRITE_ONLY) - private String mailboxPrimaryAddress; - - /* - * The mailbox's display name - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * The mailbox's UPN - */ - @JsonProperty(value = "upn", access = JsonProperty.Access.WRITE_ONLY) - private String upn; - - /* - * The AzureAD identifier of mailbox. Similar to AadUserId in account entity but this property is specific to - * mailbox object on office side - */ - @JsonProperty(value = "externalDirectoryObjectId", access = JsonProperty.Access.WRITE_ONLY) - private UUID externalDirectoryObjectId; - - /** - * Get the mailboxPrimaryAddress property: The mailbox's primary address. - * - * @return the mailboxPrimaryAddress value. - */ - public String mailboxPrimaryAddress() { - return this.mailboxPrimaryAddress; - } - - /** - * Get the displayName property: The mailbox's display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the upn property: The mailbox's UPN. - * - * @return the upn value. - */ - public String upn() { - return this.upn; - } - - /** - * Get the externalDirectoryObjectId property: The AzureAD identifier of mailbox. Similar to AadUserId in account - * entity but this property is specific to mailbox object on office side. - * - * @return the externalDirectoryObjectId value. - */ - public UUID externalDirectoryObjectId() { - return this.externalDirectoryObjectId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java deleted file mode 100644 index ded00f33417f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java +++ /dev/null @@ -1,84 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Malware entity property bag. */ -@Immutable -public final class MalwareEntityProperties extends EntityCommonProperties { - /* - * The malware category by the vendor, e.g. Trojan - */ - @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) - private String category; - - /* - * List of linked file entity identifiers on which the malware was found - */ - @JsonProperty(value = "fileEntityIds", access = JsonProperty.Access.WRITE_ONLY) - private List fileEntityIds; - - /* - * The malware name by the vendor, e.g. Win32/Toga!rfn - */ - @JsonProperty(value = "malwareName", access = JsonProperty.Access.WRITE_ONLY) - private String malwareName; - - /* - * List of linked process entity identifiers on which the malware was found. - */ - @JsonProperty(value = "processEntityIds", access = JsonProperty.Access.WRITE_ONLY) - private List processEntityIds; - - /** - * Get the category property: The malware category by the vendor, e.g. Trojan. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Get the fileEntityIds property: List of linked file entity identifiers on which the malware was found. - * - * @return the fileEntityIds value. - */ - public List fileEntityIds() { - return this.fileEntityIds; - } - - /** - * Get the malwareName property: The malware name by the vendor, e.g. Win32/Toga!rfn. - * - * @return the malwareName value. - */ - public String malwareName() { - return this.malwareName; - } - - /** - * Get the processEntityIds property: List of linked process entity identifiers on which the malware was found. - * - * @return the processEntityIds value. - */ - public List processEntityIds() { - return this.processEntityIds; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java deleted file mode 100644 index 529764ae709a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** MCAS (Microsoft Cloud App Security) requirements check properties. */ -@Fluent -public final class McasCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public McasCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java deleted file mode 100644 index 38068dd10782..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.McasDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** MCAS (Microsoft Cloud App Security) data connector properties. */ -@Fluent -public final class McasDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private McasDataConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public McasDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the McasDataConnectorProperties object itself. - */ - public McasDataConnectorProperties withDataTypes(McasDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public McasDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model McasDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(McasDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java deleted file mode 100644 index 789441efbf97..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. */ -@Fluent -public final class MdatpCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public MdatpCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java deleted file mode 100644 index a1466e451fb0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** MDATP (Microsoft Defender Advanced Threat Protection) data connector properties. */ -@Fluent -public final class MdatpDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes") - private AlertsDataTypeOfDataConnector dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the MdatpDataConnectorProperties object itself. - */ - public MdatpDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public MdatpDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() != null) { - dataTypes().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java deleted file mode 100644 index 25c3b5166242..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java +++ /dev/null @@ -1,513 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.LocalDate; -import java.util.List; - -/** Metadata resource definition. */ -@Fluent -public final class MetadataModelInner extends ResourceWithEtag { - /* - * Metadata properties - */ - @JsonProperty(value = "properties") - private MetadataProperties innerProperties; - - /** - * Get the innerProperties property: Metadata properties. - * - * @return the innerProperties value. - */ - private MetadataProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MetadataModelInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @return the contentId value. - */ - public String contentId() { - return this.innerProperties() == null ? null : this.innerProperties().contentId(); - } - - /** - * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @param contentId the contentId value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withContentId(String contentId) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withContentId(contentId); - return this; - } - - /** - * Get the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - public String parentId() { - return this.innerProperties() == null ? null : this.innerProperties().parentId(); - } - - /** - * Set the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @param parentId the parentId value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withParentId(String parentId) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withParentId(parentId); - return this; - } - - /** - * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @param version the version value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - public Kind kind() { - return this.innerProperties() == null ? null : this.innerProperties().kind(); - } - - /** - * Set the kind property: The kind of content the metadata is for. - * - * @param kind the kind value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withKind(Kind kind) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withKind(kind); - return this; - } - - /** - * Get the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - public MetadataSource source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: Source of the content. This is where/how it was created. - * - * @param source the source value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withSource(MetadataSource source) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the author property: The creator of the content item. - * - * @return the author value. - */ - public MetadataAuthor author() { - return this.innerProperties() == null ? null : this.innerProperties().author(); - } - - /** - * Set the author property: The creator of the content item. - * - * @param author the author value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withAuthor(MetadataAuthor author) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withAuthor(author); - return this; - } - - /** - * Get the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - public MetadataSupport support() { - return this.innerProperties() == null ? null : this.innerProperties().support(); - } - - /** - * Set the support property: Support information for the metadata - type, name, contact information. - * - * @param support the support value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withSupport(MetadataSupport support) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withSupport(support); - return this; - } - - /** - * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - public MetadataDependencies dependencies() { - return this.innerProperties() == null ? null : this.innerProperties().dependencies(); - } - - /** - * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @param dependencies the dependencies value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withDependencies(MetadataDependencies dependencies) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withDependencies(dependencies); - return this; - } - - /** - * Get the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - public MetadataCategories categories() { - return this.innerProperties() == null ? null : this.innerProperties().categories(); - } - - /** - * Set the categories property: Categories for the solution content item. - * - * @param categories the categories value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withCategories(MetadataCategories categories) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withCategories(categories); - return this; - } - - /** - * Get the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - public List providers() { - return this.innerProperties() == null ? null : this.innerProperties().providers(); - } - - /** - * Set the providers property: Providers for the solution content item. - * - * @param providers the providers value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withProviders(List providers) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withProviders(providers); - return this; - } - - /** - * Get the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - public LocalDate firstPublishDate() { - return this.innerProperties() == null ? null : this.innerProperties().firstPublishDate(); - } - - /** - * Set the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate the firstPublishDate value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withFirstPublishDate(LocalDate firstPublishDate) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withFirstPublishDate(firstPublishDate); - return this; - } - - /** - * Get the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - public LocalDate lastPublishDate() { - return this.innerProperties() == null ? null : this.innerProperties().lastPublishDate(); - } - - /** - * Set the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate the lastPublishDate value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withLastPublishDate(LocalDate lastPublishDate) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withLastPublishDate(lastPublishDate); - return this; - } - - /** - * Get the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - public String customVersion() { - return this.innerProperties() == null ? null : this.innerProperties().customVersion(); - } - - /** - * Set the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion the customVersion value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withCustomVersion(String customVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withCustomVersion(customVersion); - return this; - } - - /** - * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @return the contentSchemaVersion value. - */ - public String contentSchemaVersion() { - return this.innerProperties() == null ? null : this.innerProperties().contentSchemaVersion(); - } - - /** - * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @param contentSchemaVersion the contentSchemaVersion value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withContentSchemaVersion(String contentSchemaVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withContentSchemaVersion(contentSchemaVersion); - return this; - } - - /** - * Get the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @return the icon value. - */ - public String icon() { - return this.innerProperties() == null ? null : this.innerProperties().icon(); - } - - /** - * Set the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @param icon the icon value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withIcon(String icon) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withIcon(icon); - return this; - } - - /** - * Get the threatAnalysisTactics property: the tactics the resource covers. - * - * @return the threatAnalysisTactics value. - */ - public List threatAnalysisTactics() { - return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTactics(); - } - - /** - * Set the threatAnalysisTactics property: the tactics the resource covers. - * - * @param threatAnalysisTactics the threatAnalysisTactics value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withThreatAnalysisTactics(List threatAnalysisTactics) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withThreatAnalysisTactics(threatAnalysisTactics); - return this; - } - - /** - * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @return the threatAnalysisTechniques value. - */ - public List threatAnalysisTechniques() { - return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTechniques(); - } - - /** - * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withThreatAnalysisTechniques(List threatAnalysisTechniques) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withThreatAnalysisTechniques(threatAnalysisTechniques); - return this; - } - - /** - * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @return the previewImages value. - */ - public List previewImages() { - return this.innerProperties() == null ? null : this.innerProperties().previewImages(); - } - - /** - * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @param previewImages the previewImages value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withPreviewImages(List previewImages) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withPreviewImages(previewImages); - return this; - } - - /** - * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @return the previewImagesDark value. - */ - public List previewImagesDark() { - return this.innerProperties() == null ? null : this.innerProperties().previewImagesDark(); - } - - /** - * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @param previewImagesDark the previewImagesDark value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withPreviewImagesDark(List previewImagesDark) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withPreviewImagesDark(previewImagesDark); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java deleted file mode 100644 index 3fed7e25da81..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java +++ /dev/null @@ -1,575 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.LocalDate; -import java.util.List; - -/** Metadata property bag. */ -@Fluent -public final class MetadataProperties { - /* - * Static ID for the content. Used to identify dependencies and content from solutions or community. - * Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name - */ - @JsonProperty(value = "contentId") - private String contentId; - - /* - * Full parent resource ID of the content item the metadata is for. This is the full resource ID including the - * scope (subscription and resource group) - */ - @JsonProperty(value = "parentId", required = true) - private String parentId; - - /* - * Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM - * template best practices. Can also be any string, but then we cannot guarantee any version checks - */ - @JsonProperty(value = "version") - private String version; - - /* - * The kind of content the metadata is for. - */ - @JsonProperty(value = "kind", required = true) - private Kind kind; - - /* - * Source of the content. This is where/how it was created. - */ - @JsonProperty(value = "source") - private MetadataSource source; - - /* - * The creator of the content item. - */ - @JsonProperty(value = "author") - private MetadataAuthor author; - - /* - * Support information for the metadata - type, name, contact information - */ - @JsonProperty(value = "support") - private MetadataSupport support; - - /* - * Dependencies for the content item, what other content items it requires to work. Can describe more complex - * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or - * operator/criteria for complex formats. - */ - @JsonProperty(value = "dependencies") - private MetadataDependencies dependencies; - - /* - * Categories for the solution content item - */ - @JsonProperty(value = "categories") - private MetadataCategories categories; - - /* - * Providers for the solution content item - */ - @JsonProperty(value = "providers") - private List providers; - - /* - * first publish date solution content item - */ - @JsonProperty(value = "firstPublishDate") - private LocalDate firstPublishDate; - - /* - * last publish date for the solution content item - */ - @JsonProperty(value = "lastPublishDate") - private LocalDate lastPublishDate; - - /* - * The custom version of the content. A optional free text - */ - @JsonProperty(value = "customVersion") - private String customVersion; - - /* - * Schema version of the content. Can be used to distinguish between different flow based on the schema version - */ - @JsonProperty(value = "contentSchemaVersion") - private String contentSchemaVersion; - - /* - * the icon identifier. this id can later be fetched from the solution template - */ - @JsonProperty(value = "icon") - private String icon; - - /* - * the tactics the resource covers - */ - @JsonProperty(value = "threatAnalysisTactics") - private List threatAnalysisTactics; - - /* - * the techniques the resource covers, these have to be aligned with the tactics being used - */ - @JsonProperty(value = "threatAnalysisTechniques") - private List threatAnalysisTechniques; - - /* - * preview image file names. These will be taken from the solution artifacts - */ - @JsonProperty(value = "previewImages") - private List previewImages; - - /* - * preview image file names. These will be taken from the solution artifacts. used for dark theme support - */ - @JsonProperty(value = "previewImagesDark") - private List previewImagesDark; - - /** - * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @return the contentId value. - */ - public String contentId() { - return this.contentId; - } - - /** - * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @param contentId the contentId value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withContentId(String contentId) { - this.contentId = contentId; - return this; - } - - /** - * Get the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - public String parentId() { - return this.parentId; - } - - /** - * Set the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @param parentId the parentId value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withParentId(String parentId) { - this.parentId = parentId; - return this; - } - - /** - * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @param version the version value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of content the metadata is for. - * - * @param kind the kind value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - public MetadataSource source() { - return this.source; - } - - /** - * Set the source property: Source of the content. This is where/how it was created. - * - * @param source the source value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withSource(MetadataSource source) { - this.source = source; - return this; - } - - /** - * Get the author property: The creator of the content item. - * - * @return the author value. - */ - public MetadataAuthor author() { - return this.author; - } - - /** - * Set the author property: The creator of the content item. - * - * @param author the author value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withAuthor(MetadataAuthor author) { - this.author = author; - return this; - } - - /** - * Get the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - public MetadataSupport support() { - return this.support; - } - - /** - * Set the support property: Support information for the metadata - type, name, contact information. - * - * @param support the support value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withSupport(MetadataSupport support) { - this.support = support; - return this; - } - - /** - * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - public MetadataDependencies dependencies() { - return this.dependencies; - } - - /** - * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @param dependencies the dependencies value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withDependencies(MetadataDependencies dependencies) { - this.dependencies = dependencies; - return this; - } - - /** - * Get the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - public MetadataCategories categories() { - return this.categories; - } - - /** - * Set the categories property: Categories for the solution content item. - * - * @param categories the categories value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withCategories(MetadataCategories categories) { - this.categories = categories; - return this; - } - - /** - * Get the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - public List providers() { - return this.providers; - } - - /** - * Set the providers property: Providers for the solution content item. - * - * @param providers the providers value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withProviders(List providers) { - this.providers = providers; - return this; - } - - /** - * Get the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - public LocalDate firstPublishDate() { - return this.firstPublishDate; - } - - /** - * Set the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate the firstPublishDate value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withFirstPublishDate(LocalDate firstPublishDate) { - this.firstPublishDate = firstPublishDate; - return this; - } - - /** - * Get the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - public LocalDate lastPublishDate() { - return this.lastPublishDate; - } - - /** - * Set the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate the lastPublishDate value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withLastPublishDate(LocalDate lastPublishDate) { - this.lastPublishDate = lastPublishDate; - return this; - } - - /** - * Get the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - public String customVersion() { - return this.customVersion; - } - - /** - * Set the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion the customVersion value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withCustomVersion(String customVersion) { - this.customVersion = customVersion; - return this; - } - - /** - * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @return the contentSchemaVersion value. - */ - public String contentSchemaVersion() { - return this.contentSchemaVersion; - } - - /** - * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @param contentSchemaVersion the contentSchemaVersion value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withContentSchemaVersion(String contentSchemaVersion) { - this.contentSchemaVersion = contentSchemaVersion; - return this; - } - - /** - * Get the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @return the icon value. - */ - public String icon() { - return this.icon; - } - - /** - * Set the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @param icon the icon value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withIcon(String icon) { - this.icon = icon; - return this; - } - - /** - * Get the threatAnalysisTactics property: the tactics the resource covers. - * - * @return the threatAnalysisTactics value. - */ - public List threatAnalysisTactics() { - return this.threatAnalysisTactics; - } - - /** - * Set the threatAnalysisTactics property: the tactics the resource covers. - * - * @param threatAnalysisTactics the threatAnalysisTactics value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withThreatAnalysisTactics(List threatAnalysisTactics) { - this.threatAnalysisTactics = threatAnalysisTactics; - return this; - } - - /** - * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @return the threatAnalysisTechniques value. - */ - public List threatAnalysisTechniques() { - return this.threatAnalysisTechniques; - } - - /** - * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withThreatAnalysisTechniques(List threatAnalysisTechniques) { - this.threatAnalysisTechniques = threatAnalysisTechniques; - return this; - } - - /** - * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @return the previewImages value. - */ - public List previewImages() { - return this.previewImages; - } - - /** - * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @param previewImages the previewImages value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withPreviewImages(List previewImages) { - this.previewImages = previewImages; - return this; - } - - /** - * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @return the previewImagesDark value. - */ - public List previewImagesDark() { - return this.previewImagesDark; - } - - /** - * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @param previewImagesDark the previewImagesDark value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withPreviewImagesDark(List previewImagesDark) { - this.previewImagesDark = previewImagesDark; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parentId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property parentId in model MetadataProperties")); - } - if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model MetadataProperties")); - } - if (source() != null) { - source().validate(); - } - if (author() != null) { - author().validate(); - } - if (support() != null) { - support().validate(); - } - if (dependencies() != null) { - dependencies().validate(); - } - if (categories() != null) { - categories().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MetadataProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java deleted file mode 100644 index 470f6f2cb684..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java +++ /dev/null @@ -1,562 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.LocalDate; -import java.util.List; - -/** Metadata property bag for patch requests. This is the same as the MetadataProperties, but with nothing required. */ -@Fluent -public final class MetadataPropertiesPatch { - /* - * Static ID for the content. Used to identify dependencies and content from solutions or community. - * Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name - */ - @JsonProperty(value = "contentId") - private String contentId; - - /* - * Full parent resource ID of the content item the metadata is for. This is the full resource ID including the - * scope (subscription and resource group) - */ - @JsonProperty(value = "parentId") - private String parentId; - - /* - * Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM - * template best practices. Can also be any string, but then we cannot guarantee any version checks - */ - @JsonProperty(value = "version") - private String version; - - /* - * The kind of content the metadata is for. - */ - @JsonProperty(value = "kind") - private Kind kind; - - /* - * Source of the content. This is where/how it was created. - */ - @JsonProperty(value = "source") - private MetadataSource source; - - /* - * The creator of the content item. - */ - @JsonProperty(value = "author") - private MetadataAuthor author; - - /* - * Support information for the metadata - type, name, contact information - */ - @JsonProperty(value = "support") - private MetadataSupport support; - - /* - * Dependencies for the content item, what other content items it requires to work. Can describe more complex - * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or - * operator/criteria for complex formats. - */ - @JsonProperty(value = "dependencies") - private MetadataDependencies dependencies; - - /* - * Categories for the solution content item - */ - @JsonProperty(value = "categories") - private MetadataCategories categories; - - /* - * Providers for the solution content item - */ - @JsonProperty(value = "providers") - private List providers; - - /* - * first publish date solution content item - */ - @JsonProperty(value = "firstPublishDate") - private LocalDate firstPublishDate; - - /* - * last publish date for the solution content item - */ - @JsonProperty(value = "lastPublishDate") - private LocalDate lastPublishDate; - - /* - * The custom version of the content. A optional free text - */ - @JsonProperty(value = "customVersion") - private String customVersion; - - /* - * Schema version of the content. Can be used to distinguish between different flow based on the schema version - */ - @JsonProperty(value = "contentSchemaVersion") - private String contentSchemaVersion; - - /* - * the icon identifier. this id can later be fetched from the solution template - */ - @JsonProperty(value = "icon") - private String icon; - - /* - * the tactics the resource covers - */ - @JsonProperty(value = "threatAnalysisTactics") - private List threatAnalysisTactics; - - /* - * the techniques the resource covers, these have to be aligned with the tactics being used - */ - @JsonProperty(value = "threatAnalysisTechniques") - private List threatAnalysisTechniques; - - /* - * preview image file names. These will be taken from the solution artifacts - */ - @JsonProperty(value = "previewImages") - private List previewImages; - - /* - * preview image file names. These will be taken from the solution artifacts. used for dark theme support - */ - @JsonProperty(value = "previewImagesDark") - private List previewImagesDark; - - /** - * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @return the contentId value. - */ - public String contentId() { - return this.contentId; - } - - /** - * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @param contentId the contentId value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withContentId(String contentId) { - this.contentId = contentId; - return this; - } - - /** - * Get the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - public String parentId() { - return this.parentId; - } - - /** - * Set the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @param parentId the parentId value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withParentId(String parentId) { - this.parentId = parentId; - return this; - } - - /** - * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @param version the version value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of content the metadata is for. - * - * @param kind the kind value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - public MetadataSource source() { - return this.source; - } - - /** - * Set the source property: Source of the content. This is where/how it was created. - * - * @param source the source value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withSource(MetadataSource source) { - this.source = source; - return this; - } - - /** - * Get the author property: The creator of the content item. - * - * @return the author value. - */ - public MetadataAuthor author() { - return this.author; - } - - /** - * Set the author property: The creator of the content item. - * - * @param author the author value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withAuthor(MetadataAuthor author) { - this.author = author; - return this; - } - - /** - * Get the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - public MetadataSupport support() { - return this.support; - } - - /** - * Set the support property: Support information for the metadata - type, name, contact information. - * - * @param support the support value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withSupport(MetadataSupport support) { - this.support = support; - return this; - } - - /** - * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - public MetadataDependencies dependencies() { - return this.dependencies; - } - - /** - * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @param dependencies the dependencies value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withDependencies(MetadataDependencies dependencies) { - this.dependencies = dependencies; - return this; - } - - /** - * Get the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - public MetadataCategories categories() { - return this.categories; - } - - /** - * Set the categories property: Categories for the solution content item. - * - * @param categories the categories value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withCategories(MetadataCategories categories) { - this.categories = categories; - return this; - } - - /** - * Get the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - public List providers() { - return this.providers; - } - - /** - * Set the providers property: Providers for the solution content item. - * - * @param providers the providers value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withProviders(List providers) { - this.providers = providers; - return this; - } - - /** - * Get the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - public LocalDate firstPublishDate() { - return this.firstPublishDate; - } - - /** - * Set the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate the firstPublishDate value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withFirstPublishDate(LocalDate firstPublishDate) { - this.firstPublishDate = firstPublishDate; - return this; - } - - /** - * Get the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - public LocalDate lastPublishDate() { - return this.lastPublishDate; - } - - /** - * Set the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate the lastPublishDate value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withLastPublishDate(LocalDate lastPublishDate) { - this.lastPublishDate = lastPublishDate; - return this; - } - - /** - * Get the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - public String customVersion() { - return this.customVersion; - } - - /** - * Set the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion the customVersion value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withCustomVersion(String customVersion) { - this.customVersion = customVersion; - return this; - } - - /** - * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @return the contentSchemaVersion value. - */ - public String contentSchemaVersion() { - return this.contentSchemaVersion; - } - - /** - * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @param contentSchemaVersion the contentSchemaVersion value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withContentSchemaVersion(String contentSchemaVersion) { - this.contentSchemaVersion = contentSchemaVersion; - return this; - } - - /** - * Get the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @return the icon value. - */ - public String icon() { - return this.icon; - } - - /** - * Set the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @param icon the icon value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withIcon(String icon) { - this.icon = icon; - return this; - } - - /** - * Get the threatAnalysisTactics property: the tactics the resource covers. - * - * @return the threatAnalysisTactics value. - */ - public List threatAnalysisTactics() { - return this.threatAnalysisTactics; - } - - /** - * Set the threatAnalysisTactics property: the tactics the resource covers. - * - * @param threatAnalysisTactics the threatAnalysisTactics value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withThreatAnalysisTactics(List threatAnalysisTactics) { - this.threatAnalysisTactics = threatAnalysisTactics; - return this; - } - - /** - * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @return the threatAnalysisTechniques value. - */ - public List threatAnalysisTechniques() { - return this.threatAnalysisTechniques; - } - - /** - * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withThreatAnalysisTechniques(List threatAnalysisTechniques) { - this.threatAnalysisTechniques = threatAnalysisTechniques; - return this; - } - - /** - * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @return the previewImages value. - */ - public List previewImages() { - return this.previewImages; - } - - /** - * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @param previewImages the previewImages value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withPreviewImages(List previewImages) { - this.previewImages = previewImages; - return this; - } - - /** - * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @return the previewImagesDark value. - */ - public List previewImagesDark() { - return this.previewImagesDark; - } - - /** - * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @param previewImagesDark the previewImagesDark value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withPreviewImagesDark(List previewImagesDark) { - this.previewImagesDark = previewImagesDark; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (source() != null) { - source().validate(); - } - if (author() != null) { - author().validate(); - } - if (support() != null) { - support().validate(); - } - if (dependencies() != null) { - dependencies().validate(); - } - if (categories() != null) { - categories().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java deleted file mode 100644 index 6c482ad3565a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java +++ /dev/null @@ -1,191 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRuleCommonProperties; -import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** MicrosoftSecurityIncidentCreation rule property bag. */ -@Fluent -public final class MicrosoftSecurityIncidentCreationAlertRuleProperties - extends MicrosoftSecurityIncidentCreationAlertRuleCommonProperties { - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName") - private String alertRuleTemplateName; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * Determines whether this alert rule is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The last time that this alert has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.alertRuleTemplateName; - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleProperties withAlertRuleTemplateName( - String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the alert rule. - * - * @param description the description value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for alerts created by this alert rule. - * - * @param displayName the displayName value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleProperties withDisplayNamesFilter( - List displayNamesFilter) { - super.withDisplayNamesFilter(displayNamesFilter); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleProperties withDisplayNamesExcludeFilter( - List displayNamesExcludeFilter) { - super.withDisplayNamesExcludeFilter(displayNamesExcludeFilter); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleProperties withProductFilter( - MicrosoftSecurityProductName productFilter) { - super.withProductFilter(productFilter); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleProperties withSeveritiesFilter( - List severitiesFilter) { - super.withSeveritiesFilter(severitiesFilter); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model" - + " MicrosoftSecurityIncidentCreationAlertRuleProperties")); - } - } - - private static final ClientLogger LOGGER = - new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java deleted file mode 100644 index d5732a0625a0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java +++ /dev/null @@ -1,174 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** MicrosoftSecurityIncidentCreation rule template properties. */ -@Fluent -public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties - extends AlertRuleTemplatePropertiesBase { - /* - * the alerts' displayNames on which the cases will be generated - */ - @JsonProperty(value = "displayNamesFilter") - private List displayNamesFilter; - - /* - * the alerts' displayNames on which the cases will not be generated - */ - @JsonProperty(value = "displayNamesExcludeFilter") - private List displayNamesExcludeFilter; - - /* - * The alerts' productName on which the cases will be generated - */ - @JsonProperty(value = "productFilter") - private MicrosoftSecurityProductName productFilter; - - /* - * the alerts' severities on which the cases will be generated - */ - @JsonProperty(value = "severitiesFilter") - private List severitiesFilter; - - /** - * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. - * - * @return the displayNamesFilter value. - */ - public List displayNamesFilter() { - return this.displayNamesFilter; - } - - /** - * Set the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. - * - * @param displayNamesFilter the displayNamesFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withDisplayNamesFilter( - List displayNamesFilter) { - this.displayNamesFilter = displayNamesFilter; - return this; - } - - /** - * Get the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. - * - * @return the displayNamesExcludeFilter value. - */ - public List displayNamesExcludeFilter() { - return this.displayNamesExcludeFilter; - } - - /** - * Set the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. - * - * @param displayNamesExcludeFilter the displayNamesExcludeFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withDisplayNamesExcludeFilter( - List displayNamesExcludeFilter) { - this.displayNamesExcludeFilter = displayNamesExcludeFilter; - return this; - } - - /** - * Get the productFilter property: The alerts' productName on which the cases will be generated. - * - * @return the productFilter value. - */ - public MicrosoftSecurityProductName productFilter() { - return this.productFilter; - } - - /** - * Set the productFilter property: The alerts' productName on which the cases will be generated. - * - * @param productFilter the productFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withProductFilter( - MicrosoftSecurityProductName productFilter) { - this.productFilter = productFilter; - return this; - } - - /** - * Get the severitiesFilter property: the alerts' severities on which the cases will be generated. - * - * @return the severitiesFilter value. - */ - public List severitiesFilter() { - return this.severitiesFilter; - } - - /** - * Set the severitiesFilter property: the alerts' severities on which the cases will be generated. - * - * @param severitiesFilter the severitiesFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withSeveritiesFilter( - List severitiesFilter) { - this.severitiesFilter = severitiesFilter; - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withStatus(TemplateStatus status) { - super.withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java deleted file mode 100644 index 6688b38be2fb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Microsoft Threat Intelligence requirements check properties. */ -@Fluent -public final class MstiCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public MstiCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java deleted file mode 100644 index 7bef9230fe38..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.MstiDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Microsoft Threat Intelligence data connector properties. */ -@Fluent -public final class MstiDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private MstiDataConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public MstiDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the MstiDataConnectorProperties object itself. - */ - public MstiDataConnectorProperties withDataTypes(MstiDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public MstiDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model MstiDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MstiDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java deleted file mode 100644 index 68d2ff985a20..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** MTP (Microsoft Threat Protection) requirements check properties. */ -@Fluent -public final class MtpCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public MtpCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java deleted file mode 100644 index 2399f7dba165..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** MTP (Microsoft Threat Protection) data connector properties. */ -@Fluent -public final class MtpDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private MtpDataConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public MtpDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the MtpDataConnectorProperties object itself. - */ - public MtpDataConnectorProperties withDataTypes(MtpDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public MtpDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model MtpDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java deleted file mode 100644 index 810e29f8c340..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Nic entity property bag. */ -@Immutable -public final class NicEntityProperties extends EntityCommonProperties { - /* - * The MAC address of this network interface - */ - @JsonProperty(value = "macAddress", access = JsonProperty.Access.WRITE_ONLY) - private String macAddress; - - /* - * The IP entity id of this network interface - */ - @JsonProperty(value = "ipAddressEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String ipAddressEntityId; - - /* - * A list of VLANs of the network interface entity. - */ - @JsonProperty(value = "vlans", access = JsonProperty.Access.WRITE_ONLY) - private List vlans; - - /** - * Get the macAddress property: The MAC address of this network interface. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Get the ipAddressEntityId property: The IP entity id of this network interface. - * - * @return the ipAddressEntityId value. - */ - public String ipAddressEntityId() { - return this.ipAddressEntityId; - } - - /** - * Get the vlans property: A list of VLANs of the network interface entity. - * - * @return the vlans value. - */ - public List vlans() { - return this.vlans; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java deleted file mode 100644 index 2d2b3f5d6791..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java +++ /dev/null @@ -1,509 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.EntityMapping; -import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; -import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Nrt alert rule base property bag. */ -@Fluent -public final class NrtAlertRuleProperties { - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName") - private String alertRuleTemplateName; - - /* - * The version of the alert rule template used to create this rule - in format , where all are numbers, for - * example 0 <1.0.2> - */ - @JsonProperty(value = "templateVersion") - private String templateVersion; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query", required = true) - private String query; - - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * The techniques of the alert rule - */ - @JsonProperty(value = "techniques") - private List techniques; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * Determines whether this alert rule is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The last time that this alert rule has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The suppression (in ISO 8601 duration format) to wait since last time this alert rule been triggered. - */ - @JsonProperty(value = "suppressionDuration", required = true) - private Duration suppressionDuration; - - /* - * Determines whether the suppression for this alert rule is enabled or disabled. - */ - @JsonProperty(value = "suppressionEnabled", required = true) - private boolean suppressionEnabled; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", required = true) - private AlertSeverity severity; - - /* - * The settings of the incidents that created from alerts triggered by this analytics rule - */ - @JsonProperty(value = "incidentConfiguration") - private IncidentConfiguration incidentConfiguration; - - /* - * Dictionary of string key-value pairs of columns to be attached to the alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - - /* - * The event grouping settings. - */ - @JsonProperty(value = "eventGroupingSettings") - private EventGroupingSettings eventGroupingSettings; - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.alertRuleTemplateName; - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @return the templateVersion value. - */ - public String templateVersion() { - return this.templateVersion; - } - - /** - * Set the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @param templateVersion the templateVersion value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withTemplateVersion(String templateVersion) { - this.templateVersion = templateVersion; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the alert rule. - * - * @param description the description value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for alerts created by this alert rule. - * - * @param displayName the displayName value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert rule has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @return the suppressionDuration value. - */ - public Duration suppressionDuration() { - return this.suppressionDuration; - } - - /** - * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @param suppressionDuration the suppressionDuration value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withSuppressionDuration(Duration suppressionDuration) { - this.suppressionDuration = suppressionDuration; - return this; - } - - /** - * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @return the suppressionEnabled value. - */ - public boolean suppressionEnabled() { - return this.suppressionEnabled; - } - - /** - * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @param suppressionEnabled the suppressionEnabled value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withSuppressionEnabled(boolean suppressionEnabled) { - this.suppressionEnabled = suppressionEnabled; - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @return the incidentConfiguration value. - */ - public IncidentConfiguration incidentConfiguration() { - return this.incidentConfiguration; - } - - /** - * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @param incidentConfiguration the incidentConfiguration value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { - this.incidentConfiguration = incidentConfiguration; - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.eventGroupingSettings; - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - this.eventGroupingSettings = eventGroupingSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (query() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property query in model NrtAlertRuleProperties")); - } - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model NrtAlertRuleProperties")); - } - if (suppressionDuration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property suppressionDuration in model NrtAlertRuleProperties")); - } - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property severity in model NrtAlertRuleProperties")); - } - if (incidentConfiguration() != null) { - incidentConfiguration().validate(); - } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } - if (eventGroupingSettings() != null) { - eventGroupingSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NrtAlertRuleProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java deleted file mode 100644 index 97788b8fd862..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java +++ /dev/null @@ -1,278 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.EntityMapping; -import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** NRT alert rule template properties. */ -@Fluent -public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The version of this template - in format , where all are numbers. For example <1.0.2>. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Dictionary of string key-value pairs of columns to be attached to the alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - - /* - * The event grouping settings. - */ - @JsonProperty(value = "eventGroupingSettings") - private EventGroupingSettings eventGroupingSettings; - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @param version the version value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.eventGroupingSettings; - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - this.eventGroupingSettings = eventGroupingSettings; - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withTactics(List tactics) { - super.withTactics(tactics); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withTechniques(List techniques) { - super.withTechniques(techniques); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withStatus(TemplateStatus status) { - super.withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } - if (eventGroupingSettings() != null) { - eventGroupingSettings().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java deleted file mode 100644 index e79cb5b7768f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Office365 Project requirements check properties. */ -@Fluent -public final class Office365ProjectCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public Office365ProjectCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java deleted file mode 100644 index 86464533c6a1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Office Microsoft Project data connector properties. */ -@Fluent -public final class Office365ProjectDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private Office365ProjectConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public Office365ProjectConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the Office365ProjectDataConnectorProperties object itself. - */ - public Office365ProjectDataConnectorProperties withDataTypes(Office365ProjectConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public Office365ProjectDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model Office365ProjectDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Office365ProjectDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java deleted file mode 100644 index 7e6a246d93cb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. */ -@Fluent -public final class OfficeAtpCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public OfficeAtpCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java deleted file mode 100644 index 9a64b134a987..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** OfficeATP (Office 365 Advanced Threat Protection) data connector properties. */ -@Fluent -public final class OfficeAtpDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes") - private AlertsDataTypeOfDataConnector dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficeAtpDataConnectorProperties object itself. - */ - public OfficeAtpDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public OfficeAtpDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() != null) { - dataTypes().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java deleted file mode 100644 index e1ef2000626c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java +++ /dev/null @@ -1,101 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Consent for Office365 tenant that already made. */ -@Fluent -public final class OfficeConsentInner extends ProxyResource { - /* - * Office consent properties - */ - @JsonProperty(value = "properties") - private OfficeConsentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: Office consent properties. - * - * @return the innerProperties value. - */ - private OfficeConsentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the tenantId property: The tenantId of the Office365 with the consent. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenantId of the Office365 with the consent. - * - * @param tenantId the tenantId value to set. - * @return the OfficeConsentInner object itself. - */ - public OfficeConsentInner withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeConsentProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Get the consentId property: Help to easily cascade among the data layers. - * - * @return the consentId value. - */ - public String consentId() { - return this.innerProperties() == null ? null : this.innerProperties().consentId(); - } - - /** - * Set the consentId property: Help to easily cascade among the data layers. - * - * @param consentId the consentId value to set. - * @return the OfficeConsentInner object itself. - */ - public OfficeConsentInner withConsentId(String consentId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeConsentProperties(); - } - this.innerProperties().withConsentId(consentId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java deleted file mode 100644 index ef163ee8eda7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Consent property bag. */ -@Fluent -public final class OfficeConsentProperties { - /* - * The tenantId of the Office365 with the consent. - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /* - * Help to easily cascade among the data layers. - */ - @JsonProperty(value = "consentId") - private String consentId; - - /** - * Get the tenantId property: The tenantId of the Office365 with the consent. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenantId of the Office365 with the consent. - * - * @param tenantId the tenantId value to set. - * @return the OfficeConsentProperties object itself. - */ - public OfficeConsentProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the consentId property: Help to easily cascade among the data layers. - * - * @return the consentId value. - */ - public String consentId() { - return this.consentId; - } - - /** - * Set the consentId property: Help to easily cascade among the data layers. - * - * @param consentId the consentId value to set. - * @return the OfficeConsentProperties object itself. - */ - public OfficeConsentProperties withConsentId(String consentId) { - this.consentId = consentId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java deleted file mode 100644 index 4b02a823625c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Office data connector properties. */ -@Fluent -public final class OfficeDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private OfficeDataConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public OfficeDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficeDataConnectorProperties object itself. - */ - public OfficeDataConnectorProperties withDataTypes(OfficeDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public OfficeDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model OfficeDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OfficeDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java deleted file mode 100644 index 5ae6bc407935..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** OfficeIRM (Microsoft Insider Risk Management) requirements check properties. */ -@Fluent -public final class OfficeIrmCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public OfficeIrmCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java deleted file mode 100644 index c3e618acc5a3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** OfficeIRM (Microsoft Insider Risk Management) data connector properties. */ -@Fluent -public final class OfficeIrmDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes") - private AlertsDataTypeOfDataConnector dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficeIrmDataConnectorProperties object itself. - */ - public OfficeIrmDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public OfficeIrmDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() != null) { - dataTypes().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java deleted file mode 100644 index b64db3bd6270..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Office PowerBI requirements check properties. */ -@Fluent -public final class OfficePowerBICheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public OfficePowerBICheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java deleted file mode 100644 index 4f19d046961e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Office Microsoft PowerBI data connector properties. */ -@Fluent -public final class OfficePowerBIDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private OfficePowerBIConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public OfficePowerBIConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficePowerBIDataConnectorProperties object itself. - */ - public OfficePowerBIDataConnectorProperties withDataTypes(OfficePowerBIConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public OfficePowerBIDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model OfficePowerBIDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OfficePowerBIDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java deleted file mode 100644 index ec5a4d2872bb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java +++ /dev/null @@ -1,128 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Operation provided by provider. */ -@Fluent -public final class OperationInner { - /* - * Properties of the operation - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /* - * Name of the operation - */ - @JsonProperty(value = "name") - private String name; - - /* - * The origin of the operation - */ - @JsonProperty(value = "origin") - private String origin; - - /* - * Indicates whether the operation is a data action - */ - @JsonProperty(value = "isDataAction") - private Boolean isDataAction; - - /** - * Get the display property: Properties of the operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Properties of the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the name property: Name of the operation. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the operation. - * - * @param name the name value to set. - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the origin property: The origin of the operation. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin property: The origin of the operation. - * - * @param origin the origin value to set. - * @return the OperationInner object itself. - */ - public OperationInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Get the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Set the isDataAction property: Indicates whether the operation is a data action. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationInner object itself. - */ - public OperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java deleted file mode 100644 index b1dde6737938..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java +++ /dev/null @@ -1,171 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ElevationToken; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Process entity property bag. */ -@Fluent -public final class ProcessEntityProperties extends EntityCommonProperties { - /* - * The account entity id running the processes. - */ - @JsonProperty(value = "accountEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String accountEntityId; - - /* - * The command line used to create the process - */ - @JsonProperty(value = "commandLine", access = JsonProperty.Access.WRITE_ONLY) - private String commandLine; - - /* - * The time when the process started to run - */ - @JsonProperty(value = "creationTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTimeUtc; - - /* - * The elevation token associated with the process. - */ - @JsonProperty(value = "elevationToken") - private ElevationToken elevationToken; - - /* - * The host entity id on which the process was running - */ - @JsonProperty(value = "hostEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String hostEntityId; - - /* - * The session entity id in which the process was running - */ - @JsonProperty(value = "hostLogonSessionEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String hostLogonSessionEntityId; - - /* - * Image file entity id - */ - @JsonProperty(value = "imageFileEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String imageFileEntityId; - - /* - * The parent process entity id. - */ - @JsonProperty(value = "parentProcessEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String parentProcessEntityId; - - /* - * The process ID - */ - @JsonProperty(value = "processId", access = JsonProperty.Access.WRITE_ONLY) - private String processId; - - /** - * Get the accountEntityId property: The account entity id running the processes. - * - * @return the accountEntityId value. - */ - public String accountEntityId() { - return this.accountEntityId; - } - - /** - * Get the commandLine property: The command line used to create the process. - * - * @return the commandLine value. - */ - public String commandLine() { - return this.commandLine; - } - - /** - * Get the creationTimeUtc property: The time when the process started to run. - * - * @return the creationTimeUtc value. - */ - public OffsetDateTime creationTimeUtc() { - return this.creationTimeUtc; - } - - /** - * Get the elevationToken property: The elevation token associated with the process. - * - * @return the elevationToken value. - */ - public ElevationToken elevationToken() { - return this.elevationToken; - } - - /** - * Set the elevationToken property: The elevation token associated with the process. - * - * @param elevationToken the elevationToken value to set. - * @return the ProcessEntityProperties object itself. - */ - public ProcessEntityProperties withElevationToken(ElevationToken elevationToken) { - this.elevationToken = elevationToken; - return this; - } - - /** - * Get the hostEntityId property: The host entity id on which the process was running. - * - * @return the hostEntityId value. - */ - public String hostEntityId() { - return this.hostEntityId; - } - - /** - * Get the hostLogonSessionEntityId property: The session entity id in which the process was running. - * - * @return the hostLogonSessionEntityId value. - */ - public String hostLogonSessionEntityId() { - return this.hostLogonSessionEntityId; - } - - /** - * Get the imageFileEntityId property: Image file entity id. - * - * @return the imageFileEntityId value. - */ - public String imageFileEntityId() { - return this.imageFileEntityId; - } - - /** - * Get the parentProcessEntityId property: The parent process entity id. - * - * @return the parentProcessEntityId value. - */ - public String parentProcessEntityId() { - return this.parentProcessEntityId; - } - - /** - * Get the processId property: The process ID. - * - * @return the processId value. - */ - public String processId() { - return this.processId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java deleted file mode 100644 index 405ab6789eaf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.RegistryHive; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** RegistryKey entity property bag. */ -@Immutable -public final class RegistryKeyEntityProperties extends EntityCommonProperties { - /* - * the hive that holds the registry key. - */ - @JsonProperty(value = "hive", access = JsonProperty.Access.WRITE_ONLY) - private RegistryHive hive; - - /* - * The registry key path. - */ - @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) - private String key; - - /** - * Get the hive property: the hive that holds the registry key. - * - * @return the hive value. - */ - public RegistryHive hive() { - return this.hive; - } - - /** - * Get the key property: The registry key path. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java deleted file mode 100644 index a15af888fb1b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.RegistryValueKind; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** RegistryValue entity property bag. */ -@Immutable -public final class RegistryValueEntityProperties extends EntityCommonProperties { - /* - * The registry key entity id. - */ - @JsonProperty(value = "keyEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String keyEntityId; - - /* - * String formatted representation of the value data. - */ - @JsonProperty(value = "valueData", access = JsonProperty.Access.WRITE_ONLY) - private String valueData; - - /* - * The registry value name. - */ - @JsonProperty(value = "valueName", access = JsonProperty.Access.WRITE_ONLY) - private String valueName; - - /* - * Specifies the data types to use when storing values in the registry, or identifies the data type of a value in - * the registry. - */ - @JsonProperty(value = "valueType", access = JsonProperty.Access.WRITE_ONLY) - private RegistryValueKind valueType; - - /** - * Get the keyEntityId property: The registry key entity id. - * - * @return the keyEntityId value. - */ - public String keyEntityId() { - return this.keyEntityId; - } - - /** - * Get the valueData property: String formatted representation of the value data. - * - * @return the valueData value. - */ - public String valueData() { - return this.valueData; - } - - /** - * Get the valueName property: The registry value name. - * - * @return the valueName value. - */ - public String valueName() { - return this.valueName; - } - - /** - * Get the valueType property: Specifies the data types to use when storing values in the registry, or identifies - * the data type of a value in the registry. - * - * @return the valueType value. - */ - public RegistryValueKind valueType() { - return this.valueType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java deleted file mode 100644 index 40a02c226353..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java +++ /dev/null @@ -1,98 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a relation between two resources. */ -@Fluent -public final class RelationInner extends ResourceWithEtag { - /* - * Relation properties - */ - @JsonProperty(value = "properties") - private RelationProperties innerProperties; - - /** - * Get the innerProperties property: Relation properties. - * - * @return the innerProperties value. - */ - private RelationProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public RelationInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the relatedResourceId property: The resource ID of the related resource. - * - * @return the relatedResourceId value. - */ - public String relatedResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().relatedResourceId(); - } - - /** - * Set the relatedResourceId property: The resource ID of the related resource. - * - * @param relatedResourceId the relatedResourceId value to set. - * @return the RelationInner object itself. - */ - public RelationInner withRelatedResourceId(String relatedResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new RelationProperties(); - } - this.innerProperties().withRelatedResourceId(relatedResourceId); - return this; - } - - /** - * Get the relatedResourceName property: The name of the related resource. - * - * @return the relatedResourceName value. - */ - public String relatedResourceName() { - return this.innerProperties() == null ? null : this.innerProperties().relatedResourceName(); - } - - /** - * Get the relatedResourceType property: The resource type of the related resource. - * - * @return the relatedResourceType value. - */ - public String relatedResourceType() { - return this.innerProperties() == null ? null : this.innerProperties().relatedResourceType(); - } - - /** - * Get the relatedResourceKind property: The resource kind of the related resource. - * - * @return the relatedResourceKind value. - */ - public String relatedResourceKind() { - return this.innerProperties() == null ? null : this.innerProperties().relatedResourceKind(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java deleted file mode 100644 index 99e3df52c8c1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Relation property bag. */ -@Fluent -public final class RelationProperties { - /* - * The resource ID of the related resource - */ - @JsonProperty(value = "relatedResourceId", required = true) - private String relatedResourceId; - - /* - * The name of the related resource - */ - @JsonProperty(value = "relatedResourceName", access = JsonProperty.Access.WRITE_ONLY) - private String relatedResourceName; - - /* - * The resource type of the related resource - */ - @JsonProperty(value = "relatedResourceType", access = JsonProperty.Access.WRITE_ONLY) - private String relatedResourceType; - - /* - * The resource kind of the related resource - */ - @JsonProperty(value = "relatedResourceKind", access = JsonProperty.Access.WRITE_ONLY) - private String relatedResourceKind; - - /** - * Get the relatedResourceId property: The resource ID of the related resource. - * - * @return the relatedResourceId value. - */ - public String relatedResourceId() { - return this.relatedResourceId; - } - - /** - * Set the relatedResourceId property: The resource ID of the related resource. - * - * @param relatedResourceId the relatedResourceId value to set. - * @return the RelationProperties object itself. - */ - public RelationProperties withRelatedResourceId(String relatedResourceId) { - this.relatedResourceId = relatedResourceId; - return this; - } - - /** - * Get the relatedResourceName property: The name of the related resource. - * - * @return the relatedResourceName value. - */ - public String relatedResourceName() { - return this.relatedResourceName; - } - - /** - * Get the relatedResourceType property: The resource type of the related resource. - * - * @return the relatedResourceType value. - */ - public String relatedResourceType() { - return this.relatedResourceType; - } - - /** - * Get the relatedResourceKind property: The resource kind of the related resource. - * - * @return the relatedResourceKind value. - */ - public String relatedResourceKind() { - return this.relatedResourceKind; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (relatedResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property relatedResourceId in model RelationProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RelationProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java deleted file mode 100644 index dff64861cae5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents a repository. */ -@Fluent -public final class RepoInner { - /* - * The url to access the repository. - */ - @JsonProperty(value = "url") - private String url; - - /* - * The name of the repository. - */ - @JsonProperty(value = "fullName") - private String fullName; - - /* - * Array of branches. - */ - @JsonProperty(value = "branches") - private List branches; - - /** - * Get the url property: The url to access the repository. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: The url to access the repository. - * - * @param url the url value to set. - * @return the RepoInner object itself. - */ - public RepoInner withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the fullName property: The name of the repository. - * - * @return the fullName value. - */ - public String fullName() { - return this.fullName; - } - - /** - * Set the fullName property: The name of the repository. - * - * @param fullName the fullName value to set. - * @return the RepoInner object itself. - */ - public RepoInner withFullName(String fullName) { - this.fullName = fullName; - return this; - } - - /** - * Get the branches property: Array of branches. - * - * @return the branches value. - */ - public List branches() { - return this.branches; - } - - /** - * Set the branches property: Array of branches. - * - * @param branches the branches value to set. - * @return the RepoInner object itself. - */ - public RepoInner withBranches(List branches) { - this.branches = branches; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java deleted file mode 100644 index 98738e4e2029..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java +++ /dev/null @@ -1,406 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.EntityMapping; -import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; -import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; -import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRuleCommonProperties; -import com.azure.resourcemanager.securityinsights.models.TriggerOperator; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Scheduled alert rule base property bag. */ -@Fluent -public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommonProperties { - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName") - private String alertRuleTemplateName; - - /* - * The version of the alert rule template used to create this rule - in format , where all are numbers, for - * example 0 <1.0.2> - */ - @JsonProperty(value = "templateVersion") - private String templateVersion; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * Determines whether this alert rule is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The last time that this alert rule has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The suppression (in ISO 8601 duration format) to wait since last time this alert rule been triggered. - */ - @JsonProperty(value = "suppressionDuration", required = true) - private Duration suppressionDuration; - - /* - * Determines whether the suppression for this alert rule is enabled or disabled. - */ - @JsonProperty(value = "suppressionEnabled", required = true) - private boolean suppressionEnabled; - - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * The techniques of the alert rule - */ - @JsonProperty(value = "techniques") - private List techniques; - - /* - * The settings of the incidents that created from alerts triggered by this analytics rule - */ - @JsonProperty(value = "incidentConfiguration") - private IncidentConfiguration incidentConfiguration; - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.alertRuleTemplateName; - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @return the templateVersion value. - */ - public String templateVersion() { - return this.templateVersion; - } - - /** - * Set the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @param templateVersion the templateVersion value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withTemplateVersion(String templateVersion) { - this.templateVersion = templateVersion; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the alert rule. - * - * @param description the description value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for alerts created by this alert rule. - * - * @param displayName the displayName value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert rule has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @return the suppressionDuration value. - */ - public Duration suppressionDuration() { - return this.suppressionDuration; - } - - /** - * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @param suppressionDuration the suppressionDuration value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withSuppressionDuration(Duration suppressionDuration) { - this.suppressionDuration = suppressionDuration; - return this; - } - - /** - * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @return the suppressionEnabled value. - */ - public boolean suppressionEnabled() { - return this.suppressionEnabled; - } - - /** - * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @param suppressionEnabled the suppressionEnabled value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withSuppressionEnabled(boolean suppressionEnabled) { - this.suppressionEnabled = suppressionEnabled; - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** - * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @return the incidentConfiguration value. - */ - public IncidentConfiguration incidentConfiguration() { - return this.incidentConfiguration; - } - - /** - * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @param incidentConfiguration the incidentConfiguration value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { - this.incidentConfiguration = incidentConfiguration; - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withQuery(String query) { - super.withQuery(query); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withQueryFrequency(Duration queryFrequency) { - super.withQueryFrequency(queryFrequency); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withQueryPeriod(Duration queryPeriod) { - super.withQueryPeriod(queryPeriod); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withSeverity(AlertSeverity severity) { - super.withSeverity(severity); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withTriggerOperator(TriggerOperator triggerOperator) { - super.withTriggerOperator(triggerOperator); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withTriggerThreshold(Integer triggerThreshold) { - super.withTriggerThreshold(triggerThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - super.withEventGroupingSettings(eventGroupingSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withCustomDetails(Map customDetails) { - super.withCustomDetails(customDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withEntityMappings(List entityMappings) { - super.withEntityMappings(entityMappings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - super.withAlertDetailsOverride(alertDetailsOverride); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model ScheduledAlertRuleProperties")); - } - if (suppressionDuration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property suppressionDuration in model ScheduledAlertRuleProperties")); - } - if (incidentConfiguration() != null) { - incidentConfiguration().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScheduledAlertRuleProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java deleted file mode 100644 index 42be47785289..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java +++ /dev/null @@ -1,548 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.EntityMapping; -import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.azure.resourcemanager.securityinsights.models.TriggerOperator; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Scheduled alert rule template properties. */ -@Fluent -public final class ScheduledAlertRuleTemplateProperties { - /* - * the number of alert rules that were created by this template - */ - @JsonProperty(value = "alertRulesCreatedByTemplateCount") - private Integer alertRulesCreatedByTemplateCount; - - /* - * The time that this alert rule template has been added. - */ - @JsonProperty(value = "createdDateUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDateUtc; - - /* - * The time that this alert rule template was last updated. - */ - @JsonProperty(value = "lastUpdatedDateUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastUpdatedDateUtc; - - /* - * The description of the alert rule template. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The display name for alert rule template. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The required data connectors for this template - */ - @JsonProperty(value = "requiredDataConnectors") - private List requiredDataConnectors; - - /* - * The alert rule template status. - */ - @JsonProperty(value = "status") - private TemplateStatus status; - - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The frequency (in ISO 8601 duration format) for this alert rule to run. - */ - @JsonProperty(value = "queryFrequency") - private Duration queryFrequency; - - /* - * The period (in ISO 8601 duration format) that this alert rule looks at. - */ - @JsonProperty(value = "queryPeriod") - private Duration queryPeriod; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The operation against the threshold that triggers alert rule. - */ - @JsonProperty(value = "triggerOperator") - private TriggerOperator triggerOperator; - - /* - * The threshold triggers this alert rule. - */ - @JsonProperty(value = "triggerThreshold") - private Integer triggerThreshold; - - /* - * The tactics of the alert rule template - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * The techniques of the alert rule - */ - @JsonProperty(value = "techniques") - private List techniques; - - /* - * The version of this template - in format , where all are numbers. For example <1.0.2>. - */ - @JsonProperty(value = "version") - private String version; - - /* - * The event grouping settings. - */ - @JsonProperty(value = "eventGroupingSettings") - private EventGroupingSettings eventGroupingSettings; - - /* - * Dictionary of string key-value pairs of columns to be attached to the alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.alertRulesCreatedByTemplateCount; - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - this.alertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - return this; - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.createdDateUtc; - } - - /** - * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.lastUpdatedDateUtc; - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the requiredDataConnectors property: The required data connectors for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.requiredDataConnectors; - } - - /** - * Set the requiredDataConnectors property: The required data connectors for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - this.requiredDataConnectors = requiredDataConnectors; - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.status; - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withStatus(TemplateStatus status) { - this.status = status; - return this; - } - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. - * - * @return the queryFrequency value. - */ - public Duration queryFrequency() { - return this.queryFrequency; - } - - /** - * Set the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. - * - * @param queryFrequency the queryFrequency value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withQueryFrequency(Duration queryFrequency) { - this.queryFrequency = queryFrequency; - return this; - } - - /** - * Get the queryPeriod property: The period (in ISO 8601 duration format) that this alert rule looks at. - * - * @return the queryPeriod value. - */ - public Duration queryPeriod() { - return this.queryPeriod; - } - - /** - * Set the queryPeriod property: The period (in ISO 8601 duration format) that this alert rule looks at. - * - * @param queryPeriod the queryPeriod value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withQueryPeriod(Duration queryPeriod) { - this.queryPeriod = queryPeriod; - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the triggerOperator property: The operation against the threshold that triggers alert rule. - * - * @return the triggerOperator value. - */ - public TriggerOperator triggerOperator() { - return this.triggerOperator; - } - - /** - * Set the triggerOperator property: The operation against the threshold that triggers alert rule. - * - * @param triggerOperator the triggerOperator value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withTriggerOperator(TriggerOperator triggerOperator) { - this.triggerOperator = triggerOperator; - return this; - } - - /** - * Get the triggerThreshold property: The threshold triggers this alert rule. - * - * @return the triggerThreshold value. - */ - public Integer triggerThreshold() { - return this.triggerThreshold; - } - - /** - * Set the triggerThreshold property: The threshold triggers this alert rule. - * - * @param triggerThreshold the triggerThreshold value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withTriggerThreshold(Integer triggerThreshold) { - this.triggerThreshold = triggerThreshold; - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @param version the version value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.eventGroupingSettings; - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - this.eventGroupingSettings = eventGroupingSettings; - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. - */ - public ScheduledAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (requiredDataConnectors() != null) { - requiredDataConnectors().forEach(e -> e.validate()); - } - if (eventGroupingSettings() != null) { - eventGroupingSettings().validate(); - } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java deleted file mode 100644 index 21db1aca93e5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java +++ /dev/null @@ -1,425 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AlertStatus; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.ConfidenceLevel; -import com.azure.resourcemanager.securityinsights.models.ConfidenceScoreStatus; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.KillChainIntent; -import com.azure.resourcemanager.securityinsights.models.SecurityAlertPropertiesConfidenceReasonsItem; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** SecurityAlert entity property bag. */ -@Fluent -public final class SecurityAlertProperties extends EntityCommonProperties { - /* - * The display name of the alert. - */ - @JsonProperty(value = "alertDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String alertDisplayName; - - /* - * The type name of the alert. - */ - @JsonProperty(value = "alertType", access = JsonProperty.Access.WRITE_ONLY) - private String alertType; - - /* - * Display name of the main entity being reported on. - */ - @JsonProperty(value = "compromisedEntity", access = JsonProperty.Access.WRITE_ONLY) - private String compromisedEntity; - - /* - * The confidence level of this alert. - */ - @JsonProperty(value = "confidenceLevel", access = JsonProperty.Access.WRITE_ONLY) - private ConfidenceLevel confidenceLevel; - - /* - * The confidence reasons - */ - @JsonProperty(value = "confidenceReasons", access = JsonProperty.Access.WRITE_ONLY) - private List confidenceReasons; - - /* - * The confidence score of the alert. - */ - @JsonProperty(value = "confidenceScore", access = JsonProperty.Access.WRITE_ONLY) - private Double confidenceScore; - - /* - * The confidence score calculation status, i.e. indicating if score calculation is pending for this alert, not - * applicable or final. - */ - @JsonProperty(value = "confidenceScoreStatus", access = JsonProperty.Access.WRITE_ONLY) - private ConfidenceScoreStatus confidenceScoreStatus; - - /* - * Alert description. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The impact end time of the alert (the time of the last event contributing to the alert). - */ - @JsonProperty(value = "endTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endTimeUtc; - - /* - * Holds the alert intent stage(s) mapping for this alert. - */ - @JsonProperty(value = "intent", access = JsonProperty.Access.WRITE_ONLY) - private KillChainIntent intent; - - /* - * The identifier of the alert inside the product which generated the alert. - */ - @JsonProperty(value = "providerAlertId", access = JsonProperty.Access.WRITE_ONLY) - private String providerAlertId; - - /* - * The time the alert was made available for consumption. - */ - @JsonProperty(value = "processingEndTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime processingEndTime; - - /* - * The name of a component inside the product which generated the alert. - */ - @JsonProperty(value = "productComponentName", access = JsonProperty.Access.WRITE_ONLY) - private String productComponentName; - - /* - * The name of the product which published this alert. - */ - @JsonProperty(value = "productName", access = JsonProperty.Access.WRITE_ONLY) - private String productName; - - /* - * The version of the product generating the alert. - */ - @JsonProperty(value = "productVersion", access = JsonProperty.Access.WRITE_ONLY) - private String productVersion; - - /* - * Manual action items to take to remediate the alert. - */ - @JsonProperty(value = "remediationSteps", access = JsonProperty.Access.WRITE_ONLY) - private List remediationSteps; - - /* - * The severity of the alert - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The impact start time of the alert (the time of the first event contributing to the alert). - */ - @JsonProperty(value = "startTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTimeUtc; - - /* - * The lifecycle status of the alert. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private AlertStatus status; - - /* - * Holds the product identifier of the alert for the product. - */ - @JsonProperty(value = "systemAlertId", access = JsonProperty.Access.WRITE_ONLY) - private String systemAlertId; - - /* - * The tactics of the alert - */ - @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) - private List tactics; - - /* - * The time the alert was generated. - */ - @JsonProperty(value = "timeGenerated", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime timeGenerated; - - /* - * The name of the vendor that raise the alert. - */ - @JsonProperty(value = "vendorName", access = JsonProperty.Access.WRITE_ONLY) - private String vendorName; - - /* - * The uri link of the alert. - */ - @JsonProperty(value = "alertLink", access = JsonProperty.Access.WRITE_ONLY) - private String alertLink; - - /* - * The list of resource identifiers of the alert. - */ - @JsonProperty(value = "resourceIdentifiers", access = JsonProperty.Access.WRITE_ONLY) - private List resourceIdentifiers; - - /** - * Get the alertDisplayName property: The display name of the alert. - * - * @return the alertDisplayName value. - */ - public String alertDisplayName() { - return this.alertDisplayName; - } - - /** - * Get the alertType property: The type name of the alert. - * - * @return the alertType value. - */ - public String alertType() { - return this.alertType; - } - - /** - * Get the compromisedEntity property: Display name of the main entity being reported on. - * - * @return the compromisedEntity value. - */ - public String compromisedEntity() { - return this.compromisedEntity; - } - - /** - * Get the confidenceLevel property: The confidence level of this alert. - * - * @return the confidenceLevel value. - */ - public ConfidenceLevel confidenceLevel() { - return this.confidenceLevel; - } - - /** - * Get the confidenceReasons property: The confidence reasons. - * - * @return the confidenceReasons value. - */ - public List confidenceReasons() { - return this.confidenceReasons; - } - - /** - * Get the confidenceScore property: The confidence score of the alert. - * - * @return the confidenceScore value. - */ - public Double confidenceScore() { - return this.confidenceScore; - } - - /** - * Get the confidenceScoreStatus property: The confidence score calculation status, i.e. indicating if score - * calculation is pending for this alert, not applicable or final. - * - * @return the confidenceScoreStatus value. - */ - public ConfidenceScoreStatus confidenceScoreStatus() { - return this.confidenceScoreStatus; - } - - /** - * Get the description property: Alert description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the endTimeUtc property: The impact end time of the alert (the time of the last event contributing to the - * alert). - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Get the intent property: Holds the alert intent stage(s) mapping for this alert. - * - * @return the intent value. - */ - public KillChainIntent intent() { - return this.intent; - } - - /** - * Get the providerAlertId property: The identifier of the alert inside the product which generated the alert. - * - * @return the providerAlertId value. - */ - public String providerAlertId() { - return this.providerAlertId; - } - - /** - * Get the processingEndTime property: The time the alert was made available for consumption. - * - * @return the processingEndTime value. - */ - public OffsetDateTime processingEndTime() { - return this.processingEndTime; - } - - /** - * Get the productComponentName property: The name of a component inside the product which generated the alert. - * - * @return the productComponentName value. - */ - public String productComponentName() { - return this.productComponentName; - } - - /** - * Get the productName property: The name of the product which published this alert. - * - * @return the productName value. - */ - public String productName() { - return this.productName; - } - - /** - * Get the productVersion property: The version of the product generating the alert. - * - * @return the productVersion value. - */ - public String productVersion() { - return this.productVersion; - } - - /** - * Get the remediationSteps property: Manual action items to take to remediate the alert. - * - * @return the remediationSteps value. - */ - public List remediationSteps() { - return this.remediationSteps; - } - - /** - * Get the severity property: The severity of the alert. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity of the alert. - * - * @param severity the severity value to set. - * @return the SecurityAlertProperties object itself. - */ - public SecurityAlertProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the startTimeUtc property: The impact start time of the alert (the time of the first event contributing to - * the alert). - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Get the status property: The lifecycle status of the alert. - * - * @return the status value. - */ - public AlertStatus status() { - return this.status; - } - - /** - * Get the systemAlertId property: Holds the product identifier of the alert for the product. - * - * @return the systemAlertId value. - */ - public String systemAlertId() { - return this.systemAlertId; - } - - /** - * Get the tactics property: The tactics of the alert. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Get the timeGenerated property: The time the alert was generated. - * - * @return the timeGenerated value. - */ - public OffsetDateTime timeGenerated() { - return this.timeGenerated; - } - - /** - * Get the vendorName property: The name of the vendor that raise the alert. - * - * @return the vendorName value. - */ - public String vendorName() { - return this.vendorName; - } - - /** - * Get the alertLink property: The uri link of the alert. - * - * @return the alertLink value. - */ - public String alertLink() { - return this.alertLink; - } - - /** - * Get the resourceIdentifiers property: The list of resource identifiers of the alert. - * - * @return the resourceIdentifiers value. - */ - public List resourceIdentifiers() { - return this.resourceIdentifiers; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (confidenceReasons() != null) { - confidenceReasons().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java deleted file mode 100644 index e6bf9c697c0a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java +++ /dev/null @@ -1,71 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** SecurityGroup entity property bag. */ -@Immutable -public final class SecurityGroupEntityProperties extends EntityCommonProperties { - /* - * The group distinguished name - */ - @JsonProperty(value = "distinguishedName", access = JsonProperty.Access.WRITE_ONLY) - private String distinguishedName; - - /* - * A single-value attribute that is the unique identifier for the object, assigned by active directory. - */ - @JsonProperty(value = "objectGuid", access = JsonProperty.Access.WRITE_ONLY) - private UUID objectGuid; - - /* - * The SID attribute is a single-value attribute that specifies the security identifier (SID) of the group - */ - @JsonProperty(value = "sid", access = JsonProperty.Access.WRITE_ONLY) - private String sid; - - /** - * Get the distinguishedName property: The group distinguished name. - * - * @return the distinguishedName value. - */ - public String distinguishedName() { - return this.distinguishedName; - } - - /** - * Get the objectGuid property: A single-value attribute that is the unique identifier for the object, assigned by - * active directory. - * - * @return the objectGuid value. - */ - public UUID objectGuid() { - return this.objectGuid; - } - - /** - * Get the sid property: The SID attribute is a single-value attribute that specifies the security identifier (SID) - * of the group. - * - * @return the sid value. - */ - public String sid() { - return this.sid; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java deleted file mode 100644 index 8bf08cc6714d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java +++ /dev/null @@ -1,40 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AnomalySecurityMLAnalyticsSettings; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Security ML Analytics Setting. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = SecurityMLAnalyticsSettingInner.class) -@JsonTypeName("SecurityMLAnalyticsSetting") -@JsonSubTypes({@JsonSubTypes.Type(name = "Anomaly", value = AnomalySecurityMLAnalyticsSettings.class)}) -@Fluent -public class SecurityMLAnalyticsSettingInner extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public SecurityMLAnalyticsSettingInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java deleted file mode 100644 index e46fd29c170a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java +++ /dev/null @@ -1,71 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Sentinel onboarding state. */ -@Fluent -public final class SentinelOnboardingStateInner extends ResourceWithEtag { - /* - * The Sentinel onboarding state object - */ - @JsonProperty(value = "properties") - private SentinelOnboardingStateProperties innerProperties; - - /** - * Get the innerProperties property: The Sentinel onboarding state object. - * - * @return the innerProperties value. - */ - private SentinelOnboardingStateProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public SentinelOnboardingStateInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the customerManagedKey property: Flag that indicates the status of the CMK setting. - * - * @return the customerManagedKey value. - */ - public Boolean customerManagedKey() { - return this.innerProperties() == null ? null : this.innerProperties().customerManagedKey(); - } - - /** - * Set the customerManagedKey property: Flag that indicates the status of the CMK setting. - * - * @param customerManagedKey the customerManagedKey value to set. - * @return the SentinelOnboardingStateInner object itself. - */ - public SentinelOnboardingStateInner withCustomerManagedKey(Boolean customerManagedKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SentinelOnboardingStateProperties(); - } - this.innerProperties().withCustomerManagedKey(customerManagedKey); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java deleted file mode 100644 index d1067a68a26d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Sentinel onboarding state properties. */ -@Fluent -public final class SentinelOnboardingStateProperties { - /* - * Flag that indicates the status of the CMK setting - */ - @JsonProperty(value = "customerManagedKey") - private Boolean customerManagedKey; - - /** - * Get the customerManagedKey property: Flag that indicates the status of the CMK setting. - * - * @return the customerManagedKey value. - */ - public Boolean customerManagedKey() { - return this.customerManagedKey; - } - - /** - * Set the customerManagedKey property: Flag that indicates the status of the CMK setting. - * - * @param customerManagedKey the customerManagedKey value to set. - * @return the SentinelOnboardingStateProperties object itself. - */ - public SentinelOnboardingStateProperties withCustomerManagedKey(Boolean customerManagedKey) { - this.customerManagedKey = customerManagedKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java deleted file mode 100644 index 420eae2ca857..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java +++ /dev/null @@ -1,58 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of the Sentinel onboarding states. */ -@Fluent -public final class SentinelOnboardingStatesListInner { - /* - * Array of Sentinel onboarding states - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the value property: Array of Sentinel onboarding states. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of Sentinel onboarding states. - * - * @param value the value value to set. - * @return the SentinelOnboardingStatesListInner object itself. - */ - public SentinelOnboardingStatesListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model SentinelOnboardingStatesListInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SentinelOnboardingStatesListInner.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java deleted file mode 100644 index bc77b021a5b5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the settings. */ -@Fluent -public final class SettingListInner { - /* - * Array of settings. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the value property: Array of settings. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of settings. - * - * @param value the value value to set. - * @return the SettingListInner object itself. - */ - public SettingListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SettingListInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SettingListInner.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java deleted file mode 100644 index fe11570beafc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.Anomalies; -import com.azure.resourcemanager.securityinsights.models.EntityAnalytics; -import com.azure.resourcemanager.securityinsights.models.EyesOn; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.Ueba; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The Setting. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = SettingsInner.class) -@JsonTypeName("Settings") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Anomalies", value = Anomalies.class), - @JsonSubTypes.Type(name = "EyesOn", value = EyesOn.class), - @JsonSubTypes.Type(name = "EntityAnalytics", value = EntityAnalytics.class), - @JsonSubTypes.Type(name = "Ueba", value = Ueba.class) -}) -@Fluent -public class SettingsInner extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public SettingsInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java deleted file mode 100644 index 3d9c0096e645..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java +++ /dev/null @@ -1,262 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ContentType; -import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import com.azure.resourcemanager.securityinsights.models.Repository; -import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.Version; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents a SourceControl in Azure Security Insights. */ -@Fluent -public final class SourceControlInner extends ResourceWithEtag { - /* - * source control properties - */ - @JsonProperty(value = "properties") - private SourceControlProperties innerProperties; - - /** - * Get the innerProperties property: source control properties. - * - * @return the innerProperties value. - */ - private SourceControlProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public SourceControlInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the id property: The id (a Guid) of the source control. - * - * @return the id value. - */ - public String idPropertiesId() { - return this.innerProperties() == null ? null : this.innerProperties().id(); - } - - /** - * Set the id property: The id (a Guid) of the source control. - * - * @param id the id value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withIdPropertiesId(String id) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withId(id); - return this; - } - - /** - * Get the version property: The version number associated with the source control. - * - * @return the version value. - */ - public Version version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: The version number associated with the source control. - * - * @param version the version value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withVersion(Version version) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the displayName property: The display name of the source control. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name of the source control. - * - * @param displayName the displayName value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the description property: A description of the source control. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: A description of the source control. - * - * @param description the description value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the repoType property: The repository type of the source control. - * - * @return the repoType value. - */ - public RepoType repoType() { - return this.innerProperties() == null ? null : this.innerProperties().repoType(); - } - - /** - * Set the repoType property: The repository type of the source control. - * - * @param repoType the repoType value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withRepoType(RepoType repoType) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withRepoType(repoType); - return this; - } - - /** - * Get the contentTypes property: Array of source control content types. - * - * @return the contentTypes value. - */ - public List contentTypes() { - return this.innerProperties() == null ? null : this.innerProperties().contentTypes(); - } - - /** - * Set the contentTypes property: Array of source control content types. - * - * @param contentTypes the contentTypes value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withContentTypes(List contentTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withContentTypes(contentTypes); - return this; - } - - /** - * Get the repository property: Repository metadata. - * - * @return the repository value. - */ - public Repository repository() { - return this.innerProperties() == null ? null : this.innerProperties().repository(); - } - - /** - * Set the repository property: Repository metadata. - * - * @param repository the repository value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withRepository(Repository repository) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withRepository(repository); - return this; - } - - /** - * Get the repositoryResourceInfo property: Information regarding the resources created in user's repository. - * - * @return the repositoryResourceInfo value. - */ - public RepositoryResourceInfo repositoryResourceInfo() { - return this.innerProperties() == null ? null : this.innerProperties().repositoryResourceInfo(); - } - - /** - * Set the repositoryResourceInfo property: Information regarding the resources created in user's repository. - * - * @param repositoryResourceInfo the repositoryResourceInfo value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withRepositoryResourceInfo(repositoryResourceInfo); - return this; - } - - /** - * Get the lastDeploymentInfo property: Information regarding the latest deployment for the source control. - * - * @return the lastDeploymentInfo value. - */ - public DeploymentInfo lastDeploymentInfo() { - return this.innerProperties() == null ? null : this.innerProperties().lastDeploymentInfo(); - } - - /** - * Set the lastDeploymentInfo property: Information regarding the latest deployment for the source control. - * - * @param lastDeploymentInfo the lastDeploymentInfo value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withLastDeploymentInfo(lastDeploymentInfo); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java deleted file mode 100644 index c7b2417c0cdc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java +++ /dev/null @@ -1,296 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.ContentType; -import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import com.azure.resourcemanager.securityinsights.models.Repository; -import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; -import com.azure.resourcemanager.securityinsights.models.Version; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes source control properties. */ -@Fluent -public final class SourceControlProperties { - /* - * The id (a Guid) of the source control - */ - @JsonProperty(value = "id") - private String id; - - /* - * The version number associated with the source control - */ - @JsonProperty(value = "version") - private Version version; - - /* - * The display name of the source control - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * A description of the source control - */ - @JsonProperty(value = "description") - private String description; - - /* - * The repository type of the source control - */ - @JsonProperty(value = "repoType", required = true) - private RepoType repoType; - - /* - * Array of source control content types. - */ - @JsonProperty(value = "contentTypes", required = true) - private List contentTypes; - - /* - * Repository metadata. - */ - @JsonProperty(value = "repository", required = true) - private Repository repository; - - /* - * Information regarding the resources created in user's repository. - */ - @JsonProperty(value = "repositoryResourceInfo") - private RepositoryResourceInfo repositoryResourceInfo; - - /* - * Information regarding the latest deployment for the source control. - */ - @JsonProperty(value = "lastDeploymentInfo") - private DeploymentInfo lastDeploymentInfo; - - /** - * Get the id property: The id (a Guid) of the source control. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The id (a Guid) of the source control. - * - * @param id the id value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the version property: The version number associated with the source control. - * - * @return the version value. - */ - public Version version() { - return this.version; - } - - /** - * Set the version property: The version number associated with the source control. - * - * @param version the version value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withVersion(Version version) { - this.version = version; - return this; - } - - /** - * Get the displayName property: The display name of the source control. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the source control. - * - * @param displayName the displayName value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: A description of the source control. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: A description of the source control. - * - * @param description the description value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the repoType property: The repository type of the source control. - * - * @return the repoType value. - */ - public RepoType repoType() { - return this.repoType; - } - - /** - * Set the repoType property: The repository type of the source control. - * - * @param repoType the repoType value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withRepoType(RepoType repoType) { - this.repoType = repoType; - return this; - } - - /** - * Get the contentTypes property: Array of source control content types. - * - * @return the contentTypes value. - */ - public List contentTypes() { - return this.contentTypes; - } - - /** - * Set the contentTypes property: Array of source control content types. - * - * @param contentTypes the contentTypes value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withContentTypes(List contentTypes) { - this.contentTypes = contentTypes; - return this; - } - - /** - * Get the repository property: Repository metadata. - * - * @return the repository value. - */ - public Repository repository() { - return this.repository; - } - - /** - * Set the repository property: Repository metadata. - * - * @param repository the repository value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withRepository(Repository repository) { - this.repository = repository; - return this; - } - - /** - * Get the repositoryResourceInfo property: Information regarding the resources created in user's repository. - * - * @return the repositoryResourceInfo value. - */ - public RepositoryResourceInfo repositoryResourceInfo() { - return this.repositoryResourceInfo; - } - - /** - * Set the repositoryResourceInfo property: Information regarding the resources created in user's repository. - * - * @param repositoryResourceInfo the repositoryResourceInfo value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { - this.repositoryResourceInfo = repositoryResourceInfo; - return this; - } - - /** - * Get the lastDeploymentInfo property: Information regarding the latest deployment for the source control. - * - * @return the lastDeploymentInfo value. - */ - public DeploymentInfo lastDeploymentInfo() { - return this.lastDeploymentInfo; - } - - /** - * Set the lastDeploymentInfo property: Information regarding the latest deployment for the source control. - * - * @param lastDeploymentInfo the lastDeploymentInfo value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { - this.lastDeploymentInfo = lastDeploymentInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model SourceControlProperties")); - } - if (repoType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property repoType in model SourceControlProperties")); - } - if (contentTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property contentTypes in model SourceControlProperties")); - } - if (repository() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property repository in model SourceControlProperties")); - } else { - repository().validate(); - } - if (repositoryResourceInfo() != null) { - repositoryResourceInfo().validate(); - } - if (lastDeploymentInfo() != null) { - lastDeploymentInfo().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SourceControlProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java deleted file mode 100644 index b676b6b71061..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java +++ /dev/null @@ -1,176 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Submission mail entity property bag. */ -@Immutable -public final class SubmissionMailEntityProperties extends EntityCommonProperties { - /* - * The network message id of email to which submission belongs - */ - @JsonProperty(value = "networkMessageId", access = JsonProperty.Access.WRITE_ONLY) - private UUID networkMessageId; - - /* - * The submission id - */ - @JsonProperty(value = "submissionId", access = JsonProperty.Access.WRITE_ONLY) - private UUID submissionId; - - /* - * The submitter - */ - @JsonProperty(value = "submitter", access = JsonProperty.Access.WRITE_ONLY) - private String submitter; - - /* - * The submission date - */ - @JsonProperty(value = "submissionDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime submissionDate; - - /* - * The Time stamp when the message is received (Mail) - */ - @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime timestamp; - - /* - * The recipient of the mail - */ - @JsonProperty(value = "recipient", access = JsonProperty.Access.WRITE_ONLY) - private String recipient; - - /* - * The sender of the mail - */ - @JsonProperty(value = "sender", access = JsonProperty.Access.WRITE_ONLY) - private String sender; - - /* - * The sender's IP - */ - @JsonProperty(value = "senderIp", access = JsonProperty.Access.WRITE_ONLY) - private String senderIp; - - /* - * The subject of submission mail - */ - @JsonProperty(value = "subject", access = JsonProperty.Access.WRITE_ONLY) - private String subject; - - /* - * The submission type for the given instance. This maps to Junk, Phish, Malware or NotJunk. - */ - @JsonProperty(value = "reportType", access = JsonProperty.Access.WRITE_ONLY) - private String reportType; - - /** - * Get the networkMessageId property: The network message id of email to which submission belongs. - * - * @return the networkMessageId value. - */ - public UUID networkMessageId() { - return this.networkMessageId; - } - - /** - * Get the submissionId property: The submission id. - * - * @return the submissionId value. - */ - public UUID submissionId() { - return this.submissionId; - } - - /** - * Get the submitter property: The submitter. - * - * @return the submitter value. - */ - public String submitter() { - return this.submitter; - } - - /** - * Get the submissionDate property: The submission date. - * - * @return the submissionDate value. - */ - public OffsetDateTime submissionDate() { - return this.submissionDate; - } - - /** - * Get the timestamp property: The Time stamp when the message is received (Mail). - * - * @return the timestamp value. - */ - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * Get the recipient property: The recipient of the mail. - * - * @return the recipient value. - */ - public String recipient() { - return this.recipient; - } - - /** - * Get the sender property: The sender of the mail. - * - * @return the sender value. - */ - public String sender() { - return this.sender; - } - - /** - * Get the senderIp property: The sender's IP. - * - * @return the senderIp value. - */ - public String senderIp() { - return this.senderIp; - } - - /** - * Get the subject property: The subject of submission mail. - * - * @return the subject value. - */ - public String subject() { - return this.subject; - } - - /** - * Get the reportType property: The submission type for the given instance. This maps to Junk, Phish, Malware or - * NotJunk. - * - * @return the reportType value. - */ - public String reportType() { - return this.reportType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java deleted file mode 100644 index defd84d01805..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Threat Intelligence Platforms data connector required properties. */ -@Fluent -public final class TICheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public TICheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java deleted file mode 100644 index 62d09af2a1b6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** TI (Threat Intelligence) data connector properties. */ -@Fluent -public final class TIDataConnectorProperties extends DataConnectorTenantId { - /* - * The lookback period for the feed to be imported. - */ - @JsonProperty(value = "tipLookbackPeriod") - private OffsetDateTime tipLookbackPeriod; - - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private TIDataConnectorDataTypes dataTypes; - - /** - * Get the tipLookbackPeriod property: The lookback period for the feed to be imported. - * - * @return the tipLookbackPeriod value. - */ - public OffsetDateTime tipLookbackPeriod() { - return this.tipLookbackPeriod; - } - - /** - * Set the tipLookbackPeriod property: The lookback period for the feed to be imported. - * - * @param tipLookbackPeriod the tipLookbackPeriod value to set. - * @return the TIDataConnectorProperties object itself. - */ - public TIDataConnectorProperties withTipLookbackPeriod(OffsetDateTime tipLookbackPeriod) { - this.tipLookbackPeriod = tipLookbackPeriod; - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public TIDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the TIDataConnectorProperties object itself. - */ - public TIDataConnectorProperties withDataTypes(TIDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public TIDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model TIDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TIDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java deleted file mode 100644 index 9054e9c2939e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java +++ /dev/null @@ -1,96 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Describes team information. */ -@Immutable -public final class TeamInformationInner { - /* - * Team ID - */ - @JsonProperty(value = "teamId", access = JsonProperty.Access.WRITE_ONLY) - private String teamId; - - /* - * The primary channel URL of the team - */ - @JsonProperty(value = "primaryChannelUrl", access = JsonProperty.Access.WRITE_ONLY) - private String primaryChannelUrl; - - /* - * The time the team was created - */ - @JsonProperty(value = "teamCreationTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime teamCreationTimeUtc; - - /* - * The name of the team - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The description of the team - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * Get the teamId property: Team ID. - * - * @return the teamId value. - */ - public String teamId() { - return this.teamId; - } - - /** - * Get the primaryChannelUrl property: The primary channel URL of the team. - * - * @return the primaryChannelUrl value. - */ - public String primaryChannelUrl() { - return this.primaryChannelUrl; - } - - /** - * Get the teamCreationTimeUtc property: The time the team was created. - * - * @return the teamCreationTimeUtc value. - */ - public OffsetDateTime teamCreationTimeUtc() { - return this.teamCreationTimeUtc; - } - - /** - * Get the name property: The name of the team. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the description property: The description of the team. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java deleted file mode 100644 index 3118a288a38b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java +++ /dev/null @@ -1,176 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Threat Intelligence alert rule base property bag. */ -@Fluent -public final class ThreatIntelligenceAlertRuleProperties { - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName", required = true) - private String alertRuleTemplateName; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * Determines whether this alert rule is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The last time that this alert has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) - private AlertSeverity severity; - - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) - private List tactics; - - /* - * The techniques of the alert rule - */ - @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) - private List techniques; - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.alertRuleTemplateName; - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the ThreatIntelligenceAlertRuleProperties object itself. - */ - public ThreatIntelligenceAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ThreatIntelligenceAlertRuleProperties object itself. - */ - public ThreatIntelligenceAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (alertRuleTemplateName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alertRuleTemplateName in model" - + " ThreatIntelligenceAlertRuleProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceAlertRuleProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java deleted file mode 100644 index 2cabad3ea765..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Threat Intelligence alert rule template properties. */ -@Fluent -public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", required = true) - private AlertSeverity severity; - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the ThreatIntelligenceAlertRuleTemplateProperties object itself. - */ - public ThreatIntelligenceAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withTactics(List tactics) { - super.withTactics(tactics); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withTechniques(List techniques) { - super.withTechniques(techniques); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withStatus(TemplateStatus status) { - super.withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model ThreatIntelligenceAlertRuleTemplateProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceAlertRuleTemplateProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java deleted file mode 100644 index 94e3ad449679..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java +++ /dev/null @@ -1,775 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceExternalReference; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceGranularMarkingModel; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceKillChainPhase; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceParsedPattern; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Describes threat intelligence entity properties. */ -@Fluent -public final class ThreatIntelligenceIndicatorProperties extends EntityCommonProperties { - /* - * List of tags - */ - @JsonProperty(value = "threatIntelligenceTags") - private List threatIntelligenceTags; - - /* - * Last updated time in UTC - */ - @JsonProperty(value = "lastUpdatedTimeUtc") - private String lastUpdatedTimeUtc; - - /* - * Source of a threat intelligence entity - */ - @JsonProperty(value = "source") - private String source; - - /* - * Display name of a threat intelligence entity - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Description of a threat intelligence entity - */ - @JsonProperty(value = "description") - private String description; - - /* - * Indicator types of threat intelligence entities - */ - @JsonProperty(value = "indicatorTypes") - private List indicatorTypes; - - /* - * Pattern of a threat intelligence entity - */ - @JsonProperty(value = "pattern") - private String pattern; - - /* - * Pattern type of a threat intelligence entity - */ - @JsonProperty(value = "patternType") - private String patternType; - - /* - * Pattern version of a threat intelligence entity - */ - @JsonProperty(value = "patternVersion") - private String patternVersion; - - /* - * Kill chain phases - */ - @JsonProperty(value = "killChainPhases") - private List killChainPhases; - - /* - * Parsed patterns - */ - @JsonProperty(value = "parsedPattern") - private List parsedPattern; - - /* - * External ID of threat intelligence entity - */ - @JsonProperty(value = "externalId") - private String externalId; - - /* - * Created by reference of threat intelligence entity - */ - @JsonProperty(value = "createdByRef") - private String createdByRef; - - /* - * Is threat intelligence entity defanged - */ - @JsonProperty(value = "defanged") - private Boolean defanged; - - /* - * External last updated time in UTC - */ - @JsonProperty(value = "externalLastUpdatedTimeUtc") - private String externalLastUpdatedTimeUtc; - - /* - * External References - */ - @JsonProperty(value = "externalReferences") - private List externalReferences; - - /* - * Granular Markings - */ - @JsonProperty(value = "granularMarkings") - private List granularMarkings; - - /* - * Labels of threat intelligence entity - */ - @JsonProperty(value = "labels") - private List labels; - - /* - * Is threat intelligence entity revoked - */ - @JsonProperty(value = "revoked") - private Boolean revoked; - - /* - * Confidence of threat intelligence entity - */ - @JsonProperty(value = "confidence") - private Integer confidence; - - /* - * Threat intelligence entity object marking references - */ - @JsonProperty(value = "objectMarkingRefs") - private List objectMarkingRefs; - - /* - * Language of threat intelligence entity - */ - @JsonProperty(value = "language") - private String language; - - /* - * Threat types - */ - @JsonProperty(value = "threatTypes") - private List threatTypes; - - /* - * Valid from - */ - @JsonProperty(value = "validFrom") - private String validFrom; - - /* - * Valid until - */ - @JsonProperty(value = "validUntil") - private String validUntil; - - /* - * Created by - */ - @JsonProperty(value = "created") - private String created; - - /* - * Modified by - */ - @JsonProperty(value = "modified") - private String modified; - - /* - * Extensions map - */ - @JsonProperty(value = "extensions") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map extensions; - - /** - * Get the threatIntelligenceTags property: List of tags. - * - * @return the threatIntelligenceTags value. - */ - public List threatIntelligenceTags() { - return this.threatIntelligenceTags; - } - - /** - * Set the threatIntelligenceTags property: List of tags. - * - * @param threatIntelligenceTags the threatIntelligenceTags value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withThreatIntelligenceTags(List threatIntelligenceTags) { - this.threatIntelligenceTags = threatIntelligenceTags; - return this; - } - - /** - * Get the lastUpdatedTimeUtc property: Last updated time in UTC. - * - * @return the lastUpdatedTimeUtc value. - */ - public String lastUpdatedTimeUtc() { - return this.lastUpdatedTimeUtc; - } - - /** - * Set the lastUpdatedTimeUtc property: Last updated time in UTC. - * - * @param lastUpdatedTimeUtc the lastUpdatedTimeUtc value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withLastUpdatedTimeUtc(String lastUpdatedTimeUtc) { - this.lastUpdatedTimeUtc = lastUpdatedTimeUtc; - return this; - } - - /** - * Get the source property: Source of a threat intelligence entity. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Set the source property: Source of a threat intelligence entity. - * - * @param source the source value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the displayName property: Display name of a threat intelligence entity. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of a threat intelligence entity. - * - * @param displayName the displayName value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: Description of a threat intelligence entity. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of a threat intelligence entity. - * - * @param description the description value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the indicatorTypes property: Indicator types of threat intelligence entities. - * - * @return the indicatorTypes value. - */ - public List indicatorTypes() { - return this.indicatorTypes; - } - - /** - * Set the indicatorTypes property: Indicator types of threat intelligence entities. - * - * @param indicatorTypes the indicatorTypes value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withIndicatorTypes(List indicatorTypes) { - this.indicatorTypes = indicatorTypes; - return this; - } - - /** - * Get the pattern property: Pattern of a threat intelligence entity. - * - * @return the pattern value. - */ - public String pattern() { - return this.pattern; - } - - /** - * Set the pattern property: Pattern of a threat intelligence entity. - * - * @param pattern the pattern value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withPattern(String pattern) { - this.pattern = pattern; - return this; - } - - /** - * Get the patternType property: Pattern type of a threat intelligence entity. - * - * @return the patternType value. - */ - public String patternType() { - return this.patternType; - } - - /** - * Set the patternType property: Pattern type of a threat intelligence entity. - * - * @param patternType the patternType value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withPatternType(String patternType) { - this.patternType = patternType; - return this; - } - - /** - * Get the patternVersion property: Pattern version of a threat intelligence entity. - * - * @return the patternVersion value. - */ - public String patternVersion() { - return this.patternVersion; - } - - /** - * Set the patternVersion property: Pattern version of a threat intelligence entity. - * - * @param patternVersion the patternVersion value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withPatternVersion(String patternVersion) { - this.patternVersion = patternVersion; - return this; - } - - /** - * Get the killChainPhases property: Kill chain phases. - * - * @return the killChainPhases value. - */ - public List killChainPhases() { - return this.killChainPhases; - } - - /** - * Set the killChainPhases property: Kill chain phases. - * - * @param killChainPhases the killChainPhases value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withKillChainPhases( - List killChainPhases) { - this.killChainPhases = killChainPhases; - return this; - } - - /** - * Get the parsedPattern property: Parsed patterns. - * - * @return the parsedPattern value. - */ - public List parsedPattern() { - return this.parsedPattern; - } - - /** - * Set the parsedPattern property: Parsed patterns. - * - * @param parsedPattern the parsedPattern value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withParsedPattern( - List parsedPattern) { - this.parsedPattern = parsedPattern; - return this; - } - - /** - * Get the externalId property: External ID of threat intelligence entity. - * - * @return the externalId value. - */ - public String externalId() { - return this.externalId; - } - - /** - * Set the externalId property: External ID of threat intelligence entity. - * - * @param externalId the externalId value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withExternalId(String externalId) { - this.externalId = externalId; - return this; - } - - /** - * Get the createdByRef property: Created by reference of threat intelligence entity. - * - * @return the createdByRef value. - */ - public String createdByRef() { - return this.createdByRef; - } - - /** - * Set the createdByRef property: Created by reference of threat intelligence entity. - * - * @param createdByRef the createdByRef value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withCreatedByRef(String createdByRef) { - this.createdByRef = createdByRef; - return this; - } - - /** - * Get the defanged property: Is threat intelligence entity defanged. - * - * @return the defanged value. - */ - public Boolean defanged() { - return this.defanged; - } - - /** - * Set the defanged property: Is threat intelligence entity defanged. - * - * @param defanged the defanged value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withDefanged(Boolean defanged) { - this.defanged = defanged; - return this; - } - - /** - * Get the externalLastUpdatedTimeUtc property: External last updated time in UTC. - * - * @return the externalLastUpdatedTimeUtc value. - */ - public String externalLastUpdatedTimeUtc() { - return this.externalLastUpdatedTimeUtc; - } - - /** - * Set the externalLastUpdatedTimeUtc property: External last updated time in UTC. - * - * @param externalLastUpdatedTimeUtc the externalLastUpdatedTimeUtc value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withExternalLastUpdatedTimeUtc(String externalLastUpdatedTimeUtc) { - this.externalLastUpdatedTimeUtc = externalLastUpdatedTimeUtc; - return this; - } - - /** - * Get the externalReferences property: External References. - * - * @return the externalReferences value. - */ - public List externalReferences() { - return this.externalReferences; - } - - /** - * Set the externalReferences property: External References. - * - * @param externalReferences the externalReferences value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withExternalReferences( - List externalReferences) { - this.externalReferences = externalReferences; - return this; - } - - /** - * Get the granularMarkings property: Granular Markings. - * - * @return the granularMarkings value. - */ - public List granularMarkings() { - return this.granularMarkings; - } - - /** - * Set the granularMarkings property: Granular Markings. - * - * @param granularMarkings the granularMarkings value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withGranularMarkings( - List granularMarkings) { - this.granularMarkings = granularMarkings; - return this; - } - - /** - * Get the labels property: Labels of threat intelligence entity. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: Labels of threat intelligence entity. - * - * @param labels the labels value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Get the revoked property: Is threat intelligence entity revoked. - * - * @return the revoked value. - */ - public Boolean revoked() { - return this.revoked; - } - - /** - * Set the revoked property: Is threat intelligence entity revoked. - * - * @param revoked the revoked value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withRevoked(Boolean revoked) { - this.revoked = revoked; - return this; - } - - /** - * Get the confidence property: Confidence of threat intelligence entity. - * - * @return the confidence value. - */ - public Integer confidence() { - return this.confidence; - } - - /** - * Set the confidence property: Confidence of threat intelligence entity. - * - * @param confidence the confidence value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withConfidence(Integer confidence) { - this.confidence = confidence; - return this; - } - - /** - * Get the objectMarkingRefs property: Threat intelligence entity object marking references. - * - * @return the objectMarkingRefs value. - */ - public List objectMarkingRefs() { - return this.objectMarkingRefs; - } - - /** - * Set the objectMarkingRefs property: Threat intelligence entity object marking references. - * - * @param objectMarkingRefs the objectMarkingRefs value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withObjectMarkingRefs(List objectMarkingRefs) { - this.objectMarkingRefs = objectMarkingRefs; - return this; - } - - /** - * Get the language property: Language of threat intelligence entity. - * - * @return the language value. - */ - public String language() { - return this.language; - } - - /** - * Set the language property: Language of threat intelligence entity. - * - * @param language the language value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withLanguage(String language) { - this.language = language; - return this; - } - - /** - * Get the threatTypes property: Threat types. - * - * @return the threatTypes value. - */ - public List threatTypes() { - return this.threatTypes; - } - - /** - * Set the threatTypes property: Threat types. - * - * @param threatTypes the threatTypes value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withThreatTypes(List threatTypes) { - this.threatTypes = threatTypes; - return this; - } - - /** - * Get the validFrom property: Valid from. - * - * @return the validFrom value. - */ - public String validFrom() { - return this.validFrom; - } - - /** - * Set the validFrom property: Valid from. - * - * @param validFrom the validFrom value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withValidFrom(String validFrom) { - this.validFrom = validFrom; - return this; - } - - /** - * Get the validUntil property: Valid until. - * - * @return the validUntil value. - */ - public String validUntil() { - return this.validUntil; - } - - /** - * Set the validUntil property: Valid until. - * - * @param validUntil the validUntil value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withValidUntil(String validUntil) { - this.validUntil = validUntil; - return this; - } - - /** - * Get the created property: Created by. - * - * @return the created value. - */ - public String created() { - return this.created; - } - - /** - * Set the created property: Created by. - * - * @param created the created value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withCreated(String created) { - this.created = created; - return this; - } - - /** - * Get the modified property: Modified by. - * - * @return the modified value. - */ - public String modified() { - return this.modified; - } - - /** - * Set the modified property: Modified by. - * - * @param modified the modified value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withModified(String modified) { - this.modified = modified; - return this; - } - - /** - * Get the extensions property: Extensions map. - * - * @return the extensions value. - */ - public Map extensions() { - return this.extensions; - } - - /** - * Set the extensions property: Extensions map. - * - * @param extensions the extensions value to set. - * @return the ThreatIntelligenceIndicatorProperties object itself. - */ - public ThreatIntelligenceIndicatorProperties withExtensions(Map extensions) { - this.extensions = extensions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (killChainPhases() != null) { - killChainPhases().forEach(e -> e.validate()); - } - if (parsedPattern() != null) { - parsedPattern().forEach(e -> e.validate()); - } - if (externalReferences() != null) { - externalReferences().forEach(e -> e.validate()); - } - if (granularMarkings() != null) { - granularMarkings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java deleted file mode 100644 index 66c6f53009c5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java +++ /dev/null @@ -1,40 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Threat intelligence information object. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = ThreatIntelligenceInformationInner.class) -@JsonTypeName("ThreatIntelligenceInformation") -@JsonSubTypes({@JsonSubTypes.Type(name = "indicator", value = ThreatIntelligenceIndicatorModel.class)}) -@Fluent -public class ThreatIntelligenceInformationInner extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceInformationInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java deleted file mode 100644 index fccc6810b44c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java +++ /dev/null @@ -1,59 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceMetrics; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the threat intelligence metric fields (type/threat type/source). */ -@Fluent -public final class ThreatIntelligenceMetricsListInner { - /* - * Array of threat intelligence metric fields (type/threat type/source). - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the value property: Array of threat intelligence metric fields (type/threat type/source). - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of threat intelligence metric fields (type/threat type/source). - * - * @param value the value value to set. - * @return the ThreatIntelligenceMetricsListInner object itself. - */ - public ThreatIntelligenceMetricsListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ThreatIntelligenceMetricsListInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceMetricsListInner.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java deleted file mode 100644 index e65e280aade2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Threat Intelligence TAXII data connector required properties. */ -@Fluent -public final class TiTaxiiCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public TiTaxiiCheckRequirementsProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java deleted file mode 100644 index 2faf94e2db69..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java +++ /dev/null @@ -1,284 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.azure.resourcemanager.securityinsights.models.PollingFrequency; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Threat Intelligence TAXII data connector properties. */ -@Fluent -public final class TiTaxiiDataConnectorProperties extends DataConnectorTenantId { - /* - * The workspace id. - */ - @JsonProperty(value = "workspaceId") - private String workspaceId; - - /* - * The friendly name for the TAXII server. - */ - @JsonProperty(value = "friendlyName") - private String friendlyName; - - /* - * The API root for the TAXII server. - */ - @JsonProperty(value = "taxiiServer") - private String taxiiServer; - - /* - * The collection id of the TAXII server. - */ - @JsonProperty(value = "collectionId") - private String collectionId; - - /* - * The userName for the TAXII server. - */ - @JsonProperty(value = "userName") - private String username; - - /* - * The password for the TAXII server. - */ - @JsonProperty(value = "password") - private String password; - - /* - * The lookback period for the TAXII server. - */ - @JsonProperty(value = "taxiiLookbackPeriod") - private OffsetDateTime taxiiLookbackPeriod; - - /* - * The polling frequency for the TAXII server. - */ - @JsonProperty(value = "pollingFrequency", required = true) - private PollingFrequency pollingFrequency; - - /* - * The available data types for Threat Intelligence TAXII data connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private TiTaxiiDataConnectorDataTypes dataTypes; - - /** - * Get the workspaceId property: The workspace id. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Set the workspaceId property: The workspace id. - * - * @param workspaceId the workspaceId value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - return this; - } - - /** - * Get the friendlyName property: The friendly name for the TAXII server. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The friendly name for the TAXII server. - * - * @param friendlyName the friendlyName value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the taxiiServer property: The API root for the TAXII server. - * - * @return the taxiiServer value. - */ - public String taxiiServer() { - return this.taxiiServer; - } - - /** - * Set the taxiiServer property: The API root for the TAXII server. - * - * @param taxiiServer the taxiiServer value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withTaxiiServer(String taxiiServer) { - this.taxiiServer = taxiiServer; - return this; - } - - /** - * Get the collectionId property: The collection id of the TAXII server. - * - * @return the collectionId value. - */ - public String collectionId() { - return this.collectionId; - } - - /** - * Set the collectionId property: The collection id of the TAXII server. - * - * @param collectionId the collectionId value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withCollectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Get the username property: The userName for the TAXII server. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The userName for the TAXII server. - * - * @param username the username value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password for the TAXII server. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password for the TAXII server. - * - * @param password the password value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the taxiiLookbackPeriod property: The lookback period for the TAXII server. - * - * @return the taxiiLookbackPeriod value. - */ - public OffsetDateTime taxiiLookbackPeriod() { - return this.taxiiLookbackPeriod; - } - - /** - * Set the taxiiLookbackPeriod property: The lookback period for the TAXII server. - * - * @param taxiiLookbackPeriod the taxiiLookbackPeriod value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withTaxiiLookbackPeriod(OffsetDateTime taxiiLookbackPeriod) { - this.taxiiLookbackPeriod = taxiiLookbackPeriod; - return this; - } - - /** - * Get the pollingFrequency property: The polling frequency for the TAXII server. - * - * @return the pollingFrequency value. - */ - public PollingFrequency pollingFrequency() { - return this.pollingFrequency; - } - - /** - * Set the pollingFrequency property: The polling frequency for the TAXII server. - * - * @param pollingFrequency the pollingFrequency value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withPollingFrequency(PollingFrequency pollingFrequency) { - this.pollingFrequency = pollingFrequency; - return this; - } - - /** - * Get the dataTypes property: The available data types for Threat Intelligence TAXII data connector. - * - * @return the dataTypes value. - */ - public TiTaxiiDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for Threat Intelligence TAXII data connector. - * - * @param dataTypes the dataTypes value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withDataTypes(TiTaxiiDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public TiTaxiiDataConnectorProperties withTenantId(String tenantId) { - super.withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (pollingFrequency() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property pollingFrequency in model TiTaxiiDataConnectorProperties")); - } - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model TiTaxiiDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TiTaxiiDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java deleted file mode 100644 index 9a9c6252b395..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.UebaDataSources; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Ueba property bag. */ -@Fluent -public final class UebaProperties { - /* - * The relevant data sources that enriched by ueba - */ - @JsonProperty(value = "dataSources") - private List dataSources; - - /** - * Get the dataSources property: The relevant data sources that enriched by ueba. - * - * @return the dataSources value. - */ - public List dataSources() { - return this.dataSources; - } - - /** - * Set the dataSources property: The relevant data sources that enriched by ueba. - * - * @param dataSources the dataSources value to set. - * @return the UebaProperties object itself. - */ - public UebaProperties withDataSources(List dataSources) { - this.dataSources = dataSources; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java deleted file mode 100644 index 833855a5cdd7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Url entity property bag. */ -@Immutable -public final class UrlEntityProperties extends EntityCommonProperties { - /* - * A full URL the entity points to - */ - @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) - private String url; - - /** - * Get the url property: A full URL the entity points to. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java deleted file mode 100644 index 14c1ca299bc2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java +++ /dev/null @@ -1,544 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.SourceType; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents a Watchlist in Azure Security Insights. */ -@Fluent -public final class WatchlistInner extends ResourceWithEtag { - /* - * Watchlist properties - */ - @JsonProperty(value = "properties") - private WatchlistProperties innerProperties; - - /** - * Get the innerProperties property: Watchlist properties. - * - * @return the innerProperties value. - */ - private WatchlistProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public WatchlistInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the watchlistId property: The id (a Guid) of the watchlist. - * - * @return the watchlistId value. - */ - public String watchlistId() { - return this.innerProperties() == null ? null : this.innerProperties().watchlistId(); - } - - /** - * Set the watchlistId property: The id (a Guid) of the watchlist. - * - * @param watchlistId the watchlistId value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withWatchlistId(String watchlistId) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withWatchlistId(watchlistId); - return this; - } - - /** - * Get the displayName property: The display name of the watchlist. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name of the watchlist. - * - * @param displayName the displayName value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the provider property: The provider of the watchlist. - * - * @return the provider value. - */ - public String provider() { - return this.innerProperties() == null ? null : this.innerProperties().provider(); - } - - /** - * Set the provider property: The provider of the watchlist. - * - * @param provider the provider value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withProvider(String provider) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withProvider(provider); - return this; - } - - /** - * Get the source property: The filename of the watchlist, called 'source'. - * - * @return the source value. - */ - public String source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: The filename of the watchlist, called 'source'. - * - * @param source the source value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withSource(String source) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the sourceType property: The sourceType of the watchlist. - * - * @return the sourceType value. - */ - public SourceType sourceType() { - return this.innerProperties() == null ? null : this.innerProperties().sourceType(); - } - - /** - * Set the sourceType property: The sourceType of the watchlist. - * - * @param sourceType the sourceType value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withSourceType(SourceType sourceType) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withSourceType(sourceType); - return this; - } - - /** - * Get the created property: The time the watchlist was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); - } - - /** - * Set the created property: The time the watchlist was created. - * - * @param created the created value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withCreated(OffsetDateTime created) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withCreated(created); - return this; - } - - /** - * Get the updated property: The last time the watchlist was updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.innerProperties() == null ? null : this.innerProperties().updated(); - } - - /** - * Set the updated property: The last time the watchlist was updated. - * - * @param updated the updated value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withUpdated(OffsetDateTime updated) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withUpdated(updated); - return this; - } - - /** - * Get the createdBy property: Describes a user that created the watchlist. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); - } - - /** - * Set the createdBy property: Describes a user that created the watchlist. - * - * @param createdBy the createdBy value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withCreatedBy(UserInfo createdBy) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withCreatedBy(createdBy); - return this; - } - - /** - * Get the updatedBy property: Describes a user that updated the watchlist. - * - * @return the updatedBy value. - */ - public UserInfo updatedBy() { - return this.innerProperties() == null ? null : this.innerProperties().updatedBy(); - } - - /** - * Set the updatedBy property: Describes a user that updated the watchlist. - * - * @param updatedBy the updatedBy value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withUpdatedBy(UserInfo updatedBy) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withUpdatedBy(updatedBy); - return this; - } - - /** - * Get the description property: A description of the watchlist. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: A description of the watchlist. - * - * @param description the description value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the watchlistType property: The type of the watchlist. - * - * @return the watchlistType value. - */ - public String watchlistType() { - return this.innerProperties() == null ? null : this.innerProperties().watchlistType(); - } - - /** - * Set the watchlistType property: The type of the watchlist. - * - * @param watchlistType the watchlistType value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withWatchlistType(String watchlistType) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withWatchlistType(watchlistType); - return this; - } - - /** - * Get the watchlistAlias property: The alias of the watchlist. - * - * @return the watchlistAlias value. - */ - public String watchlistAlias() { - return this.innerProperties() == null ? null : this.innerProperties().watchlistAlias(); - } - - /** - * Set the watchlistAlias property: The alias of the watchlist. - * - * @param watchlistAlias the watchlistAlias value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withWatchlistAlias(String watchlistAlias) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withWatchlistAlias(watchlistAlias); - return this; - } - - /** - * Get the isDeleted property: A flag that indicates if the watchlist is deleted or not. - * - * @return the isDeleted value. - */ - public Boolean isDeleted() { - return this.innerProperties() == null ? null : this.innerProperties().isDeleted(); - } - - /** - * Set the isDeleted property: A flag that indicates if the watchlist is deleted or not. - * - * @param isDeleted the isDeleted value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withIsDeleted(Boolean isDeleted) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withIsDeleted(isDeleted); - return this; - } - - /** - * Get the labels property: List of labels relevant to this watchlist. - * - * @return the labels value. - */ - public List labels() { - return this.innerProperties() == null ? null : this.innerProperties().labels(); - } - - /** - * Set the labels property: List of labels relevant to this watchlist. - * - * @param labels the labels value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withLabels(List labels) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withLabels(labels); - return this; - } - - /** - * Get the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration format). - * - * @return the defaultDuration value. - */ - public Duration defaultDuration() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDuration(); - } - - /** - * Set the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration format). - * - * @param defaultDuration the defaultDuration value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withDefaultDuration(Duration defaultDuration) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withDefaultDuration(defaultDuration); - return this; - } - - /** - * Get the tenantId property: The tenantId where the watchlist belongs to. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenantId where the watchlist belongs to. - * - * @param tenantId the tenantId value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Get the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. - * - * @return the numberOfLinesToSkip value. - */ - public Integer numberOfLinesToSkip() { - return this.innerProperties() == null ? null : this.innerProperties().numberOfLinesToSkip(); - } - - /** - * Set the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. - * - * @param numberOfLinesToSkip the numberOfLinesToSkip value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withNumberOfLinesToSkip(Integer numberOfLinesToSkip) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withNumberOfLinesToSkip(numberOfLinesToSkip); - return this; - } - - /** - * Get the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. - * - * @return the rawContent value. - */ - public String rawContent() { - return this.innerProperties() == null ? null : this.innerProperties().rawContent(); - } - - /** - * Set the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. - * - * @param rawContent the rawContent value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withRawContent(String rawContent) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withRawContent(rawContent); - 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 - * use this field as the key field when joining to other event data by IP address. - * - * @return the itemsSearchKey value. - */ - public String itemsSearchKey() { - return this.innerProperties() == null ? null : this.innerProperties().itemsSearchKey(); - } - - /** - * Set 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 - * use this field as the key field when joining to other event data by IP address. - * - * @param itemsSearchKey the itemsSearchKey value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withItemsSearchKey(String itemsSearchKey) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withItemsSearchKey(itemsSearchKey); - return this; - } - - /** - * Get the contentType property: The content type of the raw content. Example : text/csv or text/tsv. - * - * @return the contentType value. - */ - public String contentType() { - return this.innerProperties() == null ? null : this.innerProperties().contentType(); - } - - /** - * Set the contentType property: The content type of the raw content. Example : text/csv or text/tsv. - * - * @param contentType the contentType value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withContentType(String contentType) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withContentType(contentType); - return this; - } - - /** - * Get the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * - * @return the uploadStatus value. - */ - public String uploadStatus() { - return this.innerProperties() == null ? null : this.innerProperties().uploadStatus(); - } - - /** - * Set the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * - * @param uploadStatus the uploadStatus value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withUploadStatus(String uploadStatus) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withUploadStatus(uploadStatus); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java deleted file mode 100644 index e7424ae99545..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java +++ /dev/null @@ -1,281 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Represents a Watchlist item in Azure Security Insights. */ -@Fluent -public final class WatchlistItemInner extends ResourceWithEtag { - /* - * Watchlist Item properties - */ - @JsonProperty(value = "properties") - private WatchlistItemProperties innerProperties; - - /** - * Get the innerProperties property: Watchlist Item properties. - * - * @return the innerProperties value. - */ - private WatchlistItemProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public WatchlistItemInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the watchlistItemType property: The type of the watchlist item. - * - * @return the watchlistItemType value. - */ - public String watchlistItemType() { - return this.innerProperties() == null ? null : this.innerProperties().watchlistItemType(); - } - - /** - * Set the watchlistItemType property: The type of the watchlist item. - * - * @param watchlistItemType the watchlistItemType value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withWatchlistItemType(String watchlistItemType) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withWatchlistItemType(watchlistItemType); - return this; - } - - /** - * Get the watchlistItemId property: The id (a Guid) of the watchlist item. - * - * @return the watchlistItemId value. - */ - public String watchlistItemId() { - return this.innerProperties() == null ? null : this.innerProperties().watchlistItemId(); - } - - /** - * Set the watchlistItemId property: The id (a Guid) of the watchlist item. - * - * @param watchlistItemId the watchlistItemId value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withWatchlistItemId(String watchlistItemId) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withWatchlistItemId(watchlistItemId); - return this; - } - - /** - * Get the tenantId property: The tenantId to which the watchlist item belongs to. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenantId to which the watchlist item belongs to. - * - * @param tenantId the tenantId value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Get the isDeleted property: A flag that indicates if the watchlist item is deleted or not. - * - * @return the isDeleted value. - */ - public Boolean isDeleted() { - return this.innerProperties() == null ? null : this.innerProperties().isDeleted(); - } - - /** - * Set the isDeleted property: A flag that indicates if the watchlist item is deleted or not. - * - * @param isDeleted the isDeleted value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withIsDeleted(Boolean isDeleted) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withIsDeleted(isDeleted); - return this; - } - - /** - * Get the created property: The time the watchlist item was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); - } - - /** - * Set the created property: The time the watchlist item was created. - * - * @param created the created value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withCreated(OffsetDateTime created) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withCreated(created); - return this; - } - - /** - * Get the updated property: The last time the watchlist item was updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.innerProperties() == null ? null : this.innerProperties().updated(); - } - - /** - * Set the updated property: The last time the watchlist item was updated. - * - * @param updated the updated value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withUpdated(OffsetDateTime updated) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withUpdated(updated); - return this; - } - - /** - * Get the createdBy property: Describes a user that created the watchlist item. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); - } - - /** - * Set the createdBy property: Describes a user that created the watchlist item. - * - * @param createdBy the createdBy value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withCreatedBy(UserInfo createdBy) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withCreatedBy(createdBy); - return this; - } - - /** - * Get the updatedBy property: Describes a user that updated the watchlist item. - * - * @return the updatedBy value. - */ - public UserInfo updatedBy() { - return this.innerProperties() == null ? null : this.innerProperties().updatedBy(); - } - - /** - * Set the updatedBy property: Describes a user that updated the watchlist item. - * - * @param updatedBy the updatedBy value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withUpdatedBy(UserInfo updatedBy) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withUpdatedBy(updatedBy); - return this; - } - - /** - * Get the itemsKeyValue property: key-value pairs for a watchlist item. - * - * @return the itemsKeyValue value. - */ - public Map itemsKeyValue() { - return this.innerProperties() == null ? null : this.innerProperties().itemsKeyValue(); - } - - /** - * Set the itemsKeyValue property: key-value pairs for a watchlist item. - * - * @param itemsKeyValue the itemsKeyValue value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withItemsKeyValue(Map itemsKeyValue) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withItemsKeyValue(itemsKeyValue); - return this; - } - - /** - * Get the entityMapping property: key-value pairs for a watchlist item entity mapping. - * - * @return the entityMapping value. - */ - public Map entityMapping() { - return this.innerProperties() == null ? null : this.innerProperties().entityMapping(); - } - - /** - * Set the entityMapping property: key-value pairs for a watchlist item entity mapping. - * - * @param entityMapping the entityMapping value to set. - * @return the WatchlistItemInner object itself. - */ - public WatchlistItemInner withEntityMapping(Map entityMapping) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistItemProperties(); - } - this.innerProperties().withEntityMapping(entityMapping); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java deleted file mode 100644 index b33026a9990e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java +++ /dev/null @@ -1,301 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Describes watchlist item properties. */ -@Fluent -public final class WatchlistItemProperties { - /* - * The type of the watchlist item - */ - @JsonProperty(value = "watchlistItemType") - private String watchlistItemType; - - /* - * The id (a Guid) of the watchlist item - */ - @JsonProperty(value = "watchlistItemId") - private String watchlistItemId; - - /* - * The tenantId to which the watchlist item belongs to - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /* - * A flag that indicates if the watchlist item is deleted or not - */ - @JsonProperty(value = "isDeleted") - private Boolean isDeleted; - - /* - * The time the watchlist item was created - */ - @JsonProperty(value = "created") - private OffsetDateTime created; - - /* - * The last time the watchlist item was updated - */ - @JsonProperty(value = "updated") - private OffsetDateTime updated; - - /* - * Describes a user that created the watchlist item - */ - @JsonProperty(value = "createdBy") - private UserInfo createdBy; - - /* - * Describes a user that updated the watchlist item - */ - @JsonProperty(value = "updatedBy") - private UserInfo updatedBy; - - /* - * key-value pairs for a watchlist item - */ - @JsonProperty(value = "itemsKeyValue", required = true) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map itemsKeyValue; - - /* - * key-value pairs for a watchlist item entity mapping - */ - @JsonProperty(value = "entityMapping") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map entityMapping; - - /** - * Get the watchlistItemType property: The type of the watchlist item. - * - * @return the watchlistItemType value. - */ - public String watchlistItemType() { - return this.watchlistItemType; - } - - /** - * Set the watchlistItemType property: The type of the watchlist item. - * - * @param watchlistItemType the watchlistItemType value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withWatchlistItemType(String watchlistItemType) { - this.watchlistItemType = watchlistItemType; - return this; - } - - /** - * Get the watchlistItemId property: The id (a Guid) of the watchlist item. - * - * @return the watchlistItemId value. - */ - public String watchlistItemId() { - return this.watchlistItemId; - } - - /** - * Set the watchlistItemId property: The id (a Guid) of the watchlist item. - * - * @param watchlistItemId the watchlistItemId value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withWatchlistItemId(String watchlistItemId) { - this.watchlistItemId = watchlistItemId; - return this; - } - - /** - * Get the tenantId property: The tenantId to which the watchlist item belongs to. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenantId to which the watchlist item belongs to. - * - * @param tenantId the tenantId value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the isDeleted property: A flag that indicates if the watchlist item is deleted or not. - * - * @return the isDeleted value. - */ - public Boolean isDeleted() { - return this.isDeleted; - } - - /** - * Set the isDeleted property: A flag that indicates if the watchlist item is deleted or not. - * - * @param isDeleted the isDeleted value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * Get the created property: The time the watchlist item was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Set the created property: The time the watchlist item was created. - * - * @param created the created value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withCreated(OffsetDateTime created) { - this.created = created; - return this; - } - - /** - * Get the updated property: The last time the watchlist item was updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.updated; - } - - /** - * Set the updated property: The last time the watchlist item was updated. - * - * @param updated the updated value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withUpdated(OffsetDateTime updated) { - this.updated = updated; - return this; - } - - /** - * Get the createdBy property: Describes a user that created the watchlist item. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: Describes a user that created the watchlist item. - * - * @param createdBy the createdBy value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withCreatedBy(UserInfo createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the updatedBy property: Describes a user that updated the watchlist item. - * - * @return the updatedBy value. - */ - public UserInfo updatedBy() { - return this.updatedBy; - } - - /** - * Set the updatedBy property: Describes a user that updated the watchlist item. - * - * @param updatedBy the updatedBy value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withUpdatedBy(UserInfo updatedBy) { - this.updatedBy = updatedBy; - return this; - } - - /** - * Get the itemsKeyValue property: key-value pairs for a watchlist item. - * - * @return the itemsKeyValue value. - */ - public Map itemsKeyValue() { - return this.itemsKeyValue; - } - - /** - * Set the itemsKeyValue property: key-value pairs for a watchlist item. - * - * @param itemsKeyValue the itemsKeyValue value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withItemsKeyValue(Map itemsKeyValue) { - this.itemsKeyValue = itemsKeyValue; - return this; - } - - /** - * Get the entityMapping property: key-value pairs for a watchlist item entity mapping. - * - * @return the entityMapping value. - */ - public Map entityMapping() { - return this.entityMapping; - } - - /** - * Set the entityMapping property: key-value pairs for a watchlist item entity mapping. - * - * @param entityMapping the entityMapping value to set. - * @return the WatchlistItemProperties object itself. - */ - public WatchlistItemProperties withEntityMapping(Map entityMapping) { - this.entityMapping = entityMapping; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (createdBy() != null) { - createdBy().validate(); - } - if (updatedBy() != null) { - updatedBy().validate(); - } - if (itemsKeyValue() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property itemsKeyValue in model WatchlistItemProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WatchlistItemProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java deleted file mode 100644 index 97fa95571482..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java +++ /dev/null @@ -1,608 +0,0 @@ -// 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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.SourceType; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; - -/** Describes watchlist properties. */ -@Fluent -public final class WatchlistProperties { - /* - * The id (a Guid) of the watchlist - */ - @JsonProperty(value = "watchlistId") - private String watchlistId; - - /* - * The display name of the watchlist - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * The provider of the watchlist - */ - @JsonProperty(value = "provider", required = true) - private String provider; - - /* - * The filename of the watchlist, called 'source' - */ - @JsonProperty(value = "source") - private String source; - - /* - * The sourceType of the watchlist - */ - @JsonProperty(value = "sourceType") - private SourceType sourceType; - - /* - * The time the watchlist was created - */ - @JsonProperty(value = "created") - private OffsetDateTime created; - - /* - * The last time the watchlist was updated - */ - @JsonProperty(value = "updated") - private OffsetDateTime updated; - - /* - * Describes a user that created the watchlist - */ - @JsonProperty(value = "createdBy") - private UserInfo createdBy; - - /* - * Describes a user that updated the watchlist - */ - @JsonProperty(value = "updatedBy") - private UserInfo updatedBy; - - /* - * A description of the watchlist - */ - @JsonProperty(value = "description") - private String description; - - /* - * The type of the watchlist - */ - @JsonProperty(value = "watchlistType") - private String watchlistType; - - /* - * The alias of the watchlist - */ - @JsonProperty(value = "watchlistAlias") - private String watchlistAlias; - - /* - * A flag that indicates if the watchlist is deleted or not - */ - @JsonProperty(value = "isDeleted") - private Boolean isDeleted; - - /* - * List of labels relevant to this watchlist - */ - @JsonProperty(value = "labels") - private List labels; - - /* - * The default duration of a watchlist (in ISO 8601 duration format) - */ - @JsonProperty(value = "defaultDuration") - private Duration defaultDuration; - - /* - * The tenantId where the watchlist belongs to - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /* - * The number of lines in a csv/tsv content to skip before the header - */ - @JsonProperty(value = "numberOfLinesToSkip") - private Integer numberOfLinesToSkip; - - /* - * The raw content that represents to watchlist items to create. In case of csv/tsv content type, it's the content - * of the file that will parsed by the endpoint - */ - @JsonProperty(value = "rawContent") - private String rawContent; - - /* - * 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 use this field as the key - * field when joining to other event data by IP address. - */ - @JsonProperty(value = "itemsSearchKey", required = true) - private String itemsSearchKey; - - /* - * The content type of the raw content. Example : text/csv or text/tsv - */ - @JsonProperty(value = "contentType") - private String contentType; - - /* - * The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a Watchlist upload status is - * equal to InProgress, the Watchlist cannot be deleted - */ - @JsonProperty(value = "uploadStatus") - private String uploadStatus; - - /** - * Get the watchlistId property: The id (a Guid) of the watchlist. - * - * @return the watchlistId value. - */ - public String watchlistId() { - return this.watchlistId; - } - - /** - * Set the watchlistId property: The id (a Guid) of the watchlist. - * - * @param watchlistId the watchlistId value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withWatchlistId(String watchlistId) { - this.watchlistId = watchlistId; - return this; - } - - /** - * Get the displayName property: The display name of the watchlist. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the watchlist. - * - * @param displayName the displayName value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the provider property: The provider of the watchlist. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: The provider of the watchlist. - * - * @param provider the provider value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the source property: The filename of the watchlist, called 'source'. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Set the source property: The filename of the watchlist, called 'source'. - * - * @param source the source value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the sourceType property: The sourceType of the watchlist. - * - * @return the sourceType value. - */ - public SourceType sourceType() { - return this.sourceType; - } - - /** - * Set the sourceType property: The sourceType of the watchlist. - * - * @param sourceType the sourceType value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withSourceType(SourceType sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get the created property: The time the watchlist was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Set the created property: The time the watchlist was created. - * - * @param created the created value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withCreated(OffsetDateTime created) { - this.created = created; - return this; - } - - /** - * Get the updated property: The last time the watchlist was updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.updated; - } - - /** - * Set the updated property: The last time the watchlist was updated. - * - * @param updated the updated value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withUpdated(OffsetDateTime updated) { - this.updated = updated; - return this; - } - - /** - * Get the createdBy property: Describes a user that created the watchlist. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: Describes a user that created the watchlist. - * - * @param createdBy the createdBy value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withCreatedBy(UserInfo createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the updatedBy property: Describes a user that updated the watchlist. - * - * @return the updatedBy value. - */ - public UserInfo updatedBy() { - return this.updatedBy; - } - - /** - * Set the updatedBy property: Describes a user that updated the watchlist. - * - * @param updatedBy the updatedBy value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withUpdatedBy(UserInfo updatedBy) { - this.updatedBy = updatedBy; - return this; - } - - /** - * Get the description property: A description of the watchlist. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: A description of the watchlist. - * - * @param description the description value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the watchlistType property: The type of the watchlist. - * - * @return the watchlistType value. - */ - public String watchlistType() { - return this.watchlistType; - } - - /** - * Set the watchlistType property: The type of the watchlist. - * - * @param watchlistType the watchlistType value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withWatchlistType(String watchlistType) { - this.watchlistType = watchlistType; - return this; - } - - /** - * Get the watchlistAlias property: The alias of the watchlist. - * - * @return the watchlistAlias value. - */ - public String watchlistAlias() { - return this.watchlistAlias; - } - - /** - * Set the watchlistAlias property: The alias of the watchlist. - * - * @param watchlistAlias the watchlistAlias value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withWatchlistAlias(String watchlistAlias) { - this.watchlistAlias = watchlistAlias; - return this; - } - - /** - * Get the isDeleted property: A flag that indicates if the watchlist is deleted or not. - * - * @return the isDeleted value. - */ - public Boolean isDeleted() { - return this.isDeleted; - } - - /** - * Set the isDeleted property: A flag that indicates if the watchlist is deleted or not. - * - * @param isDeleted the isDeleted value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * Get the labels property: List of labels relevant to this watchlist. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: List of labels relevant to this watchlist. - * - * @param labels the labels value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Get the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration format). - * - * @return the defaultDuration value. - */ - public Duration defaultDuration() { - return this.defaultDuration; - } - - /** - * Set the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration format). - * - * @param defaultDuration the defaultDuration value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withDefaultDuration(Duration defaultDuration) { - this.defaultDuration = defaultDuration; - return this; - } - - /** - * Get the tenantId property: The tenantId where the watchlist belongs to. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenantId where the watchlist belongs to. - * - * @param tenantId the tenantId value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. - * - * @return the numberOfLinesToSkip value. - */ - public Integer numberOfLinesToSkip() { - return this.numberOfLinesToSkip; - } - - /** - * Set the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. - * - * @param numberOfLinesToSkip the numberOfLinesToSkip value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withNumberOfLinesToSkip(Integer numberOfLinesToSkip) { - this.numberOfLinesToSkip = numberOfLinesToSkip; - return this; - } - - /** - * Get the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. - * - * @return the rawContent value. - */ - public String rawContent() { - return this.rawContent; - } - - /** - * Set the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. - * - * @param rawContent the rawContent value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withRawContent(String rawContent) { - this.rawContent = rawContent; - 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 - * use this field as the key field when joining to other event data by IP address. - * - * @return the itemsSearchKey value. - */ - public String itemsSearchKey() { - return this.itemsSearchKey; - } - - /** - * Set 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 - * use this field as the key field when joining to other event data by IP address. - * - * @param itemsSearchKey the itemsSearchKey value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withItemsSearchKey(String itemsSearchKey) { - this.itemsSearchKey = itemsSearchKey; - return this; - } - - /** - * Get the contentType property: The content type of the raw content. Example : text/csv or text/tsv. - * - * @return the contentType value. - */ - public String contentType() { - return this.contentType; - } - - /** - * Set the contentType property: The content type of the raw content. Example : text/csv or text/tsv. - * - * @param contentType the contentType value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * - * @return the uploadStatus value. - */ - public String uploadStatus() { - return this.uploadStatus; - } - - /** - * Set the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * - * @param uploadStatus the uploadStatus value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withUploadStatus(String uploadStatus) { - this.uploadStatus = uploadStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property displayName in model WatchlistProperties")); - } - if (provider() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property provider in model WatchlistProperties")); - } - if (createdBy() != null) { - createdBy().validate(); - } - if (updatedBy() != null) { - updatedBy().validate(); - } - if (itemsSearchKey() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property itemsSearchKey in model WatchlistProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WatchlistProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/package-info.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/package-info.java deleted file mode 100644 index d62af6071724..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for SecurityInsights. API spec for Microsoft.SecurityInsights (Azure - * Security Insights) resource provider. - */ -package com.azure.resourcemanager.securityinsights.fluent.models; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/package-info.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/package-info.java deleted file mode 100644 index 99716aa0d737..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for SecurityInsights. API spec for Microsoft.SecurityInsights (Azure Security - * Insights) resource provider. - */ -package com.azure.resourcemanager.securityinsights.fluent; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionResponseImpl.java deleted file mode 100644 index 72b52d5050ea..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionResponseImpl.java +++ /dev/null @@ -1,195 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; -import com.azure.resourcemanager.securityinsights.models.ActionRequest; -import com.azure.resourcemanager.securityinsights.models.ActionResponse; - -public final class ActionResponseImpl implements ActionResponse, ActionResponse.Definition, ActionResponse.Update { - private ActionResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String workflowId() { - return this.innerModel().workflowId(); - } - - public String logicAppResourceId() { - return this.innerModel().logicAppResourceId(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ActionResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String ruleId; - - private String actionId; - - private ActionRequest createAction; - - private ActionRequest updateAction; - - public ActionResponseImpl withExistingAlertRule(String resourceGroupName, String workspaceName, String ruleId) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.ruleId = ruleId; - return this; - } - - public ActionResponse create() { - this.innerObject = - serviceManager - .serviceClient() - .getActions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, ruleId, actionId, createAction, Context.NONE) - .getValue(); - return this; - } - - public ActionResponse create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getActions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleId, actionId, createAction, context) - .getValue(); - return this; - } - - ActionResponseImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new ActionResponseInner(); - this.serviceManager = serviceManager; - this.actionId = name; - this.createAction = new ActionRequest(); - } - - public ActionResponseImpl update() { - this.updateAction = new ActionRequest(); - return this; - } - - public ActionResponse apply() { - this.innerObject = - serviceManager - .serviceClient() - .getActions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, ruleId, actionId, updateAction, Context.NONE) - .getValue(); - return this; - } - - public ActionResponse apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getActions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleId, actionId, updateAction, context) - .getValue(); - return this; - } - - ActionResponseImpl( - ActionResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.ruleId = Utils.getValueFromIdByName(innerObject.id(), "alertRules"); - this.actionId = Utils.getValueFromIdByName(innerObject.id(), "actions"); - } - - public ActionResponse refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getActions() - .getWithResponse(resourceGroupName, workspaceName, ruleId, actionId, Context.NONE) - .getValue(); - return this; - } - - public ActionResponse refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getActions() - .getWithResponse(resourceGroupName, workspaceName, ruleId, actionId, context) - .getValue(); - return this; - } - - public ActionResponseImpl withEtag(String etag) { - if (isInCreateMode()) { - this.createAction.withEtag(etag); - return this; - } else { - this.updateAction.withEtag(etag); - return this; - } - } - - public ActionResponseImpl withTriggerUri(String triggerUri) { - if (isInCreateMode()) { - this.createAction.withTriggerUri(triggerUri); - return this; - } else { - this.updateAction.withTriggerUri(triggerUri); - return this; - } - } - - public ActionResponseImpl withLogicAppResourceId(String logicAppResourceId) { - if (isInCreateMode()) { - this.createAction.withLogicAppResourceId(logicAppResourceId); - return this; - } else { - this.updateAction.withLogicAppResourceId(logicAppResourceId); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java deleted file mode 100644 index 7b08804507b7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java +++ /dev/null @@ -1,947 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.ActionsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; -import com.azure.resourcemanager.securityinsights.models.ActionRequest; -import com.azure.resourcemanager.securityinsights.models.ActionsList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ActionsClient. */ -public final class ActionsClientImpl implements ActionsClient { - /** The proxy service used to perform REST calls. */ - private final ActionsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of ActionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ActionsClientImpl(SecurityInsightsImpl client) { - this.service = RestProxy.create(ActionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsActions to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsActi") - private interface ActionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAlertRule( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("ruleId") String ruleId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions" - + "/{actionId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("ruleId") String ruleId, - @PathParam("actionId") String actionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions" - + "/{actionId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("ruleId") String ruleId, - @PathParam("actionId") String actionId, - @BodyParam("application/json") ActionRequest action, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions" - + "/{actionId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("ruleId") String ruleId, - @PathParam("actionId") String actionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAlertRuleNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAlertRuleSinglePageAsync( - String resourceGroupName, String workspaceName, String ruleId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByAlertRule( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAlertRuleSinglePageAsync( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByAlertRule( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAlertRuleAsync( - String resourceGroupName, String workspaceName, String ruleId) { - return new PagedFlux<>( - () -> listByAlertRuleSinglePageAsync(resourceGroupName, workspaceName, ruleId), - nextLink -> listByAlertRuleNextSinglePageAsync(nextLink)); - } - - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAlertRuleAsync( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return new PagedFlux<>( - () -> listByAlertRuleSinglePageAsync(resourceGroupName, workspaceName, ruleId, context), - nextLink -> listByAlertRuleNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAlertRule( - String resourceGroupName, String workspaceName, String ruleId) { - return new PagedIterable<>(listByAlertRuleAsync(resourceGroupName, workspaceName, ruleId)); - } - - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAlertRule( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return new PagedIterable<>(listByAlertRuleAsync(resourceGroupName, workspaceName, ruleId, context)); - } - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, String actionId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (actionId == null) { - return Mono.error(new IllegalArgumentException("Parameter actionId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - actionId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (actionId == null) { - return Mono.error(new IllegalArgumentException("Parameter actionId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - actionId, - accept, - context); - } - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String ruleId, String actionId) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - return getAsync(resourceGroupName, workspaceName, ruleId, actionId).block(); - } - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); - } - - /** - * Creates or updates the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param action The action. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (actionId == null) { - return Mono.error(new IllegalArgumentException("Parameter actionId is required and cannot be null.")); - } - if (action == null) { - return Mono.error(new IllegalArgumentException("Parameter action is required and cannot be null.")); - } else { - action.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - actionId, - action, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param action The action. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String ruleId, - String actionId, - ActionRequest action, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (actionId == null) { - return Mono.error(new IllegalArgumentException("Parameter actionId is required and cannot be null.")); - } - if (action == null) { - return Mono.error(new IllegalArgumentException("Parameter action is required and cannot be null.")); - } else { - action.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - actionId, - action, - accept, - context); - } - - /** - * Creates or updates the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param action The action. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, action) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param action The action. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ActionResponseInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleId, actionId, action).block(); - } - - /** - * Creates or updates the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param action The action. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String ruleId, - String actionId, - ActionRequest action, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, action, context) - .block(); - } - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, String actionId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (actionId == null) { - return Mono.error(new IllegalArgumentException("Parameter actionId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - actionId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (actionId == null) { - return Mono.error(new IllegalArgumentException("Parameter actionId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - actionId, - accept, - context); - } - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - deleteAsync(resourceGroupName, workspaceName, ruleId, actionId).block(); - } - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the actions along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAlertRuleNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByAlertRuleNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the actions along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAlertRuleNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByAlertRuleNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java deleted file mode 100644 index 09f8ea57b333..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java +++ /dev/null @@ -1,220 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.ActionsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; -import com.azure.resourcemanager.securityinsights.models.ActionResponse; -import com.azure.resourcemanager.securityinsights.models.Actions; - -public final class ActionsImpl implements Actions { - private static final ClientLogger LOGGER = new ClientLogger(ActionsImpl.class); - - private final ActionsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public ActionsImpl( - ActionsClient innerClient, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByAlertRule( - String resourceGroupName, String workspaceName, String ruleId) { - PagedIterable inner = - this.serviceClient().listByAlertRule(resourceGroupName, workspaceName, ruleId); - return Utils.mapPage(inner, inner1 -> new ActionResponseImpl(inner1, this.manager())); - } - - public PagedIterable listByAlertRule( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - PagedIterable inner = - this.serviceClient().listByAlertRule(resourceGroupName, workspaceName, ruleId, context); - return Utils.mapPage(inner, inner1 -> new ActionResponseImpl(inner1, this.manager())); - } - - public ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - ActionResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId, actionId); - if (inner != null) { - return new ActionResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, ruleId, actionId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ActionResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleId, actionId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, ruleId, actionId, context); - } - - public ActionResponse getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String ruleId = Utils.getValueFromIdByName(id, "alertRules"); - if (ruleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'alertRules'.", id))); - } - String actionId = Utils.getValueFromIdByName(id, "actions"); - if (actionId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'actions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, ruleId, actionId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String ruleId = Utils.getValueFromIdByName(id, "alertRules"); - if (ruleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'alertRules'.", id))); - } - String actionId = Utils.getValueFromIdByName(id, "actions"); - if (actionId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'actions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, ruleId, actionId, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String ruleId = Utils.getValueFromIdByName(id, "alertRules"); - if (ruleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'alertRules'.", id))); - } - String actionId = Utils.getValueFromIdByName(id, "actions"); - if (actionId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'actions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, ruleId, actionId, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String ruleId = Utils.getValueFromIdByName(id, "alertRules"); - if (ruleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'alertRules'.", id))); - } - String actionId = Utils.getValueFromIdByName(id, "actions"); - if (actionId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'actions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, ruleId, actionId, context); - } - - private ActionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public ActionResponseImpl define(String name) { - return new ActionResponseImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleImpl.java deleted file mode 100644 index 48823696c23b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.models.AlertRule; - -public final class AlertRuleImpl implements AlertRule { - private AlertRuleInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - AlertRuleImpl( - AlertRuleInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public AlertRuleInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplateImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplateImpl.java deleted file mode 100644 index 3ceab1ccfa28..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplateImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplate; - -public final class AlertRuleTemplateImpl implements AlertRuleTemplate { - private AlertRuleTemplateInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - AlertRuleTemplateImpl( - AlertRuleTemplateInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public AlertRuleTemplateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java deleted file mode 100644 index d017573675b9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java +++ /dev/null @@ -1,512 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.AlertRuleTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatesList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in AlertRuleTemplatesClient. */ -public final class AlertRuleTemplatesClientImpl implements AlertRuleTemplatesClient { - /** The proxy service used to perform REST calls. */ - private final AlertRuleTemplatesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of AlertRuleTemplatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AlertRuleTemplatesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(AlertRuleTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsAlertRuleTemplates to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsAler") - private interface AlertRuleTemplatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates" - + "/{alertRuleTemplateId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("alertRuleTemplateId") String alertRuleTemplateId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (alertRuleTemplateId == null) { - return Mono - .error(new IllegalArgumentException("Parameter alertRuleTemplateId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - alertRuleTemplateId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (alertRuleTemplateId == null) { - return Mono - .error(new IllegalArgumentException("Parameter alertRuleTemplateId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - alertRuleTemplateId, - accept, - context); - } - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - return getWithResponseAsync(resourceGroupName, workspaceName, alertRuleTemplateId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - return getAsync(resourceGroupName, workspaceName, alertRuleTemplateId).block(); - } - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, alertRuleTemplateId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the alert rule templates along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the alert rule templates along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java deleted file mode 100644 index e5bdc4bc9ffc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.AlertRuleTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplates; - -public final class AlertRuleTemplatesImpl implements AlertRuleTemplates { - private static final ClientLogger LOGGER = new ClientLogger(AlertRuleTemplatesImpl.class); - - private final AlertRuleTemplatesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public AlertRuleTemplatesImpl( - AlertRuleTemplatesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new AlertRuleTemplateImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new AlertRuleTemplateImpl(inner1, this.manager())); - } - - public AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - AlertRuleTemplateInner inner = this.serviceClient().get(resourceGroupName, workspaceName, alertRuleTemplateId); - if (inner != null) { - return new AlertRuleTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, alertRuleTemplateId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new AlertRuleTemplateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private AlertRuleTemplatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java deleted file mode 100644 index e092a7beec6d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java +++ /dev/null @@ -1,867 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.AlertRulesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.models.AlertRulesList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in AlertRulesClient. */ -public final class AlertRulesClientImpl implements AlertRulesClient { - /** The proxy service used to perform REST calls. */ - private final AlertRulesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of AlertRulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AlertRulesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(AlertRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsAlertRules to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsAler") - private interface AlertRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("ruleId") String ruleId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("ruleId") String ruleId, - @BodyParam("application/json") AlertRuleInner alertRule, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("ruleId") String ruleId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - accept, - context); - } - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String ruleId) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId) { - return getAsync(resourceGroupName, workspaceName, ruleId).block(); - } - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); - } - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (alertRule == null) { - return Mono.error(new IllegalArgumentException("Parameter alertRule is required and cannot be null.")); - } else { - alertRule.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - alertRule, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (alertRule == null) { - return Mono.error(new IllegalArgumentException("Parameter alertRule is required and cannot be null.")); - } else { - alertRule.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - alertRule, - accept, - context); - } - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, alertRule) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleId, alertRule).block(); - } - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, alertRule, context).block(); - } - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - ruleId, - accept, - context); - } - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String ruleId) { - deleteAsync(resourceGroupName, workspaceName, ruleId).block(); - } - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the alert rules along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the alert rules along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java deleted file mode 100644 index 4f4d06aa4fa9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.AlertRulesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.models.AlertRule; -import com.azure.resourcemanager.securityinsights.models.AlertRules; - -public final class AlertRulesImpl implements AlertRules { - private static final ClientLogger LOGGER = new ClientLogger(AlertRulesImpl.class); - - private final AlertRulesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public AlertRulesImpl( - AlertRulesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new AlertRuleImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new AlertRuleImpl(inner1, this.manager())); - } - - public AlertRule get(String resourceGroupName, String workspaceName, String ruleId) { - AlertRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId); - if (inner != null) { - return new AlertRuleImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, ruleId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new AlertRuleImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public AlertRule createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - AlertRuleInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, ruleId, alertRule); - if (inner != null) { - return new AlertRuleImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleId, alertRule, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new AlertRuleImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String ruleId) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, ruleId, context); - } - - private AlertRulesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java deleted file mode 100644 index f0425bbe6038..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java +++ /dev/null @@ -1,212 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner; -import com.azure.resourcemanager.securityinsights.models.AutomationRule; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; -import com.azure.resourcemanager.securityinsights.models.ClientInfo; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class AutomationRuleImpl implements AutomationRule, AutomationRule.Definition, AutomationRule.Update { - private AutomationRuleInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public int order() { - return this.innerModel().order(); - } - - public AutomationRuleTriggeringLogic triggeringLogic() { - return this.innerModel().triggeringLogic(); - } - - public List actions() { - List inner = this.innerModel().actions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerModel().lastModifiedTimeUtc(); - } - - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - - public ClientInfo lastModifiedBy() { - return this.innerModel().lastModifiedBy(); - } - - public ClientInfo createdBy() { - return this.innerModel().createdBy(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public AutomationRuleInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String automationRuleId; - - public AutomationRuleImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public AutomationRule create() { - this.innerObject = - serviceManager - .serviceClient() - .getAutomationRules() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, automationRuleId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public AutomationRule create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAutomationRules() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, automationRuleId, this.innerModel(), context) - .getValue(); - return this; - } - - AutomationRuleImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new AutomationRuleInner(); - this.serviceManager = serviceManager; - this.automationRuleId = name; - } - - public AutomationRuleImpl update() { - return this; - } - - public AutomationRule apply() { - this.innerObject = - serviceManager - .serviceClient() - .getAutomationRules() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, automationRuleId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public AutomationRule apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAutomationRules() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, automationRuleId, this.innerModel(), context) - .getValue(); - return this; - } - - AutomationRuleImpl( - AutomationRuleInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.automationRuleId = Utils.getValueFromIdByName(innerObject.id(), "automationRules"); - } - - public AutomationRule refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAutomationRules() - .getWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE) - .getValue(); - return this; - } - - public AutomationRule refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAutomationRules() - .getWithResponse(resourceGroupName, workspaceName, automationRuleId, context) - .getValue(); - return this; - } - - public AutomationRuleImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; - } - - public AutomationRuleImpl withOrder(int order) { - this.innerModel().withOrder(order); - return this; - } - - public AutomationRuleImpl withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic) { - this.innerModel().withTriggeringLogic(triggeringLogic); - return this; - } - - public AutomationRuleImpl withActions(List actions) { - this.innerModel().withActions(actions); - return this; - } - - public AutomationRuleImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java deleted file mode 100644 index 68b5fbf01089..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java +++ /dev/null @@ -1,909 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.AutomationRulesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner; -import com.azure.resourcemanager.securityinsights.models.AutomationRulesList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ -public final class AutomationRulesClientImpl implements AutomationRulesClient { - /** The proxy service used to perform REST calls. */ - private final AutomationRulesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of AutomationRulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AutomationRulesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(AutomationRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsAutomationRules to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsAuto") - private interface AutomationRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("automationRuleId") String automationRuleId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("automationRuleId") String automationRuleId, - @BodyParam("application/json") AutomationRuleInner automationRuleToUpsert, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("automationRuleId") String automationRuleId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - automationRuleId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - automationRuleId, - accept, - context); - } - - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { - return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { - return getAsync(resourceGroupName, workspaceName, automationRuleId).block(); - } - - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); - } - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } - if (automationRuleToUpsert != null) { - automationRuleToUpsert.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - automationRuleId, - automationRuleToUpsert, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } - if (automationRuleToUpsert != null) { - automationRuleToUpsert.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - automationRuleId, - automationRuleToUpsert, - accept, - context); - } - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { - final AutomationRuleInner automationRuleToUpsert = null; - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId) { - final AutomationRuleInner automationRuleToUpsert = null; - return createOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert).block(); - } - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, context) - .block(); - } - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - automationRuleId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - automationRuleId, - accept, - context); - } - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String automationRuleId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { - return deleteAsync(resourceGroupName, workspaceName, automationRuleId).block(); - } - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); - } - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java deleted file mode 100644 index 90cf494caf3d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java +++ /dev/null @@ -1,193 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.AutomationRulesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner; -import com.azure.resourcemanager.securityinsights.models.AutomationRule; -import com.azure.resourcemanager.securityinsights.models.AutomationRules; - -public final class AutomationRulesImpl implements AutomationRules { - private static final ClientLogger LOGGER = new ClientLogger(AutomationRulesImpl.class); - - private final AutomationRulesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public AutomationRulesImpl( - AutomationRulesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { - AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); - if (inner != null) { - return new AutomationRuleImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, automationRuleId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new AutomationRuleImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { - return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, context); - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); - } - - public AutomationRule getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String automationRuleId = Utils.getValueFromIdByName(id, "automationRules"); - if (automationRuleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'automationRules'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String automationRuleId = Utils.getValueFromIdByName(id, "automationRules"); - if (automationRuleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'automationRules'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, automationRuleId, context); - } - - public Object deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String automationRuleId = Utils.getValueFromIdByName(id, "automationRules"); - if (automationRuleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'automationRules'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String automationRuleId = Utils.getValueFromIdByName(id, "automationRules"); - if (automationRuleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'automationRules'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, context); - } - - private AutomationRulesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public AutomationRuleImpl define(String name) { - return new AutomationRuleImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkExpandResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkExpandResponseImpl.java deleted file mode 100644 index b42e787c9a3f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkExpandResponseImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponse; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponseValue; -import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; - -public final class BookmarkExpandResponseImpl implements BookmarkExpandResponse { - private BookmarkExpandResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - BookmarkExpandResponseImpl( - BookmarkExpandResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ExpansionResultsMetadata metadata() { - return this.innerModel().metadata(); - } - - public BookmarkExpandResponseValue value() { - return this.innerModel().value(); - } - - public BookmarkExpandResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java deleted file mode 100644 index 58081823ee60..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java +++ /dev/null @@ -1,317 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.Bookmark; -import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; -import com.azure.resourcemanager.securityinsights.models.IncidentInfo; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class BookmarkImpl implements Bookmark, Bookmark.Definition, Bookmark.Update { - private BookmarkInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public OffsetDateTime created() { - return this.innerModel().created(); - } - - public UserInfo createdBy() { - return this.innerModel().createdBy(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public List labels() { - List inner = this.innerModel().labels(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String notes() { - return this.innerModel().notes(); - } - - public String query() { - return this.innerModel().query(); - } - - public String queryResult() { - return this.innerModel().queryResult(); - } - - public OffsetDateTime updated() { - return this.innerModel().updated(); - } - - public UserInfo updatedBy() { - return this.innerModel().updatedBy(); - } - - public OffsetDateTime eventTime() { - return this.innerModel().eventTime(); - } - - public OffsetDateTime queryStartTime() { - return this.innerModel().queryStartTime(); - } - - public OffsetDateTime queryEndTime() { - return this.innerModel().queryEndTime(); - } - - public IncidentInfo incidentInfo() { - return this.innerModel().incidentInfo(); - } - - public List entityMappings() { - List inner = this.innerModel().entityMappings(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List tactics() { - List inner = this.innerModel().tactics(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List techniques() { - List inner = this.innerModel().techniques(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public BookmarkInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String bookmarkId; - - public BookmarkImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Bookmark create() { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarks() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Bookmark create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarks() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, bookmarkId, this.innerModel(), context) - .getValue(); - return this; - } - - BookmarkImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new BookmarkInner(); - this.serviceManager = serviceManager; - this.bookmarkId = name; - } - - public BookmarkImpl update() { - return this; - } - - public Bookmark apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarks() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Bookmark apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarks() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, bookmarkId, this.innerModel(), context) - .getValue(); - return this; - } - - BookmarkImpl( - BookmarkInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.bookmarkId = Utils.getValueFromIdByName(innerObject.id(), "bookmarks"); - } - - public Bookmark refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarks() - .getWithResponse(resourceGroupName, workspaceName, bookmarkId, Context.NONE) - .getValue(); - return this; - } - - public Bookmark refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarks() - .getWithResponse(resourceGroupName, workspaceName, bookmarkId, context) - .getValue(); - return this; - } - - public BookmarkImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public BookmarkImpl withCreated(OffsetDateTime created) { - this.innerModel().withCreated(created); - return this; - } - - public BookmarkImpl withCreatedBy(UserInfo createdBy) { - this.innerModel().withCreatedBy(createdBy); - return this; - } - - public BookmarkImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; - } - - public BookmarkImpl withLabels(List labels) { - this.innerModel().withLabels(labels); - return this; - } - - public BookmarkImpl withNotes(String notes) { - this.innerModel().withNotes(notes); - return this; - } - - public BookmarkImpl withQuery(String query) { - this.innerModel().withQuery(query); - return this; - } - - public BookmarkImpl withQueryResult(String queryResult) { - this.innerModel().withQueryResult(queryResult); - return this; - } - - public BookmarkImpl withUpdated(OffsetDateTime updated) { - this.innerModel().withUpdated(updated); - return this; - } - - public BookmarkImpl withUpdatedBy(UserInfo updatedBy) { - this.innerModel().withUpdatedBy(updatedBy); - return this; - } - - public BookmarkImpl withEventTime(OffsetDateTime eventTime) { - this.innerModel().withEventTime(eventTime); - return this; - } - - public BookmarkImpl withQueryStartTime(OffsetDateTime queryStartTime) { - this.innerModel().withQueryStartTime(queryStartTime); - return this; - } - - public BookmarkImpl withQueryEndTime(OffsetDateTime queryEndTime) { - this.innerModel().withQueryEndTime(queryEndTime); - return this; - } - - public BookmarkImpl withIncidentInfo(IncidentInfo incidentInfo) { - this.innerModel().withIncidentInfo(incidentInfo); - return this; - } - - public BookmarkImpl withEntityMappings(List entityMappings) { - this.innerModel().withEntityMappings(entityMappings); - return this; - } - - public BookmarkImpl withTactics(List tactics) { - this.innerModel().withTactics(tactics); - return this; - } - - public BookmarkImpl withTechniques(List techniques) { - this.innerModel().withTechniques(techniques); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java deleted file mode 100644 index 0e1ed907707d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java +++ /dev/null @@ -1,257 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in BookmarkOperationsClient. */ -public final class BookmarkOperationsClientImpl implements BookmarkOperationsClient { - /** The proxy service used to perform REST calls. */ - private final BookmarkOperationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of BookmarkOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BookmarkOperationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(BookmarkOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsBookmarkOperations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarkOperationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/expand") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> expand( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @BodyParam("application/json") BookmarkExpandParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandWithResponseAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - parameters, - accept, - context); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono expandAsync( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - return expandWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkExpandResponseInner expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - return expandAsync(resourceGroupName, workspaceName, bookmarkId, parameters).block(); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context) { - return expandWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, parameters, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java deleted file mode 100644 index 40b134363e7c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponse; -import com.azure.resourcemanager.securityinsights.models.BookmarkOperations; - -public final class BookmarkOperationsImpl implements BookmarkOperations { - private static final ClientLogger LOGGER = new ClientLogger(BookmarkOperationsImpl.class); - - private final BookmarkOperationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public BookmarkOperationsImpl( - BookmarkOperationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public BookmarkExpandResponse expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - BookmarkExpandResponseInner inner = - this.serviceClient().expand(resourceGroupName, workspaceName, bookmarkId, parameters); - if (inner != null) { - return new BookmarkExpandResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context) { - Response inner = - this.serviceClient().expandWithResponse(resourceGroupName, workspaceName, bookmarkId, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BookmarkExpandResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private BookmarkOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java deleted file mode 100644 index f2f214d54a93..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java +++ /dev/null @@ -1,1066 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.RelationList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in BookmarkRelationsClient. */ -public final class BookmarkRelationsClientImpl implements BookmarkRelationsClient { - /** The proxy service used to perform REST calls. */ - private final BookmarkRelationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of BookmarkRelationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BookmarkRelationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(BookmarkRelationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsBookmarkRelations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarkRelationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @PathParam("relationName") String relationName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @PathParam("relationName") String relationName, - @BodyParam("application/json") RelationInner relation, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @PathParam("relationName") String relationName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String bookmarkId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken, context)); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - accept, - context); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark relation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - return getAsync(resourceGroupName, workspaceName, bookmarkId, relationName).block(); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - if (relation == null) { - return Mono.error(new IllegalArgumentException("Parameter relation is required and cannot be null.")); - } else { - relation.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - relation, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - if (relation == null) { - return Mono.error(new IllegalArgumentException("Parameter relation is required and cannot be null.")); - } else { - relation.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - relation, - accept, - context); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, relation) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation) { - return createOrUpdateAsync(resourceGroupName, workspaceName, bookmarkId, relationName, relation).block(); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, bookmarkId, relationName, relation, context) - .block(); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - accept, - context); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - deleteAsync(resourceGroupName, workspaceName, bookmarkId, relationName).block(); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java deleted file mode 100644 index 0c90dbec0292..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkRelations; -import com.azure.resourcemanager.securityinsights.models.Relation; - -public final class BookmarkRelationsImpl implements BookmarkRelations { - private static final ClientLogger LOGGER = new ClientLogger(BookmarkRelationsImpl.class); - - private final BookmarkRelationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public BookmarkRelationsImpl( - BookmarkRelationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, bookmarkId); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - public Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RelationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId, relationName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); - } - - public Relation getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - String relationName = Utils.getValueFromIdByName(id, "relations"); - if (relationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); - } - return this - .getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - String relationName = Utils.getValueFromIdByName(id, "relations"); - if (relationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - String relationName = Utils.getValueFromIdByName(id, "relations"); - if (relationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - String relationName = Utils.getValueFromIdByName(id, "relations"); - if (relationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); - } - - private BookmarkRelationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public RelationImpl define(String name) { - return new RelationImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java deleted file mode 100644 index 4dc36ed754b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java +++ /dev/null @@ -1,869 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.BookmarksClient; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in BookmarksClient. */ -public final class BookmarksClientImpl implements BookmarksClient { - /** The proxy service used to perform REST calls. */ - private final BookmarksService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of BookmarksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BookmarksClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(BookmarksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsBookmarks to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @BodyParam("application/json") BookmarkInner bookmark, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - accept, - context); - } - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String bookmarkId) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId) { - return getAsync(resourceGroupName, workspaceName, bookmarkId).block(); - } - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bookmark along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); - } - - /** - * Creates or updates the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param bookmark The bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (bookmark == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmark is required and cannot be null.")); - } else { - bookmark.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - bookmark, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param bookmark The bookmark. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (bookmark == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmark is required and cannot be null.")); - } else { - bookmark.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - bookmark, - accept, - context); - } - - /** - * Creates or updates the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param bookmark The bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, bookmark) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param bookmark The bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark) { - return createOrUpdateAsync(resourceGroupName, workspaceName, bookmarkId, bookmark).block(); - } - - /** - * Creates or updates the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param bookmark The bookmark. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, bookmark, context).block(); - } - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - accept, - context); - } - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String bookmarkId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { - deleteAsync(resourceGroupName, workspaceName, bookmarkId).block(); - } - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the bookmarks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the bookmarks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java deleted file mode 100644 index e87053fd5814..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.BookmarksClient; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; -import com.azure.resourcemanager.securityinsights.models.Bookmark; -import com.azure.resourcemanager.securityinsights.models.Bookmarks; - -public final class BookmarksImpl implements Bookmarks { - private static final ClientLogger LOGGER = new ClientLogger(BookmarksImpl.class); - - private final BookmarksClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public BookmarksImpl( - BookmarksClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new BookmarkImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new BookmarkImpl(inner1, this.manager())); - } - - public Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId) { - BookmarkInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId); - if (inner != null) { - return new BookmarkImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, bookmarkId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BookmarkImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { - this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, context); - } - - public Bookmark getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, bookmarkId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, bookmarkId, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, context); - } - - private BookmarksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public BookmarkImpl define(String name) { - return new BookmarkImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorImpl.java deleted file mode 100644 index b07fffa9b2f0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.models.DataConnector; - -public final class DataConnectorImpl implements DataConnector { - private DataConnectorInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - DataConnectorImpl( - DataConnectorInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public DataConnectorInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorRequirementsStateImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorRequirementsStateImpl.java deleted file mode 100644 index 2543bc68e69c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorRequirementsStateImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorAuthorizationState; -import com.azure.resourcemanager.securityinsights.models.DataConnectorLicenseState; -import com.azure.resourcemanager.securityinsights.models.DataConnectorRequirementsState; - -public final class DataConnectorRequirementsStateImpl implements DataConnectorRequirementsState { - private DataConnectorRequirementsStateInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - DataConnectorRequirementsStateImpl( - DataConnectorRequirementsStateInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public DataConnectorAuthorizationState authorizationState() { - return this.innerModel().authorizationState(); - } - - public DataConnectorLicenseState licenseState() { - return this.innerModel().licenseState(); - } - - public DataConnectorRequirementsStateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java deleted file mode 100644 index b19d22164e89..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java +++ /dev/null @@ -1,262 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DataConnectorsCheckRequirementsOperationsClient. - */ -public final class DataConnectorsCheckRequirementsOperationsClientImpl - implements DataConnectorsCheckRequirementsOperationsClient { - /** The proxy service used to perform REST calls. */ - private final DataConnectorsCheckRequirementsOperationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of DataConnectorsCheckRequirementsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DataConnectorsCheckRequirementsOperationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create( - DataConnectorsCheckRequirementsOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsDataConnectorsCheckRequirementsOperations to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsData") - private interface DataConnectorsCheckRequirementsOperationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> post( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> postWithResponseAsync( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorsCheckRequirements == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter dataConnectorsCheckRequirements is required and cannot be null.")); - } else { - dataConnectorsCheckRequirements.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .post( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorsCheckRequirements, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> postWithResponseAsync( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorsCheckRequirements == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter dataConnectorsCheckRequirements is required and cannot be null.")); - } else { - dataConnectorsCheckRequirements.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .post( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorsCheckRequirements, - accept, - context); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono postAsync( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - return postWithResponseAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorRequirementsStateInner post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - return postAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements).block(); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response postWithResponse( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context) { - return postWithResponseAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context) - .block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java deleted file mode 100644 index 1c97eca6aff9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorRequirementsState; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirementsOperations; - -public final class DataConnectorsCheckRequirementsOperationsImpl implements DataConnectorsCheckRequirementsOperations { - private static final ClientLogger LOGGER = new ClientLogger(DataConnectorsCheckRequirementsOperationsImpl.class); - - private final DataConnectorsCheckRequirementsOperationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public DataConnectorsCheckRequirementsOperationsImpl( - DataConnectorsCheckRequirementsOperationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public DataConnectorRequirementsState post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - DataConnectorRequirementsStateInner inner = - this.serviceClient().post(resourceGroupName, workspaceName, dataConnectorsCheckRequirements); - if (inner != null) { - return new DataConnectorRequirementsStateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response postWithResponse( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context) { - Response inner = - this - .serviceClient() - .postWithResponse(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DataConnectorRequirementsStateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private DataConnectorsCheckRequirementsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java deleted file mode 100644 index 1a58d841aa80..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java +++ /dev/null @@ -1,1262 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; -import com.azure.resourcemanager.securityinsights.models.DataConnectorList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DataConnectorsClient. */ -public final class DataConnectorsClientImpl implements DataConnectorsClient { - /** The proxy service used to perform REST calls. */ - private final DataConnectorsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of DataConnectorsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DataConnectorsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(DataConnectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsDataConnectors to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsData") - private interface DataConnectorsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("dataConnectorId") String dataConnectorId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("dataConnectorId") String dataConnectorId, - @BodyParam("application/json") DataConnectorInner dataConnector, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("dataConnectorId") String dataConnectorId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}" - + "/connect") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> connect( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("dataConnectorId") String dataConnectorId, - @BodyParam("application/json") DataConnectorConnectBody connectBody, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}" - + "/disconnect") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> disconnect( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("dataConnectorId") String dataConnectorId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 data connector along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 data connector along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - accept, - context); - } - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 data connector on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String dataConnectorId) { - return getWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 data connector. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId) { - return getAsync(resourceGroupName, workspaceName, dataConnectorId).block(); - } - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 data connector along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); - } - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 connector along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - if (dataConnector == null) { - return Mono.error(new IllegalArgumentException("Parameter dataConnector is required and cannot be null.")); - } else { - dataConnector.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - dataConnector, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 connector along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorInner dataConnector, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - if (dataConnector == null) { - return Mono.error(new IllegalArgumentException("Parameter dataConnector is required and cannot be null.")); - } else { - dataConnector.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - dataConnector, - accept, - context); - } - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 connector on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, dataConnector) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 connector. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - return createOrUpdateAsync(resourceGroupName, workspaceName, dataConnectorId, dataConnector).block(); - } - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 connector along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorInner dataConnector, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, dataConnectorId, dataConnector, context) - .block(); - } - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - accept, - context); - } - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String dataConnectorId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { - deleteAsync(resourceGroupName, workspaceName, dataConnectorId).block(); - } - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> connectWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - if (connectBody == null) { - return Mono.error(new IllegalArgumentException("Parameter connectBody is required and cannot be null.")); - } else { - connectBody.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .connect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - connectBody, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> connectWithResponseAsync( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - if (connectBody == null) { - return Mono.error(new IllegalArgumentException("Parameter connectBody is required and cannot be null.")); - } else { - connectBody.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .connect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - connectBody, - accept, - context); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono connectAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - return connectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - connectAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody).block(); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context) { - return connectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody, context) - .block(); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> disconnectWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .disconnect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> disconnectWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .disconnect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - accept, - context); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disconnectAsync(String resourceGroupName, String workspaceName, String dataConnectorId) { - return disconnectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { - disconnectAsync(resourceGroupName, workspaceName, dataConnectorId).block(); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return disconnectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the data connectors along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the data connectors along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java deleted file mode 100644 index 33b8c30d1247..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.models.DataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; -import com.azure.resourcemanager.securityinsights.models.DataConnectors; - -public final class DataConnectorsImpl implements DataConnectors { - private static final ClientLogger LOGGER = new ClientLogger(DataConnectorsImpl.class); - - private final DataConnectorsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public DataConnectorsImpl( - DataConnectorsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new DataConnectorImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new DataConnectorImpl(inner1, this.manager())); - } - - public DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId) { - DataConnectorInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataConnectorId); - if (inner != null) { - return new DataConnectorImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DataConnectorImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataConnector createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - DataConnectorInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, dataConnectorId, dataConnector); - if (inner != null) { - return new DataConnectorImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorInner dataConnector, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, dataConnectorId, dataConnector, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DataConnectorImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { - this.serviceClient().delete(resourceGroupName, workspaceName, dataConnectorId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); - } - - public void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - this.serviceClient().connect(resourceGroupName, workspaceName, dataConnectorId, connectBody); - } - - public Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context) { - return this - .serviceClient() - .connectWithResponse(resourceGroupName, workspaceName, dataConnectorId, connectBody, context); - } - - public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { - this.serviceClient().disconnect(resourceGroupName, workspaceName, dataConnectorId); - } - - public Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return this.serviceClient().disconnectWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); - } - - private DataConnectorsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java deleted file mode 100644 index 918c289e473c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java +++ /dev/null @@ -1,211 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.DomainWhoisClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DomainWhoisClient. */ -public final class DomainWhoisClientImpl implements DomainWhoisClient { - /** The proxy service used to perform REST calls. */ - private final DomainWhoisService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of DomainWhoisClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DomainWhoisClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(DomainWhoisService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsDomainWhois to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsDoma") - private interface DomainWhoisService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights" - + "/enrichment/domain/whois/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("domain") String domain, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String domain) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domain == null) { - return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - domain, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String domain, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domain == null) { - return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - domain, - accept, - context); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String domain) { - return getWithResponseAsync(resourceGroupName, domain).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnrichmentDomainWhoisInner get(String resourceGroupName, String domain) { - return getAsync(resourceGroupName, domain).block(); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String domain, Context context) { - return getWithResponseAsync(resourceGroupName, domain, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java deleted file mode 100644 index be9939f6abc0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.DomainWhoisClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; -import com.azure.resourcemanager.securityinsights.models.DomainWhois; -import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhois; - -public final class DomainWhoisImpl implements DomainWhois { - private static final ClientLogger LOGGER = new ClientLogger(DomainWhoisImpl.class); - - private final DomainWhoisClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public DomainWhoisImpl( - DomainWhoisClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public EnrichmentDomainWhois get(String resourceGroupName, String domain) { - EnrichmentDomainWhoisInner inner = this.serviceClient().get(resourceGroupName, domain); - if (inner != null) { - return new EnrichmentDomainWhoisImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String domain, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, domain, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EnrichmentDomainWhoisImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private DomainWhoisClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentDomainWhoisImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentDomainWhoisImpl.java deleted file mode 100644 index 4f643ea4b717..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentDomainWhoisImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; -import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhois; -import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhoisDetails; -import java.time.OffsetDateTime; - -public final class EnrichmentDomainWhoisImpl implements EnrichmentDomainWhois { - private EnrichmentDomainWhoisInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EnrichmentDomainWhoisImpl( - EnrichmentDomainWhoisInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String domain() { - return this.innerModel().domain(); - } - - public String server() { - return this.innerModel().server(); - } - - public OffsetDateTime created() { - return this.innerModel().created(); - } - - public OffsetDateTime updated() { - return this.innerModel().updated(); - } - - public OffsetDateTime expires() { - return this.innerModel().expires(); - } - - public EnrichmentDomainWhoisDetails parsedWhois() { - return this.innerModel().parsedWhois(); - } - - public EnrichmentDomainWhoisInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentIpGeodataImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentIpGeodataImpl.java deleted file mode 100644 index 75885149ad4d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentIpGeodataImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; -import com.azure.resourcemanager.securityinsights.models.EnrichmentIpGeodata; - -public final class EnrichmentIpGeodataImpl implements EnrichmentIpGeodata { - private EnrichmentIpGeodataInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EnrichmentIpGeodataImpl( - EnrichmentIpGeodataInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String asn() { - return this.innerModel().asn(); - } - - public String carrier() { - return this.innerModel().carrier(); - } - - public String city() { - return this.innerModel().city(); - } - - public Integer cityCf() { - return this.innerModel().cityCf(); - } - - public String continent() { - return this.innerModel().continent(); - } - - public String country() { - return this.innerModel().country(); - } - - public Integer countryCf() { - return this.innerModel().countryCf(); - } - - public String ipAddr() { - return this.innerModel().ipAddr(); - } - - public String ipRoutingType() { - return this.innerModel().ipRoutingType(); - } - - public String latitude() { - return this.innerModel().latitude(); - } - - public String longitude() { - return this.innerModel().longitude(); - } - - public String organization() { - return this.innerModel().organization(); - } - - public String organizationType() { - return this.innerModel().organizationType(); - } - - public String region() { - return this.innerModel().region(); - } - - public String state() { - return this.innerModel().state(); - } - - public Integer stateCf() { - return this.innerModel().stateCf(); - } - - public String stateCode() { - return this.innerModel().stateCode(); - } - - public EnrichmentIpGeodataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java deleted file mode 100644 index f9c1c922a5b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java +++ /dev/null @@ -1,1102 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; -import com.azure.resourcemanager.securityinsights.models.EntityList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntitiesClient. */ -public final class EntitiesClientImpl implements EntitiesClient { - /** The proxy service used to perform REST calls. */ - private final EntitiesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntitiesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntitiesClientImpl(SecurityInsightsImpl client) { - this.service = RestProxy.create(EntitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntities to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/expand") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> expand( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @BodyParam("application/json") EntityExpandParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/queries") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> queries( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @QueryParam("kind") EntityItemQueryKind kind, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getInsights") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getInsights( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @BodyParam("application/json") EntityGetInsightsParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - accept, - context); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String entityId) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityInner get(String resourceGroupName, String workspaceName, String entityId) { - return getAsync(resourceGroupName, workspaceName, entityId).block(); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityId, context).block(); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandWithResponseAsync( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono expandAsync( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - return expandWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityExpandResponseInner expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - return expandAsync(resourceGroupName, workspaceName, entityId, parameters).block(); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context) { - return expandWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> queriesWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (kind == null) { - return Mono.error(new IllegalArgumentException("Parameter kind is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .queries( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - kind, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> queriesWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (kind == null) { - return Mono.error(new IllegalArgumentException("Parameter kind is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .queries( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - kind, - accept, - context); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono queriesAsync( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - return queriesWithResponseAsync(resourceGroupName, workspaceName, entityId, kind) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GetQueriesResponseInner queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - return queriesAsync(resourceGroupName, workspaceName, entityId, kind).block(); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { - return queriesWithResponseAsync(resourceGroupName, workspaceName, entityId, kind, context).block(); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInsightsWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getInsights( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInsightsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getInsights( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getInsightsAsync( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - return getInsightsWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityGetInsightsResponseInner getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - return getInsightsAsync(resourceGroupName, workspaceName, entityId, parameters).block(); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context) { - return getInsightsWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java deleted file mode 100644 index f2cffddbe566..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java +++ /dev/null @@ -1,258 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesGetTimelinesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntitiesGetTimelinesClient. */ -public final class EntitiesGetTimelinesClientImpl implements EntitiesGetTimelinesClient { - /** The proxy service used to perform REST calls. */ - private final EntitiesGetTimelinesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntitiesGetTimelinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntitiesGetTimelinesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create(EntitiesGetTimelinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntitiesGetTimelines to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesGetTimelinesService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getTimeline") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @BodyParam("application/json") EntityTimelineParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - return listWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityTimelineResponseInner list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - return listAsync(resourceGroupName, workspaceName, entityId, parameters).block(); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java deleted file mode 100644 index 79b119a109c9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesGetTimelinesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntitiesGetTimelines; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineResponse; - -public final class EntitiesGetTimelinesImpl implements EntitiesGetTimelines { - private static final ClientLogger LOGGER = new ClientLogger(EntitiesGetTimelinesImpl.class); - - private final EntitiesGetTimelinesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntitiesGetTimelinesImpl( - EntitiesGetTimelinesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public EntityTimelineResponse list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - EntityTimelineResponseInner inner = - this.serviceClient().list(resourceGroupName, workspaceName, entityId, parameters); - if (inner != null) { - return new EntityTimelineResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, workspaceName, entityId, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityTimelineResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private EntitiesGetTimelinesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java deleted file mode 100644 index 6ce063fd52fe..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import com.azure.resourcemanager.securityinsights.models.Entities; -import com.azure.resourcemanager.securityinsights.models.Entity; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import com.azure.resourcemanager.securityinsights.models.EntityExpandResponse; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsResponse; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; -import com.azure.resourcemanager.securityinsights.models.GetQueriesResponse; - -public final class EntitiesImpl implements Entities { - private static final ClientLogger LOGGER = new ClientLogger(EntitiesImpl.class); - - private final EntitiesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntitiesImpl( - EntitiesClient innerClient, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EntityImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new EntityImpl(inner1, this.manager())); - } - - public Entity get(String resourceGroupName, String workspaceName, String entityId) { - EntityInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityId); - if (inner != null) { - return new EntityImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, entityId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EntityExpandResponse expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - EntityExpandResponseInner inner = - this.serviceClient().expand(resourceGroupName, workspaceName, entityId, parameters); - if (inner != null) { - return new EntityExpandResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context) { - Response inner = - this.serviceClient().expandWithResponse(resourceGroupName, workspaceName, entityId, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityExpandResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public GetQueriesResponse queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - GetQueriesResponseInner inner = this.serviceClient().queries(resourceGroupName, workspaceName, entityId, kind); - if (inner != null) { - return new GetQueriesResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { - Response inner = - this.serviceClient().queriesWithResponse(resourceGroupName, workspaceName, entityId, kind, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new GetQueriesResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EntityGetInsightsResponse getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - EntityGetInsightsResponseInner inner = - this.serviceClient().getInsights(resourceGroupName, workspaceName, entityId, parameters); - if (inner != null) { - return new EntityGetInsightsResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context) { - Response inner = - this - .serviceClient() - .getInsightsWithResponse(resourceGroupName, workspaceName, entityId, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityGetInsightsResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private EntitiesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java deleted file mode 100644 index d1fbb7073274..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java +++ /dev/null @@ -1,458 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.RelationList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntitiesRelationsClient. */ -public final class EntitiesRelationsClientImpl implements EntitiesRelationsClient { - /** The proxy service used to perform REST calls. */ - private final EntitiesRelationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntitiesRelationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntitiesRelationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(EntitiesRelationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntitiesRelations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesRelationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String entityId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String entityId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java deleted file mode 100644 index 328b7929d8aa..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.EntitiesRelations; -import com.azure.resourcemanager.securityinsights.models.Relation; - -public final class EntitiesRelationsImpl implements EntitiesRelations { - private static final ClientLogger LOGGER = new ClientLogger(EntitiesRelationsImpl.class); - - private final EntitiesRelationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntitiesRelationsImpl( - EntitiesRelationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String entityId) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, entityId); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - private EntitiesRelationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityExpandResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityExpandResponseImpl.java deleted file mode 100644 index bebd12d78d76..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityExpandResponseImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityExpandResponse; -import com.azure.resourcemanager.securityinsights.models.EntityExpandResponseValue; -import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; - -public final class EntityExpandResponseImpl implements EntityExpandResponse { - private EntityExpandResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityExpandResponseImpl( - EntityExpandResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ExpansionResultsMetadata metadata() { - return this.innerModel().metadata(); - } - - public EntityExpandResponseValue value() { - return this.innerModel().value(); - } - - public EntityExpandResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityGetInsightsResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityGetInsightsResponseImpl.java deleted file mode 100644 index ebe0040b31fc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityGetInsightsResponseImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsResponse; -import com.azure.resourcemanager.securityinsights.models.EntityInsightItem; -import com.azure.resourcemanager.securityinsights.models.GetInsightsResultsMetadata; -import java.util.Collections; -import java.util.List; - -public final class EntityGetInsightsResponseImpl implements EntityGetInsightsResponse { - private EntityGetInsightsResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityGetInsightsResponseImpl( - EntityGetInsightsResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public GetInsightsResultsMetadata metadata() { - return this.innerModel().metadata(); - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EntityGetInsightsResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityImpl.java deleted file mode 100644 index 419788334c11..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.models.Entity; - -public final class EntityImpl implements Entity { - private EntityInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityImpl( - EntityInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EntityInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java deleted file mode 100644 index cff5f927a832..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java +++ /dev/null @@ -1,911 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueriesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.models.CustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; -import com.azure.resourcemanager.securityinsights.models.EntityQueryList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntityQueriesClient. */ -public final class EntityQueriesClientImpl implements EntityQueriesClient { - /** The proxy service used to perform REST calls. */ - private final EntityQueriesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntityQueriesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntityQueriesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(EntityQueriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntityQueries to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityQueriesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("kind") EntityQueriesKind kind, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityQueryId") String entityQueryId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityQueryId") String entityQueryId, - @BodyParam("application/json") CustomEntityQuery entityQuery, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityQueryId") String entityQueryId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, EntityQueriesKind kind) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - kind, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - kind, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, EntityQueriesKind kind) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final EntityQueriesKind kind = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final EntityQueriesKind kind = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind)); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind, context)); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - accept, - context); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String entityQueryId) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId) { - return getAsync(resourceGroupName, workspaceName, entityQueryId).block(); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - if (entityQuery == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQuery is required and cannot be null.")); - } else { - entityQuery.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - entityQuery, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - if (entityQuery == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQuery is required and cannot be null.")); - } else { - entityQuery.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - entityQuery, - accept, - context); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryInner createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - return createOrUpdateAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery).block(); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery, context) - .block(); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - accept, - context); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String entityQueryId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, entityQueryId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { - deleteAsync(resourceGroupName, workspaceName, entityQueryId).block(); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entity queries along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entity queries along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java deleted file mode 100644 index 66f6d4fb5322..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueriesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.models.CustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.EntityQueries; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; -import com.azure.resourcemanager.securityinsights.models.EntityQuery; - -public final class EntityQueriesImpl implements EntityQueries { - private static final ClientLogger LOGGER = new ClientLogger(EntityQueriesImpl.class); - - private final EntityQueriesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntityQueriesImpl( - EntityQueriesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EntityQueryImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, kind, context); - return Utils.mapPage(inner, inner1 -> new EntityQueryImpl(inner1, this.manager())); - } - - public EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId) { - EntityQueryInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityQueryId); - if (inner != null) { - return new EntityQueryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, entityQueryId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityQueryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EntityQuery createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - EntityQueryInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, entityQueryId, entityQuery); - if (inner != null) { - return new EntityQueryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, entityQueryId, entityQuery, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityQueryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { - this.serviceClient().delete(resourceGroupName, workspaceName, entityQueryId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, entityQueryId, context); - } - - private EntityQueriesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryImpl.java deleted file mode 100644 index aed9918b1c34..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.models.EntityQuery; - -public final class EntityQueryImpl implements EntityQuery { - private EntityQueryInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityQueryImpl( - EntityQueryInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EntityQueryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplateImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplateImpl.java deleted file mode 100644 index 36db8654b8da..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplateImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplate; - -public final class EntityQueryTemplateImpl implements EntityQueryTemplate { - private EntityQueryTemplateInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityQueryTemplateImpl( - EntityQueryTemplateInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EntityQueryTemplateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java deleted file mode 100644 index e60bfb3413bf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java +++ /dev/null @@ -1,544 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplateList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ -public final class EntityQueryTemplatesClientImpl implements EntityQueryTemplatesClient { - /** The proxy service used to perform REST calls. */ - private final EntityQueryTemplatesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntityQueryTemplatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntityQueryTemplatesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create(EntityQueryTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntityQueryTemplates to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityQueryTemplatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("kind") Constant88 kind, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates" - + "/{entityQueryTemplateId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityQueryTemplateId") String entityQueryTemplateId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant88 kind) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - kind, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - kind, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant88 kind) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Constant88 kind = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final Constant88 kind = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind, context)); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityQueryTemplateId == null) { - return Mono - .error(new IllegalArgumentException("Parameter entityQueryTemplateId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryTemplateId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityQueryTemplateId == null) { - return Mono - .error(new IllegalArgumentException("Parameter entityQueryTemplateId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryTemplateId, - accept, - context); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryTemplateId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - return getAsync(resourceGroupName, workspaceName, entityQueryTemplateId).block(); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryTemplateId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entity query templates along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entity query templates along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java deleted file mode 100644 index 040dcb3be9b1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplate; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; - -public final class EntityQueryTemplatesImpl implements EntityQueryTemplates { - private static final ClientLogger LOGGER = new ClientLogger(EntityQueryTemplatesImpl.class); - - private final EntityQueryTemplatesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntityQueryTemplatesImpl( - EntityQueryTemplatesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EntityQueryTemplateImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, kind, context); - return Utils.mapPage(inner, inner1 -> new EntityQueryTemplateImpl(inner1, this.manager())); - } - - public EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - EntityQueryTemplateInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, entityQueryTemplateId); - if (inner != null) { - return new EntityQueryTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, entityQueryTemplateId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityQueryTemplateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private EntityQueryTemplatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java deleted file mode 100644 index a30ef2467eab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntityRelationsClient. */ -public final class EntityRelationsClientImpl implements EntityRelationsClient { - /** The proxy service used to perform REST calls. */ - private final EntityRelationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntityRelationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntityRelationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(EntityRelationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntityRelations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityRelationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations" - + "/{relationName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getRelation( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @PathParam("relationName") String relationName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRelationWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, String relationName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getRelation( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - relationName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRelationWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getRelation( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - relationName, - accept, - context); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRelationAsync( - String resourceGroupName, String workspaceName, String entityId, String relationName) { - return getRelationWithResponseAsync(resourceGroupName, workspaceName, entityId, relationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner getRelation( - String resourceGroupName, String workspaceName, String entityId, String relationName) { - return getRelationAsync(resourceGroupName, workspaceName, entityId, relationName).block(); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { - return getRelationWithResponseAsync(resourceGroupName, workspaceName, entityId, relationName, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java deleted file mode 100644 index 6521f11e7b25..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.EntityRelations; -import com.azure.resourcemanager.securityinsights.models.Relation; - -public final class EntityRelationsImpl implements EntityRelations { - private static final ClientLogger LOGGER = new ClientLogger(EntityRelationsImpl.class); - - private final EntityRelationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntityRelationsImpl( - EntityRelationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName) { - RelationInner inner = - this.serviceClient().getRelation(resourceGroupName, workspaceName, entityId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { - Response inner = - this - .serviceClient() - .getRelationWithResponse(resourceGroupName, workspaceName, entityId, relationName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RelationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private EntityRelationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityTimelineResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityTimelineResponseImpl.java deleted file mode 100644 index a6c772737410..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityTimelineResponseImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineItem; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineResponse; -import com.azure.resourcemanager.securityinsights.models.TimelineResultsMetadata; -import java.util.Collections; -import java.util.List; - -public final class EntityTimelineResponseImpl implements EntityTimelineResponse { - private EntityTimelineResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityTimelineResponseImpl( - EntityTimelineResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public TimelineResultsMetadata metadata() { - return this.innerModel().metadata(); - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EntityTimelineResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportImpl.java deleted file mode 100644 index 370082d59375..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportImpl.java +++ /dev/null @@ -1,190 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import com.azure.resourcemanager.securityinsights.models.FileImport; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileImportState; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; -import com.azure.resourcemanager.securityinsights.models.ValidationError; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class FileImportImpl implements FileImport, FileImport.Definition { - private FileImportInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - FileImportImpl( - FileImportInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public IngestionMode ingestionMode() { - return this.innerModel().ingestionMode(); - } - - public FileImportContentType contentType() { - return this.innerModel().contentType(); - } - - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - - public FileMetadata errorFile() { - return this.innerModel().errorFile(); - } - - public List errorsPreview() { - List inner = this.innerModel().errorsPreview(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public FileMetadata importFile() { - return this.innerModel().importFile(); - } - - public Integer ingestedRecordCount() { - return this.innerModel().ingestedRecordCount(); - } - - public String source() { - return this.innerModel().source(); - } - - public FileImportState state() { - return this.innerModel().state(); - } - - public Integer totalRecordCount() { - return this.innerModel().totalRecordCount(); - } - - public Integer validRecordCount() { - return this.innerModel().validRecordCount(); - } - - public OffsetDateTime filesValidUntilTimeUtc() { - return this.innerModel().filesValidUntilTimeUtc(); - } - - public OffsetDateTime importValidUntilTimeUtc() { - return this.innerModel().importValidUntilTimeUtc(); - } - - public FileImportInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String fileImportId; - - public FileImportImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public FileImport create() { - this.innerObject = - serviceManager - .serviceClient() - .getFileImports() - .createWithResponse(resourceGroupName, workspaceName, fileImportId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public FileImport create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFileImports() - .createWithResponse(resourceGroupName, workspaceName, fileImportId, this.innerModel(), context) - .getValue(); - return this; - } - - FileImportImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new FileImportInner(); - this.serviceManager = serviceManager; - this.fileImportId = name; - } - - public FileImport refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getFileImports() - .getWithResponse(resourceGroupName, workspaceName, fileImportId, Context.NONE) - .getValue(); - return this; - } - - public FileImport refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFileImports() - .getWithResponse(resourceGroupName, workspaceName, fileImportId, context) - .getValue(); - return this; - } - - public FileImportImpl withIngestionMode(IngestionMode ingestionMode) { - this.innerModel().withIngestionMode(ingestionMode); - return this; - } - - public FileImportImpl withContentType(FileImportContentType contentType) { - this.innerModel().withContentType(contentType); - return this; - } - - public FileImportImpl withImportFile(FileMetadata importFile) { - this.innerModel().withImportFile(importFile); - return this; - } - - public FileImportImpl withSource(String source) { - this.innerModel().withSource(source); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java deleted file mode 100644 index 4b6a38958664..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java +++ /dev/null @@ -1,1082 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.securityinsights.fluent.FileImportsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import com.azure.resourcemanager.securityinsights.models.FileImportList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in FileImportsClient. */ -public final class FileImportsClientImpl implements FileImportsClient { - /** The proxy service used to perform REST calls. */ - private final FileImportsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of FileImportsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FileImportsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(FileImportsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsFileImports to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsFile") - private interface FileImportsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("fileImportId") String fileImportId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") - @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("fileImportId") String fileImportId, - @BodyParam("application/json") FileImportInner fileImport, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("fileImportId") String fileImportId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 file import along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 file import along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - accept, - context); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 file import on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String fileImportId) { - return getWithResponseAsync(resourceGroupName, workspaceName, fileImportId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 file import. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId) { - return getAsync(resourceGroupName, workspaceName, fileImportId).block(); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 file import along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, fileImportId, context).block(); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - if (fileImport == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImport is required and cannot be null.")); - } else { - fileImport.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - fileImport, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - if (fileImport == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImport is required and cannot be null.")); - } else { - fileImport.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - fileImport, - accept, - context); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { - return createWithResponseAsync(resourceGroupName, workspaceName, fileImportId, fileImport) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner create( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { - return createAsync(resourceGroupName, workspaceName, fileImportId, fileImport).block(); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, fileImportId, fileImport, context).block(); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - accept, - context); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FileImportInner> beginDeleteAsync( - String resourceGroupName, String workspaceName, String fileImportId) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, fileImportId); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FileImportInner.class, - FileImportInner.class, - this.client.getContext()); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FileImportInner> beginDeleteAsync( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, fileImportId, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FileImportInner.class, FileImportInner.class, context); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FileImportInner> beginDelete( - String resourceGroupName, String workspaceName, String fileImportId) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId).getSyncPoller(); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FileImportInner> beginDelete( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId, context).getSyncPoller(); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String fileImportId) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner delete(String resourceGroupName, String workspaceName, String fileImportId) { - return deleteAsync(resourceGroupName, workspaceName, fileImportId).block(); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner delete( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return deleteAsync(resourceGroupName, workspaceName, fileImportId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the file imports along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the file imports along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java deleted file mode 100644 index 05175bc230d3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java +++ /dev/null @@ -1,206 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.FileImportsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import com.azure.resourcemanager.securityinsights.models.FileImport; -import com.azure.resourcemanager.securityinsights.models.FileImports; - -public final class FileImportsImpl implements FileImports { - private static final ClientLogger LOGGER = new ClientLogger(FileImportsImpl.class); - - private final FileImportsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public FileImportsImpl( - FileImportsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new FileImportImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new FileImportImpl(inner1, this.manager())); - } - - public FileImport get(String resourceGroupName, String workspaceName, String fileImportId) { - FileImportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, fileImportId); - if (inner != null) { - return new FileImportImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, fileImportId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new FileImportImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public FileImport delete(String resourceGroupName, String workspaceName, String fileImportId) { - FileImportInner inner = this.serviceClient().delete(resourceGroupName, workspaceName, fileImportId); - if (inner != null) { - return new FileImportImpl(inner, this.manager()); - } else { - return null; - } - } - - public FileImport delete(String resourceGroupName, String workspaceName, String fileImportId, Context context) { - FileImportInner inner = this.serviceClient().delete(resourceGroupName, workspaceName, fileImportId, context); - if (inner != null) { - return new FileImportImpl(inner, this.manager()); - } else { - return null; - } - } - - public FileImport getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileImportId = Utils.getValueFromIdByName(id, "fileImports"); - if (fileImportId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileImports'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, fileImportId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileImportId = Utils.getValueFromIdByName(id, "fileImports"); - if (fileImportId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileImports'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, fileImportId, context); - } - - public FileImport deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileImportId = Utils.getValueFromIdByName(id, "fileImports"); - if (fileImportId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileImports'.", id))); - } - return this.delete(resourceGroupName, workspaceName, fileImportId, Context.NONE); - } - - public FileImport deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileImportId = Utils.getValueFromIdByName(id, "fileImports"); - if (fileImportId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileImports'.", id))); - } - return this.delete(resourceGroupName, workspaceName, fileImportId, context); - } - - private FileImportsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public FileImportImpl define(String name) { - return new FileImportImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetQueriesResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetQueriesResponseImpl.java deleted file mode 100644 index b1fdfd6e3742..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetQueriesResponseImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityQueryItem; -import com.azure.resourcemanager.securityinsights.models.GetQueriesResponse; -import java.util.Collections; -import java.util.List; - -public final class GetQueriesResponseImpl implements GetQueriesResponse { - private GetQueriesResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - GetQueriesResponseImpl( - GetQueriesResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public GetQueriesResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentAlertListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentAlertListImpl.java deleted file mode 100644 index 62a7373bdd1b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentAlertListImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentAlertListInner; -import com.azure.resourcemanager.securityinsights.models.IncidentAlertList; -import com.azure.resourcemanager.securityinsights.models.SecurityAlert; -import java.util.Collections; -import java.util.List; - -public final class IncidentAlertListImpl implements IncidentAlertList { - private IncidentAlertListInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - IncidentAlertListImpl( - IncidentAlertListInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public IncidentAlertListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentBookmarkListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentBookmarkListImpl.java deleted file mode 100644 index 1b8b558e3983..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentBookmarkListImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; -import com.azure.resourcemanager.securityinsights.models.HuntingBookmark; -import com.azure.resourcemanager.securityinsights.models.IncidentBookmarkList; -import java.util.Collections; -import java.util.List; - -public final class IncidentBookmarkListImpl implements IncidentBookmarkList { - private IncidentBookmarkListInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - IncidentBookmarkListImpl( - IncidentBookmarkListInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public IncidentBookmarkListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentImpl.java deleted file mode 100644 index 1cb3b8ebe779..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; -import com.azure.resourcemanager.securityinsights.models.ClientInfo; -import com.azure.resourcemanager.securityinsights.models.IncidentComment; -import java.time.OffsetDateTime; - -public final class IncidentCommentImpl implements IncidentComment, IncidentComment.Definition, IncidentComment.Update { - private IncidentCommentInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerModel().lastModifiedTimeUtc(); - } - - public String message() { - return this.innerModel().message(); - } - - public ClientInfo author() { - return this.innerModel().author(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public IncidentCommentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String incidentId; - - private String incidentCommentId; - - public IncidentCommentImpl withExistingIncident(String resourceGroupName, String workspaceName, String incidentId) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.incidentId = incidentId; - return this; - } - - public IncidentComment create() { - this.innerObject = - serviceManager - .serviceClient() - .getIncidentComments() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, incidentId, incidentCommentId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public IncidentComment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIncidentComments() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, incidentId, incidentCommentId, this.innerModel(), context) - .getValue(); - return this; - } - - IncidentCommentImpl( - String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new IncidentCommentInner(); - this.serviceManager = serviceManager; - this.incidentCommentId = name; - } - - public IncidentCommentImpl update() { - return this; - } - - public IncidentComment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getIncidentComments() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, incidentId, incidentCommentId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public IncidentComment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIncidentComments() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, incidentId, incidentCommentId, this.innerModel(), context) - .getValue(); - return this; - } - - IncidentCommentImpl( - IncidentCommentInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.incidentId = Utils.getValueFromIdByName(innerObject.id(), "incidents"); - this.incidentCommentId = Utils.getValueFromIdByName(innerObject.id(), "comments"); - } - - public IncidentComment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getIncidentComments() - .getWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, Context.NONE) - .getValue(); - return this; - } - - public IncidentComment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIncidentComments() - .getWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, context) - .getValue(); - return this; - } - - public IncidentCommentImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public IncidentCommentImpl withMessage(String message) { - this.innerModel().withMessage(message); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java deleted file mode 100644 index 5c20f86fb992..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java +++ /dev/null @@ -1,1077 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.IncidentCommentsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; -import com.azure.resourcemanager.securityinsights.models.IncidentCommentList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IncidentCommentsClient. */ -public final class IncidentCommentsClientImpl implements IncidentCommentsClient { - /** The proxy service used to perform REST calls. */ - private final IncidentCommentsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of IncidentCommentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IncidentCommentsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(IncidentCommentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsIncidentComments to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentCommentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments" - + "/{incidentCommentId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @PathParam("incidentCommentId") String incidentCommentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments" - + "/{incidentCommentId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @PathParam("incidentCommentId") String incidentCommentId, - @BodyParam("application/json") IncidentCommentInner incidentComment, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments" - + "/{incidentCommentId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @PathParam("incidentCommentId") String incidentCommentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String incidentId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken)); - } - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken, context)); - } - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (incidentCommentId == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentCommentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - incidentCommentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (incidentCommentId == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentCommentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - incidentCommentId, - accept, - context); - } - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentCommentInner get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - return getAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId).block(); - } - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context).block(); - } - - /** - * Creates or updates the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param incidentComment The incident comment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String incidentCommentId, - IncidentCommentInner incidentComment) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (incidentCommentId == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentCommentId is required and cannot be null.")); - } - if (incidentComment == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentComment is required and cannot be null.")); - } else { - incidentComment.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - incidentCommentId, - incidentComment, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param incidentComment The incident comment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String incidentCommentId, - IncidentCommentInner incidentComment, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (incidentCommentId == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentCommentId is required and cannot be null.")); - } - if (incidentComment == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentComment is required and cannot be null.")); - } else { - incidentComment.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - incidentCommentId, - incidentComment, - accept, - context); - } - - /** - * Creates or updates the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param incidentComment The incident comment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String incidentCommentId, - IncidentCommentInner incidentComment) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param incidentComment The incident comment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentCommentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String incidentId, - String incidentCommentId, - IncidentCommentInner incidentComment) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment) - .block(); - } - - /** - * Creates or updates the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param incidentComment The incident comment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - String incidentCommentId, - IncidentCommentInner incidentComment, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment, context) - .block(); - } - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (incidentCommentId == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentCommentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - incidentCommentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (incidentCommentId == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentCommentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - incidentCommentId, - accept, - context); - } - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - deleteAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId).block(); - } - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of incident comments along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of incident comments along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java deleted file mode 100644 index 8092ca8833a5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java +++ /dev/null @@ -1,237 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.IncidentCommentsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; -import com.azure.resourcemanager.securityinsights.models.IncidentComment; -import com.azure.resourcemanager.securityinsights.models.IncidentComments; - -public final class IncidentCommentsImpl implements IncidentComments { - private static final ClientLogger LOGGER = new ClientLogger(IncidentCommentsImpl.class); - - private final IncidentCommentsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public IncidentCommentsImpl( - IncidentCommentsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, incidentId); - return Utils.mapPage(inner, inner1 -> new IncidentCommentImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new IncidentCommentImpl(inner1, this.manager())); - } - - public IncidentComment get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - IncidentCommentInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentCommentId); - if (inner != null) { - return new IncidentCommentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IncidentCommentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentCommentId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, context); - } - - public IncidentComment getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String incidentId = Utils.getValueFromIdByName(id, "incidents"); - if (incidentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); - } - String incidentCommentId = Utils.getValueFromIdByName(id, "comments"); - if (incidentCommentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'comments'.", id))); - } - return this - .getWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String incidentId = Utils.getValueFromIdByName(id, "incidents"); - if (incidentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); - } - String incidentCommentId = Utils.getValueFromIdByName(id, "comments"); - if (incidentCommentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'comments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String incidentId = Utils.getValueFromIdByName(id, "incidents"); - if (incidentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); - } - String incidentCommentId = Utils.getValueFromIdByName(id, "comments"); - if (incidentCommentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'comments'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String incidentId = Utils.getValueFromIdByName(id, "incidents"); - if (incidentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); - } - String incidentCommentId = Utils.getValueFromIdByName(id, "comments"); - if (incidentCommentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'comments'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, context); - } - - private IncidentCommentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public IncidentCommentImpl define(String name) { - return new IncidentCommentImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java deleted file mode 100644 index 317c6b5ed21f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner; -import com.azure.resourcemanager.securityinsights.models.Entity; -import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResponse; -import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResultsMetadata; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class IncidentEntitiesResponseImpl implements IncidentEntitiesResponse { - private IncidentEntitiesResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - IncidentEntitiesResponseImpl( - IncidentEntitiesResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List entities() { - List inner = this.innerModel().entities(); - if (inner != null) { - return Collections - .unmodifiableList( - inner.stream().map(inner1 -> new EntityImpl(inner1, this.manager())).collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public List metadata() { - List inner = this.innerModel().metadata(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public IncidentEntitiesResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java deleted file mode 100644 index d9c394639227..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java +++ /dev/null @@ -1,366 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import com.azure.resourcemanager.securityinsights.models.Incident; -import com.azure.resourcemanager.securityinsights.models.IncidentAdditionalData; -import com.azure.resourcemanager.securityinsights.models.IncidentAlertList; -import com.azure.resourcemanager.securityinsights.models.IncidentBookmarkList; -import com.azure.resourcemanager.securityinsights.models.IncidentClassification; -import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; -import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResponse; -import com.azure.resourcemanager.securityinsights.models.IncidentLabel; -import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class IncidentImpl implements Incident, Incident.Definition, Incident.Update { - private IncidentInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public IncidentAdditionalData additionalData() { - return this.innerModel().additionalData(); - } - - public IncidentClassification classification() { - return this.innerModel().classification(); - } - - public String classificationComment() { - return this.innerModel().classificationComment(); - } - - public IncidentClassificationReason classificationReason() { - return this.innerModel().classificationReason(); - } - - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - - public String description() { - return this.innerModel().description(); - } - - public OffsetDateTime firstActivityTimeUtc() { - return this.innerModel().firstActivityTimeUtc(); - } - - public String incidentUrl() { - return this.innerModel().incidentUrl(); - } - - public Integer incidentNumber() { - return this.innerModel().incidentNumber(); - } - - public List labels() { - List inner = this.innerModel().labels(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String providerName() { - return this.innerModel().providerName(); - } - - public String providerIncidentId() { - return this.innerModel().providerIncidentId(); - } - - public OffsetDateTime lastActivityTimeUtc() { - return this.innerModel().lastActivityTimeUtc(); - } - - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerModel().lastModifiedTimeUtc(); - } - - public IncidentOwnerInfo owner() { - return this.innerModel().owner(); - } - - public List relatedAnalyticRuleIds() { - List inner = this.innerModel().relatedAnalyticRuleIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public IncidentSeverity severity() { - return this.innerModel().severity(); - } - - public IncidentStatus status() { - return this.innerModel().status(); - } - - public TeamInformation teamInformation() { - TeamInformationInner inner = this.innerModel().teamInformation(); - if (inner != null) { - return new TeamInformationImpl(inner, this.manager()); - } else { - return null; - } - } - - public String title() { - return this.innerModel().title(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public IncidentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String incidentId; - - public IncidentImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Incident create() { - this.innerObject = - serviceManager - .serviceClient() - .getIncidents() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, incidentId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Incident create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIncidents() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, incidentId, this.innerModel(), context) - .getValue(); - return this; - } - - IncidentImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new IncidentInner(); - this.serviceManager = serviceManager; - this.incidentId = name; - } - - public IncidentImpl update() { - return this; - } - - public Incident apply() { - this.innerObject = - serviceManager - .serviceClient() - .getIncidents() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, incidentId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Incident apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIncidents() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, incidentId, this.innerModel(), context) - .getValue(); - return this; - } - - IncidentImpl( - IncidentInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.incidentId = Utils.getValueFromIdByName(innerObject.id(), "incidents"); - } - - public Incident refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getIncidents() - .getWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE) - .getValue(); - return this; - } - - public Incident refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIncidents() - .getWithResponse(resourceGroupName, workspaceName, incidentId, context) - .getValue(); - return this; - } - - public TeamInformation createTeam(TeamProperties teamProperties) { - return serviceManager.incidents().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); - } - - public Response createTeamWithResponse(TeamProperties teamProperties, Context context) { - return serviceManager - .incidents() - .createTeamWithResponse(resourceGroupName, workspaceName, incidentId, teamProperties, context); - } - - public IncidentAlertList listAlerts() { - return serviceManager.incidents().listAlerts(resourceGroupName, workspaceName, incidentId); - } - - public Response listAlertsWithResponse(Context context) { - return serviceManager.incidents().listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, context); - } - - public IncidentBookmarkList listBookmarks() { - return serviceManager.incidents().listBookmarks(resourceGroupName, workspaceName, incidentId); - } - - public Response listBookmarksWithResponse(Context context) { - return serviceManager - .incidents() - .listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, context); - } - - public IncidentEntitiesResponse listEntities() { - return serviceManager.incidents().listEntities(resourceGroupName, workspaceName, incidentId); - } - - public Response listEntitiesWithResponse(Context context) { - return serviceManager - .incidents() - .listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, context); - } - - public IncidentImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public IncidentImpl withClassification(IncidentClassification classification) { - this.innerModel().withClassification(classification); - return this; - } - - public IncidentImpl withClassificationComment(String classificationComment) { - this.innerModel().withClassificationComment(classificationComment); - return this; - } - - public IncidentImpl withClassificationReason(IncidentClassificationReason classificationReason) { - this.innerModel().withClassificationReason(classificationReason); - return this; - } - - public IncidentImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public IncidentImpl withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { - this.innerModel().withFirstActivityTimeUtc(firstActivityTimeUtc); - return this; - } - - public IncidentImpl withLabels(List labels) { - this.innerModel().withLabels(labels); - return this; - } - - public IncidentImpl withProviderName(String providerName) { - this.innerModel().withProviderName(providerName); - return this; - } - - public IncidentImpl withProviderIncidentId(String providerIncidentId) { - this.innerModel().withProviderIncidentId(providerIncidentId); - return this; - } - - public IncidentImpl withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { - this.innerModel().withLastActivityTimeUtc(lastActivityTimeUtc); - return this; - } - - public IncidentImpl withOwner(IncidentOwnerInfo owner) { - this.innerModel().withOwner(owner); - return this; - } - - public IncidentImpl withSeverity(IncidentSeverity severity) { - this.innerModel().withSeverity(severity); - return this; - } - - public IncidentImpl withStatus(IncidentStatus status) { - this.innerModel().withStatus(status); - return this; - } - - public IncidentImpl withTeamInformation(TeamInformationInner teamInformation) { - this.innerModel().withTeamInformation(teamInformation); - return this; - } - - public IncidentImpl withTitle(String title) { - this.innerModel().withTitle(title); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java deleted file mode 100644 index 408f9e893f0f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentPropertiesInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import com.azure.resourcemanager.securityinsights.models.IncidentAdditionalData; -import com.azure.resourcemanager.securityinsights.models.IncidentClassification; -import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; -import com.azure.resourcemanager.securityinsights.models.IncidentLabel; -import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; -import com.azure.resourcemanager.securityinsights.models.IncidentProperties; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class IncidentPropertiesImpl implements IncidentProperties { - private IncidentPropertiesInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - IncidentPropertiesImpl( - IncidentPropertiesInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public IncidentAdditionalData additionalData() { - return this.innerModel().additionalData(); - } - - public IncidentClassification classification() { - return this.innerModel().classification(); - } - - public String classificationComment() { - return this.innerModel().classificationComment(); - } - - public IncidentClassificationReason classificationReason() { - return this.innerModel().classificationReason(); - } - - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - - public String description() { - return this.innerModel().description(); - } - - public OffsetDateTime firstActivityTimeUtc() { - return this.innerModel().firstActivityTimeUtc(); - } - - public String incidentUrl() { - return this.innerModel().incidentUrl(); - } - - public Integer incidentNumber() { - return this.innerModel().incidentNumber(); - } - - public List labels() { - List inner = this.innerModel().labels(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String providerName() { - return this.innerModel().providerName(); - } - - public String providerIncidentId() { - return this.innerModel().providerIncidentId(); - } - - public OffsetDateTime lastActivityTimeUtc() { - return this.innerModel().lastActivityTimeUtc(); - } - - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerModel().lastModifiedTimeUtc(); - } - - public IncidentOwnerInfo owner() { - return this.innerModel().owner(); - } - - public List relatedAnalyticRuleIds() { - List inner = this.innerModel().relatedAnalyticRuleIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public IncidentSeverity severity() { - return this.innerModel().severity(); - } - - public IncidentStatus status() { - return this.innerModel().status(); - } - - public TeamInformation teamInformation() { - TeamInformationInner inner = this.innerModel().teamInformation(); - if (inner != null) { - return new TeamInformationImpl(inner, this.manager()); - } else { - return null; - } - } - - public String title() { - return this.innerModel().title(); - } - - public IncidentPropertiesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java deleted file mode 100644 index 2087692a0fbf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java +++ /dev/null @@ -1,1066 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.IncidentRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.RelationList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IncidentRelationsClient. */ -public final class IncidentRelationsClientImpl implements IncidentRelationsClient { - /** The proxy service used to perform REST calls. */ - private final IncidentRelationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of IncidentRelationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IncidentRelationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(IncidentRelationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsIncidentRelations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentRelationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations" - + "/{relationName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @PathParam("relationName") String relationName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations" - + "/{relationName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @PathParam("relationName") String relationName, - @BodyParam("application/json") RelationInner relation, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations" - + "/{relationName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @PathParam("relationName") String relationName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String incidentId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken)); - } - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken, context)); - } - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, String relationName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - relationName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - relationName, - accept, - context); - } - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String incidentId, String relationName) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - return getAsync(resourceGroupName, workspaceName, incidentId, relationName).block(); - } - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); - } - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - if (relation == null) { - return Mono.error(new IllegalArgumentException("Parameter relation is required and cannot be null.")); - } else { - relation.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - relationName, - relation, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - if (relation == null) { - return Mono.error(new IllegalArgumentException("Parameter relation is required and cannot be null.")); - } else { - relation.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - relationName, - relation, - accept, - context); - } - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, relation) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, relationName, relation).block(); - } - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, incidentId, relationName, relation, context) - .block(); - } - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, String relationName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - relationName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - relationName, - accept, - context); - } - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String incidentId, String relationName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - deleteAsync(resourceGroupName, workspaceName, incidentId, relationName).block(); - } - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java deleted file mode 100644 index ae14e641b851..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java +++ /dev/null @@ -1,132 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.IncidentRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.IncidentRelations; -import com.azure.resourcemanager.securityinsights.models.Relation; - -public final class IncidentRelationsImpl implements IncidentRelations { - private static final ClientLogger LOGGER = new ClientLogger(IncidentRelationsImpl.class); - - private final IncidentRelationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public IncidentRelationsImpl( - IncidentRelationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, incidentId); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, incidentId, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - public Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, incidentId, relationName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RelationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Relation createOrUpdate( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation) { - RelationInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, incidentId, relationName, relation); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, incidentId, relationName, relation, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RelationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, relationName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, incidentId, relationName, context); - } - - private IncidentRelationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java deleted file mode 100644 index a07638efa778..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java +++ /dev/null @@ -1,1906 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.IncidentsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentAlertListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import com.azure.resourcemanager.securityinsights.models.IncidentList; -import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IncidentsClient. */ -public final class IncidentsClientImpl implements IncidentsClient { - /** The proxy service used to perform REST calls. */ - private final IncidentsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of IncidentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IncidentsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(IncidentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsIncidents to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}" - + "/runPlaybook") - @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> runPlaybook( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentIdentifier") String incidentIdentifier, - @BodyParam("application/json") ManualTriggerRequestBody requestBody, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @BodyParam("application/json") IncidentInner incident, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/createTeam") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createTeam( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @BodyParam("application/json") TeamProperties teamProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/alerts") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAlerts( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/bookmarks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBookmarks( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/entities") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listEntities( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> runPlaybookWithResponseAsync( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentIdentifier == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentIdentifier is required and cannot be null.")); - } - if (requestBody != null) { - requestBody.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .runPlaybook( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentIdentifier, - requestBody, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> runPlaybookWithResponseAsync( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentIdentifier == null) { - return Mono - .error(new IllegalArgumentException("Parameter incidentIdentifier is required and cannot be null.")); - } - if (requestBody != null) { - requestBody.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .runPlaybook( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentIdentifier, - requestBody, - accept, - context); - } - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runPlaybookAsync( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody) { - return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runPlaybookAsync(String resourceGroupName, String workspaceName, String incidentIdentifier) { - final ManualTriggerRequestBody requestBody = null; - return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { - final ManualTriggerRequestBody requestBody = null; - return runPlaybookAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody).block(); - } - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context) { - return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context) - .block(); - } - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); - } - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); - } - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context); - } - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String incidentId) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentInner get(String resourceGroupName, String workspaceName, String incidentId) { - return getAsync(resourceGroupName, workspaceName, incidentId).block(); - } - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); - } - - /** - * Creates or updates the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incident The incident. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (incident == null) { - return Mono.error(new IllegalArgumentException("Parameter incident is required and cannot be null.")); - } else { - incident.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - incident, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incident The incident. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (incident == null) { - return Mono.error(new IllegalArgumentException("Parameter incident is required and cannot be null.")); - } else { - incident.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - incident, - accept, - context); - } - - /** - * Creates or updates the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incident The incident. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, incident) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incident The incident. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, incident).block(); - } - - /** - * Creates or updates the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incident The incident. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, incident, context).block(); - } - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context); - } - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String incidentId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId) { - deleteAsync(resourceGroupName, workspaceName, incidentId).block(); - } - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createTeamWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (teamProperties == null) { - return Mono.error(new IllegalArgumentException("Parameter teamProperties is required and cannot be null.")); - } else { - teamProperties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createTeam( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - teamProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createTeamWithResponseAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (teamProperties == null) { - return Mono.error(new IllegalArgumentException("Parameter teamProperties is required and cannot be null.")); - } else { - teamProperties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createTeam( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - teamProperties, - accept, - context); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createTeamAsync( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TeamInformationInner createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - return createTeamAsync(resourceGroupName, workspaceName, incidentId, teamProperties).block(); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context) { - return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties, context) - .block(); - } - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAlertsWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listAlerts( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAlertsWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listAlerts( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context); - } - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAlertsAsync( - String resourceGroupName, String workspaceName, String incidentId) { - return listAlertsWithResponseAsync(resourceGroupName, workspaceName, incidentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId) { - return listAlertsAsync(resourceGroupName, workspaceName, incidentId).block(); - } - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listAlertsWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listAlertsWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); - } - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBookmarksWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listBookmarks( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBookmarksWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBookmarks( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context); - } - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listBookmarksAsync( - String resourceGroupName, String workspaceName, String incidentId) { - return listBookmarksWithResponseAsync(resourceGroupName, workspaceName, incidentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { - return listBookmarksAsync(resourceGroupName, workspaceName, incidentId).block(); - } - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBookmarksWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listBookmarksWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); - } - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listEntitiesWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listEntities( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listEntitiesWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listEntities( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - accept, - context); - } - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listEntitiesAsync( - String resourceGroupName, String workspaceName, String incidentId) { - return listEntitiesWithResponseAsync(resourceGroupName, workspaceName, incidentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentEntitiesResponseInner listEntities( - String resourceGroupName, String workspaceName, String incidentId) { - return listEntitiesAsync(resourceGroupName, workspaceName, incidentId).block(); - } - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listEntitiesWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the incidents along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the incidents along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java deleted file mode 100644 index a49e1a802a76..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java +++ /dev/null @@ -1,328 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.IncidentsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentAlertListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import com.azure.resourcemanager.securityinsights.models.Incident; -import com.azure.resourcemanager.securityinsights.models.IncidentAlertList; -import com.azure.resourcemanager.securityinsights.models.IncidentBookmarkList; -import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResponse; -import com.azure.resourcemanager.securityinsights.models.Incidents; -import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; -import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; - -public final class IncidentsImpl implements Incidents { - private static final ClientLogger LOGGER = new ClientLogger(IncidentsImpl.class); - - private final IncidentsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public IncidentsImpl( - IncidentsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { - return this.serviceClient().runPlaybook(resourceGroupName, workspaceName, incidentIdentifier); - } - - public Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context) { - return this - .serviceClient() - .runPlaybookWithResponse(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context); - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); - } - - public Incident get(String resourceGroupName, String workspaceName, String incidentId) { - IncidentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId); - if (inner != null) { - return new IncidentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, incidentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IncidentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String incidentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, incidentId, context); - } - - public TeamInformation createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - TeamInformationInner inner = - this.serviceClient().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); - if (inner != null) { - return new TeamInformationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context) { - Response inner = - this - .serviceClient() - .createTeamWithResponse(resourceGroupName, workspaceName, incidentId, teamProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new TeamInformationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId) { - IncidentAlertListInner inner = this.serviceClient().listAlerts(resourceGroupName, workspaceName, incidentId); - if (inner != null) { - return new IncidentAlertListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listAlertsWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - Response inner = - this.serviceClient().listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IncidentAlertListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { - IncidentBookmarkListInner inner = - this.serviceClient().listBookmarks(resourceGroupName, workspaceName, incidentId); - if (inner != null) { - return new IncidentBookmarkListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listBookmarksWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - Response inner = - this.serviceClient().listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IncidentBookmarkListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId) { - IncidentEntitiesResponseInner inner = - this.serviceClient().listEntities(resourceGroupName, workspaceName, incidentId); - if (inner != null) { - return new IncidentEntitiesResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - Response inner = - this.serviceClient().listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IncidentEntitiesResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Incident getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String incidentId = Utils.getValueFromIdByName(id, "incidents"); - if (incidentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String incidentId = Utils.getValueFromIdByName(id, "incidents"); - if (incidentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, incidentId, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String incidentId = Utils.getValueFromIdByName(id, "incidents"); - if (incidentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String incidentId = Utils.getValueFromIdByName(id, "incidents"); - if (incidentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, context); - } - - private IncidentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public IncidentImpl define(String name) { - return new IncidentImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java deleted file mode 100644 index cfcbc8e039f6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java +++ /dev/null @@ -1,209 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IpGeodatasClient. */ -public final class IpGeodatasClientImpl implements IpGeodatasClient { - /** The proxy service used to perform REST calls. */ - private final IpGeodatasService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of IpGeodatasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IpGeodatasClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(IpGeodatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsIpGeodatas to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsIpGe") - private interface IpGeodatasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights" - + "/enrichment/ip/geodata/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("ipAddress") String ipAddress, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String ipAddress) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipAddress == null) { - return Mono.error(new IllegalArgumentException("Parameter ipAddress is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ipAddress, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ipAddress, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipAddress == null) { - return Mono.error(new IllegalArgumentException("Parameter ipAddress is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ipAddress, - accept, - context); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String ipAddress) { - return getWithResponseAsync(resourceGroupName, ipAddress).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress) { - return getAsync(resourceGroupName, ipAddress).block(); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ipAddress, Context context) { - return getWithResponseAsync(resourceGroupName, ipAddress, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java deleted file mode 100644 index 7afbd00545ef..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; -import com.azure.resourcemanager.securityinsights.models.EnrichmentIpGeodata; -import com.azure.resourcemanager.securityinsights.models.IpGeodatas; - -public final class IpGeodatasImpl implements IpGeodatas { - private static final ClientLogger LOGGER = new ClientLogger(IpGeodatasImpl.class); - - private final IpGeodatasClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public IpGeodatasImpl( - IpGeodatasClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public EnrichmentIpGeodata get(String resourceGroupName, String ipAddress) { - EnrichmentIpGeodataInner inner = this.serviceClient().get(resourceGroupName, ipAddress); - if (inner != null) { - return new EnrichmentIpGeodataImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String ipAddress, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, ipAddress, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EnrichmentIpGeodataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private IpGeodatasClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java deleted file mode 100644 index 268664bb18db..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java +++ /dev/null @@ -1,458 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataModel; -import com.azure.resourcemanager.securityinsights.models.MetadataPatch; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import java.time.LocalDate; -import java.util.Collections; -import java.util.List; - -public final class MetadataModelImpl implements MetadataModel, MetadataModel.Definition, MetadataModel.Update { - private MetadataModelInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String contentId() { - return this.innerModel().contentId(); - } - - public String parentId() { - return this.innerModel().parentId(); - } - - public String version() { - return this.innerModel().version(); - } - - public Kind kind() { - return this.innerModel().kind(); - } - - public MetadataSource source() { - return this.innerModel().source(); - } - - public MetadataAuthor author() { - return this.innerModel().author(); - } - - public MetadataSupport support() { - return this.innerModel().support(); - } - - public MetadataDependencies dependencies() { - return this.innerModel().dependencies(); - } - - public MetadataCategories categories() { - return this.innerModel().categories(); - } - - public List providers() { - List inner = this.innerModel().providers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public LocalDate firstPublishDate() { - return this.innerModel().firstPublishDate(); - } - - public LocalDate lastPublishDate() { - return this.innerModel().lastPublishDate(); - } - - public String customVersion() { - return this.innerModel().customVersion(); - } - - public String contentSchemaVersion() { - return this.innerModel().contentSchemaVersion(); - } - - public String icon() { - return this.innerModel().icon(); - } - - public List threatAnalysisTactics() { - List inner = this.innerModel().threatAnalysisTactics(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List threatAnalysisTechniques() { - List inner = this.innerModel().threatAnalysisTechniques(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List previewImages() { - List inner = this.innerModel().previewImages(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List previewImagesDark() { - List inner = this.innerModel().previewImagesDark(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public MetadataModelInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String metadataName; - - private MetadataPatch updateMetadataPatch; - - public MetadataModelImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public MetadataModel create() { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .createWithResponse(resourceGroupName, workspaceName, metadataName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public MetadataModel create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .createWithResponse(resourceGroupName, workspaceName, metadataName, this.innerModel(), context) - .getValue(); - return this; - } - - MetadataModelImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new MetadataModelInner(); - this.serviceManager = serviceManager; - this.metadataName = name; - } - - public MetadataModelImpl update() { - this.updateMetadataPatch = new MetadataPatch(); - return this; - } - - public MetadataModel apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .updateWithResponse(resourceGroupName, workspaceName, metadataName, updateMetadataPatch, Context.NONE) - .getValue(); - return this; - } - - public MetadataModel apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .updateWithResponse(resourceGroupName, workspaceName, metadataName, updateMetadataPatch, context) - .getValue(); - return this; - } - - MetadataModelImpl( - MetadataModelInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.metadataName = Utils.getValueFromIdByName(innerObject.id(), "metadata"); - } - - public MetadataModel refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .getWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE) - .getValue(); - return this; - } - - public MetadataModel refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .getWithResponse(resourceGroupName, workspaceName, metadataName, context) - .getValue(); - return this; - } - - public MetadataModelImpl withEtag(String etag) { - if (isInCreateMode()) { - this.innerModel().withEtag(etag); - return this; - } else { - this.updateMetadataPatch.withEtag(etag); - return this; - } - } - - public MetadataModelImpl withContentId(String contentId) { - if (isInCreateMode()) { - this.innerModel().withContentId(contentId); - return this; - } else { - this.updateMetadataPatch.withContentId(contentId); - return this; - } - } - - public MetadataModelImpl withParentId(String parentId) { - if (isInCreateMode()) { - this.innerModel().withParentId(parentId); - return this; - } else { - this.updateMetadataPatch.withParentId(parentId); - return this; - } - } - - public MetadataModelImpl withVersion(String version) { - if (isInCreateMode()) { - this.innerModel().withVersion(version); - return this; - } else { - this.updateMetadataPatch.withVersion(version); - return this; - } - } - - public MetadataModelImpl withKind(Kind kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateMetadataPatch.withKind(kind); - return this; - } - } - - public MetadataModelImpl withSource(MetadataSource source) { - if (isInCreateMode()) { - this.innerModel().withSource(source); - return this; - } else { - this.updateMetadataPatch.withSource(source); - return this; - } - } - - public MetadataModelImpl withAuthor(MetadataAuthor author) { - if (isInCreateMode()) { - this.innerModel().withAuthor(author); - return this; - } else { - this.updateMetadataPatch.withAuthor(author); - return this; - } - } - - public MetadataModelImpl withSupport(MetadataSupport support) { - if (isInCreateMode()) { - this.innerModel().withSupport(support); - return this; - } else { - this.updateMetadataPatch.withSupport(support); - return this; - } - } - - public MetadataModelImpl withDependencies(MetadataDependencies dependencies) { - if (isInCreateMode()) { - this.innerModel().withDependencies(dependencies); - return this; - } else { - this.updateMetadataPatch.withDependencies(dependencies); - return this; - } - } - - public MetadataModelImpl withCategories(MetadataCategories categories) { - if (isInCreateMode()) { - this.innerModel().withCategories(categories); - return this; - } else { - this.updateMetadataPatch.withCategories(categories); - return this; - } - } - - public MetadataModelImpl withProviders(List providers) { - if (isInCreateMode()) { - this.innerModel().withProviders(providers); - return this; - } else { - this.updateMetadataPatch.withProviders(providers); - return this; - } - } - - public MetadataModelImpl withFirstPublishDate(LocalDate firstPublishDate) { - if (isInCreateMode()) { - this.innerModel().withFirstPublishDate(firstPublishDate); - return this; - } else { - this.updateMetadataPatch.withFirstPublishDate(firstPublishDate); - return this; - } - } - - public MetadataModelImpl withLastPublishDate(LocalDate lastPublishDate) { - if (isInCreateMode()) { - this.innerModel().withLastPublishDate(lastPublishDate); - return this; - } else { - this.updateMetadataPatch.withLastPublishDate(lastPublishDate); - return this; - } - } - - public MetadataModelImpl withCustomVersion(String customVersion) { - if (isInCreateMode()) { - this.innerModel().withCustomVersion(customVersion); - return this; - } else { - this.updateMetadataPatch.withCustomVersion(customVersion); - return this; - } - } - - public MetadataModelImpl withContentSchemaVersion(String contentSchemaVersion) { - if (isInCreateMode()) { - this.innerModel().withContentSchemaVersion(contentSchemaVersion); - return this; - } else { - this.updateMetadataPatch.withContentSchemaVersion(contentSchemaVersion); - return this; - } - } - - public MetadataModelImpl withIcon(String icon) { - if (isInCreateMode()) { - this.innerModel().withIcon(icon); - return this; - } else { - this.updateMetadataPatch.withIcon(icon); - return this; - } - } - - public MetadataModelImpl withThreatAnalysisTactics(List threatAnalysisTactics) { - if (isInCreateMode()) { - this.innerModel().withThreatAnalysisTactics(threatAnalysisTactics); - return this; - } else { - this.updateMetadataPatch.withThreatAnalysisTactics(threatAnalysisTactics); - return this; - } - } - - public MetadataModelImpl withThreatAnalysisTechniques(List threatAnalysisTechniques) { - if (isInCreateMode()) { - this.innerModel().withThreatAnalysisTechniques(threatAnalysisTechniques); - return this; - } else { - this.updateMetadataPatch.withThreatAnalysisTechniques(threatAnalysisTechniques); - return this; - } - } - - public MetadataModelImpl withPreviewImages(List previewImages) { - if (isInCreateMode()) { - this.innerModel().withPreviewImages(previewImages); - return this; - } else { - this.updateMetadataPatch.withPreviewImages(previewImages); - return this; - } - } - - public MetadataModelImpl withPreviewImagesDark(List previewImagesDark) { - if (isInCreateMode()) { - this.innerModel().withPreviewImagesDark(previewImagesDark); - return this; - } else { - this.updateMetadataPatch.withPreviewImagesDark(previewImagesDark); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java deleted file mode 100644 index c99b2cc76eaf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java +++ /dev/null @@ -1,1161 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.MetadataList; -import com.azure.resourcemanager.securityinsights.models.MetadataPatch; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in MetadatasClient. */ -public final class MetadatasClientImpl implements MetadatasClient { - /** The proxy service used to perform REST calls. */ - private final MetadatasService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of MetadatasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MetadatasClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(MetadatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsMetadatas to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsMeta") - private interface MetadatasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("metadataName") String metadataName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("metadataName") String metadataName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("metadataName") String metadataName, - @BodyParam("application/json") MetadataModelInner metadata, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("metadataName") String metadataName, - @BodyParam("application/json") MetadataPatch metadataPatch, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, Integer skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, Integer skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final Integer skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final Integer skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skip)); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skip, context)); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Metadata along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Metadata along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - accept, - context); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Metadata on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String metadataName) { - return getWithResponseAsync(resourceGroupName, workspaceName, metadataName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Metadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName) { - return getAsync(resourceGroupName, workspaceName, metadataName).block(); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Metadata along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - accept, - context); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String metadataName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, metadataName).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String metadataName) { - deleteAsync(resourceGroupName, workspaceName, metadataName).block(); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - if (metadata == null) { - return Mono.error(new IllegalArgumentException("Parameter metadata is required and cannot be null.")); - } else { - metadata.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - metadata, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataModelInner metadata, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - if (metadata == null) { - return Mono.error(new IllegalArgumentException("Parameter metadata is required and cannot be null.")); - } else { - metadata.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - metadata, - accept, - context); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { - return createWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadata) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { - return createAsync(resourceGroupName, workspaceName, metadataName, metadata).block(); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataModelInner metadata, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadata, context).block(); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - if (metadataPatch == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataPatch is required and cannot be null.")); - } else { - metadataPatch.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - metadataPatch, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataPatch metadataPatch, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - if (metadataPatch == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataPatch is required and cannot be null.")); - } else { - metadataPatch.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - metadataPatch, - accept, - context); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { - return updateWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadataPatch) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { - return updateAsync(resourceGroupName, workspaceName, metadataName, metadataPatch).block(); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataPatch metadataPatch, - Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadataPatch, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java deleted file mode 100644 index fb795703dad2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java +++ /dev/null @@ -1,197 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.MetadataModel; -import com.azure.resourcemanager.securityinsights.models.Metadatas; - -public final class MetadatasImpl implements Metadatas { - private static final ClientLogger LOGGER = new ClientLogger(MetadatasImpl.class); - - private final MetadatasClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public MetadatasImpl( - MetadatasClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new MetadataModelImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skip, context); - return Utils.mapPage(inner, inner1 -> new MetadataModelImpl(inner1, this.manager())); - } - - public MetadataModel get(String resourceGroupName, String workspaceName, String metadataName) { - MetadataModelInner inner = this.serviceClient().get(resourceGroupName, workspaceName, metadataName); - if (inner != null) { - return new MetadataModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, metadataName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new MetadataModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String metadataName) { - this.serviceClient().delete(resourceGroupName, workspaceName, metadataName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, metadataName, context); - } - - public MetadataModel getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String metadataName = Utils.getValueFromIdByName(id, "metadata"); - if (metadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String metadataName = Utils.getValueFromIdByName(id, "metadata"); - if (metadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, metadataName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String metadataName = Utils.getValueFromIdByName(id, "metadata"); - if (metadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String metadataName = Utils.getValueFromIdByName(id, "metadata"); - if (metadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, metadataName, context); - } - - private MetadatasClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public MetadataModelImpl define(String name) { - return new MetadataModelImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentImpl.java deleted file mode 100644 index 3ea1193ca8e6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.azure.resourcemanager.securityinsights.models.OfficeConsent; - -public final class OfficeConsentImpl implements OfficeConsent { - private OfficeConsentInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - OfficeConsentImpl( - OfficeConsentInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public String consentId() { - return this.innerModel().consentId(); - } - - public OfficeConsentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java deleted file mode 100644 index fd9d8a21ca81..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java +++ /dev/null @@ -1,677 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.OfficeConsentsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.azure.resourcemanager.securityinsights.models.OfficeConsentList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OfficeConsentsClient. */ -public final class OfficeConsentsClientImpl implements OfficeConsentsClient { - /** The proxy service used to perform REST calls. */ - private final OfficeConsentsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of OfficeConsentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OfficeConsentsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(OfficeConsentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsOfficeConsents to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsOffi") - private interface OfficeConsentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("consentId") String consentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("consentId") String consentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String consentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (consentId == null) { - return Mono.error(new IllegalArgumentException("Parameter consentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - consentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String consentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (consentId == null) { - return Mono.error(new IllegalArgumentException("Parameter consentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - consentId, - accept, - context); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String consentId) { - return getWithResponseAsync(resourceGroupName, workspaceName, consentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId) { - return getAsync(resourceGroupName, workspaceName, consentId).block(); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String consentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (consentId == null) { - return Mono.error(new IllegalArgumentException("Parameter consentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - consentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String consentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (consentId == null) { - return Mono.error(new IllegalArgumentException("Parameter consentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - consentId, - accept, - context); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String consentId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, consentId).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String consentId) { - deleteAsync(resourceGroupName, workspaceName, consentId).block(); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the office365 consents along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the office365 consents along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java deleted file mode 100644 index 3f6213360a58..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.OfficeConsentsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.azure.resourcemanager.securityinsights.models.OfficeConsent; -import com.azure.resourcemanager.securityinsights.models.OfficeConsents; - -public final class OfficeConsentsImpl implements OfficeConsents { - private static final ClientLogger LOGGER = new ClientLogger(OfficeConsentsImpl.class); - - private final OfficeConsentsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public OfficeConsentsImpl( - OfficeConsentsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new OfficeConsentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new OfficeConsentImpl(inner1, this.manager())); - } - - public OfficeConsent get(String resourceGroupName, String workspaceName, String consentId) { - OfficeConsentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, consentId); - if (inner != null) { - return new OfficeConsentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, consentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new OfficeConsentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String consentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, consentId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, consentId, context); - } - - private OfficeConsentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationImpl.java deleted file mode 100644 index ca2867a1bf43..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.securityinsights.models.Operation; -import com.azure.resourcemanager.securityinsights.models.OperationDisplay; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - OperationImpl( - OperationInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public String name() { - return this.innerModel().name(); - } - - public String origin() { - return this.innerModel().origin(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java deleted file mode 100644 index 42c9980bb42d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,274 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.OperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.securityinsights.models.OperationsList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsOperations to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsOper") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.SecurityInsights/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsImpl.java deleted file mode 100644 index 6e11ec19acdb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.OperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.securityinsights.models.Operation; -import com.azure.resourcemanager.securityinsights.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public OperationsImpl( - OperationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java deleted file mode 100644 index 5a8f6c3d0f22..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java +++ /dev/null @@ -1,744 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.ProductSettingsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ProductSettingsClient. */ -public final class ProductSettingsClientImpl implements ProductSettingsClient { - /** The proxy service used to perform REST calls. */ - private final ProductSettingsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of ProductSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ProductSettingsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(ProductSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsProductSettings to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsProd") - private interface ProductSettingsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsName") String settingsName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsName") String settingsName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsName") String settingsName, - @BodyParam("application/json") SettingsInner settings, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String workspaceName) { - return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SettingListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - accept, - context); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String settingsName) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SettingsInner get(String resourceGroupName, String workspaceName, String settingsName) { - return getAsync(resourceGroupName, workspaceName, settingsName).block(); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - accept, - context); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String settingsName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsName).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String settingsName) { - deleteAsync(resourceGroupName, workspaceName, settingsName).block(); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - if (settings == null) { - return Mono.error(new IllegalArgumentException("Parameter settings is required and cannot be null.")); - } else { - settings.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - settings, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - if (settings == null) { - return Mono.error(new IllegalArgumentException("Parameter settings is required and cannot be null.")); - } else { - settings.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - settings, - accept, - context); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - return updateWithResponseAsync(resourceGroupName, workspaceName, settingsName, settings) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SettingsInner update( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - return updateAsync(resourceGroupName, workspaceName, settingsName, settings).block(); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, settingsName, settings, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java deleted file mode 100644 index 5596bd0f4aa9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.ProductSettingsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.azure.resourcemanager.securityinsights.models.ProductSettings; -import com.azure.resourcemanager.securityinsights.models.SettingList; -import com.azure.resourcemanager.securityinsights.models.Settings; - -public final class ProductSettingsImpl implements ProductSettings { - private static final ClientLogger LOGGER = new ClientLogger(ProductSettingsImpl.class); - - private final ProductSettingsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public ProductSettingsImpl( - ProductSettingsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public SettingList list(String resourceGroupName, String workspaceName) { - SettingListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new SettingListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SettingListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Settings get(String resourceGroupName, String workspaceName, String settingsName) { - SettingsInner inner = this.serviceClient().get(resourceGroupName, workspaceName, settingsName); - if (inner != null) { - return new SettingsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, settingsName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SettingsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String settingsName) { - this.serviceClient().delete(resourceGroupName, workspaceName, settingsName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, settingsName, context); - } - - public Settings update( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - SettingsInner inner = this.serviceClient().update(resourceGroupName, workspaceName, settingsName, settings); - if (inner != null) { - return new SettingsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { - Response inner = - this.serviceClient().updateWithResponse(resourceGroupName, workspaceName, settingsName, settings, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SettingsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ProductSettingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RelationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RelationImpl.java deleted file mode 100644 index 16262d97eb12..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RelationImpl.java +++ /dev/null @@ -1,173 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.Relation; - -public final class RelationImpl implements Relation, Relation.Definition, Relation.Update { - private RelationInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String relatedResourceId() { - return this.innerModel().relatedResourceId(); - } - - public String relatedResourceName() { - return this.innerModel().relatedResourceName(); - } - - public String relatedResourceType() { - return this.innerModel().relatedResourceType(); - } - - public String relatedResourceKind() { - return this.innerModel().relatedResourceKind(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public RelationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String bookmarkId; - - private String relationName; - - public RelationImpl withExistingBookmark(String resourceGroupName, String workspaceName, String bookmarkId) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.bookmarkId = bookmarkId; - return this; - } - - public Relation create() { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarkRelations() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, relationName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Relation create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarkRelations() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, relationName, this.innerModel(), context) - .getValue(); - return this; - } - - RelationImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new RelationInner(); - this.serviceManager = serviceManager; - this.relationName = name; - } - - public RelationImpl update() { - return this; - } - - public Relation apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarkRelations() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, relationName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Relation apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarkRelations() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, relationName, this.innerModel(), context) - .getValue(); - return this; - } - - RelationImpl( - RelationInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.bookmarkId = Utils.getValueFromIdByName(innerObject.id(), "bookmarks"); - this.relationName = Utils.getValueFromIdByName(innerObject.id(), "relations"); - } - - public Relation refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarkRelations() - .getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE) - .getValue(); - return this; - } - - public Relation refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBookmarkRelations() - .getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context) - .getValue(); - return this; - } - - public RelationImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public RelationImpl withRelatedResourceId(String relatedResourceId) { - this.innerModel().withRelatedResourceId(relatedResourceId); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RepoImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RepoImpl.java deleted file mode 100644 index fc0358a24f1d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RepoImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.azure.resourcemanager.securityinsights.models.Repo; -import java.util.Collections; -import java.util.List; - -public final class RepoImpl implements Repo { - private RepoInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - RepoImpl(RepoInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String url() { - return this.innerModel().url(); - } - - public String fullName() { - return this.innerModel().fullName(); - } - - public List branches() { - List inner = this.innerModel().branches(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public RepoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsBuilder.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsBuilder.java deleted file mode 100644 index 51ba4f3403a4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsBuilder.java +++ /dev/null @@ -1,144 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** A builder for creating a new instance of the SecurityInsightsImpl type. */ -@ServiceClientBuilder(serviceClients = {SecurityInsightsImpl.class}) -public final class SecurityInsightsBuilder { - /* - * The ID of the target subscription. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. - * - * @param subscriptionId the subscriptionId value. - * @return the SecurityInsightsBuilder. - */ - public SecurityInsightsBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the SecurityInsightsBuilder. - */ - public SecurityInsightsBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the SecurityInsightsBuilder. - */ - public SecurityInsightsBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the SecurityInsightsBuilder. - */ - public SecurityInsightsBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the SecurityInsightsBuilder. - */ - public SecurityInsightsBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the SecurityInsightsBuilder. - */ - public SecurityInsightsBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of SecurityInsightsImpl with the provided parameters. - * - * @return an instance of SecurityInsightsImpl. - */ - public SecurityInsightsImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - SecurityInsightsImpl client = - new SecurityInsightsImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); - return client; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java deleted file mode 100644 index 86963e3bc62a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java +++ /dev/null @@ -1,752 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.securityinsights.fluent.ActionsClient; -import com.azure.resourcemanager.securityinsights.fluent.AlertRuleTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.AlertRulesClient; -import com.azure.resourcemanager.securityinsights.fluent.AutomationRulesClient; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.BookmarksClient; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsClient; -import com.azure.resourcemanager.securityinsights.fluent.DomainWhoisClient; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesClient; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesGetTimelinesClient; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueriesClient; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.FileImportsClient; -import com.azure.resourcemanager.securityinsights.fluent.IncidentCommentsClient; -import com.azure.resourcemanager.securityinsights.fluent.IncidentRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.IncidentsClient; -import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; -import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; -import com.azure.resourcemanager.securityinsights.fluent.OfficeConsentsClient; -import com.azure.resourcemanager.securityinsights.fluent.OperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.ProductSettingsClient; -import com.azure.resourcemanager.securityinsights.fluent.SecurityInsights; -import com.azure.resourcemanager.securityinsights.fluent.SecurityMLAnalyticsSettingsClient; -import com.azure.resourcemanager.securityinsights.fluent.SentinelOnboardingStatesClient; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsClient; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorMetricsClient; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsClient; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.WatchlistItemsClient; -import com.azure.resourcemanager.securityinsights.fluent.WatchlistsClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** Initializes a new instance of the SecurityInsightsImpl type. */ -@ServiceClient(builder = SecurityInsightsBuilder.class) -public final class SecurityInsightsImpl implements SecurityInsights { - /** The ID of the target subscription. */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The serializer to serialize an object into a string. */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** The default poll interval for long-running operation. */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** The AlertRulesClient object to access its operations. */ - private final AlertRulesClient alertRules; - - /** - * Gets the AlertRulesClient object to access its operations. - * - * @return the AlertRulesClient object. - */ - public AlertRulesClient getAlertRules() { - return this.alertRules; - } - - /** The ActionsClient object to access its operations. */ - private final ActionsClient actions; - - /** - * Gets the ActionsClient object to access its operations. - * - * @return the ActionsClient object. - */ - public ActionsClient getActions() { - return this.actions; - } - - /** The AlertRuleTemplatesClient object to access its operations. */ - private final AlertRuleTemplatesClient alertRuleTemplates; - - /** - * Gets the AlertRuleTemplatesClient object to access its operations. - * - * @return the AlertRuleTemplatesClient object. - */ - public AlertRuleTemplatesClient getAlertRuleTemplates() { - return this.alertRuleTemplates; - } - - /** The AutomationRulesClient object to access its operations. */ - private final AutomationRulesClient automationRules; - - /** - * Gets the AutomationRulesClient object to access its operations. - * - * @return the AutomationRulesClient object. - */ - public AutomationRulesClient getAutomationRules() { - return this.automationRules; - } - - /** The IncidentsClient object to access its operations. */ - private final IncidentsClient incidents; - - /** - * Gets the IncidentsClient object to access its operations. - * - * @return the IncidentsClient object. - */ - public IncidentsClient getIncidents() { - return this.incidents; - } - - /** The BookmarksClient object to access its operations. */ - private final BookmarksClient bookmarks; - - /** - * Gets the BookmarksClient object to access its operations. - * - * @return the BookmarksClient object. - */ - public BookmarksClient getBookmarks() { - return this.bookmarks; - } - - /** The BookmarkRelationsClient object to access its operations. */ - private final BookmarkRelationsClient bookmarkRelations; - - /** - * Gets the BookmarkRelationsClient object to access its operations. - * - * @return the BookmarkRelationsClient object. - */ - public BookmarkRelationsClient getBookmarkRelations() { - return this.bookmarkRelations; - } - - /** The BookmarkOperationsClient object to access its operations. */ - private final BookmarkOperationsClient bookmarkOperations; - - /** - * Gets the BookmarkOperationsClient object to access its operations. - * - * @return the BookmarkOperationsClient object. - */ - public BookmarkOperationsClient getBookmarkOperations() { - return this.bookmarkOperations; - } - - /** The IpGeodatasClient object to access its operations. */ - private final IpGeodatasClient ipGeodatas; - - /** - * Gets the IpGeodatasClient object to access its operations. - * - * @return the IpGeodatasClient object. - */ - public IpGeodatasClient getIpGeodatas() { - return this.ipGeodatas; - } - - /** The DomainWhoisClient object to access its operations. */ - private final DomainWhoisClient domainWhois; - - /** - * Gets the DomainWhoisClient object to access its operations. - * - * @return the DomainWhoisClient object. - */ - public DomainWhoisClient getDomainWhois() { - return this.domainWhois; - } - - /** The EntitiesClient object to access its operations. */ - private final EntitiesClient entities; - - /** - * Gets the EntitiesClient object to access its operations. - * - * @return the EntitiesClient object. - */ - public EntitiesClient getEntities() { - return this.entities; - } - - /** The EntitiesGetTimelinesClient object to access its operations. */ - private final EntitiesGetTimelinesClient entitiesGetTimelines; - - /** - * Gets the EntitiesGetTimelinesClient object to access its operations. - * - * @return the EntitiesGetTimelinesClient object. - */ - public EntitiesGetTimelinesClient getEntitiesGetTimelines() { - return this.entitiesGetTimelines; - } - - /** The EntitiesRelationsClient object to access its operations. */ - private final EntitiesRelationsClient entitiesRelations; - - /** - * Gets the EntitiesRelationsClient object to access its operations. - * - * @return the EntitiesRelationsClient object. - */ - public EntitiesRelationsClient getEntitiesRelations() { - return this.entitiesRelations; - } - - /** The EntityRelationsClient object to access its operations. */ - private final EntityRelationsClient entityRelations; - - /** - * Gets the EntityRelationsClient object to access its operations. - * - * @return the EntityRelationsClient object. - */ - public EntityRelationsClient getEntityRelations() { - return this.entityRelations; - } - - /** The EntityQueriesClient object to access its operations. */ - private final EntityQueriesClient entityQueries; - - /** - * Gets the EntityQueriesClient object to access its operations. - * - * @return the EntityQueriesClient object. - */ - public EntityQueriesClient getEntityQueries() { - return this.entityQueries; - } - - /** The EntityQueryTemplatesClient object to access its operations. */ - private final EntityQueryTemplatesClient entityQueryTemplates; - - /** - * Gets the EntityQueryTemplatesClient object to access its operations. - * - * @return the EntityQueryTemplatesClient object. - */ - public EntityQueryTemplatesClient getEntityQueryTemplates() { - return this.entityQueryTemplates; - } - - /** The FileImportsClient object to access its operations. */ - private final FileImportsClient fileImports; - - /** - * Gets the FileImportsClient object to access its operations. - * - * @return the FileImportsClient object. - */ - public FileImportsClient getFileImports() { - return this.fileImports; - } - - /** The IncidentCommentsClient object to access its operations. */ - private final IncidentCommentsClient incidentComments; - - /** - * Gets the IncidentCommentsClient object to access its operations. - * - * @return the IncidentCommentsClient object. - */ - public IncidentCommentsClient getIncidentComments() { - return this.incidentComments; - } - - /** The IncidentRelationsClient object to access its operations. */ - private final IncidentRelationsClient incidentRelations; - - /** - * Gets the IncidentRelationsClient object to access its operations. - * - * @return the IncidentRelationsClient object. - */ - public IncidentRelationsClient getIncidentRelations() { - return this.incidentRelations; - } - - /** The MetadatasClient object to access its operations. */ - private final MetadatasClient metadatas; - - /** - * Gets the MetadatasClient object to access its operations. - * - * @return the MetadatasClient object. - */ - public MetadatasClient getMetadatas() { - return this.metadatas; - } - - /** The OfficeConsentsClient object to access its operations. */ - private final OfficeConsentsClient officeConsents; - - /** - * Gets the OfficeConsentsClient object to access its operations. - * - * @return the OfficeConsentsClient object. - */ - public OfficeConsentsClient getOfficeConsents() { - return this.officeConsents; - } - - /** The SentinelOnboardingStatesClient object to access its operations. */ - private final SentinelOnboardingStatesClient sentinelOnboardingStates; - - /** - * Gets the SentinelOnboardingStatesClient object to access its operations. - * - * @return the SentinelOnboardingStatesClient object. - */ - public SentinelOnboardingStatesClient getSentinelOnboardingStates() { - return this.sentinelOnboardingStates; - } - - /** The SecurityMLAnalyticsSettingsClient object to access its operations. */ - private final SecurityMLAnalyticsSettingsClient securityMLAnalyticsSettings; - - /** - * Gets the SecurityMLAnalyticsSettingsClient object to access its operations. - * - * @return the SecurityMLAnalyticsSettingsClient object. - */ - public SecurityMLAnalyticsSettingsClient getSecurityMLAnalyticsSettings() { - return this.securityMLAnalyticsSettings; - } - - /** The ProductSettingsClient object to access its operations. */ - private final ProductSettingsClient productSettings; - - /** - * Gets the ProductSettingsClient object to access its operations. - * - * @return the ProductSettingsClient object. - */ - public ProductSettingsClient getProductSettings() { - return this.productSettings; - } - - /** The SourceControlsClient object to access its operations. */ - private final SourceControlsClient sourceControls; - - /** - * Gets the SourceControlsClient object to access its operations. - * - * @return the SourceControlsClient object. - */ - public SourceControlsClient getSourceControls() { - return this.sourceControls; - } - - /** The SourceControlsOperationsClient object to access its operations. */ - private final SourceControlsOperationsClient sourceControlsOperations; - - /** - * Gets the SourceControlsOperationsClient object to access its operations. - * - * @return the SourceControlsOperationsClient object. - */ - public SourceControlsOperationsClient getSourceControlsOperations() { - return this.sourceControlsOperations; - } - - /** The ThreatIntelligenceIndicatorsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorsClient threatIntelligenceIndicators; - - /** - * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorsClient object. - */ - public ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators() { - return this.threatIntelligenceIndicators; - } - - /** The ThreatIntelligenceIndicatorsOperationsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorsOperationsClient threatIntelligenceIndicatorsOperations; - - /** - * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorsOperationsClient object. - */ - public ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations() { - return this.threatIntelligenceIndicatorsOperations; - } - - /** The ThreatIntelligenceIndicatorMetricsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorMetricsClient threatIntelligenceIndicatorMetrics; - - /** - * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorMetricsClient object. - */ - public ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics() { - return this.threatIntelligenceIndicatorMetrics; - } - - /** The WatchlistsClient object to access its operations. */ - private final WatchlistsClient watchlists; - - /** - * Gets the WatchlistsClient object to access its operations. - * - * @return the WatchlistsClient object. - */ - public WatchlistsClient getWatchlists() { - return this.watchlists; - } - - /** The WatchlistItemsClient object to access its operations. */ - private final WatchlistItemsClient watchlistItems; - - /** - * Gets the WatchlistItemsClient object to access its operations. - * - * @return the WatchlistItemsClient object. - */ - public WatchlistItemsClient getWatchlistItems() { - return this.watchlistItems; - } - - /** The DataConnectorsClient object to access its operations. */ - private final DataConnectorsClient dataConnectors; - - /** - * Gets the DataConnectorsClient object to access its operations. - * - * @return the DataConnectorsClient object. - */ - public DataConnectorsClient getDataConnectors() { - return this.dataConnectors; - } - - /** The DataConnectorsCheckRequirementsOperationsClient object to access its operations. */ - private final DataConnectorsCheckRequirementsOperationsClient dataConnectorsCheckRequirementsOperations; - - /** - * Gets the DataConnectorsCheckRequirementsOperationsClient object to access its operations. - * - * @return the DataConnectorsCheckRequirementsOperationsClient object. - */ - public DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckRequirementsOperations() { - return this.dataConnectorsCheckRequirementsOperations; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * Initializes an instance of SecurityInsights client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. - */ - SecurityInsightsImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2022-09-01-preview"; - this.alertRules = new AlertRulesClientImpl(this); - this.actions = new ActionsClientImpl(this); - this.alertRuleTemplates = new AlertRuleTemplatesClientImpl(this); - this.automationRules = new AutomationRulesClientImpl(this); - this.incidents = new IncidentsClientImpl(this); - this.bookmarks = new BookmarksClientImpl(this); - this.bookmarkRelations = new BookmarkRelationsClientImpl(this); - this.bookmarkOperations = new BookmarkOperationsClientImpl(this); - this.ipGeodatas = new IpGeodatasClientImpl(this); - this.domainWhois = new DomainWhoisClientImpl(this); - this.entities = new EntitiesClientImpl(this); - this.entitiesGetTimelines = new EntitiesGetTimelinesClientImpl(this); - this.entitiesRelations = new EntitiesRelationsClientImpl(this); - this.entityRelations = new EntityRelationsClientImpl(this); - this.entityQueries = new EntityQueriesClientImpl(this); - this.entityQueryTemplates = new EntityQueryTemplatesClientImpl(this); - this.fileImports = new FileImportsClientImpl(this); - this.incidentComments = new IncidentCommentsClientImpl(this); - this.incidentRelations = new IncidentRelationsClientImpl(this); - this.metadatas = new MetadatasClientImpl(this); - this.officeConsents = new OfficeConsentsClientImpl(this); - this.sentinelOnboardingStates = new SentinelOnboardingStatesClientImpl(this); - this.securityMLAnalyticsSettings = new SecurityMLAnalyticsSettingsClientImpl(this); - this.productSettings = new ProductSettingsClientImpl(this); - this.sourceControls = new SourceControlsClientImpl(this); - this.sourceControlsOperations = new SourceControlsOperationsClientImpl(this); - this.threatIntelligenceIndicators = new ThreatIntelligenceIndicatorsClientImpl(this); - this.threatIntelligenceIndicatorsOperations = new ThreatIntelligenceIndicatorsOperationsClientImpl(this); - this.threatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsClientImpl(this); - this.watchlists = new WatchlistsClientImpl(this); - this.watchlistItems = new WatchlistItemsClientImpl(this); - this.dataConnectors = new DataConnectorsClientImpl(this); - this.dataConnectorsCheckRequirementsOperations = new DataConnectorsCheckRequirementsOperationsClientImpl(this); - this.operations = new OperationsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(s); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecurityInsightsImpl.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingImpl.java deleted file mode 100644 index 57be54dbc3bf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner; -import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSetting; - -public final class SecurityMLAnalyticsSettingImpl implements SecurityMLAnalyticsSetting { - private SecurityMLAnalyticsSettingInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SecurityMLAnalyticsSettingImpl( - SecurityMLAnalyticsSettingInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public SecurityMLAnalyticsSettingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java deleted file mode 100644 index 2cd597054440..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java +++ /dev/null @@ -1,916 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.SecurityMLAnalyticsSettingsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner; -import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettingsList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SecurityMLAnalyticsSettingsClient. */ -public final class SecurityMLAnalyticsSettingsClientImpl implements SecurityMLAnalyticsSettingsClient { - /** The proxy service used to perform REST calls. */ - private final SecurityMLAnalyticsSettingsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of SecurityMLAnalyticsSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SecurityMLAnalyticsSettingsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create( - SecurityMLAnalyticsSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsSecurityMLAnalyticsSettings to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsSecu") - private interface SecurityMLAnalyticsSettingsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings" - + "/{settingsResourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsResourceName") String settingsResourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings" - + "/{settingsResourceName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsResourceName") String settingsResourceName, - @BodyParam("application/json") SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings" - + "/{settingsResourceName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsResourceName") String settingsResourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Security ML Analytics Settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Security ML Analytics Settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Security ML Analytics Settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Security ML Analytics Settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Security ML Analytics Settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Security ML Analytics Settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsResourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsResourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsResourceName, - accept, - context); - } - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String settingsResourceName) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityMLAnalyticsSettingInner get( - String resourceGroupName, String workspaceName, String settingsResourceName) { - return getAsync(resourceGroupName, workspaceName, settingsResourceName).block(); - } - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); - } - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); - } - if (securityMLAnalyticsSetting == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter securityMLAnalyticsSetting is required and cannot be null.")); - } else { - securityMLAnalyticsSetting.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsResourceName, - securityMLAnalyticsSetting, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); - } - if (securityMLAnalyticsSetting == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter securityMLAnalyticsSetting is required and cannot be null.")); - } else { - securityMLAnalyticsSetting.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsResourceName, - securityMLAnalyticsSetting, - accept, - context); - } - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityMLAnalyticsSettingInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { - return createOrUpdateAsync(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting) - .block(); - } - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, context) - .block(); - } - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsResourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsResourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (settingsResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsResourceName, - accept, - context); - } - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String settingsResourceName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { - deleteAsync(resourceGroupName, workspaceName, settingsResourceName).block(); - } - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the SecurityMLAnalyticsSettings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the SecurityMLAnalyticsSettings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java deleted file mode 100644 index f0d4218f31a3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java +++ /dev/null @@ -1,123 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.SecurityMLAnalyticsSettingsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner; -import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSetting; -import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettings; - -public final class SecurityMLAnalyticsSettingsImpl implements SecurityMLAnalyticsSettings { - private static final ClientLogger LOGGER = new ClientLogger(SecurityMLAnalyticsSettingsImpl.class); - - private final SecurityMLAnalyticsSettingsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public SecurityMLAnalyticsSettingsImpl( - SecurityMLAnalyticsSettingsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new SecurityMLAnalyticsSettingImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new SecurityMLAnalyticsSettingImpl(inner1, this.manager())); - } - - public SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName) { - SecurityMLAnalyticsSettingInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, settingsResourceName); - if (inner != null) { - return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, settingsResourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SecurityMLAnalyticsSettingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SecurityMLAnalyticsSetting createOrUpdate( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { - SecurityMLAnalyticsSettingInner inner = - this - .serviceClient() - .createOrUpdate(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting); - if (inner != null) { - return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SecurityMLAnalyticsSettingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { - this.serviceClient().delete(resourceGroupName, workspaceName, settingsResourceName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, settingsResourceName, context); - } - - private SecurityMLAnalyticsSettingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStateImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStateImpl.java deleted file mode 100644 index ae6794185e73..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStateImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStateInner; -import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingState; - -public final class SentinelOnboardingStateImpl implements SentinelOnboardingState, SentinelOnboardingState.Definition { - private SentinelOnboardingStateInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SentinelOnboardingStateImpl( - SentinelOnboardingStateInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Boolean customerManagedKey() { - return this.innerModel().customerManagedKey(); - } - - public SentinelOnboardingStateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String sentinelOnboardingStateName; - - public SentinelOnboardingStateImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public SentinelOnboardingState create() { - this.innerObject = - serviceManager - .serviceClient() - .getSentinelOnboardingStates() - .createWithResponse( - resourceGroupName, workspaceName, sentinelOnboardingStateName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public SentinelOnboardingState create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSentinelOnboardingStates() - .createWithResponse( - resourceGroupName, workspaceName, sentinelOnboardingStateName, this.innerModel(), context) - .getValue(); - return this; - } - - SentinelOnboardingStateImpl( - String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new SentinelOnboardingStateInner(); - this.serviceManager = serviceManager; - this.sentinelOnboardingStateName = name; - } - - public SentinelOnboardingState refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getSentinelOnboardingStates() - .getWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, Context.NONE) - .getValue(); - return this; - } - - public SentinelOnboardingState refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSentinelOnboardingStates() - .getWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, context) - .getValue(); - return this; - } - - public SentinelOnboardingStateImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public SentinelOnboardingStateImpl withCustomerManagedKey(Boolean customerManagedKey) { - this.innerModel().withCustomerManagedKey(customerManagedKey); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java deleted file mode 100644 index 9035d0d85eef..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java +++ /dev/null @@ -1,809 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.SentinelOnboardingStatesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStatesListInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SentinelOnboardingStatesClient. */ -public final class SentinelOnboardingStatesClientImpl implements SentinelOnboardingStatesClient { - /** The proxy service used to perform REST calls. */ - private final SentinelOnboardingStatesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of SentinelOnboardingStatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SentinelOnboardingStatesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create(SentinelOnboardingStatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsSentinelOnboardingStates to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsSent") - private interface SentinelOnboardingStatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates" - + "/{sentinelOnboardingStateName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sentinelOnboardingStateName") String sentinelOnboardingStateName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates" - + "/{sentinelOnboardingStateName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sentinelOnboardingStateName") String sentinelOnboardingStateName, - @BodyParam("application/json") SentinelOnboardingStateInner sentinelOnboardingStateParameter, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates" - + "/{sentinelOnboardingStateName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sentinelOnboardingStateName") String sentinelOnboardingStateName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sentinelOnboardingStateName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sentinelOnboardingStateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sentinelOnboardingStateName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sentinelOnboardingStateName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sentinelOnboardingStateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sentinelOnboardingStateName, - accept, - context); - } - - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - return getWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SentinelOnboardingStateInner get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - return getAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName).block(); - } - - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); - } - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sentinelOnboardingStateName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sentinelOnboardingStateName is required and cannot be null.")); - } - if (sentinelOnboardingStateParameter != null) { - sentinelOnboardingStateParameter.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sentinelOnboardingStateName, - sentinelOnboardingStateParameter, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sentinelOnboardingStateName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sentinelOnboardingStateName is required and cannot be null.")); - } - if (sentinelOnboardingStateParameter != null) { - sentinelOnboardingStateParameter.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sentinelOnboardingStateName, - sentinelOnboardingStateParameter, - accept, - context); - } - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter) { - return createWithResponseAsync( - resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - final SentinelOnboardingStateInner sentinelOnboardingStateParameter = null; - return createWithResponseAsync( - resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SentinelOnboardingStateInner create( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - final SentinelOnboardingStateInner sentinelOnboardingStateParameter = null; - return createAsync( - resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) - .block(); - } - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter, - Context context) { - return createWithResponseAsync( - resourceGroupName, - workspaceName, - sentinelOnboardingStateName, - sentinelOnboardingStateParameter, - context) - .block(); - } - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sentinelOnboardingStateName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sentinelOnboardingStateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sentinelOnboardingStateName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sentinelOnboardingStateName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sentinelOnboardingStateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sentinelOnboardingStateName, - accept, - context); - } - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - deleteAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName).block(); - } - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); - } - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String workspaceName) { - return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java deleted file mode 100644 index 805ce3714bf1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java +++ /dev/null @@ -1,220 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.SentinelOnboardingStatesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStatesListInner; -import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingState; -import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStates; -import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStatesList; - -public final class SentinelOnboardingStatesImpl implements SentinelOnboardingStates { - private static final ClientLogger LOGGER = new ClientLogger(SentinelOnboardingStatesImpl.class); - - private final SentinelOnboardingStatesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public SentinelOnboardingStatesImpl( - SentinelOnboardingStatesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public SentinelOnboardingState get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - SentinelOnboardingStateInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, sentinelOnboardingStateName); - if (inner != null) { - return new SentinelOnboardingStateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SentinelOnboardingStateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - this.serviceClient().delete(resourceGroupName, workspaceName, sentinelOnboardingStateName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, context); - } - - public SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName) { - SentinelOnboardingStatesListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new SentinelOnboardingStatesListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SentinelOnboardingStatesListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SentinelOnboardingState getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sentinelOnboardingStateName = Utils.getValueFromIdByName(id, "onboardingStates"); - if (sentinelOnboardingStateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'onboardingStates'.", id))); - } - return this - .getWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sentinelOnboardingStateName = Utils.getValueFromIdByName(id, "onboardingStates"); - if (sentinelOnboardingStateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'onboardingStates'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sentinelOnboardingStateName = Utils.getValueFromIdByName(id, "onboardingStates"); - if (sentinelOnboardingStateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'onboardingStates'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sentinelOnboardingStateName = Utils.getValueFromIdByName(id, "onboardingStates"); - if (sentinelOnboardingStateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'onboardingStates'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, context); - } - - private SentinelOnboardingStatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public SentinelOnboardingStateImpl define(String name) { - return new SentinelOnboardingStateImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesListImpl.java deleted file mode 100644 index 203b82f16d59..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesListImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStatesListInner; -import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingState; -import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStatesList; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class SentinelOnboardingStatesListImpl implements SentinelOnboardingStatesList { - private SentinelOnboardingStatesListInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SentinelOnboardingStatesListImpl( - SentinelOnboardingStatesListInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new SentinelOnboardingStateImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public SentinelOnboardingStatesListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingListImpl.java deleted file mode 100644 index d42aef74defe..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingListImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.azure.resourcemanager.securityinsights.models.SettingList; -import com.azure.resourcemanager.securityinsights.models.Settings; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class SettingListImpl implements SettingList { - private SettingListInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SettingListImpl( - SettingListInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new SettingsImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public SettingListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingsImpl.java deleted file mode 100644 index e54bfa38cc02..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingsImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.azure.resourcemanager.securityinsights.models.Settings; - -public final class SettingsImpl implements Settings { - private SettingsInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SettingsImpl( - SettingsInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public SettingsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java deleted file mode 100644 index 8923bdc0d8b3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java +++ /dev/null @@ -1,208 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import com.azure.resourcemanager.securityinsights.models.ContentType; -import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import com.azure.resourcemanager.securityinsights.models.Repository; -import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; -import com.azure.resourcemanager.securityinsights.models.SourceControl; -import com.azure.resourcemanager.securityinsights.models.Version; -import java.util.Collections; -import java.util.List; - -public final class SourceControlImpl implements SourceControl, SourceControl.Definition { - private SourceControlInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SourceControlImpl( - SourceControlInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String idPropertiesId() { - return this.innerModel().idPropertiesId(); - } - - public Version version() { - return this.innerModel().version(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String description() { - return this.innerModel().description(); - } - - public RepoType repoType() { - return this.innerModel().repoType(); - } - - public List contentTypes() { - List inner = this.innerModel().contentTypes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Repository repository() { - return this.innerModel().repository(); - } - - public RepositoryResourceInfo repositoryResourceInfo() { - return this.innerModel().repositoryResourceInfo(); - } - - public DeploymentInfo lastDeploymentInfo() { - return this.innerModel().lastDeploymentInfo(); - } - - public SourceControlInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String sourceControlId; - - public SourceControlImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public SourceControl create() { - this.innerObject = - serviceManager - .serviceClient() - .getSourceControlsOperations() - .createWithResponse(resourceGroupName, workspaceName, sourceControlId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public SourceControl create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSourceControlsOperations() - .createWithResponse(resourceGroupName, workspaceName, sourceControlId, this.innerModel(), context) - .getValue(); - return this; - } - - SourceControlImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new SourceControlInner(); - this.serviceManager = serviceManager; - this.sourceControlId = name; - } - - public SourceControl refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getSourceControlsOperations() - .getWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE) - .getValue(); - return this; - } - - public SourceControl refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSourceControlsOperations() - .getWithResponse(resourceGroupName, workspaceName, sourceControlId, context) - .getValue(); - return this; - } - - public SourceControlImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public SourceControlImpl withIdPropertiesId(String idPropertiesId) { - this.innerModel().withIdPropertiesId(idPropertiesId); - return this; - } - - public SourceControlImpl withVersion(Version version) { - this.innerModel().withVersion(version); - return this; - } - - public SourceControlImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; - } - - public SourceControlImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public SourceControlImpl withRepoType(RepoType repoType) { - this.innerModel().withRepoType(repoType); - return this; - } - - public SourceControlImpl withContentTypes(List contentTypes) { - this.innerModel().withContentTypes(contentTypes); - return this; - } - - public SourceControlImpl withRepository(Repository repository) { - this.innerModel().withRepository(repository); - return this; - } - - public SourceControlImpl withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { - this.innerModel().withRepositoryResourceInfo(repositoryResourceInfo); - return this; - } - - public SourceControlImpl withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { - this.innerModel().withLastDeploymentInfo(lastDeploymentInfo); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java deleted file mode 100644 index 7d0d20b95466..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java +++ /dev/null @@ -1,359 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.azure.resourcemanager.securityinsights.models.RepoList; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SourceControlsClient. */ -public final class SourceControlsClientImpl implements SourceControlsClient { - /** The proxy service used to perform REST calls. */ - private final SourceControlsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of SourceControlsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SourceControlsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(SourceControlsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsSourceControls to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsSour") - private interface SourceControlsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/listRepositories") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRepositories( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") RepoType repoType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRepositoriesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 of repositories metadata along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRepositoriesSinglePageAsync( - String resourceGroupName, String workspaceName, RepoType repoType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (repoType == null) { - return Mono.error(new IllegalArgumentException("Parameter repoType is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listRepositories( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - repoType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 of repositories metadata along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRepositoriesSinglePageAsync( - String resourceGroupName, String workspaceName, RepoType repoType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (repoType == null) { - return Mono.error(new IllegalArgumentException("Parameter repoType is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listRepositories( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - repoType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 of repositories metadata as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRepositoriesAsync( - String resourceGroupName, String workspaceName, RepoType repoType) { - return new PagedFlux<>( - () -> listRepositoriesSinglePageAsync(resourceGroupName, workspaceName, repoType), - nextLink -> listRepositoriesNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 of repositories metadata as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRepositoriesAsync( - String resourceGroupName, String workspaceName, RepoType repoType, Context context) { - return new PagedFlux<>( - () -> listRepositoriesSinglePageAsync(resourceGroupName, workspaceName, repoType, context), - nextLink -> listRepositoriesNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 of repositories metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRepositories( - String resourceGroupName, String workspaceName, RepoType repoType) { - return new PagedIterable<>(listRepositoriesAsync(resourceGroupName, workspaceName, repoType)); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 of repositories metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRepositories( - String resourceGroupName, String workspaceName, RepoType repoType, Context context) { - return new PagedIterable<>(listRepositoriesAsync(resourceGroupName, workspaceName, repoType, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the source controls along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRepositoriesNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listRepositoriesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the source controls along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRepositoriesNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listRepositoriesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java deleted file mode 100644 index bb8376e2af85..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.azure.resourcemanager.securityinsights.models.Repo; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import com.azure.resourcemanager.securityinsights.models.SourceControls; - -public final class SourceControlsImpl implements SourceControls { - private static final ClientLogger LOGGER = new ClientLogger(SourceControlsImpl.class); - - private final SourceControlsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public SourceControlsImpl( - SourceControlsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType) { - PagedIterable inner = - this.serviceClient().listRepositories(resourceGroupName, workspaceName, repoType); - return Utils.mapPage(inner, inner1 -> new RepoImpl(inner1, this.manager())); - } - - public PagedIterable listRepositories( - String resourceGroupName, String workspaceName, RepoType repoType, Context context) { - PagedIterable inner = - this.serviceClient().listRepositories(resourceGroupName, workspaceName, repoType, context); - return Utils.mapPage(inner, inner1 -> new RepoImpl(inner1, this.manager())); - } - - private SourceControlsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java deleted file mode 100644 index 154c48e0138a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java +++ /dev/null @@ -1,889 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import com.azure.resourcemanager.securityinsights.models.SourceControlList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SourceControlsOperationsClient. */ -public final class SourceControlsOperationsClientImpl implements SourceControlsOperationsClient { - /** The proxy service used to perform REST calls. */ - private final SourceControlsOperationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of SourceControlsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SourceControlsOperationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create(SourceControlsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsSourceControlsOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsSour") - private interface SourceControlsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sourceControlId") String sourceControlId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sourceControlId") String sourceControlId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sourceControlId") String sourceControlId, - @BodyParam("application/json") SourceControlInner sourceControl, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 source control byt its identifier along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 source control byt its identifier along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - accept, - context); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 source control byt its identifier on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String sourceControlId) { - return getWithResponseAsync(resourceGroupName, workspaceName, sourceControlId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 source control byt its identifier. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId) { - return getAsync(resourceGroupName, workspaceName, sourceControlId).block(); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 source control byt its identifier along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - accept, - context); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String sourceControlId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sourceControlId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { - deleteAsync(resourceGroupName, workspaceName, sourceControlId).block(); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - if (sourceControl == null) { - return Mono.error(new IllegalArgumentException("Parameter sourceControl is required and cannot be null.")); - } else { - sourceControl.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - sourceControl, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String sourceControlId, - SourceControlInner sourceControl, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - if (sourceControl == null) { - return Mono.error(new IllegalArgumentException("Parameter sourceControl is required and cannot be null.")); - } else { - sourceControl.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - sourceControl, - accept, - context); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { - return createWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner create( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { - return createAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl).block(); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sourceControlId, - SourceControlInner sourceControl, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the source controls along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the source controls along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java deleted file mode 100644 index 467e637cf289..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java +++ /dev/null @@ -1,193 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import com.azure.resourcemanager.securityinsights.models.SourceControl; -import com.azure.resourcemanager.securityinsights.models.SourceControlsOperations; - -public final class SourceControlsOperationsImpl implements SourceControlsOperations { - private static final ClientLogger LOGGER = new ClientLogger(SourceControlsOperationsImpl.class); - - private final SourceControlsOperationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public SourceControlsOperationsImpl( - SourceControlsOperationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); - } - - public SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId) { - SourceControlInner inner = this.serviceClient().get(resourceGroupName, workspaceName, sourceControlId); - if (inner != null) { - return new SourceControlImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, sourceControlId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SourceControlImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { - this.serviceClient().delete(resourceGroupName, workspaceName, sourceControlId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, context); - } - - public SourceControl getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, sourceControlId, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, context); - } - - private SourceControlsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public SourceControlImpl define(String name) { - return new SourceControlImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TeamInformationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TeamInformationImpl.java deleted file mode 100644 index 4193894c5c11..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TeamInformationImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import java.time.OffsetDateTime; - -public final class TeamInformationImpl implements TeamInformation { - private TeamInformationInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - TeamInformationImpl( - TeamInformationInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String teamId() { - return this.innerModel().teamId(); - } - - public String primaryChannelUrl() { - return this.innerModel().primaryChannelUrl(); - } - - public OffsetDateTime teamCreationTimeUtc() { - return this.innerModel().teamCreationTimeUtc(); - } - - public String name() { - return this.innerModel().name(); - } - - public String description() { - return this.innerModel().description(); - } - - public TeamInformationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java deleted file mode 100644 index 246f25d1030c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java +++ /dev/null @@ -1,220 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorMetricsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceMetricsListInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorMetricsClient. - */ -public final class ThreatIntelligenceIndicatorMetricsClientImpl implements ThreatIntelligenceIndicatorMetricsClient { - /** The proxy service used to perform REST calls. */ - private final ThreatIntelligenceIndicatorMetricsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of ThreatIntelligenceIndicatorMetricsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ThreatIntelligenceIndicatorMetricsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create( - ThreatIntelligenceIndicatorMetricsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsThreatIntelligenceIndicatorMetrics to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorMetricsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/metrics") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String workspaceName) { - return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java deleted file mode 100644 index a89b3041bc58..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorMetricsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceMetricsListInner; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorMetrics; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceMetricsList; - -public final class ThreatIntelligenceIndicatorMetricsImpl implements ThreatIntelligenceIndicatorMetrics { - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceIndicatorMetricsImpl.class); - - private final ThreatIntelligenceIndicatorMetricsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public ThreatIntelligenceIndicatorMetricsImpl( - ThreatIntelligenceIndicatorMetricsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName) { - ThreatIntelligenceMetricsListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new ThreatIntelligenceMetricsListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ThreatIntelligenceMetricsListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ThreatIntelligenceIndicatorMetricsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java deleted file mode 100644 index c25005bfa019..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java +++ /dev/null @@ -1,1589 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformationList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */ -public final class ThreatIntelligenceIndicatorsClientImpl implements ThreatIntelligenceIndicatorsClient { - /** The proxy service used to perform REST calls. */ - private final ThreatIntelligenceIndicatorsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of ThreatIntelligenceIndicatorsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ThreatIntelligenceIndicatorsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create( - ThreatIntelligenceIndicatorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsThreatIntelligenceIndicators to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main" - + "/createIndicator") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createIndicator( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @BodyParam("application/json") ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main" - + "/queryIndicators") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> queryIndicators( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}/appendTags") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> appendTags( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @BodyParam("application/json") ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}/replaceTags") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> replaceTags( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @BodyParam("application/json") ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> queryIndicatorsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createIndicatorWithResponseAsync( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (threatIntelligenceProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceProperties is required and cannot be null.")); - } else { - threatIntelligenceProperties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createIndicator( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - threatIntelligenceProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createIndicatorWithResponseAsync( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (threatIntelligenceProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceProperties is required and cannot be null.")); - } else { - threatIntelligenceProperties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createIndicator( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - threatIntelligenceProperties, - accept, - context); - } - - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createIndicatorAsync( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - return createIndicatorWithResponseAsync(resourceGroupName, workspaceName, threatIntelligenceProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - return createIndicatorAsync(resourceGroupName, workspaceName, threatIntelligenceProperties).block(); - } - - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createIndicatorWithResponse( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - return createIndicatorWithResponseAsync(resourceGroupName, workspaceName, threatIntelligenceProperties, context) - .block(); - } - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - accept, - context); - } - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); - } - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (threatIntelligenceProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceProperties is required and cannot be null.")); - } else { - threatIntelligenceProperties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - threatIntelligenceProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (threatIntelligenceProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceProperties is required and cannot be null.")); - } else { - threatIntelligenceProperties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - threatIntelligenceProperties, - accept, - context); - } - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - return createWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - return createAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties).block(); - } - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties, context) - .block(); - } - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - accept, - context); - } - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); - } - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> queryIndicatorsSinglePageAsync( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (threatIntelligenceFilteringCriteria == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceFilteringCriteria is required and cannot be null.")); - } else { - threatIntelligenceFilteringCriteria.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .queryIndicators( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - threatIntelligenceFilteringCriteria, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> queryIndicatorsSinglePageAsync( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (threatIntelligenceFilteringCriteria == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceFilteringCriteria is required and cannot be null.")); - } else { - threatIntelligenceFilteringCriteria.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .queryIndicators( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - threatIntelligenceFilteringCriteria, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux queryIndicatorsAsync( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria) { - return new PagedFlux<>( - () -> queryIndicatorsSinglePageAsync(resourceGroupName, workspaceName, threatIntelligenceFilteringCriteria), - nextLink -> queryIndicatorsNextSinglePageAsync(nextLink)); - } - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux queryIndicatorsAsync( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria, - Context context) { - return new PagedFlux<>( - () -> - queryIndicatorsSinglePageAsync( - resourceGroupName, workspaceName, threatIntelligenceFilteringCriteria, context), - nextLink -> queryIndicatorsNextSinglePageAsync(nextLink, context)); - } - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable queryIndicators( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria) { - return new PagedIterable<>( - queryIndicatorsAsync(resourceGroupName, workspaceName, threatIntelligenceFilteringCriteria)); - } - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable queryIndicators( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria, - Context context) { - return new PagedIterable<>( - queryIndicatorsAsync(resourceGroupName, workspaceName, threatIntelligenceFilteringCriteria, context)); - } - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> appendTagsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (threatIntelligenceAppendTags == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceAppendTags is required and cannot be null.")); - } else { - threatIntelligenceAppendTags.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .appendTags( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - threatIntelligenceAppendTags, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> appendTagsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (threatIntelligenceAppendTags == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceAppendTags is required and cannot be null.")); - } else { - threatIntelligenceAppendTags.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .appendTags( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - threatIntelligenceAppendTags, - accept, - context); - } - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono appendTagsAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - return appendTagsWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void appendTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - appendTagsAsync(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags).block(); - } - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response appendTagsWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context) { - return appendTagsWithResponseAsync( - resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context) - .block(); - } - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> replaceTagsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (threatIntelligenceReplaceTags == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceReplaceTags is required and cannot be null.")); - } else { - threatIntelligenceReplaceTags.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .replaceTags( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - threatIntelligenceReplaceTags, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> replaceTagsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (threatIntelligenceReplaceTags == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter threatIntelligenceReplaceTags is required and cannot be null.")); - } else { - threatIntelligenceReplaceTags.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .replaceTags( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - threatIntelligenceReplaceTags, - accept, - context); - } - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono replaceTagsAsync( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - return replaceTagsWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner replaceTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - return replaceTagsAsync(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags).block(); - } - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response replaceTagsWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context) { - return replaceTagsWithResponseAsync( - resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> queryIndicatorsNextSinglePageAsync( - String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.queryIndicatorsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> queryIndicatorsNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .queryIndicatorsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java deleted file mode 100644 index ad629fc04fc9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java +++ /dev/null @@ -1,216 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicators; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformation; - -public final class ThreatIntelligenceIndicatorsImpl implements ThreatIntelligenceIndicators { - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceIndicatorsImpl.class); - - private final ThreatIntelligenceIndicatorsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public ThreatIntelligenceIndicatorsImpl( - ThreatIntelligenceIndicatorsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().createIndicator(resourceGroupName, workspaceName, threatIntelligenceProperties); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createIndicatorWithResponse( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - Response inner = - this - .serviceClient() - .createIndicatorWithResponse(resourceGroupName, workspaceName, threatIntelligenceProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ThreatIntelligenceInformationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name) { - ThreatIntelligenceInformationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ThreatIntelligenceInformationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().create(resourceGroupName, workspaceName, name, threatIntelligenceProperties); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - Response inner = - this - .serviceClient() - .createWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ThreatIntelligenceInformationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public PagedIterable queryIndicators( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria) { - PagedIterable inner = - this.serviceClient().queryIndicators(resourceGroupName, workspaceName, threatIntelligenceFilteringCriteria); - return Utils.mapPage(inner, inner1 -> new ThreatIntelligenceInformationImpl(inner1, this.manager())); - } - - public PagedIterable queryIndicators( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria, - Context context) { - PagedIterable inner = - this - .serviceClient() - .queryIndicators(resourceGroupName, workspaceName, threatIntelligenceFilteringCriteria, context); - return Utils.mapPage(inner, inner1 -> new ThreatIntelligenceInformationImpl(inner1, this.manager())); - } - - public void appendTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - this.serviceClient().appendTags(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags); - } - - public Response appendTagsWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context) { - return this - .serviceClient() - .appendTagsWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context); - } - - public ThreatIntelligenceInformation replaceTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().replaceTags(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response replaceTagsWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context) { - Response inner = - this - .serviceClient() - .replaceTagsWithResponse( - resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ThreatIntelligenceInformationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ThreatIntelligenceIndicatorsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java deleted file mode 100644 index ac5099ba79a9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java +++ /dev/null @@ -1,437 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformationList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * ThreatIntelligenceIndicatorsOperationsClient. - */ -public final class ThreatIntelligenceIndicatorsOperationsClientImpl - implements ThreatIntelligenceIndicatorsOperationsClient { - /** The proxy service used to perform REST calls. */ - private final ThreatIntelligenceIndicatorsOperationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of ThreatIntelligenceIndicatorsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ThreatIntelligenceIndicatorsOperationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create( - ThreatIntelligenceIndicatorsOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsThreatIntelligenceIndicatorsOperations to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); - } - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java deleted file mode 100644 index df68b9a281d2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorsOperations; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformation; - -public final class ThreatIntelligenceIndicatorsOperationsImpl implements ThreatIntelligenceIndicatorsOperations { - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceIndicatorsOperationsImpl.class); - - private final ThreatIntelligenceIndicatorsOperationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public ThreatIntelligenceIndicatorsOperationsImpl( - ThreatIntelligenceIndicatorsOperationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ThreatIntelligenceInformationImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new ThreatIntelligenceInformationImpl(inner1, this.manager())); - } - - private ThreatIntelligenceIndicatorsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceInformationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceInformationImpl.java deleted file mode 100644 index 91112c166786..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceInformationImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformation; - -public final class ThreatIntelligenceInformationImpl implements ThreatIntelligenceInformation { - private ThreatIntelligenceInformationInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - ThreatIntelligenceInformationImpl( - ThreatIntelligenceInformationInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ThreatIntelligenceInformationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceMetricsListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceMetricsListImpl.java deleted file mode 100644 index 2d0154591adb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceMetricsListImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceMetricsListInner; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceMetrics; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceMetricsList; -import java.util.Collections; -import java.util.List; - -public final class ThreatIntelligenceMetricsListImpl implements ThreatIntelligenceMetricsList { - private ThreatIntelligenceMetricsListInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - ThreatIntelligenceMetricsListImpl( - ThreatIntelligenceMetricsListInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ThreatIntelligenceMetricsListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/Utils.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/Utils.java deleted file mode 100644 index cdc16e4cf245..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/Utils.java +++ /dev/null @@ -1,204 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class Utils { - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java deleted file mode 100644 index ba1748990562..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java +++ /dev/null @@ -1,348 +0,0 @@ -// 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.implementation; - -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.SourceType; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.azure.resourcemanager.securityinsights.models.Watchlist; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class WatchlistImpl implements Watchlist, Watchlist.Definition, Watchlist.Update { - private WatchlistInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String watchlistId() { - return this.innerModel().watchlistId(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String provider() { - return this.innerModel().provider(); - } - - public String source() { - return this.innerModel().source(); - } - - public SourceType sourceType() { - return this.innerModel().sourceType(); - } - - public OffsetDateTime created() { - return this.innerModel().created(); - } - - public OffsetDateTime updated() { - return this.innerModel().updated(); - } - - public UserInfo createdBy() { - return this.innerModel().createdBy(); - } - - public UserInfo updatedBy() { - return this.innerModel().updatedBy(); - } - - public String description() { - return this.innerModel().description(); - } - - public String watchlistType() { - return this.innerModel().watchlistType(); - } - - public String watchlistAlias() { - return this.innerModel().watchlistAlias(); - } - - public Boolean isDeleted() { - return this.innerModel().isDeleted(); - } - - public List labels() { - List inner = this.innerModel().labels(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Duration defaultDuration() { - return this.innerModel().defaultDuration(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public Integer numberOfLinesToSkip() { - return this.innerModel().numberOfLinesToSkip(); - } - - public String rawContent() { - return this.innerModel().rawContent(); - } - - public String itemsSearchKey() { - return this.innerModel().itemsSearchKey(); - } - - public String contentType() { - return this.innerModel().contentType(); - } - - public String uploadStatus() { - return this.innerModel().uploadStatus(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public WatchlistInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String watchlistAlias; - - public WatchlistImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Watchlist create() { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlists() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, watchlistAlias, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Watchlist create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlists() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, watchlistAlias, this.innerModel(), context) - .getValue(); - return this; - } - - WatchlistImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new WatchlistInner(); - this.serviceManager = serviceManager; - this.watchlistAlias = name; - } - - public WatchlistImpl update() { - return this; - } - - public Watchlist apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlists() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, watchlistAlias, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Watchlist apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlists() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, watchlistAlias, this.innerModel(), context) - .getValue(); - return this; - } - - WatchlistImpl( - WatchlistInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.watchlistAlias = Utils.getValueFromIdByName(innerObject.id(), "watchlists"); - } - - public Watchlist refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlists() - .getWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE) - .getValue(); - return this; - } - - public Watchlist refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlists() - .getWithResponse(resourceGroupName, workspaceName, watchlistAlias, context) - .getValue(); - return this; - } - - public WatchlistImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public WatchlistImpl withWatchlistId(String watchlistId) { - this.innerModel().withWatchlistId(watchlistId); - return this; - } - - public WatchlistImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; - } - - public WatchlistImpl withProvider(String provider) { - this.innerModel().withProvider(provider); - return this; - } - - public WatchlistImpl withSource(String source) { - this.innerModel().withSource(source); - return this; - } - - public WatchlistImpl withSourceType(SourceType sourceType) { - this.innerModel().withSourceType(sourceType); - return this; - } - - public WatchlistImpl withCreated(OffsetDateTime created) { - this.innerModel().withCreated(created); - return this; - } - - public WatchlistImpl withUpdated(OffsetDateTime updated) { - this.innerModel().withUpdated(updated); - return this; - } - - public WatchlistImpl withCreatedBy(UserInfo createdBy) { - this.innerModel().withCreatedBy(createdBy); - return this; - } - - public WatchlistImpl withUpdatedBy(UserInfo updatedBy) { - this.innerModel().withUpdatedBy(updatedBy); - return this; - } - - public WatchlistImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public WatchlistImpl withWatchlistType(String watchlistType) { - this.innerModel().withWatchlistType(watchlistType); - return this; - } - - public WatchlistImpl withWatchlistAlias(String watchlistAlias) { - this.innerModel().withWatchlistAlias(watchlistAlias); - return this; - } - - public WatchlistImpl withIsDeleted(Boolean isDeleted) { - this.innerModel().withIsDeleted(isDeleted); - return this; - } - - public WatchlistImpl withLabels(List labels) { - this.innerModel().withLabels(labels); - return this; - } - - public WatchlistImpl withDefaultDuration(Duration defaultDuration) { - this.innerModel().withDefaultDuration(defaultDuration); - return this; - } - - public WatchlistImpl withTenantId(String tenantId) { - this.innerModel().withTenantId(tenantId); - return this; - } - - public WatchlistImpl withNumberOfLinesToSkip(Integer numberOfLinesToSkip) { - this.innerModel().withNumberOfLinesToSkip(numberOfLinesToSkip); - return this; - } - - public WatchlistImpl withRawContent(String rawContent) { - this.innerModel().withRawContent(rawContent); - return this; - } - - public WatchlistImpl withItemsSearchKey(String itemsSearchKey) { - this.innerModel().withItemsSearchKey(itemsSearchKey); - return this; - } - - public WatchlistImpl withContentType(String contentType) { - this.innerModel().withContentType(contentType); - return this; - } - - public WatchlistImpl withUploadStatus(String uploadStatus) { - this.innerModel().withUploadStatus(uploadStatus); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemImpl.java deleted file mode 100644 index 4b5b6d0486c8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemImpl.java +++ /dev/null @@ -1,258 +0,0 @@ -// 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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.azure.resourcemanager.securityinsights.models.WatchlistItem; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; - -public final class WatchlistItemImpl implements WatchlistItem, WatchlistItem.Definition, WatchlistItem.Update { - private WatchlistItemInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String watchlistItemType() { - return this.innerModel().watchlistItemType(); - } - - public String watchlistItemId() { - return this.innerModel().watchlistItemId(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public Boolean isDeleted() { - return this.innerModel().isDeleted(); - } - - public OffsetDateTime created() { - return this.innerModel().created(); - } - - public OffsetDateTime updated() { - return this.innerModel().updated(); - } - - public UserInfo createdBy() { - return this.innerModel().createdBy(); - } - - public UserInfo updatedBy() { - return this.innerModel().updatedBy(); - } - - public Map itemsKeyValue() { - Map inner = this.innerModel().itemsKeyValue(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public Map entityMapping() { - Map inner = this.innerModel().entityMapping(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public WatchlistItemInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String watchlistAlias; - - private String watchlistItemId; - - public WatchlistItemImpl withExistingWatchlist( - String resourceGroupName, String workspaceName, String watchlistAlias) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.watchlistAlias = watchlistAlias; - return this; - } - - public WatchlistItem create() { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlistItems() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public WatchlistItem create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlistItems() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, this.innerModel(), context) - .getValue(); - return this; - } - - WatchlistItemImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new WatchlistItemInner(); - this.serviceManager = serviceManager; - this.watchlistItemId = name; - } - - public WatchlistItemImpl update() { - return this; - } - - public WatchlistItem apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlistItems() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public WatchlistItem apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlistItems() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, this.innerModel(), context) - .getValue(); - return this; - } - - WatchlistItemImpl( - WatchlistItemInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.watchlistAlias = Utils.getValueFromIdByName(innerObject.id(), "watchlists"); - this.watchlistItemId = Utils.getValueFromIdByName(innerObject.id(), "watchlistItems"); - } - - public WatchlistItem refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlistItems() - .getWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE) - .getValue(); - return this; - } - - public WatchlistItem refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWatchlistItems() - .getWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context) - .getValue(); - return this; - } - - public WatchlistItemImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public WatchlistItemImpl withWatchlistItemType(String watchlistItemType) { - this.innerModel().withWatchlistItemType(watchlistItemType); - return this; - } - - public WatchlistItemImpl withWatchlistItemId(String watchlistItemId) { - this.innerModel().withWatchlistItemId(watchlistItemId); - return this; - } - - public WatchlistItemImpl withTenantId(String tenantId) { - this.innerModel().withTenantId(tenantId); - return this; - } - - public WatchlistItemImpl withIsDeleted(Boolean isDeleted) { - this.innerModel().withIsDeleted(isDeleted); - return this; - } - - public WatchlistItemImpl withCreated(OffsetDateTime created) { - this.innerModel().withCreated(created); - return this; - } - - public WatchlistItemImpl withUpdated(OffsetDateTime updated) { - this.innerModel().withUpdated(updated); - return this; - } - - public WatchlistItemImpl withCreatedBy(UserInfo createdBy) { - this.innerModel().withCreatedBy(createdBy); - return this; - } - - public WatchlistItemImpl withUpdatedBy(UserInfo updatedBy) { - this.innerModel().withUpdatedBy(updatedBy); - return this; - } - - public WatchlistItemImpl withItemsKeyValue(Map itemsKeyValue) { - this.innerModel().withItemsKeyValue(itemsKeyValue); - return this; - } - - public WatchlistItemImpl withEntityMapping(Map entityMapping) { - this.innerModel().withEntityMapping(entityMapping); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java deleted file mode 100644 index 0257b61bfb20..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java +++ /dev/null @@ -1,1030 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.WatchlistItemsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; -import com.azure.resourcemanager.securityinsights.models.WatchlistItemList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WatchlistItemsClient. */ -public final class WatchlistItemsClientImpl implements WatchlistItemsClient { - /** The proxy service used to perform REST calls. */ - private final WatchlistItemsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of WatchlistItemsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WatchlistItemsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(WatchlistItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsWatchlistItems to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsWatc") - private interface WatchlistItemsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}" - + "/watchlistItems") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("$skipToken") String skipToken, - @PathParam("watchlistAlias") String watchlistAlias, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}" - + "/watchlistItems/{watchlistItemId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("watchlistAlias") String watchlistAlias, - @PathParam("watchlistItemId") String watchlistItemId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}" - + "/watchlistItems/{watchlistItemId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("watchlistAlias") String watchlistAlias, - @PathParam("watchlistItemId") String watchlistItemId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}" - + "/watchlistItems/{watchlistItemId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("watchlistAlias") String watchlistAlias, - @PathParam("watchlistItemId") String watchlistItemId, - @BodyParam("application/json") WatchlistItemInner watchlistItem, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - skipToken, - watchlistAlias, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - skipToken, - watchlistAlias, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String watchlistAlias) { - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias) { - final String skipToken = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken)); - } - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken, context)); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - if (watchlistItemId == null) { - return Mono - .error(new IllegalArgumentException("Parameter watchlistItemId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - watchlistItemId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - if (watchlistItemId == null) { - return Mono - .error(new IllegalArgumentException("Parameter watchlistItemId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - watchlistItemId, - accept, - context); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistItemInner get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - return getAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId).block(); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context).block(); - } - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - if (watchlistItemId == null) { - return Mono - .error(new IllegalArgumentException("Parameter watchlistItemId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - watchlistItemId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - if (watchlistItemId == null) { - return Mono - .error(new IllegalArgumentException("Parameter watchlistItemId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - watchlistItemId, - accept, - context); - } - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - deleteAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId).block(); - } - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context) - .block(); - } - - /** - * Creates or updates a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param watchlistItem The watchlist item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - WatchlistItemInner watchlistItem) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - if (watchlistItemId == null) { - return Mono - .error(new IllegalArgumentException("Parameter watchlistItemId is required and cannot be null.")); - } - if (watchlistItem == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistItem is required and cannot be null.")); - } else { - watchlistItem.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - watchlistItemId, - watchlistItem, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param watchlistItem The watchlist item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - if (watchlistItemId == null) { - return Mono - .error(new IllegalArgumentException("Parameter watchlistItemId is required and cannot be null.")); - } - if (watchlistItem == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistItem is required and cannot be null.")); - } else { - watchlistItem.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - watchlistItemId, - watchlistItem, - accept, - context); - } - - /** - * Creates or updates a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param watchlistItem The watchlist item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - WatchlistItemInner watchlistItem) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param watchlistItem The watchlist item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistItemInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - WatchlistItemInner watchlistItem) { - return createOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem) - .block(); - } - - /** - * Creates or updates a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param watchlistItem The watchlist item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the watchlist items along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the watchlist items along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java deleted file mode 100644 index fc1cb65f0917..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java +++ /dev/null @@ -1,240 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.WatchlistItemsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; -import com.azure.resourcemanager.securityinsights.models.WatchlistItem; -import com.azure.resourcemanager.securityinsights.models.WatchlistItems; - -public final class WatchlistItemsImpl implements WatchlistItems { - private static final ClientLogger LOGGER = new ClientLogger(WatchlistItemsImpl.class); - - private final WatchlistItemsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public WatchlistItemsImpl( - WatchlistItemsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, watchlistAlias); - return Utils.mapPage(inner, inner1 -> new WatchlistItemImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, watchlistAlias, skipToken, context); - return Utils.mapPage(inner, inner1 -> new WatchlistItemImpl(inner1, this.manager())); - } - - public WatchlistItem get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - WatchlistItemInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); - if (inner != null) { - return new WatchlistItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WatchlistItemImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); - } - - public Response deleteWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context); - } - - public WatchlistItem getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); - if (watchlistAlias == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); - } - String watchlistItemId = Utils.getValueFromIdByName(id, "watchlistItems"); - if (watchlistItemId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'watchlistItems'.", id))); - } - return this - .getWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); - if (watchlistAlias == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); - } - String watchlistItemId = Utils.getValueFromIdByName(id, "watchlistItems"); - if (watchlistItemId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'watchlistItems'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); - if (watchlistAlias == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); - } - String watchlistItemId = Utils.getValueFromIdByName(id, "watchlistItems"); - if (watchlistItemId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'watchlistItems'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); - if (watchlistAlias == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); - } - String watchlistItemId = Utils.getValueFromIdByName(id, "watchlistItems"); - if (watchlistItemId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'watchlistItems'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context); - } - - private WatchlistItemsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public WatchlistItemImpl define(String name) { - return new WatchlistItemImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java deleted file mode 100644 index 56e2704b1252..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java +++ /dev/null @@ -1,944 +0,0 @@ -// 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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.WatchlistsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; -import com.azure.resourcemanager.securityinsights.models.WatchlistList; -import com.azure.resourcemanager.securityinsights.models.WatchlistsCreateOrUpdateResponse; -import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WatchlistsClient. */ -public final class WatchlistsClientImpl implements WatchlistsClient { - /** The proxy service used to perform REST calls. */ - private final WatchlistsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of WatchlistsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WatchlistsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(WatchlistsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsWatchlists to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsWatc") - private interface WatchlistsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("watchlistAlias") String watchlistAlias, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("watchlistAlias") String watchlistAlias, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("watchlistAlias") String watchlistAlias, - @BodyParam("application/json") WatchlistInner watchlist, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skipToken, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skipToken = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skipToken)); - } - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skipToken, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skipToken, context)); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String watchlistAlias) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - accept, - context); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String watchlistAlias) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias) { - return getAsync(resourceGroupName, workspaceName, watchlistAlias).block(); - } - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 watchlist, without its watchlist items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); - } - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String watchlistAlias) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - accept, - context); - } - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String watchlistAlias) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { - deleteAsync(resourceGroupName, workspaceName, watchlistAlias).block(); - } - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); - } - - /** - * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and - * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS - * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing - * such large file can be polled through the URL returned in Azure-AsyncOperation header. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlist The watchlist. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - if (watchlist == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlist is required and cannot be null.")); - } else { - watchlist.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - watchlist, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and - * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS - * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing - * such large file can be polled through the URL returned in Azure-AsyncOperation header. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlist The watchlist. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (watchlistAlias == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlistAlias is required and cannot be null.")); - } - if (watchlist == null) { - return Mono.error(new IllegalArgumentException("Parameter watchlist is required and cannot be null.")); - } else { - watchlist.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - watchlistAlias, - watchlist, - accept, - context); - } - - /** - * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and - * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS - * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing - * such large file can be polled through the URL returned in Azure-AsyncOperation header. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlist The watchlist. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and - * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS - * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing - * such large file can be polled through the URL returned in Azure-AsyncOperation header. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlist The watchlist. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistInner createOrUpdate( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { - return createOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist).block(); - } - - /** - * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and - * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS - * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing - * such large file can be polled through the URL returned in Azure-AsyncOperation header. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlist The watchlist. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the watchlists along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the watchlists along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java deleted file mode 100644 index 139a0477f33f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java +++ /dev/null @@ -1,192 +0,0 @@ -// 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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.WatchlistsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; -import com.azure.resourcemanager.securityinsights.models.Watchlist; -import com.azure.resourcemanager.securityinsights.models.Watchlists; -import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; - -public final class WatchlistsImpl implements Watchlists { - private static final ClientLogger LOGGER = new ClientLogger(WatchlistsImpl.class); - - private final WatchlistsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public WatchlistsImpl( - WatchlistsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String skipToken, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skipToken, context); - return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); - } - - public Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias) { - WatchlistInner inner = this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias); - if (inner != null) { - return new WatchlistImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WatchlistImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); - } - - public WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); - } - - public Watchlist getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); - if (watchlistAlias == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); - if (watchlistAlias == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); - if (watchlistAlias == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE); - } - - public WatchlistsDeleteResponse deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); - if (watchlistAlias == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); - } - - private WatchlistsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public WatchlistImpl define(String name) { - return new WatchlistImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/package-info.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/package-info.java deleted file mode 100644 index 456876fc95a3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for SecurityInsights. API spec for Microsoft.SecurityInsights (Azure Security - * Insights) resource provider. - */ -package com.azure.resourcemanager.securityinsights.implementation; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java deleted file mode 100644 index bf95fed22e28..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AadCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents AAD (Azure Active Directory) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureActiveDirectory") -@Fluent -public final class AadCheckRequirements extends DataConnectorsCheckRequirements { - /* - * AAD (Azure Active Directory) requirements check properties. - */ - @JsonProperty(value = "properties") - private AadCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: AAD (Azure Active Directory) requirements check properties. - * - * @return the innerProperties value. - */ - private AadCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java deleted file mode 100644 index 2c2d4b0f24aa..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AadDataConnectorProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents AAD (Azure Active Directory) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureActiveDirectory") -@Fluent -public final class AadDataConnector extends DataConnectorInner { - /* - * AAD (Azure Active Directory) data connector properties. - */ - @JsonProperty(value = "properties") - private AadDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: AAD (Azure Active Directory) data connector properties. - * - * @return the innerProperties value. - */ - private AadDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public AadDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AadDataConnector object itself. - */ - public AadDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new AadDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the AadDataConnector object itself. - */ - public AadDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new AadDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java deleted file mode 100644 index 45cdb56dc88a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AatpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents AATP (Azure Advanced Threat Protection) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureAdvancedThreatProtection") -@Fluent -public final class AatpCheckRequirements extends DataConnectorsCheckRequirements { - /* - * AATP (Azure Advanced Threat Protection) requirements check properties. - */ - @JsonProperty(value = "properties") - private AatpCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: AATP (Azure Advanced Threat Protection) requirements check properties. - * - * @return the innerProperties value. - */ - private AatpCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java deleted file mode 100644 index 25261e2030c4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AatpDataConnectorProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents AATP (Azure Advanced Threat Protection) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureAdvancedThreatProtection") -@Fluent -public final class AatpDataConnector extends DataConnectorInner { - /* - * AATP (Azure Advanced Threat Protection) data connector properties. - */ - @JsonProperty(value = "properties") - private AatpDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: AATP (Azure Advanced Threat Protection) data connector properties. - * - * @return the innerProperties value. - */ - private AatpDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public AatpDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AatpDataConnector object itself. - */ - public AatpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new AatpDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the AatpDataConnector object itself. - */ - public AatpDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new AatpDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java deleted file mode 100644 index d662cdb888ec..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java +++ /dev/null @@ -1,181 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AccountEntityProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; -import java.util.UUID; - -/** Represents an account entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Account") -@Fluent -public final class AccountEntity extends EntityInner { - /* - * Account entity properties - */ - @JsonProperty(value = "properties") - private AccountEntityProperties innerProperties; - - /** - * Get the innerProperties property: Account entity properties. - * - * @return the innerProperties value. - */ - private AccountEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the aadTenantId property: The Azure Active Directory tenant id. - * - * @return the aadTenantId value. - */ - public String aadTenantId() { - return this.innerProperties() == null ? null : this.innerProperties().aadTenantId(); - } - - /** - * Get the aadUserId property: The Azure Active Directory user id. - * - * @return the aadUserId value. - */ - public String aadUserId() { - return this.innerProperties() == null ? null : this.innerProperties().aadUserId(); - } - - /** - * Get the accountName property: The name of the account. This field should hold only the name without any domain - * added to it, i.e. administrator. - * - * @return the accountName value. - */ - public String accountName() { - return this.innerProperties() == null ? null : this.innerProperties().accountName(); - } - - /** - * Get the displayName property: The display name of the account. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Get the hostEntityId property: The Host entity id that contains the account in case it is a local account (not - * domain joined). - * - * @return the hostEntityId value. - */ - public String hostEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().hostEntityId(); - } - - /** - * Get the isDomainJoined property: Determines whether this is a domain account. - * - * @return the isDomainJoined value. - */ - public Boolean isDomainJoined() { - return this.innerProperties() == null ? null : this.innerProperties().isDomainJoined(); - } - - /** - * Get the ntDomain property: The NetBIOS domain name as it appears in the alert format domain/username. Examples: - * NT AUTHORITY. - * - * @return the ntDomain value. - */ - public String ntDomain() { - return this.innerProperties() == null ? null : this.innerProperties().ntDomain(); - } - - /** - * Get the objectGuid property: The objectGUID attribute is a single-value attribute that is the unique identifier - * for the object, assigned by active directory. - * - * @return the objectGuid value. - */ - public UUID objectGuid() { - return this.innerProperties() == null ? null : this.innerProperties().objectGuid(); - } - - /** - * Get the puid property: The Azure Active Directory Passport User ID. - * - * @return the puid value. - */ - public String puid() { - return this.innerProperties() == null ? null : this.innerProperties().puid(); - } - - /** - * Get the sid property: The account security identifier, e.g. S-1-5-18. - * - * @return the sid value. - */ - public String sid() { - return this.innerProperties() == null ? null : this.innerProperties().sid(); - } - - /** - * Get the upnSuffix property: The user principal name suffix for the account, in some cases it is also the domain - * name. Examples: contoso.com. - * - * @return the upnSuffix value. - */ - public String upnSuffix() { - return this.innerProperties() == null ? null : this.innerProperties().upnSuffix(); - } - - /** - * Get the dnsDomain property: The fully qualified domain DNS name. - * - * @return the dnsDomain value. - */ - public String dnsDomain() { - return this.innerProperties() == null ? null : this.innerProperties().dnsDomain(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java deleted file mode 100644 index 385e767940bd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java +++ /dev/null @@ -1,58 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Action property bag base. */ -@Fluent -public class ActionPropertiesBase { - /* - * Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - */ - @JsonProperty(value = "logicAppResourceId", required = true) - private String logicAppResourceId; - - /** - * Get the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * - * @return the logicAppResourceId value. - */ - public String logicAppResourceId() { - return this.logicAppResourceId; - } - - /** - * Set the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * - * @param logicAppResourceId the logicAppResourceId value to set. - * @return the ActionPropertiesBase object itself. - */ - public ActionPropertiesBase withLogicAppResourceId(String logicAppResourceId) { - this.logicAppResourceId = logicAppResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logicAppResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property logicAppResourceId in model ActionPropertiesBase")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ActionPropertiesBase.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java deleted file mode 100644 index ccc8692cff41..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java +++ /dev/null @@ -1,96 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.ActionRequestProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Action for alert rule. */ -@Fluent -public final class ActionRequest extends ResourceWithEtag { - /* - * Action properties for put request - */ - @JsonProperty(value = "properties") - private ActionRequestProperties innerProperties; - - /** - * Get the innerProperties property: Action properties for put request. - * - * @return the innerProperties value. - */ - private ActionRequestProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ActionRequest withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the triggerUri property: Logic App Callback URL for this specific workflow. - * - * @return the triggerUri value. - */ - public String triggerUri() { - return this.innerProperties() == null ? null : this.innerProperties().triggerUri(); - } - - /** - * Set the triggerUri property: Logic App Callback URL for this specific workflow. - * - * @param triggerUri the triggerUri value to set. - * @return the ActionRequest object itself. - */ - public ActionRequest withTriggerUri(String triggerUri) { - if (this.innerProperties() == null) { - this.innerProperties = new ActionRequestProperties(); - } - this.innerProperties().withTriggerUri(triggerUri); - return this; - } - - /** - * Get the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * - * @return the logicAppResourceId value. - */ - public String logicAppResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().logicAppResourceId(); - } - - /** - * Set the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * - * @param logicAppResourceId the logicAppResourceId value to set. - * @return the ActionRequest object itself. - */ - public ActionRequest withLogicAppResourceId(String logicAppResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new ActionRequestProperties(); - } - this.innerProperties().withLogicAppResourceId(logicAppResourceId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java deleted file mode 100644 index 3540eefe0690..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; - -/** An immutable client-side representation of ActionResponse. */ -public interface ActionResponse { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the workflowId property: The name of the logic app's workflow. - * - * @return the workflowId value. - */ - String workflowId(); - - /** - * Gets the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * - * @return the logicAppResourceId value. - */ - String logicAppResourceId(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner object. - * - * @return the inner object. - */ - ActionResponseInner innerModel(); - - /** The entirety of the ActionResponse definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The ActionResponse definition stages. */ - interface DefinitionStages { - /** The first stage of the ActionResponse definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ActionResponse definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, ruleId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @return the next definition stage. - */ - WithCreate withExistingAlertRule(String resourceGroupName, String workspaceName, String ruleId); - } - /** - * The stage of the ActionResponse definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithEtag, - DefinitionStages.WithTriggerUri, - DefinitionStages.WithLogicAppResourceId { - /** - * Executes the create request. - * - * @return the created resource. - */ - ActionResponse create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ActionResponse create(Context context); - } - /** The stage of the ActionResponse definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the ActionResponse definition allowing to specify triggerUri. */ - interface WithTriggerUri { - /** - * Specifies the triggerUri property: Logic App Callback URL for this specific workflow.. - * - * @param triggerUri Logic App Callback URL for this specific workflow. - * @return the next definition stage. - */ - WithCreate withTriggerUri(String triggerUri); - } - /** The stage of the ActionResponse definition allowing to specify logicAppResourceId. */ - interface WithLogicAppResourceId { - /** - * Specifies the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}.. - * - * @param logicAppResourceId Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * @return the next definition stage. - */ - WithCreate withLogicAppResourceId(String logicAppResourceId); - } - } - /** - * Begins update for the ActionResponse resource. - * - * @return the stage of resource update. - */ - ActionResponse.Update update(); - - /** The template for ActionResponse update. */ - interface Update extends UpdateStages.WithEtag, UpdateStages.WithTriggerUri, UpdateStages.WithLogicAppResourceId { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ActionResponse apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ActionResponse apply(Context context); - } - /** The ActionResponse update stages. */ - interface UpdateStages { - /** The stage of the ActionResponse update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the ActionResponse update allowing to specify triggerUri. */ - interface WithTriggerUri { - /** - * Specifies the triggerUri property: Logic App Callback URL for this specific workflow.. - * - * @param triggerUri Logic App Callback URL for this specific workflow. - * @return the next definition stage. - */ - Update withTriggerUri(String triggerUri); - } - /** The stage of the ActionResponse update allowing to specify logicAppResourceId. */ - interface WithLogicAppResourceId { - /** - * Specifies the logicAppResourceId property: Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}.. - * - * @param logicAppResourceId Logic App Resource Id, - * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - * @return the next definition stage. - */ - Update withLogicAppResourceId(String logicAppResourceId); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ActionResponse refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ActionResponse refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java deleted file mode 100644 index 9e8ad565443d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The type of the automation rule action. */ -public final class ActionType extends ExpandableStringEnum { - /** Static value ModifyProperties for ActionType. */ - public static final ActionType MODIFY_PROPERTIES = fromString("ModifyProperties"); - - /** Static value RunPlaybook for ActionType. */ - public static final ActionType RUN_PLAYBOOK = fromString("RunPlaybook"); - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - @JsonCreator - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java deleted file mode 100644 index 97de0d03303b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java +++ /dev/null @@ -1,152 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Actions. */ -public interface Actions { - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 all actions of alert rule as paginated response with {@link PagedIterable}. - */ - PagedIterable listByAlertRule(String resourceGroupName, String workspaceName, String ruleId); - - /** - * Gets all actions of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 all actions of alert rule as paginated response with {@link PagedIterable}. - */ - PagedIterable listByAlertRule( - String resourceGroupName, String workspaceName, String ruleId, Context context); - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @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 the action of alert rule. - */ - ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); - - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @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 the action of alert rule along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); - - /** - * Delete the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); - - /** - * Gets the action of alert rule. - * - * @param id the resource ID. - * @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 the action of alert rule along with {@link Response}. - */ - ActionResponse getById(String id); - - /** - * Gets the action of alert rule. - * - * @param id the resource ID. - * @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 the action of alert rule along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the action of alert rule. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete the action of alert rule. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ActionResponse resource. - * - * @param name resource name. - * @return the first stage of the new ActionResponse definition. - */ - ActionResponse.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java deleted file mode 100644 index 4f7ecdd353b9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the actions. */ -@Fluent -public final class ActionsList { - /* - * URL to fetch the next set of actions. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of actions. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of actions. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of actions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of actions. - * - * @param value the value value to set. - * @return the ActionsList object itself. - */ - public ActionsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ActionsList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ActionsList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java deleted file mode 100644 index e010a8c88c2a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java +++ /dev/null @@ -1,283 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.ActivityEntityQueriesProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents Activity entity query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Activity") -@Fluent -public final class ActivityCustomEntityQuery extends CustomEntityQuery { - /* - * Activity entity query properties - */ - @JsonProperty(value = "properties") - private ActivityEntityQueriesProperties innerProperties; - - /** - * Get the innerProperties property: Activity entity query properties. - * - * @return the innerProperties value. - */ - private ActivityEntityQueriesProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ActivityCustomEntityQuery withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withTitle(title); - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.innerProperties() == null ? null : this.innerProperties().content(); - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withContent(String content) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withContent(content); - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions() { - return this.innerProperties() == null ? null : this.innerProperties().queryDefinitions(); - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withQueryDefinitions( - ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withQueryDefinitions(queryDefinitions); - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.innerProperties() == null ? null : this.innerProperties().inputEntityType(); - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withInputEntityType(EntityType inputEntityType) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withInputEntityType(inputEntityType); - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.innerProperties() == null ? null : this.innerProperties().requiredInputFieldsSets(); - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withRequiredInputFieldsSets(requiredInputFieldsSets); - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().entitiesFilter(); - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withEntitiesFilter(Map> entitiesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withEntitiesFilter(entitiesFilter); - return this; - } - - /** - * Get the templateName property: The template id this activity was created from. - * - * @return the templateName value. - */ - public String templateName() { - return this.innerProperties() == null ? null : this.innerProperties().templateName(); - } - - /** - * Set the templateName property: The template id this activity was created from. - * - * @param templateName the templateName value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withTemplateName(String templateName) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withTemplateName(templateName); - return this; - } - - /** - * Get the enabled property: Determines whether this activity is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this activity is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the createdTimeUtc property: The time the activity was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the lastModifiedTimeUtc property: The last time the activity was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java deleted file mode 100644 index 610d4eff8d46..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Activity query definitions. */ -@Fluent -public final class ActivityEntityQueriesPropertiesQueryDefinitions { - /* - * The Activity query to run on a given entity - */ - @JsonProperty(value = "query") - private String query; - - /** - * Get the query property: The Activity query to run on a given entity. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The Activity query to run on a given entity. - * - * @param query the query value to set. - * @return the ActivityEntityQueriesPropertiesQueryDefinitions object itself. - */ - public ActivityEntityQueriesPropertiesQueryDefinitions withQuery(String query) { - this.query = query; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java deleted file mode 100644 index 7aadce92dcd4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java +++ /dev/null @@ -1,283 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.ActivityEntityQueriesProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents Activity entity query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Activity") -@Fluent -public final class ActivityEntityQuery extends EntityQueryInner { - /* - * Activity entity query properties - */ - @JsonProperty(value = "properties") - private ActivityEntityQueriesProperties innerProperties; - - /** - * Get the innerProperties property: Activity entity query properties. - * - * @return the innerProperties value. - */ - private ActivityEntityQueriesProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ActivityEntityQuery withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withTitle(title); - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.innerProperties() == null ? null : this.innerProperties().content(); - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withContent(String content) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withContent(content); - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions() { - return this.innerProperties() == null ? null : this.innerProperties().queryDefinitions(); - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withQueryDefinitions(ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withQueryDefinitions(queryDefinitions); - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.innerProperties() == null ? null : this.innerProperties().inputEntityType(); - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withInputEntityType(EntityType inputEntityType) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withInputEntityType(inputEntityType); - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.innerProperties() == null ? null : this.innerProperties().requiredInputFieldsSets(); - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withRequiredInputFieldsSets(requiredInputFieldsSets); - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().entitiesFilter(); - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withEntitiesFilter(Map> entitiesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withEntitiesFilter(entitiesFilter); - return this; - } - - /** - * Get the templateName property: The template id this activity was created from. - * - * @return the templateName value. - */ - public String templateName() { - return this.innerProperties() == null ? null : this.innerProperties().templateName(); - } - - /** - * Set the templateName property: The template id this activity was created from. - * - * @param templateName the templateName value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withTemplateName(String templateName) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withTemplateName(templateName); - return this; - } - - /** - * Get the enabled property: Determines whether this activity is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this activity is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the createdTimeUtc property: The time the activity was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the lastModifiedTimeUtc property: The last time the activity was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java deleted file mode 100644 index 9066b404574c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java +++ /dev/null @@ -1,235 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.ActivityEntityQueryTemplateProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** Represents Activity entity query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Activity") -@Fluent -public final class ActivityEntityQueryTemplate extends EntityQueryTemplateInner { - /* - * Activity entity query properties - */ - @JsonProperty(value = "properties") - private ActivityEntityQueryTemplateProperties innerProperties; - - /** - * Get the innerProperties property: Activity entity query properties. - * - * @return the innerProperties value. - */ - private ActivityEntityQueryTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withTitle(title); - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.innerProperties() == null ? null : this.innerProperties().content(); - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withContent(String content) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withContent(content); - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions() { - return this.innerProperties() == null ? null : this.innerProperties().queryDefinitions(); - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withQueryDefinitions( - ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withQueryDefinitions(queryDefinitions); - return this; - } - - /** - * Get the dataTypes property: List of required data types for the given entity query template. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: List of required data types for the given entity query template. - * - * @param dataTypes the dataTypes value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withDataTypes(List dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.innerProperties() == null ? null : this.innerProperties().inputEntityType(); - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withInputEntityType(EntityType inputEntityType) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withInputEntityType(inputEntityType); - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.innerProperties() == null ? null : this.innerProperties().requiredInputFieldsSets(); - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withRequiredInputFieldsSets(requiredInputFieldsSets); - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().entitiesFilter(); - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withEntitiesFilter(Map> entitiesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withEntitiesFilter(entitiesFilter); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java deleted file mode 100644 index 9a85f95ebfa3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Activity query definitions. */ -@Fluent -public final class ActivityEntityQueryTemplatePropertiesQueryDefinitions { - /* - * The Activity query to run on a given entity - */ - @JsonProperty(value = "query") - private String query; - - /* - * The dimensions we want to summarize the timeline results on, this is comma separated list - */ - @JsonProperty(value = "summarizeBy") - private String summarizeBy; - - /** - * Get the query property: The Activity query to run on a given entity. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The Activity query to run on a given entity. - * - * @param query the query value to set. - * @return the ActivityEntityQueryTemplatePropertiesQueryDefinitions object itself. - */ - public ActivityEntityQueryTemplatePropertiesQueryDefinitions withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the summarizeBy property: The dimensions we want to summarize the timeline results on, this is comma - * separated list. - * - * @return the summarizeBy value. - */ - public String summarizeBy() { - return this.summarizeBy; - } - - /** - * Set the summarizeBy property: The dimensions we want to summarize the timeline results on, this is comma - * separated list. - * - * @param summarizeBy the summarizeBy value to set. - * @return the ActivityEntityQueryTemplatePropertiesQueryDefinitions object itself. - */ - public ActivityEntityQueryTemplatePropertiesQueryDefinitions withSummarizeBy(String summarizeBy) { - this.summarizeBy = summarizeBy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java deleted file mode 100644 index 1e6b52c71395..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java +++ /dev/null @@ -1,251 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Represents Activity timeline item. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Activity") -@Fluent -public final class ActivityTimelineItem extends EntityTimelineItem { - /* - * The activity query id. - */ - @JsonProperty(value = "queryId", required = true) - private String queryId; - - /* - * The grouping bucket start time. - */ - @JsonProperty(value = "bucketStartTimeUTC", required = true) - private OffsetDateTime bucketStartTimeUtc; - - /* - * The grouping bucket end time. - */ - @JsonProperty(value = "bucketEndTimeUTC", required = true) - private OffsetDateTime bucketEndTimeUtc; - - /* - * The time of the first activity in the grouping bucket. - */ - @JsonProperty(value = "firstActivityTimeUTC", required = true) - private OffsetDateTime firstActivityTimeUtc; - - /* - * The time of the last activity in the grouping bucket. - */ - @JsonProperty(value = "lastActivityTimeUTC", required = true) - private OffsetDateTime lastActivityTimeUtc; - - /* - * The activity timeline content. - */ - @JsonProperty(value = "content", required = true) - private String content; - - /* - * The activity timeline title. - */ - @JsonProperty(value = "title", required = true) - private String title; - - /** - * Get the queryId property: The activity query id. - * - * @return the queryId value. - */ - public String queryId() { - return this.queryId; - } - - /** - * Set the queryId property: The activity query id. - * - * @param queryId the queryId value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Get the bucketStartTimeUtc property: The grouping bucket start time. - * - * @return the bucketStartTimeUtc value. - */ - public OffsetDateTime bucketStartTimeUtc() { - return this.bucketStartTimeUtc; - } - - /** - * Set the bucketStartTimeUtc property: The grouping bucket start time. - * - * @param bucketStartTimeUtc the bucketStartTimeUtc value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withBucketStartTimeUtc(OffsetDateTime bucketStartTimeUtc) { - this.bucketStartTimeUtc = bucketStartTimeUtc; - return this; - } - - /** - * Get the bucketEndTimeUtc property: The grouping bucket end time. - * - * @return the bucketEndTimeUtc value. - */ - public OffsetDateTime bucketEndTimeUtc() { - return this.bucketEndTimeUtc; - } - - /** - * Set the bucketEndTimeUtc property: The grouping bucket end time. - * - * @param bucketEndTimeUtc the bucketEndTimeUtc value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withBucketEndTimeUtc(OffsetDateTime bucketEndTimeUtc) { - this.bucketEndTimeUtc = bucketEndTimeUtc; - return this; - } - - /** - * Get the firstActivityTimeUtc property: The time of the first activity in the grouping bucket. - * - * @return the firstActivityTimeUtc value. - */ - public OffsetDateTime firstActivityTimeUtc() { - return this.firstActivityTimeUtc; - } - - /** - * Set the firstActivityTimeUtc property: The time of the first activity in the grouping bucket. - * - * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { - this.firstActivityTimeUtc = firstActivityTimeUtc; - return this; - } - - /** - * Get the lastActivityTimeUtc property: The time of the last activity in the grouping bucket. - * - * @return the lastActivityTimeUtc value. - */ - public OffsetDateTime lastActivityTimeUtc() { - return this.lastActivityTimeUtc; - } - - /** - * Set the lastActivityTimeUtc property: The time of the last activity in the grouping bucket. - * - * @param lastActivityTimeUtc the lastActivityTimeUtc value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { - this.lastActivityTimeUtc = lastActivityTimeUtc; - return this; - } - - /** - * Get the content property: The activity timeline content. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The activity timeline content. - * - * @param content the content value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the title property: The activity timeline title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The activity timeline title. - * - * @param title the title value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withTitle(String title) { - this.title = title; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (queryId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property queryId in model ActivityTimelineItem")); - } - if (bucketStartTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property bucketStartTimeUtc in model ActivityTimelineItem")); - } - if (bucketEndTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property bucketEndTimeUtc in model ActivityTimelineItem")); - } - if (firstActivityTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property firstActivityTimeUtc in model ActivityTimelineItem")); - } - if (lastActivityTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property lastActivityTimeUtc in model ActivityTimelineItem")); - } - if (content() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property content in model ActivityTimelineItem")); - } - if (title() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property title in model ActivityTimelineItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ActivityTimelineItem.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java deleted file mode 100644 index eff4838eabd8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** Alert detail. */ -public final class AlertDetail extends ExpandableStringEnum { - /** Static value DisplayName for AlertDetail. */ - public static final AlertDetail DISPLAY_NAME = fromString("DisplayName"); - - /** Static value Severity for AlertDetail. */ - public static final AlertDetail SEVERITY = fromString("Severity"); - - /** - * Creates or finds a AlertDetail from its string representation. - * - * @param name a name to look for. - * @return the corresponding AlertDetail. - */ - @JsonCreator - public static AlertDetail fromString(String name) { - return fromString(name, AlertDetail.class); - } - - /** - * Gets known AlertDetail values. - * - * @return known AlertDetail values. - */ - public static Collection values() { - return values(AlertDetail.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java deleted file mode 100644 index 6abe8f54b47d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java +++ /dev/null @@ -1,124 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Settings for how to dynamically override alert static details. */ -@Fluent -public final class AlertDetailsOverride { - /* - * the format containing columns name(s) to override the alert name - */ - @JsonProperty(value = "alertDisplayNameFormat") - private String alertDisplayNameFormat; - - /* - * the format containing columns name(s) to override the alert description - */ - @JsonProperty(value = "alertDescriptionFormat") - private String alertDescriptionFormat; - - /* - * the column name to take the alert tactics from - */ - @JsonProperty(value = "alertTacticsColumnName") - private String alertTacticsColumnName; - - /* - * the column name to take the alert severity from - */ - @JsonProperty(value = "alertSeverityColumnName") - private String alertSeverityColumnName; - - /** - * Get the alertDisplayNameFormat property: the format containing columns name(s) to override the alert name. - * - * @return the alertDisplayNameFormat value. - */ - public String alertDisplayNameFormat() { - return this.alertDisplayNameFormat; - } - - /** - * Set the alertDisplayNameFormat property: the format containing columns name(s) to override the alert name. - * - * @param alertDisplayNameFormat the alertDisplayNameFormat value to set. - * @return the AlertDetailsOverride object itself. - */ - public AlertDetailsOverride withAlertDisplayNameFormat(String alertDisplayNameFormat) { - this.alertDisplayNameFormat = alertDisplayNameFormat; - return this; - } - - /** - * Get the alertDescriptionFormat property: the format containing columns name(s) to override the alert description. - * - * @return the alertDescriptionFormat value. - */ - public String alertDescriptionFormat() { - return this.alertDescriptionFormat; - } - - /** - * Set the alertDescriptionFormat property: the format containing columns name(s) to override the alert description. - * - * @param alertDescriptionFormat the alertDescriptionFormat value to set. - * @return the AlertDetailsOverride object itself. - */ - public AlertDetailsOverride withAlertDescriptionFormat(String alertDescriptionFormat) { - this.alertDescriptionFormat = alertDescriptionFormat; - return this; - } - - /** - * Get the alertTacticsColumnName property: the column name to take the alert tactics from. - * - * @return the alertTacticsColumnName value. - */ - public String alertTacticsColumnName() { - return this.alertTacticsColumnName; - } - - /** - * Set the alertTacticsColumnName property: the column name to take the alert tactics from. - * - * @param alertTacticsColumnName the alertTacticsColumnName value to set. - * @return the AlertDetailsOverride object itself. - */ - public AlertDetailsOverride withAlertTacticsColumnName(String alertTacticsColumnName) { - this.alertTacticsColumnName = alertTacticsColumnName; - return this; - } - - /** - * Get the alertSeverityColumnName property: the column name to take the alert severity from. - * - * @return the alertSeverityColumnName value. - */ - public String alertSeverityColumnName() { - return this.alertSeverityColumnName; - } - - /** - * Set the alertSeverityColumnName property: the column name to take the alert severity from. - * - * @param alertSeverityColumnName the alertSeverityColumnName value to set. - * @return the AlertDetailsOverride object itself. - */ - public AlertDetailsOverride withAlertSeverityColumnName(String alertSeverityColumnName) { - this.alertSeverityColumnName = alertSeverityColumnName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRule.java deleted file mode 100644 index 7b9839a7561f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRule.java +++ /dev/null @@ -1,53 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; - -/** An immutable client-side representation of AlertRule. */ -public interface AlertRule { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner object. - * - * @return the inner object. - */ - AlertRuleInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java deleted file mode 100644 index fb0c0d7f86b2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java +++ /dev/null @@ -1,51 +0,0 @@ -// 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; - -/** The kind of the alert rule. */ -public final class AlertRuleKind extends ExpandableStringEnum { - /** Static value Scheduled for AlertRuleKind. */ - public static final AlertRuleKind SCHEDULED = fromString("Scheduled"); - - /** Static value MicrosoftSecurityIncidentCreation for AlertRuleKind. */ - public static final AlertRuleKind MICROSOFT_SECURITY_INCIDENT_CREATION = - fromString("MicrosoftSecurityIncidentCreation"); - - /** Static value Fusion for AlertRuleKind. */ - public static final AlertRuleKind FUSION = fromString("Fusion"); - - /** Static value MLBehaviorAnalytics for AlertRuleKind. */ - public static final AlertRuleKind MLBEHAVIOR_ANALYTICS = fromString("MLBehaviorAnalytics"); - - /** Static value ThreatIntelligence for AlertRuleKind. */ - public static final AlertRuleKind THREAT_INTELLIGENCE = fromString("ThreatIntelligence"); - - /** Static value NRT for AlertRuleKind. */ - public static final AlertRuleKind NRT = fromString("NRT"); - - /** - * Creates or finds a AlertRuleKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding AlertRuleKind. - */ - @JsonCreator - public static AlertRuleKind fromString(String name) { - return fromString(name, AlertRuleKind.class); - } - - /** - * Gets known AlertRuleKind values. - * - * @return known AlertRuleKind values. - */ - public static Collection values() { - return values(AlertRuleKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplate.java deleted file mode 100644 index 247c2492e403..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplate.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; - -/** An immutable client-side representation of AlertRuleTemplate. */ -public interface AlertRuleTemplate { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner object. - * - * @return the inner object. - */ - AlertRuleTemplateInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java deleted file mode 100644 index a8705467713b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** alert rule template data sources. */ -@Fluent -public final class AlertRuleTemplateDataSource { - /* - * The connector id that provides the following data types - */ - @JsonProperty(value = "connectorId") - private String connectorId; - - /* - * The data types used by the alert rule template - */ - @JsonProperty(value = "dataTypes") - private List dataTypes; - - /** - * Get the connectorId property: The connector id that provides the following data types. - * - * @return the connectorId value. - */ - public String connectorId() { - return this.connectorId; - } - - /** - * Set the connectorId property: The connector id that provides the following data types. - * - * @param connectorId the connectorId value to set. - * @return the AlertRuleTemplateDataSource object itself. - */ - public AlertRuleTemplateDataSource withConnectorId(String connectorId) { - this.connectorId = connectorId; - return this; - } - - /** - * Get the dataTypes property: The data types used by the alert rule template. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The data types used by the alert rule template. - * - * @param dataTypes the dataTypes value to set. - * @return the AlertRuleTemplateDataSource object itself. - */ - public AlertRuleTemplateDataSource withDataTypes(List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java deleted file mode 100644 index 9ec04325df71..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java +++ /dev/null @@ -1,187 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Base alert rule template property bag. */ -@Fluent -public class AlertRuleTemplatePropertiesBase { - /* - * the number of alert rules that were created by this template - */ - @JsonProperty(value = "alertRulesCreatedByTemplateCount") - private Integer alertRulesCreatedByTemplateCount; - - /* - * The last time that this alert rule template has been updated. - */ - @JsonProperty(value = "lastUpdatedDateUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastUpdatedDateUtc; - - /* - * The time that this alert rule template has been added. - */ - @JsonProperty(value = "createdDateUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDateUtc; - - /* - * The description of the alert rule template. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The display name for alert rule template. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The required data sources for this template - */ - @JsonProperty(value = "requiredDataConnectors") - private List requiredDataConnectors; - - /* - * The alert rule template status. - */ - @JsonProperty(value = "status") - private TemplateStatus status; - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.alertRulesCreatedByTemplateCount; - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - this.alertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.lastUpdatedDateUtc; - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.createdDateUtc; - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.requiredDataConnectors; - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase withRequiredDataConnectors( - List requiredDataConnectors) { - this.requiredDataConnectors = requiredDataConnectors; - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.status; - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase withStatus(TemplateStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (requiredDataConnectors() != null) { - requiredDataConnectors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java deleted file mode 100644 index 7ab1567de6d3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java +++ /dev/null @@ -1,112 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Alert rule template with MITRE property bag. */ -@Fluent -public class AlertRuleTemplateWithMitreProperties extends AlertRuleTemplatePropertiesBase { - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * The techniques of the alert rule - */ - @JsonProperty(value = "techniques") - private List techniques; - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the AlertRuleTemplateWithMitreProperties object itself. - */ - public AlertRuleTemplateWithMitreProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the AlertRuleTemplateWithMitreProperties object itself. - */ - public AlertRuleTemplateWithMitreProperties withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** {@inheritDoc} */ - @Override - public AlertRuleTemplateWithMitreProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public AlertRuleTemplateWithMitreProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AlertRuleTemplateWithMitreProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AlertRuleTemplateWithMitreProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public AlertRuleTemplateWithMitreProperties withStatus(TemplateStatus status) { - super.withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java deleted file mode 100644 index 6c1e23964aae..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java +++ /dev/null @@ -1,65 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of AlertRuleTemplates. */ -public interface AlertRuleTemplates { - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all alert rule templates as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all alert rule templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all alert rule templates as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @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 the alert rule template. - */ - AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); - - /** - * Gets the alert rule template. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param alertRuleTemplateId Alert rule template ID. - * @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 the alert rule template along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java deleted file mode 100644 index 8292bf9e3852..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the alert rule templates. */ -@Fluent -public final class AlertRuleTemplatesList { - /* - * URL to fetch the next set of alert rule templates. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of alert rule templates. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of alert rule templates. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of alert rule templates. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of alert rule templates. - * - * @param value the value value to set. - * @return the AlertRuleTemplatesList object itself. - */ - public AlertRuleTemplatesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AlertRuleTemplatesList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AlertRuleTemplatesList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java deleted file mode 100644 index 4ce770f0de66..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java +++ /dev/null @@ -1,121 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; - -/** Resource collection API of AlertRules. */ -public interface AlertRules { - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all alert rules as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all alert rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all alert rules as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 the alert rule. - */ - AlertRule get(String resourceGroupName, String workspaceName, String ruleId); - - /** - * Gets the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 the alert rule along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @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 alert rule. - */ - AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); - - /** - * Creates or updates the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param alertRule The alert rule. - * @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 alert rule along with {@link Response}. - */ - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String ruleId); - - /** - * Delete the alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @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 the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java deleted file mode 100644 index c758bd659a27..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the alert rules. */ -@Fluent -public final class AlertRulesList { - /* - * URL to fetch the next set of alert rules. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of alert rules. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of alert rules. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of alert rules. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of alert rules. - * - * @param value the value value to set. - * @return the AlertRulesList object itself. - */ - public AlertRulesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AlertRulesList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AlertRulesList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java deleted file mode 100644 index 4c140f2d9b58..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The severity of the alert. */ -public final class AlertSeverity extends ExpandableStringEnum { - /** Static value High for AlertSeverity. */ - public static final AlertSeverity HIGH = fromString("High"); - - /** Static value Medium for AlertSeverity. */ - public static final AlertSeverity MEDIUM = fromString("Medium"); - - /** Static value Low for AlertSeverity. */ - public static final AlertSeverity LOW = fromString("Low"); - - /** Static value Informational for AlertSeverity. */ - public static final AlertSeverity INFORMATIONAL = fromString("Informational"); - - /** - * Creates or finds a AlertSeverity from its string representation. - * - * @param name a name to look for. - * @return the corresponding AlertSeverity. - */ - @JsonCreator - public static AlertSeverity fromString(String name) { - return fromString(name, AlertSeverity.class); - } - - /** - * Gets known AlertSeverity values. - * - * @return known AlertSeverity values. - */ - public static Collection values() { - return values(AlertSeverity.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java deleted file mode 100644 index db728892d6f1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java +++ /dev/null @@ -1,47 +0,0 @@ -// 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; - -/** The lifecycle status of the alert. */ -public final class AlertStatus extends ExpandableStringEnum { - /** Static value Unknown for AlertStatus. */ - public static final AlertStatus UNKNOWN = fromString("Unknown"); - - /** Static value New for AlertStatus. */ - public static final AlertStatus NEW = fromString("New"); - - /** Static value Resolved for AlertStatus. */ - public static final AlertStatus RESOLVED = fromString("Resolved"); - - /** Static value Dismissed for AlertStatus. */ - public static final AlertStatus DISMISSED = fromString("Dismissed"); - - /** Static value InProgress for AlertStatus. */ - public static final AlertStatus IN_PROGRESS = fromString("InProgress"); - - /** - * Creates or finds a AlertStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding AlertStatus. - */ - @JsonCreator - public static AlertStatus fromString(String name) { - return fromString(name, AlertStatus.class); - } - - /** - * Gets known AlertStatus values. - * - * @return known AlertStatus values. - */ - public static Collection values() { - return values(AlertStatus.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java deleted file mode 100644 index 2b9ea1a54378..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Alerts data type for data connectors. */ -@Fluent -public class AlertsDataTypeOfDataConnector { - /* - * Alerts data type connection. - */ - @JsonProperty(value = "alerts", required = true) - private DataConnectorDataTypeCommon alerts; - - /** - * Get the alerts property: Alerts data type connection. - * - * @return the alerts value. - */ - public DataConnectorDataTypeCommon alerts() { - return this.alerts; - } - - /** - * Set the alerts property: Alerts data type connection. - * - * @param alerts the alerts value to set. - * @return the AlertsDataTypeOfDataConnector object itself. - */ - public AlertsDataTypeOfDataConnector withAlerts(DataConnectorDataTypeCommon alerts) { - this.alerts = alerts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (alerts() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alerts in model AlertsDataTypeOfDataConnector")); - } else { - alerts().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AlertsDataTypeOfDataConnector.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java deleted file mode 100644 index a06d6aea9018..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java +++ /dev/null @@ -1,62 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AnomaliesSettingsProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Settings with single toggle. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Anomalies") -@Fluent -public final class Anomalies extends SettingsInner { - /* - * Anomalies properties - */ - @JsonProperty(value = "properties") - private AnomaliesSettingsProperties innerProperties; - - /** - * Get the innerProperties property: Anomalies properties. - * - * @return the innerProperties value. - */ - private AnomaliesSettingsProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public Anomalies withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the isEnabled property: Determines whether the setting is enable or disabled. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java deleted file mode 100644 index 3a67f21d0c14..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java +++ /dev/null @@ -1,372 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AnomalySecurityMLAnalyticsSettingsProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.UUID; - -/** Represents Anomaly Security ML Analytics Settings. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Anomaly") -@Fluent -public final class AnomalySecurityMLAnalyticsSettings extends SecurityMLAnalyticsSettingInner { - /* - * Anomaly Security ML Analytics Settings properties - */ - @JsonProperty(value = "properties") - private AnomalySecurityMLAnalyticsSettingsProperties innerProperties; - - /** - * Get the innerProperties property: Anomaly Security ML Analytics Settings properties. - * - * @return the innerProperties value. - */ - private AnomalySecurityMLAnalyticsSettingsProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public AnomalySecurityMLAnalyticsSettings withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the description property: The description of the SecurityMLAnalyticsSettings. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the SecurityMLAnalyticsSettings. - * - * @param description the description value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for settings created by this SecurityMLAnalyticsSettings. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for settings created by this SecurityMLAnalyticsSettings. - * - * @param displayName the displayName value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the enabled property: Determines whether this settings is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this settings is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this SecurityMLAnalyticsSettings has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); - } - - /** - * Get the requiredDataConnectors property: The required data sources for this SecurityMLAnalyticsSettings. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data sources for this SecurityMLAnalyticsSettings. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withRequiredDataConnectors( - List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the tactics property: The tactics of the SecurityMLAnalyticsSettings. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the SecurityMLAnalyticsSettings. - * - * @param tactics the tactics value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: The techniques of the SecurityMLAnalyticsSettings. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: The techniques of the SecurityMLAnalyticsSettings. - * - * @param techniques the techniques value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Get the anomalyVersion property: The anomaly version of the AnomalySecurityMLAnalyticsSettings. - * - * @return the anomalyVersion value. - */ - public String anomalyVersion() { - return this.innerProperties() == null ? null : this.innerProperties().anomalyVersion(); - } - - /** - * Set the anomalyVersion property: The anomaly version of the AnomalySecurityMLAnalyticsSettings. - * - * @param anomalyVersion the anomalyVersion value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withAnomalyVersion(String anomalyVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withAnomalyVersion(anomalyVersion); - return this; - } - - /** - * Get the customizableObservations property: The customizable observations of the - * AnomalySecurityMLAnalyticsSettings. - * - * @return the customizableObservations value. - */ - public Object customizableObservations() { - return this.innerProperties() == null ? null : this.innerProperties().customizableObservations(); - } - - /** - * Set the customizableObservations property: The customizable observations of the - * AnomalySecurityMLAnalyticsSettings. - * - * @param customizableObservations the customizableObservations value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withCustomizableObservations(Object customizableObservations) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withCustomizableObservations(customizableObservations); - return this; - } - - /** - * Get the frequency property: The frequency that this SecurityMLAnalyticsSettings will be run. - * - * @return the frequency value. - */ - public Duration frequency() { - return this.innerProperties() == null ? null : this.innerProperties().frequency(); - } - - /** - * Set the frequency property: The frequency that this SecurityMLAnalyticsSettings will be run. - * - * @param frequency the frequency value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withFrequency(Duration frequency) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withFrequency(frequency); - return this; - } - - /** - * Get the settingsStatus property: The anomaly SecurityMLAnalyticsSettings status. - * - * @return the settingsStatus value. - */ - public SettingsStatus settingsStatus() { - return this.innerProperties() == null ? null : this.innerProperties().settingsStatus(); - } - - /** - * Set the settingsStatus property: The anomaly SecurityMLAnalyticsSettings status. - * - * @param settingsStatus the settingsStatus value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withSettingsStatus(SettingsStatus settingsStatus) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withSettingsStatus(settingsStatus); - return this; - } - - /** - * Get the isDefaultSettings property: Determines whether this anomaly security ml analytics settings is a default - * settings. - * - * @return the isDefaultSettings value. - */ - public Boolean isDefaultSettings() { - return this.innerProperties() == null ? null : this.innerProperties().isDefaultSettings(); - } - - /** - * Set the isDefaultSettings property: Determines whether this anomaly security ml analytics settings is a default - * settings. - * - * @param isDefaultSettings the isDefaultSettings value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withIsDefaultSettings(Boolean isDefaultSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withIsDefaultSettings(isDefaultSettings); - return this; - } - - /** - * Get the anomalySettingsVersion property: The anomaly settings version of the Anomaly security ml analytics - * settings that dictates whether job version gets updated or not. - * - * @return the anomalySettingsVersion value. - */ - public Integer anomalySettingsVersion() { - return this.innerProperties() == null ? null : this.innerProperties().anomalySettingsVersion(); - } - - /** - * Set the anomalySettingsVersion property: The anomaly settings version of the Anomaly security ml analytics - * settings that dictates whether job version gets updated or not. - * - * @param anomalySettingsVersion the anomalySettingsVersion value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withAnomalySettingsVersion(Integer anomalySettingsVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withAnomalySettingsVersion(anomalySettingsVersion); - return this; - } - - /** - * Get the settingsDefinitionId property: The anomaly settings definition Id. - * - * @return the settingsDefinitionId value. - */ - public UUID settingsDefinitionId() { - return this.innerProperties() == null ? null : this.innerProperties().settingsDefinitionId(); - } - - /** - * Set the settingsDefinitionId property: The anomaly settings definition Id. - * - * @param settingsDefinitionId the settingsDefinitionId value to set. - * @return the AnomalySecurityMLAnalyticsSettings object itself. - */ - public AnomalySecurityMLAnalyticsSettings withSettingsDefinitionId(UUID settingsDefinitionId) { - if (this.innerProperties() == null) { - this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties(); - } - this.innerProperties().withSettingsDefinitionId(settingsDefinitionId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java deleted file mode 100644 index 28ec81da3af0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java +++ /dev/null @@ -1,345 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents anomaly timeline item. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Anomaly") -@Fluent -public final class AnomalyTimelineItem extends EntityTimelineItem { - /* - * The anomaly azure resource id. - */ - @JsonProperty(value = "azureResourceId", required = true) - private String azureResourceId; - - /* - * The anomaly product name. - */ - @JsonProperty(value = "productName") - private String productName; - - /* - * The anomaly description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The anomaly name. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * The anomaly end time. - */ - @JsonProperty(value = "endTimeUtc", required = true) - private OffsetDateTime endTimeUtc; - - /* - * The anomaly start time. - */ - @JsonProperty(value = "startTimeUtc", required = true) - private OffsetDateTime startTimeUtc; - - /* - * The anomaly generated time. - */ - @JsonProperty(value = "timeGenerated", required = true) - private OffsetDateTime timeGenerated; - - /* - * The name of the anomaly vendor. - */ - @JsonProperty(value = "vendor") - private String vendor; - - /* - * The intent of the anomaly. - */ - @JsonProperty(value = "intent") - private String intent; - - /* - * The techniques of the anomaly. - */ - @JsonProperty(value = "techniques") - private List techniques; - - /* - * The reasons that cause the anomaly. - */ - @JsonProperty(value = "reasons") - private List reasons; - - /** - * Get the azureResourceId property: The anomaly azure resource id. - * - * @return the azureResourceId value. - */ - public String azureResourceId() { - return this.azureResourceId; - } - - /** - * Set the azureResourceId property: The anomaly azure resource id. - * - * @param azureResourceId the azureResourceId value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withAzureResourceId(String azureResourceId) { - this.azureResourceId = azureResourceId; - return this; - } - - /** - * Get the productName property: The anomaly product name. - * - * @return the productName value. - */ - public String productName() { - return this.productName; - } - - /** - * Set the productName property: The anomaly product name. - * - * @param productName the productName value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withProductName(String productName) { - this.productName = productName; - return this; - } - - /** - * Get the description property: The anomaly description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The anomaly description. - * - * @param description the description value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The anomaly name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The anomaly name. - * - * @param displayName the displayName value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the endTimeUtc property: The anomaly end time. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The anomaly end time. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the startTimeUtc property: The anomaly start time. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The anomaly start time. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the timeGenerated property: The anomaly generated time. - * - * @return the timeGenerated value. - */ - public OffsetDateTime timeGenerated() { - return this.timeGenerated; - } - - /** - * Set the timeGenerated property: The anomaly generated time. - * - * @param timeGenerated the timeGenerated value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withTimeGenerated(OffsetDateTime timeGenerated) { - this.timeGenerated = timeGenerated; - return this; - } - - /** - * Get the vendor property: The name of the anomaly vendor. - * - * @return the vendor value. - */ - public String vendor() { - return this.vendor; - } - - /** - * Set the vendor property: The name of the anomaly vendor. - * - * @param vendor the vendor value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withVendor(String vendor) { - this.vendor = vendor; - return this; - } - - /** - * Get the intent property: The intent of the anomaly. - * - * @return the intent value. - */ - public String intent() { - return this.intent; - } - - /** - * Set the intent property: The intent of the anomaly. - * - * @param intent the intent value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withIntent(String intent) { - this.intent = intent; - return this; - } - - /** - * Get the techniques property: The techniques of the anomaly. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: The techniques of the anomaly. - * - * @param techniques the techniques value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** - * Get the reasons property: The reasons that cause the anomaly. - * - * @return the reasons value. - */ - public List reasons() { - return this.reasons; - } - - /** - * Set the reasons property: The reasons that cause the anomaly. - * - * @param reasons the reasons value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withReasons(List reasons) { - this.reasons = reasons; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (azureResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property azureResourceId in model AnomalyTimelineItem")); - } - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property displayName in model AnomalyTimelineItem")); - } - if (endTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property endTimeUtc in model AnomalyTimelineItem")); - } - if (startTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTimeUtc in model AnomalyTimelineItem")); - } - if (timeGenerated() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property timeGenerated in model AnomalyTimelineItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AnomalyTimelineItem.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java deleted file mode 100644 index a6c58a1e0595..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The directionality of this mail message. */ -public final class AntispamMailDirection extends ExpandableStringEnum { - /** Static value Unknown for AntispamMailDirection. */ - public static final AntispamMailDirection UNKNOWN = fromString("Unknown"); - - /** Static value Inbound for AntispamMailDirection. */ - public static final AntispamMailDirection INBOUND = fromString("Inbound"); - - /** Static value Outbound for AntispamMailDirection. */ - public static final AntispamMailDirection OUTBOUND = fromString("Outbound"); - - /** Static value Intraorg for AntispamMailDirection. */ - public static final AntispamMailDirection INTRAORG = fromString("Intraorg"); - - /** - * Creates or finds a AntispamMailDirection from its string representation. - * - * @param name a name to look for. - * @return the corresponding AntispamMailDirection. - */ - @JsonCreator - public static AntispamMailDirection fromString(String name) { - return fromString(name, AntispamMailDirection.class); - } - - /** - * Gets known AntispamMailDirection values. - * - * @return known AntispamMailDirection values. - */ - public static Collection values() { - return values(AntispamMailDirection.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java deleted file mode 100644 index 836a4a6fdd8f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AscCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents ASC (Azure Security Center) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureSecurityCenter") -@Fluent -public final class AscCheckRequirements extends DataConnectorsCheckRequirements { - /* - * ASC (Azure Security Center) requirements check properties. - */ - @JsonProperty(value = "properties") - private AscCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: ASC (Azure Security Center) requirements check properties. - * - * @return the innerProperties value. - */ - private AscCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); - } - - /** - * Set the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AscCheckRequirements object itself. - */ - public AscCheckRequirements withSubscriptionId(String subscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new AscCheckRequirementsProperties(); - } - this.innerProperties().withSubscriptionId(subscriptionId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java deleted file mode 100644 index 683d6beac5b1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AscDataConnectorProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents ASC (Azure Security Center) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureSecurityCenter") -@Fluent -public final class AscDataConnector extends DataConnectorInner { - /* - * ASC (Azure Security Center) data connector properties. - */ - @JsonProperty(value = "properties") - private AscDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: ASC (Azure Security Center) data connector properties. - * - * @return the innerProperties value. - */ - private AscDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public AscDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); - } - - /** - * Set the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AscDataConnector object itself. - */ - public AscDataConnector withSubscriptionId(String subscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new AscDataConnectorProperties(); - } - this.innerProperties().withSubscriptionId(subscriptionId); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AscDataConnector object itself. - */ - public AscDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new AscDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java deleted file mode 100644 index 9c1c9f98c9ea..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java +++ /dev/null @@ -1,83 +0,0 @@ -// 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; - -/** The severity for alerts created by this alert rule. */ -public final class AttackTactic extends ExpandableStringEnum { - /** Static value Reconnaissance for AttackTactic. */ - public static final AttackTactic RECONNAISSANCE = fromString("Reconnaissance"); - - /** Static value ResourceDevelopment for AttackTactic. */ - public static final AttackTactic RESOURCE_DEVELOPMENT = fromString("ResourceDevelopment"); - - /** Static value InitialAccess for AttackTactic. */ - public static final AttackTactic INITIAL_ACCESS = fromString("InitialAccess"); - - /** Static value Execution for AttackTactic. */ - public static final AttackTactic EXECUTION = fromString("Execution"); - - /** Static value Persistence for AttackTactic. */ - public static final AttackTactic PERSISTENCE = fromString("Persistence"); - - /** Static value PrivilegeEscalation for AttackTactic. */ - public static final AttackTactic PRIVILEGE_ESCALATION = fromString("PrivilegeEscalation"); - - /** Static value DefenseEvasion for AttackTactic. */ - public static final AttackTactic DEFENSE_EVASION = fromString("DefenseEvasion"); - - /** Static value CredentialAccess for AttackTactic. */ - public static final AttackTactic CREDENTIAL_ACCESS = fromString("CredentialAccess"); - - /** Static value Discovery for AttackTactic. */ - public static final AttackTactic DISCOVERY = fromString("Discovery"); - - /** Static value LateralMovement for AttackTactic. */ - public static final AttackTactic LATERAL_MOVEMENT = fromString("LateralMovement"); - - /** Static value Collection for AttackTactic. */ - public static final AttackTactic COLLECTION = fromString("Collection"); - - /** Static value Exfiltration for AttackTactic. */ - public static final AttackTactic EXFILTRATION = fromString("Exfiltration"); - - /** Static value CommandAndControl for AttackTactic. */ - public static final AttackTactic COMMAND_AND_CONTROL = fromString("CommandAndControl"); - - /** Static value Impact for AttackTactic. */ - public static final AttackTactic IMPACT = fromString("Impact"); - - /** Static value PreAttack for AttackTactic. */ - public static final AttackTactic PRE_ATTACK = fromString("PreAttack"); - - /** Static value ImpairProcessControl for AttackTactic. */ - public static final AttackTactic IMPAIR_PROCESS_CONTROL = fromString("ImpairProcessControl"); - - /** Static value InhibitResponseFunction for AttackTactic. */ - public static final AttackTactic INHIBIT_RESPONSE_FUNCTION = fromString("InhibitResponseFunction"); - - /** - * Creates or finds a AttackTactic from its string representation. - * - * @param name a name to look for. - * @return the corresponding AttackTactic. - */ - @JsonCreator - public static AttackTactic fromString(String name) { - return fromString(name, AttackTactic.class); - } - - /** - * Gets known AttackTactic values. - * - * @return known AttackTactic values. - */ - public static Collection values() { - return values(AttackTactic.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java deleted file mode 100644 index 76325ea78317..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java +++ /dev/null @@ -1,313 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of AutomationRule. */ -public interface AutomationRule { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the displayName property: The display name of the automation rule. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the order property: The order of execution of the automation rule. - * - * @return the order value. - */ - int order(); - - /** - * Gets the triggeringLogic property: Describes automation rule triggering logic. - * - * @return the triggeringLogic value. - */ - AutomationRuleTriggeringLogic triggeringLogic(); - - /** - * Gets the actions property: The actions to execute when the automation rule is triggered. - * - * @return the actions value. - */ - List actions(); - - /** - * Gets the lastModifiedTimeUtc property: The last time the automation rule was updated. - * - * @return the lastModifiedTimeUtc value. - */ - OffsetDateTime lastModifiedTimeUtc(); - - /** - * Gets the createdTimeUtc property: The time the automation rule was created. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - - /** - * Gets the lastModifiedBy property: Information on the client (user or application) that made some action. - * - * @return the lastModifiedBy value. - */ - ClientInfo lastModifiedBy(); - - /** - * Gets the createdBy property: Information on the client (user or application) that made some action. - * - * @return the createdBy value. - */ - ClientInfo createdBy(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner object. - * - * @return the inner object. - */ - AutomationRuleInner innerModel(); - - /** The entirety of the AutomationRule definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithDisplayName, - DefinitionStages.WithOrder, - DefinitionStages.WithTriggeringLogic, - DefinitionStages.WithActions, - DefinitionStages.WithCreate { - } - /** The AutomationRule definition stages. */ - interface DefinitionStages { - /** The first stage of the AutomationRule definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the AutomationRule definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithDisplayName withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the AutomationRule definition allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The display name of the automation rule.. - * - * @param displayName The display name of the automation rule. - * @return the next definition stage. - */ - WithOrder withDisplayName(String displayName); - } - /** The stage of the AutomationRule definition allowing to specify order. */ - interface WithOrder { - /** - * Specifies the order property: The order of execution of the automation rule.. - * - * @param order The order of execution of the automation rule. - * @return the next definition stage. - */ - WithTriggeringLogic withOrder(int order); - } - /** The stage of the AutomationRule definition allowing to specify triggeringLogic. */ - interface WithTriggeringLogic { - /** - * Specifies the triggeringLogic property: Describes automation rule triggering logic.. - * - * @param triggeringLogic Describes automation rule triggering logic. - * @return the next definition stage. - */ - WithActions withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic); - } - /** The stage of the AutomationRule definition allowing to specify actions. */ - interface WithActions { - /** - * Specifies the actions property: The actions to execute when the automation rule is triggered.. - * - * @param actions The actions to execute when the automation rule is triggered. - * @return the next definition stage. - */ - WithCreate withActions(List actions); - } - /** - * The stage of the AutomationRule definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithEtag { - /** - * Executes the create request. - * - * @return the created resource. - */ - AutomationRule create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AutomationRule create(Context context); - } - /** The stage of the AutomationRule definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - } - /** - * Begins update for the AutomationRule resource. - * - * @return the stage of resource update. - */ - AutomationRule.Update update(); - - /** The template for AutomationRule update. */ - interface Update - extends UpdateStages.WithEtag, - UpdateStages.WithDisplayName, - UpdateStages.WithOrder, - UpdateStages.WithTriggeringLogic, - UpdateStages.WithActions { - /** - * Executes the update request. - * - * @return the updated resource. - */ - AutomationRule apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - AutomationRule apply(Context context); - } - /** The AutomationRule update stages. */ - interface UpdateStages { - /** The stage of the AutomationRule update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the AutomationRule update allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The display name of the automation rule.. - * - * @param displayName The display name of the automation rule. - * @return the next definition stage. - */ - Update withDisplayName(String displayName); - } - /** The stage of the AutomationRule update allowing to specify order. */ - interface WithOrder { - /** - * Specifies the order property: The order of execution of the automation rule.. - * - * @param order The order of execution of the automation rule. - * @return the next definition stage. - */ - Update withOrder(int order); - } - /** The stage of the AutomationRule update allowing to specify triggeringLogic. */ - interface WithTriggeringLogic { - /** - * Specifies the triggeringLogic property: Describes automation rule triggering logic.. - * - * @param triggeringLogic Describes automation rule triggering logic. - * @return the next definition stage. - */ - Update withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic); - } - /** The stage of the AutomationRule update allowing to specify actions. */ - interface WithActions { - /** - * Specifies the actions property: The actions to execute when the automation rule is triggered.. - * - * @param actions The actions to execute when the automation rule is triggered. - * @return the next definition stage. - */ - Update withActions(List actions); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - AutomationRule refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - AutomationRule refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java deleted file mode 100644 index 3ff1bf1a59fe..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java +++ /dev/null @@ -1,59 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule action. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "actionType", - defaultImpl = AutomationRuleAction.class) -@JsonTypeName("AutomationRuleAction") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ModifyProperties", value = AutomationRuleModifyPropertiesAction.class), - @JsonSubTypes.Type(name = "RunPlaybook", value = AutomationRuleRunPlaybookAction.class) -}) -@Fluent -public class AutomationRuleAction { - /* - * The order property. - */ - @JsonProperty(value = "order", required = true) - private int order; - - /** - * Get the order property: The order property. - * - * @return the order value. - */ - public int order() { - return this.order; - } - - /** - * Set the order property: The order property. - * - * @param order the order value to set. - * @return the AutomationRuleAction object itself. - */ - public AutomationRuleAction withOrder(int order) { - this.order = order; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java deleted file mode 100644 index 0eee30498e7c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AutomationRuleBooleanCondition model. */ -@Fluent -public final class AutomationRuleBooleanCondition { - /* - * The operator property. - */ - @JsonProperty(value = "operator") - private AutomationRuleBooleanConditionSupportedOperator operator; - - /* - * The innerConditions property. - */ - @JsonProperty(value = "innerConditions") - private List innerConditions; - - /** - * Get the operator property: The operator property. - * - * @return the operator value. - */ - public AutomationRuleBooleanConditionSupportedOperator operator() { - return this.operator; - } - - /** - * Set the operator property: The operator property. - * - * @param operator the operator value to set. - * @return the AutomationRuleBooleanCondition object itself. - */ - public AutomationRuleBooleanCondition withOperator(AutomationRuleBooleanConditionSupportedOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the innerConditions property: The innerConditions property. - * - * @return the innerConditions value. - */ - public List innerConditions() { - return this.innerConditions; - } - - /** - * Set the innerConditions property: The innerConditions property. - * - * @param innerConditions the innerConditions value to set. - * @return the AutomationRuleBooleanCondition object itself. - */ - public AutomationRuleBooleanCondition withInnerConditions(List innerConditions) { - this.innerConditions = innerConditions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerConditions() != null) { - innerConditions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java deleted file mode 100644 index a703cfcce4e4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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 AutomationRuleBooleanConditionSupportedOperator. */ -public final class AutomationRuleBooleanConditionSupportedOperator - extends ExpandableStringEnum { - /** Static value And for AutomationRuleBooleanConditionSupportedOperator. */ - public static final AutomationRuleBooleanConditionSupportedOperator AND = fromString("And"); - - /** Static value Or for AutomationRuleBooleanConditionSupportedOperator. */ - public static final AutomationRuleBooleanConditionSupportedOperator OR = fromString("Or"); - - /** - * Creates or finds a AutomationRuleBooleanConditionSupportedOperator from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRuleBooleanConditionSupportedOperator. - */ - @JsonCreator - public static AutomationRuleBooleanConditionSupportedOperator fromString(String name) { - return fromString(name, AutomationRuleBooleanConditionSupportedOperator.class); - } - - /** - * Gets known AutomationRuleBooleanConditionSupportedOperator values. - * - * @return known AutomationRuleBooleanConditionSupportedOperator values. - */ - public static Collection values() { - return values(AutomationRuleBooleanConditionSupportedOperator.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java deleted file mode 100644 index fbd2b4bcaef2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "conditionType", - defaultImpl = AutomationRuleCondition.class) -@JsonTypeName("AutomationRuleCondition") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Boolean", value = BooleanConditionProperties.class), - @JsonSubTypes.Type(name = "PropertyArrayChanged", value = PropertyArrayChangedConditionProperties.class), - @JsonSubTypes.Type(name = "PropertyArray", value = PropertyArrayConditionProperties.class), - @JsonSubTypes.Type(name = "PropertyChanged", value = PropertyChangedConditionProperties.class), - @JsonSubTypes.Type(name = "Property", value = PropertyConditionProperties.class) -}) -@Immutable -public class AutomationRuleCondition { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java deleted file mode 100644 index 0f56b3772f36..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java +++ /dev/null @@ -1,62 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule action to modify an object's properties. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") -@JsonTypeName("ModifyProperties") -@Fluent -public final class AutomationRuleModifyPropertiesAction extends AutomationRuleAction { - /* - * The actionConfiguration property. - */ - @JsonProperty(value = "actionConfiguration") - private IncidentPropertiesAction actionConfiguration; - - /** - * Get the actionConfiguration property: The actionConfiguration property. - * - * @return the actionConfiguration value. - */ - public IncidentPropertiesAction actionConfiguration() { - return this.actionConfiguration; - } - - /** - * Set the actionConfiguration property: The actionConfiguration property. - * - * @param actionConfiguration the actionConfiguration value to set. - * @return the AutomationRuleModifyPropertiesAction object itself. - */ - public AutomationRuleModifyPropertiesAction withActionConfiguration(IncidentPropertiesAction actionConfiguration) { - this.actionConfiguration = actionConfiguration; - return this; - } - - /** {@inheritDoc} */ - @Override - public AutomationRuleModifyPropertiesAction withOrder(int order) { - super.withOrder(order); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (actionConfiguration() != null) { - actionConfiguration().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java deleted file mode 100644 index 6b0b8389178c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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 AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ -public final class AutomationRulePropertyArrayChangedConditionSupportedArrayType - extends ExpandableStringEnum { - /** Static value Alerts for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType ALERTS = fromString("Alerts"); - - /** Static value Labels for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType LABELS = fromString("Labels"); - - /** Static value Tactics for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType TACTICS = fromString("Tactics"); - - /** Static value Comments for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType COMMENTS = fromString("Comments"); - - /** - * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedArrayType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyArrayChangedConditionSupportedArrayType. - */ - @JsonCreator - public static AutomationRulePropertyArrayChangedConditionSupportedArrayType fromString(String name) { - return fromString(name, AutomationRulePropertyArrayChangedConditionSupportedArrayType.class); - } - - /** - * Gets known AutomationRulePropertyArrayChangedConditionSupportedArrayType values. - * - * @return known AutomationRulePropertyArrayChangedConditionSupportedArrayType values. - */ - public static Collection values() { - return values(AutomationRulePropertyArrayChangedConditionSupportedArrayType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java deleted file mode 100644 index 1d0e54020290..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java +++ /dev/null @@ -1,36 +0,0 @@ -// 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 AutomationRulePropertyArrayChangedConditionSupportedChangeType. */ -public final class AutomationRulePropertyArrayChangedConditionSupportedChangeType - extends ExpandableStringEnum { - /** Static value Added for AutomationRulePropertyArrayChangedConditionSupportedChangeType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedChangeType ADDED = fromString("Added"); - - /** - * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedChangeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyArrayChangedConditionSupportedChangeType. - */ - @JsonCreator - public static AutomationRulePropertyArrayChangedConditionSupportedChangeType fromString(String name) { - return fromString(name, AutomationRulePropertyArrayChangedConditionSupportedChangeType.class); - } - - /** - * Gets known AutomationRulePropertyArrayChangedConditionSupportedChangeType values. - * - * @return known AutomationRulePropertyArrayChangedConditionSupportedChangeType values. - */ - public static Collection values() { - return values(AutomationRulePropertyArrayChangedConditionSupportedChangeType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java deleted file mode 100644 index 33ee0d2d5aee..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The AutomationRulePropertyArrayChangedValuesCondition model. */ -@Fluent -public final class AutomationRulePropertyArrayChangedValuesCondition { - /* - * The arrayType property. - */ - @JsonProperty(value = "arrayType") - private AutomationRulePropertyArrayChangedConditionSupportedArrayType arrayType; - - /* - * The changeType property. - */ - @JsonProperty(value = "changeType") - private AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType; - - /** - * Get the arrayType property: The arrayType property. - * - * @return the arrayType value. - */ - public AutomationRulePropertyArrayChangedConditionSupportedArrayType arrayType() { - return this.arrayType; - } - - /** - * Set the arrayType property: The arrayType property. - * - * @param arrayType the arrayType value to set. - * @return the AutomationRulePropertyArrayChangedValuesCondition object itself. - */ - public AutomationRulePropertyArrayChangedValuesCondition withArrayType( - AutomationRulePropertyArrayChangedConditionSupportedArrayType arrayType) { - this.arrayType = arrayType; - return this; - } - - /** - * Get the changeType property: The changeType property. - * - * @return the changeType value. - */ - public AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType() { - return this.changeType; - } - - /** - * Set the changeType property: The changeType property. - * - * @param changeType the changeType value to set. - * @return the AutomationRulePropertyArrayChangedValuesCondition object itself. - */ - public AutomationRulePropertyArrayChangedValuesCondition withChangeType( - AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType) { - this.changeType = changeType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java deleted file mode 100644 index 670c64ea5936..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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 AutomationRulePropertyArrayConditionSupportedArrayConditionType. */ -public final class AutomationRulePropertyArrayConditionSupportedArrayConditionType - extends ExpandableStringEnum { - /** Static value AnyItem for AutomationRulePropertyArrayConditionSupportedArrayConditionType. */ - public static final AutomationRulePropertyArrayConditionSupportedArrayConditionType ANY_ITEM = - fromString("AnyItem"); - - /** - * Creates or finds a AutomationRulePropertyArrayConditionSupportedArrayConditionType from its string - * representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyArrayConditionSupportedArrayConditionType. - */ - @JsonCreator - public static AutomationRulePropertyArrayConditionSupportedArrayConditionType fromString(String name) { - return fromString(name, AutomationRulePropertyArrayConditionSupportedArrayConditionType.class); - } - - /** - * Gets known AutomationRulePropertyArrayConditionSupportedArrayConditionType values. - * - * @return known AutomationRulePropertyArrayConditionSupportedArrayConditionType values. - */ - public static Collection values() { - return values(AutomationRulePropertyArrayConditionSupportedArrayConditionType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java deleted file mode 100644 index af5e23b9d813..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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 AutomationRulePropertyArrayConditionSupportedArrayType. */ -public final class AutomationRulePropertyArrayConditionSupportedArrayType - extends ExpandableStringEnum { - /** Static value CustomDetails for AutomationRulePropertyArrayConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayConditionSupportedArrayType CUSTOM_DETAILS = - fromString("CustomDetails"); - - /** Static value CustomDetailValues for AutomationRulePropertyArrayConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayConditionSupportedArrayType CUSTOM_DETAIL_VALUES = - fromString("CustomDetailValues"); - - /** - * Creates or finds a AutomationRulePropertyArrayConditionSupportedArrayType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyArrayConditionSupportedArrayType. - */ - @JsonCreator - public static AutomationRulePropertyArrayConditionSupportedArrayType fromString(String name) { - return fromString(name, AutomationRulePropertyArrayConditionSupportedArrayType.class); - } - - /** - * Gets known AutomationRulePropertyArrayConditionSupportedArrayType values. - * - * @return known AutomationRulePropertyArrayConditionSupportedArrayType values. - */ - public static Collection values() { - return values(AutomationRulePropertyArrayConditionSupportedArrayType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java deleted file mode 100644 index 40158ab460bc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java +++ /dev/null @@ -1,104 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AutomationRulePropertyArrayValuesCondition model. */ -@Fluent -public final class AutomationRulePropertyArrayValuesCondition { - /* - * The arrayType property. - */ - @JsonProperty(value = "arrayType") - private AutomationRulePropertyArrayConditionSupportedArrayType arrayType; - - /* - * The arrayConditionType property. - */ - @JsonProperty(value = "arrayConditionType") - private AutomationRulePropertyArrayConditionSupportedArrayConditionType arrayConditionType; - - /* - * The itemConditions property. - */ - @JsonProperty(value = "itemConditions") - private List itemConditions; - - /** - * Get the arrayType property: The arrayType property. - * - * @return the arrayType value. - */ - public AutomationRulePropertyArrayConditionSupportedArrayType arrayType() { - return this.arrayType; - } - - /** - * Set the arrayType property: The arrayType property. - * - * @param arrayType the arrayType value to set. - * @return the AutomationRulePropertyArrayValuesCondition object itself. - */ - public AutomationRulePropertyArrayValuesCondition withArrayType( - AutomationRulePropertyArrayConditionSupportedArrayType arrayType) { - this.arrayType = arrayType; - return this; - } - - /** - * Get the arrayConditionType property: The arrayConditionType property. - * - * @return the arrayConditionType value. - */ - public AutomationRulePropertyArrayConditionSupportedArrayConditionType arrayConditionType() { - return this.arrayConditionType; - } - - /** - * Set the arrayConditionType property: The arrayConditionType property. - * - * @param arrayConditionType the arrayConditionType value to set. - * @return the AutomationRulePropertyArrayValuesCondition object itself. - */ - public AutomationRulePropertyArrayValuesCondition withArrayConditionType( - AutomationRulePropertyArrayConditionSupportedArrayConditionType arrayConditionType) { - this.arrayConditionType = arrayConditionType; - return this; - } - - /** - * Get the itemConditions property: The itemConditions property. - * - * @return the itemConditions value. - */ - public List itemConditions() { - return this.itemConditions; - } - - /** - * Set the itemConditions property: The itemConditions property. - * - * @param itemConditions the itemConditions value to set. - * @return the AutomationRulePropertyArrayValuesCondition object itself. - */ - public AutomationRulePropertyArrayValuesCondition withItemConditions(List itemConditions) { - this.itemConditions = itemConditions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (itemConditions() != null) { - itemConditions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java deleted file mode 100644 index 1ca0b7145030..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java +++ /dev/null @@ -1,40 +0,0 @@ -// 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 AutomationRulePropertyChangedConditionSupportedChangedType. */ -public final class AutomationRulePropertyChangedConditionSupportedChangedType - extends ExpandableStringEnum { - /** Static value ChangedFrom for AutomationRulePropertyChangedConditionSupportedChangedType. */ - public static final AutomationRulePropertyChangedConditionSupportedChangedType CHANGED_FROM = - fromString("ChangedFrom"); - - /** Static value ChangedTo for AutomationRulePropertyChangedConditionSupportedChangedType. */ - public static final AutomationRulePropertyChangedConditionSupportedChangedType CHANGED_TO = fromString("ChangedTo"); - - /** - * Creates or finds a AutomationRulePropertyChangedConditionSupportedChangedType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyChangedConditionSupportedChangedType. - */ - @JsonCreator - public static AutomationRulePropertyChangedConditionSupportedChangedType fromString(String name) { - return fromString(name, AutomationRulePropertyChangedConditionSupportedChangedType.class); - } - - /** - * Gets known AutomationRulePropertyChangedConditionSupportedChangedType values. - * - * @return known AutomationRulePropertyChangedConditionSupportedChangedType values. - */ - public static Collection values() { - return values(AutomationRulePropertyChangedConditionSupportedChangedType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java deleted file mode 100644 index 7f7b6618b841..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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 AutomationRulePropertyChangedConditionSupportedPropertyType. */ -public final class AutomationRulePropertyChangedConditionSupportedPropertyType - extends ExpandableStringEnum { - /** Static value IncidentSeverity for AutomationRulePropertyChangedConditionSupportedPropertyType. */ - public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_SEVERITY = - fromString("IncidentSeverity"); - - /** Static value IncidentStatus for AutomationRulePropertyChangedConditionSupportedPropertyType. */ - public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_STATUS = - fromString("IncidentStatus"); - - /** Static value IncidentOwner for AutomationRulePropertyChangedConditionSupportedPropertyType. */ - public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_OWNER = - fromString("IncidentOwner"); - - /** - * Creates or finds a AutomationRulePropertyChangedConditionSupportedPropertyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyChangedConditionSupportedPropertyType. - */ - @JsonCreator - public static AutomationRulePropertyChangedConditionSupportedPropertyType fromString(String name) { - return fromString(name, AutomationRulePropertyChangedConditionSupportedPropertyType.class); - } - - /** - * Gets known AutomationRulePropertyChangedConditionSupportedPropertyType values. - * - * @return known AutomationRulePropertyChangedConditionSupportedPropertyType values. - */ - public static Collection values() { - return values(AutomationRulePropertyChangedConditionSupportedPropertyType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java deleted file mode 100644 index ae9a8ff2891d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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 AutomationRulePropertyConditionSupportedOperator. */ -public final class AutomationRulePropertyConditionSupportedOperator - extends ExpandableStringEnum { - /** Static value Equals for AutomationRulePropertyConditionSupportedOperator. */ - public static final AutomationRulePropertyConditionSupportedOperator EQUALS = fromString("Equals"); - - /** Static value NotEquals for AutomationRulePropertyConditionSupportedOperator. */ - public static final AutomationRulePropertyConditionSupportedOperator NOT_EQUALS = fromString("NotEquals"); - - /** Static value Contains for AutomationRulePropertyConditionSupportedOperator. */ - public static final AutomationRulePropertyConditionSupportedOperator CONTAINS = fromString("Contains"); - - /** Static value NotContains for AutomationRulePropertyConditionSupportedOperator. */ - public static final AutomationRulePropertyConditionSupportedOperator NOT_CONTAINS = fromString("NotContains"); - - /** Static value StartsWith for AutomationRulePropertyConditionSupportedOperator. */ - public static final AutomationRulePropertyConditionSupportedOperator STARTS_WITH = fromString("StartsWith"); - - /** Static value NotStartsWith for AutomationRulePropertyConditionSupportedOperator. */ - public static final AutomationRulePropertyConditionSupportedOperator NOT_STARTS_WITH = fromString("NotStartsWith"); - - /** Static value EndsWith for AutomationRulePropertyConditionSupportedOperator. */ - public static final AutomationRulePropertyConditionSupportedOperator ENDS_WITH = fromString("EndsWith"); - - /** Static value NotEndsWith for AutomationRulePropertyConditionSupportedOperator. */ - public static final AutomationRulePropertyConditionSupportedOperator NOT_ENDS_WITH = fromString("NotEndsWith"); - - /** - * Creates or finds a AutomationRulePropertyConditionSupportedOperator from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyConditionSupportedOperator. - */ - @JsonCreator - public static AutomationRulePropertyConditionSupportedOperator fromString(String name) { - return fromString(name, AutomationRulePropertyConditionSupportedOperator.class); - } - - /** - * Gets known AutomationRulePropertyConditionSupportedOperator values. - * - * @return known AutomationRulePropertyConditionSupportedOperator values. - */ - public static Collection values() { - return values(AutomationRulePropertyConditionSupportedOperator.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java deleted file mode 100644 index 72af96f863db..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java +++ /dev/null @@ -1,242 +0,0 @@ -// 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; - -/** The property to evaluate in an automation rule property condition. */ -public final class AutomationRulePropertyConditionSupportedProperty - extends ExpandableStringEnum { - /** Static value IncidentTitle for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_TITLE = fromString("IncidentTitle"); - - /** Static value IncidentDescription for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_DESCRIPTION = - fromString("IncidentDescription"); - - /** Static value IncidentSeverity for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_SEVERITY = - fromString("IncidentSeverity"); - - /** Static value IncidentStatus for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_STATUS = fromString("IncidentStatus"); - - /** Static value IncidentRelatedAnalyticRuleIds for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_RELATED_ANALYTIC_RULE_IDS = - fromString("IncidentRelatedAnalyticRuleIds"); - - /** Static value IncidentTactics for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_TACTICS = - fromString("IncidentTactics"); - - /** Static value IncidentLabel for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_LABEL = fromString("IncidentLabel"); - - /** Static value IncidentProviderName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_PROVIDER_NAME = - fromString("IncidentProviderName"); - - /** Static value IncidentUpdatedBySource for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_UPDATED_BY_SOURCE = - fromString("IncidentUpdatedBySource"); - - /** Static value IncidentCustomDetailsKey for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_CUSTOM_DETAILS_KEY = - fromString("IncidentCustomDetailsKey"); - - /** Static value IncidentCustomDetailsValue for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_CUSTOM_DETAILS_VALUE = - fromString("IncidentCustomDetailsValue"); - - /** Static value AccountAadTenantId for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_AAD_TENANT_ID = - fromString("AccountAadTenantId"); - - /** Static value AccountAadUserId for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_AAD_USER_ID = - fromString("AccountAadUserId"); - - /** Static value AccountName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_NAME = fromString("AccountName"); - - /** Static value AccountNTDomain for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_NTDOMAIN = - fromString("AccountNTDomain"); - - /** Static value AccountPUID for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_PUID = fromString("AccountPUID"); - - /** Static value AccountSid for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_SID = fromString("AccountSid"); - - /** Static value AccountObjectGuid for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_OBJECT_GUID = - fromString("AccountObjectGuid"); - - /** Static value AccountUPNSuffix for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_UPNSUFFIX = - fromString("AccountUPNSuffix"); - - /** Static value AlertProductNames for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ALERT_PRODUCT_NAMES = - fromString("AlertProductNames"); - - /** Static value AlertAnalyticRuleIds for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ALERT_ANALYTIC_RULE_IDS = - fromString("AlertAnalyticRuleIds"); - - /** Static value AzureResourceResourceId for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty AZURE_RESOURCE_RESOURCE_ID = - fromString("AzureResourceResourceId"); - - /** Static value AzureResourceSubscriptionId for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty AZURE_RESOURCE_SUBSCRIPTION_ID = - fromString("AzureResourceSubscriptionId"); - - /** Static value CloudApplicationAppId for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty CLOUD_APPLICATION_APP_ID = - fromString("CloudApplicationAppId"); - - /** Static value CloudApplicationAppName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty CLOUD_APPLICATION_APP_NAME = - fromString("CloudApplicationAppName"); - - /** Static value DNSDomainName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty DNSDOMAIN_NAME = fromString("DNSDomainName"); - - /** Static value FileDirectory for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty FILE_DIRECTORY = fromString("FileDirectory"); - - /** Static value FileName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty FILE_NAME = fromString("FileName"); - - /** Static value FileHashValue for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty FILE_HASH_VALUE = fromString("FileHashValue"); - - /** Static value HostAzureID for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty HOST_AZURE_ID = fromString("HostAzureID"); - - /** Static value HostName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty HOST_NAME = fromString("HostName"); - - /** Static value HostNetBiosName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty HOST_NET_BIOS_NAME = - fromString("HostNetBiosName"); - - /** Static value HostNTDomain for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty HOST_NTDOMAIN = fromString("HostNTDomain"); - - /** Static value HostOSVersion for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty HOST_OSVERSION = fromString("HostOSVersion"); - - /** Static value IoTDeviceId for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty IO_TDEVICE_ID = fromString("IoTDeviceId"); - - /** Static value IoTDeviceName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty IO_TDEVICE_NAME = fromString("IoTDeviceName"); - - /** Static value IoTDeviceType for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty IO_TDEVICE_TYPE = fromString("IoTDeviceType"); - - /** Static value IoTDeviceVendor for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty IO_TDEVICE_VENDOR = - fromString("IoTDeviceVendor"); - - /** Static value IoTDeviceModel for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty IO_TDEVICE_MODEL = - fromString("IoTDeviceModel"); - - /** Static value IoTDeviceOperatingSystem for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty IO_TDEVICE_OPERATING_SYSTEM = - fromString("IoTDeviceOperatingSystem"); - - /** Static value IPAddress for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty IPADDRESS = fromString("IPAddress"); - - /** Static value MailboxDisplayName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAILBOX_DISPLAY_NAME = - fromString("MailboxDisplayName"); - - /** Static value MailboxPrimaryAddress for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAILBOX_PRIMARY_ADDRESS = - fromString("MailboxPrimaryAddress"); - - /** Static value MailboxUPN for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAILBOX_UPN = fromString("MailboxUPN"); - - /** Static value MailMessageDeliveryAction for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAIL_MESSAGE_DELIVERY_ACTION = - fromString("MailMessageDeliveryAction"); - - /** Static value MailMessageDeliveryLocation for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAIL_MESSAGE_DELIVERY_LOCATION = - fromString("MailMessageDeliveryLocation"); - - /** Static value MailMessageRecipient for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAIL_MESSAGE_RECIPIENT = - fromString("MailMessageRecipient"); - - /** Static value MailMessageSenderIP for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAIL_MESSAGE_SENDER_IP = - fromString("MailMessageSenderIP"); - - /** Static value MailMessageSubject for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAIL_MESSAGE_SUBJECT = - fromString("MailMessageSubject"); - - /** Static value MailMessageP1Sender for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAIL_MESSAGE_P1SENDER = - fromString("MailMessageP1Sender"); - - /** Static value MailMessageP2Sender for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MAIL_MESSAGE_P2SENDER = - fromString("MailMessageP2Sender"); - - /** Static value MalwareCategory for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MALWARE_CATEGORY = - fromString("MalwareCategory"); - - /** Static value MalwareName for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty MALWARE_NAME = fromString("MalwareName"); - - /** Static value ProcessCommandLine for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty PROCESS_COMMAND_LINE = - fromString("ProcessCommandLine"); - - /** Static value ProcessId for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty PROCESS_ID = fromString("ProcessId"); - - /** Static value RegistryKey for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty REGISTRY_KEY = fromString("RegistryKey"); - - /** Static value RegistryValueData for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty REGISTRY_VALUE_DATA = - fromString("RegistryValueData"); - - /** Static value Url for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty URL = fromString("Url"); - - /** - * Creates or finds a AutomationRulePropertyConditionSupportedProperty from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyConditionSupportedProperty. - */ - @JsonCreator - public static AutomationRulePropertyConditionSupportedProperty fromString(String name) { - return fromString(name, AutomationRulePropertyConditionSupportedProperty.class); - } - - /** - * Gets known AutomationRulePropertyConditionSupportedProperty values. - * - * @return known AutomationRulePropertyConditionSupportedProperty values. - */ - public static Collection values() { - return values(AutomationRulePropertyConditionSupportedProperty.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java deleted file mode 100644 index 9996382f4bdd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java +++ /dev/null @@ -1,128 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AutomationRulePropertyValuesChangedCondition model. */ -@Fluent -public final class AutomationRulePropertyValuesChangedCondition { - /* - * The propertyName property. - */ - @JsonProperty(value = "propertyName") - private AutomationRulePropertyChangedConditionSupportedPropertyType propertyName; - - /* - * The changeType property. - */ - @JsonProperty(value = "changeType") - private AutomationRulePropertyChangedConditionSupportedChangedType changeType; - - /* - * The operator property. - */ - @JsonProperty(value = "operator") - private AutomationRulePropertyConditionSupportedOperator operator; - - /* - * The propertyValues property. - */ - @JsonProperty(value = "propertyValues") - private List propertyValues; - - /** - * Get the propertyName property: The propertyName property. - * - * @return the propertyName value. - */ - public AutomationRulePropertyChangedConditionSupportedPropertyType propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The propertyName property. - * - * @param propertyName the propertyName value to set. - * @return the AutomationRulePropertyValuesChangedCondition object itself. - */ - public AutomationRulePropertyValuesChangedCondition withPropertyName( - AutomationRulePropertyChangedConditionSupportedPropertyType propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the changeType property: The changeType property. - * - * @return the changeType value. - */ - public AutomationRulePropertyChangedConditionSupportedChangedType changeType() { - return this.changeType; - } - - /** - * Set the changeType property: The changeType property. - * - * @param changeType the changeType value to set. - * @return the AutomationRulePropertyValuesChangedCondition object itself. - */ - public AutomationRulePropertyValuesChangedCondition withChangeType( - AutomationRulePropertyChangedConditionSupportedChangedType changeType) { - this.changeType = changeType; - return this; - } - - /** - * Get the operator property: The operator property. - * - * @return the operator value. - */ - public AutomationRulePropertyConditionSupportedOperator operator() { - return this.operator; - } - - /** - * Set the operator property: The operator property. - * - * @param operator the operator value to set. - * @return the AutomationRulePropertyValuesChangedCondition object itself. - */ - public AutomationRulePropertyValuesChangedCondition withOperator( - AutomationRulePropertyConditionSupportedOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the propertyValues property: The propertyValues property. - * - * @return the propertyValues value. - */ - public List propertyValues() { - return this.propertyValues; - } - - /** - * Set the propertyValues property: The propertyValues property. - * - * @param propertyValues the propertyValues value to set. - * @return the AutomationRulePropertyValuesChangedCondition object itself. - */ - public AutomationRulePropertyValuesChangedCondition withPropertyValues(List propertyValues) { - this.propertyValues = propertyValues; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java deleted file mode 100644 index d04dd33f2854..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java +++ /dev/null @@ -1,101 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AutomationRulePropertyValuesCondition model. */ -@Fluent -public final class AutomationRulePropertyValuesCondition { - /* - * The property to evaluate in an automation rule property condition. - */ - @JsonProperty(value = "propertyName") - private AutomationRulePropertyConditionSupportedProperty propertyName; - - /* - * The operator property. - */ - @JsonProperty(value = "operator") - private AutomationRulePropertyConditionSupportedOperator operator; - - /* - * The propertyValues property. - */ - @JsonProperty(value = "propertyValues") - private List propertyValues; - - /** - * Get the propertyName property: The property to evaluate in an automation rule property condition. - * - * @return the propertyName value. - */ - public AutomationRulePropertyConditionSupportedProperty propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The property to evaluate in an automation rule property condition. - * - * @param propertyName the propertyName value to set. - * @return the AutomationRulePropertyValuesCondition object itself. - */ - public AutomationRulePropertyValuesCondition withPropertyName( - AutomationRulePropertyConditionSupportedProperty propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the operator property: The operator property. - * - * @return the operator value. - */ - public AutomationRulePropertyConditionSupportedOperator operator() { - return this.operator; - } - - /** - * Set the operator property: The operator property. - * - * @param operator the operator value to set. - * @return the AutomationRulePropertyValuesCondition object itself. - */ - public AutomationRulePropertyValuesCondition withOperator( - AutomationRulePropertyConditionSupportedOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the propertyValues property: The propertyValues property. - * - * @return the propertyValues value. - */ - public List propertyValues() { - return this.propertyValues; - } - - /** - * Set the propertyValues property: The propertyValues property. - * - * @param propertyValues the propertyValues value to set. - * @return the AutomationRulePropertyValuesCondition object itself. - */ - public AutomationRulePropertyValuesCondition withPropertyValues(List propertyValues) { - this.propertyValues = propertyValues; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java deleted file mode 100644 index f2b367315f61..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java +++ /dev/null @@ -1,62 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule action to run a playbook. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") -@JsonTypeName("RunPlaybook") -@Fluent -public final class AutomationRuleRunPlaybookAction extends AutomationRuleAction { - /* - * The actionConfiguration property. - */ - @JsonProperty(value = "actionConfiguration") - private PlaybookActionProperties actionConfiguration; - - /** - * Get the actionConfiguration property: The actionConfiguration property. - * - * @return the actionConfiguration value. - */ - public PlaybookActionProperties actionConfiguration() { - return this.actionConfiguration; - } - - /** - * Set the actionConfiguration property: The actionConfiguration property. - * - * @param actionConfiguration the actionConfiguration value to set. - * @return the AutomationRuleRunPlaybookAction object itself. - */ - public AutomationRuleRunPlaybookAction withActionConfiguration(PlaybookActionProperties actionConfiguration) { - this.actionConfiguration = actionConfiguration; - return this; - } - - /** {@inheritDoc} */ - @Override - public AutomationRuleRunPlaybookAction withOrder(int order) { - super.withOrder(order); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (actionConfiguration() != null) { - actionConfiguration().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java deleted file mode 100644 index 066a10e1830e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java +++ /dev/null @@ -1,174 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Describes automation rule triggering logic. */ -@Fluent -public final class AutomationRuleTriggeringLogic { - /* - * Determines whether the automation rule is enabled or disabled. - */ - @JsonProperty(value = "isEnabled", required = true) - private boolean isEnabled; - - /* - * Determines when the automation rule should automatically expire and be disabled. - */ - @JsonProperty(value = "expirationTimeUtc") - private OffsetDateTime expirationTimeUtc; - - /* - * The triggersOn property. - */ - @JsonProperty(value = "triggersOn", required = true) - private TriggersOn triggersOn; - - /* - * The triggersWhen property. - */ - @JsonProperty(value = "triggersWhen", required = true) - private TriggersWhen triggersWhen; - - /* - * The conditions to evaluate to determine if the automation rule should be triggered on a given object. - */ - @JsonProperty(value = "conditions") - private List conditions; - - /** - * Get the isEnabled property: Determines whether the automation rule is enabled or disabled. - * - * @return the isEnabled value. - */ - public boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled property: Determines whether the automation rule is enabled or disabled. - * - * @param isEnabled the isEnabled value to set. - * @return the AutomationRuleTriggeringLogic object itself. - */ - public AutomationRuleTriggeringLogic withIsEnabled(boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Get the expirationTimeUtc property: Determines when the automation rule should automatically expire and be - * disabled. - * - * @return the expirationTimeUtc value. - */ - public OffsetDateTime expirationTimeUtc() { - return this.expirationTimeUtc; - } - - /** - * Set the expirationTimeUtc property: Determines when the automation rule should automatically expire and be - * disabled. - * - * @param expirationTimeUtc the expirationTimeUtc value to set. - * @return the AutomationRuleTriggeringLogic object itself. - */ - public AutomationRuleTriggeringLogic withExpirationTimeUtc(OffsetDateTime expirationTimeUtc) { - this.expirationTimeUtc = expirationTimeUtc; - return this; - } - - /** - * Get the triggersOn property: The triggersOn property. - * - * @return the triggersOn value. - */ - public TriggersOn triggersOn() { - return this.triggersOn; - } - - /** - * Set the triggersOn property: The triggersOn property. - * - * @param triggersOn the triggersOn value to set. - * @return the AutomationRuleTriggeringLogic object itself. - */ - public AutomationRuleTriggeringLogic withTriggersOn(TriggersOn triggersOn) { - this.triggersOn = triggersOn; - return this; - } - - /** - * Get the triggersWhen property: The triggersWhen property. - * - * @return the triggersWhen value. - */ - public TriggersWhen triggersWhen() { - return this.triggersWhen; - } - - /** - * Set the triggersWhen property: The triggersWhen property. - * - * @param triggersWhen the triggersWhen value to set. - * @return the AutomationRuleTriggeringLogic object itself. - */ - public AutomationRuleTriggeringLogic withTriggersWhen(TriggersWhen triggersWhen) { - this.triggersWhen = triggersWhen; - return this; - } - - /** - * Get the conditions property: The conditions to evaluate to determine if the automation rule should be triggered - * on a given object. - * - * @return the conditions value. - */ - public List conditions() { - return this.conditions; - } - - /** - * Set the conditions property: The conditions to evaluate to determine if the automation rule should be triggered - * on a given object. - * - * @param conditions the conditions value to set. - * @return the AutomationRuleTriggeringLogic object itself. - */ - public AutomationRuleTriggeringLogic withConditions(List conditions) { - this.conditions = conditions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (triggersOn() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property triggersOn in model AutomationRuleTriggeringLogic")); - } - if (triggersWhen() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property triggersWhen in model AutomationRuleTriggeringLogic")); - } - if (conditions() != null) { - conditions().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutomationRuleTriggeringLogic.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java deleted file mode 100644 index 157bf09eeafd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java +++ /dev/null @@ -1,147 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of AutomationRules. */ -public interface AutomationRules { - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 the automation rule. - */ - AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); - - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 the automation rule along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 any object. - */ - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); - - /** - * Delete the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @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 any object along with {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all automation rules as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all automation rules as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the automation rule. - * - * @param id the resource ID. - * @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 the automation rule along with {@link Response}. - */ - AutomationRule getById(String id); - - /** - * Gets the automation rule. - * - * @param id the resource ID. - * @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 the automation rule along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the automation rule. - * - * @param id the resource ID. - * @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 any object along with {@link Response}. - */ - Object deleteById(String id); - - /** - * Delete the automation rule. - * - * @param id the resource ID. - * @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 any object along with {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new AutomationRule resource. - * - * @param name resource name. - * @return the first stage of the new AutomationRule definition. - */ - AutomationRule.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java deleted file mode 100644 index ca0dc3474b77..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AutomationRulesList model. */ -@Fluent -public final class AutomationRulesList { - /* - * The value property. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The nextLink property. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the AutomationRulesList object itself. - */ - public AutomationRulesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The nextLink property. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the AutomationRulesList object itself. - */ - public AutomationRulesList withNextLink(String nextLink) { - this.nextLink = nextLink; - 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()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java deleted file mode 100644 index 30665983543b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Connector Availability Status. */ -@Fluent -public final class Availability { - /* - * The connector Availability Status - */ - @JsonProperty(value = "status") - private AvailabilityStatus status; - - /* - * Set connector as preview - */ - @JsonProperty(value = "isPreview") - private Boolean isPreview; - - /** - * Get the status property: The connector Availability Status. - * - * @return the status value. - */ - public AvailabilityStatus status() { - return this.status; - } - - /** - * Set the status property: The connector Availability Status. - * - * @param status the status value to set. - * @return the Availability object itself. - */ - public Availability withStatus(AvailabilityStatus status) { - this.status = status; - return this; - } - - /** - * Get the isPreview property: Set connector as preview. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Set connector as preview. - * - * @param isPreview the isPreview value to set. - * @return the Availability object itself. - */ - public Availability withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AvailabilityStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AvailabilityStatus.java deleted file mode 100644 index 4943056eabbf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AvailabilityStatus.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The connector Availability Status. */ -public enum AvailabilityStatus { - /** Enum value 1. */ - ONE(1); - - /** The actual serialized value for a AvailabilityStatus instance. */ - private final int value; - - AvailabilityStatus(int value) { - this.value = value; - } - - /** - * Parses a serialized value to a AvailabilityStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed AvailabilityStatus object, or null if unable to parse. - */ - @JsonCreator - public static AvailabilityStatus fromInt(int value) { - AvailabilityStatus[] items = AvailabilityStatus.values(); - for (AvailabilityStatus item : items) { - if (item.toInt() == value) { - return item; - } - } - return null; - } - - /** - * De-serializes the instance to int value. - * - * @return the int value. - */ - @JsonValue - public int toInt() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java deleted file mode 100644 index 047f80cbc5a1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Amazon Web Services CloudTrail requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AmazonWebServicesCloudTrail") -@Immutable -public final class AwsCloudTrailCheckRequirements extends DataConnectorsCheckRequirements { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java deleted file mode 100644 index 85fed62b4c13..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java +++ /dev/null @@ -1,101 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AwsCloudTrailDataConnectorProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Amazon Web Services CloudTrail data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AmazonWebServicesCloudTrail") -@Fluent -public final class AwsCloudTrailDataConnector extends DataConnectorInner { - /* - * Amazon Web Services CloudTrail data connector properties. - */ - @JsonProperty(value = "properties") - private AwsCloudTrailDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Amazon Web Services CloudTrail data connector properties. - * - * @return the innerProperties value. - */ - private AwsCloudTrailDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public AwsCloudTrailDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the awsRoleArn property: The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws - * account. - * - * @return the awsRoleArn value. - */ - public String awsRoleArn() { - return this.innerProperties() == null ? null : this.innerProperties().awsRoleArn(); - } - - /** - * Set the awsRoleArn property: The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws - * account. - * - * @param awsRoleArn the awsRoleArn value to set. - * @return the AwsCloudTrailDataConnector object itself. - */ - public AwsCloudTrailDataConnector withAwsRoleArn(String awsRoleArn) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsCloudTrailDataConnectorProperties(); - } - this.innerProperties().withAwsRoleArn(awsRoleArn); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AwsCloudTrailDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AwsCloudTrailDataConnector object itself. - */ - public AwsCloudTrailDataConnector withDataTypes(AwsCloudTrailDataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsCloudTrailDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java deleted file mode 100644 index 019e54161be6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Amazon Web Services CloudTrail data connector. */ -@Fluent -public final class AwsCloudTrailDataConnectorDataTypes { - /* - * Logs data type. - */ - @JsonProperty(value = "logs", required = true) - private AwsCloudTrailDataConnectorDataTypesLogs logs; - - /** - * Get the logs property: Logs data type. - * - * @return the logs value. - */ - public AwsCloudTrailDataConnectorDataTypesLogs logs() { - return this.logs; - } - - /** - * Set the logs property: Logs data type. - * - * @param logs the logs value to set. - * @return the AwsCloudTrailDataConnectorDataTypes object itself. - */ - public AwsCloudTrailDataConnectorDataTypes withLogs(AwsCloudTrailDataConnectorDataTypesLogs logs) { - this.logs = logs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logs() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property logs in model AwsCloudTrailDataConnectorDataTypes")); - } else { - logs().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AwsCloudTrailDataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java deleted file mode 100644 index f11d9c72a1d9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Logs data type. */ -@Fluent -public final class AwsCloudTrailDataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public AwsCloudTrailDataConnectorDataTypesLogs withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java deleted file mode 100644 index ddfb6f7d40c1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Amazon Web Services S3 requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AmazonWebServicesS3") -@Immutable -public final class AwsS3CheckRequirements extends DataConnectorsCheckRequirements { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java deleted file mode 100644 index 3739b6ccb523..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java +++ /dev/null @@ -1,146 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AwsS3DataConnectorProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Represents Amazon Web Services S3 data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AmazonWebServicesS3") -@Fluent -public final class AwsS3DataConnector extends DataConnectorInner { - /* - * Amazon Web Services S3 data connector properties. - */ - @JsonProperty(value = "properties") - private AwsS3DataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Amazon Web Services S3 data connector properties. - * - * @return the innerProperties value. - */ - private AwsS3DataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public AwsS3DataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the destinationTable property: The logs destination table name in LogAnalytics. - * - * @return the destinationTable value. - */ - public String destinationTable() { - return this.innerProperties() == null ? null : this.innerProperties().destinationTable(); - } - - /** - * Set the destinationTable property: The logs destination table name in LogAnalytics. - * - * @param destinationTable the destinationTable value to set. - * @return the AwsS3DataConnector object itself. - */ - public AwsS3DataConnector withDestinationTable(String destinationTable) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsS3DataConnectorProperties(); - } - this.innerProperties().withDestinationTable(destinationTable); - return this; - } - - /** - * Get the sqsUrls property: The AWS sqs urls for the connector. - * - * @return the sqsUrls value. - */ - public List sqsUrls() { - return this.innerProperties() == null ? null : this.innerProperties().sqsUrls(); - } - - /** - * Set the sqsUrls property: The AWS sqs urls for the connector. - * - * @param sqsUrls the sqsUrls value to set. - * @return the AwsS3DataConnector object itself. - */ - public AwsS3DataConnector withSqsUrls(List sqsUrls) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsS3DataConnectorProperties(); - } - this.innerProperties().withSqsUrls(sqsUrls); - return this; - } - - /** - * Get the roleArn property: The Aws Role Arn that is used to access the Aws account. - * - * @return the roleArn value. - */ - public String roleArn() { - return this.innerProperties() == null ? null : this.innerProperties().roleArn(); - } - - /** - * Set the roleArn property: The Aws Role Arn that is used to access the Aws account. - * - * @param roleArn the roleArn value to set. - * @return the AwsS3DataConnector object itself. - */ - public AwsS3DataConnector withRoleArn(String roleArn) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsS3DataConnectorProperties(); - } - this.innerProperties().withRoleArn(roleArn); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AwsS3DataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AwsS3DataConnector object itself. - */ - public AwsS3DataConnector withDataTypes(AwsS3DataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsS3DataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java deleted file mode 100644 index 14c7a6754785..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Amazon Web Services S3 data connector. */ -@Fluent -public final class AwsS3DataConnectorDataTypes { - /* - * Logs data type. - */ - @JsonProperty(value = "logs", required = true) - private AwsS3DataConnectorDataTypesLogs logs; - - /** - * Get the logs property: Logs data type. - * - * @return the logs value. - */ - public AwsS3DataConnectorDataTypesLogs logs() { - return this.logs; - } - - /** - * Set the logs property: Logs data type. - * - * @param logs the logs value to set. - * @return the AwsS3DataConnectorDataTypes object itself. - */ - public AwsS3DataConnectorDataTypes withLogs(AwsS3DataConnectorDataTypesLogs logs) { - this.logs = logs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logs() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property logs in model AwsS3DataConnectorDataTypes")); - } else { - logs().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AwsS3DataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java deleted file mode 100644 index dd24d8ad6de3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Logs data type. */ -@Fluent -public final class AwsS3DataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public AwsS3DataConnectorDataTypesLogs withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java deleted file mode 100644 index 4c8ea0212461..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Resources created in Azure DevOps repository. */ -@Fluent -public final class AzureDevOpsResourceInfo { - /* - * Id of the pipeline created for the source-control. - */ - @JsonProperty(value = "pipelineId") - private String pipelineId; - - /* - * Id of the service-connection created for the source-control. - */ - @JsonProperty(value = "serviceConnectionId") - private String serviceConnectionId; - - /** - * Get the pipelineId property: Id of the pipeline created for the source-control. - * - * @return the pipelineId value. - */ - public String pipelineId() { - return this.pipelineId; - } - - /** - * Set the pipelineId property: Id of the pipeline created for the source-control. - * - * @param pipelineId the pipelineId value to set. - * @return the AzureDevOpsResourceInfo object itself. - */ - public AzureDevOpsResourceInfo withPipelineId(String pipelineId) { - this.pipelineId = pipelineId; - return this; - } - - /** - * Get the serviceConnectionId property: Id of the service-connection created for the source-control. - * - * @return the serviceConnectionId value. - */ - public String serviceConnectionId() { - return this.serviceConnectionId; - } - - /** - * Set the serviceConnectionId property: Id of the service-connection created for the source-control. - * - * @param serviceConnectionId the serviceConnectionId value to set. - * @return the AzureDevOpsResourceInfo object itself. - */ - public AzureDevOpsResourceInfo withServiceConnectionId(String serviceConnectionId) { - this.serviceConnectionId = serviceConnectionId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java deleted file mode 100644 index 64b4871d5cf4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java +++ /dev/null @@ -1,85 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AzureResourceEntityProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Represents an azure resource entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureResource") -@Fluent -public final class AzureResourceEntity extends EntityInner { - /* - * AzureResource entity properties - */ - @JsonProperty(value = "properties") - private AzureResourceEntityProperties innerProperties; - - /** - * Get the innerProperties property: AzureResource entity properties. - * - * @return the innerProperties value. - */ - private AzureResourceEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the resourceId property: The azure resource id of the resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.innerProperties() == null ? null : this.innerProperties().resourceId(); - } - - /** - * Get the subscriptionId property: The subscription id of the resource. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java deleted file mode 100644 index bfdfb6f62b95..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java +++ /dev/null @@ -1,632 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Bookmark. */ -public interface Bookmark { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the created property: The time the bookmark was created. - * - * @return the created value. - */ - OffsetDateTime created(); - - /** - * Gets the createdBy property: Describes a user that created the bookmark. - * - * @return the createdBy value. - */ - UserInfo createdBy(); - - /** - * Gets the displayName property: The display name of the bookmark. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the labels property: List of labels relevant to this bookmark. - * - * @return the labels value. - */ - List labels(); - - /** - * Gets the notes property: The notes of the bookmark. - * - * @return the notes value. - */ - String notes(); - - /** - * Gets the query property: The query of the bookmark. - * - * @return the query value. - */ - String query(); - - /** - * Gets the queryResult property: The query result of the bookmark. - * - * @return the queryResult value. - */ - String queryResult(); - - /** - * Gets the updated property: The last time the bookmark was updated. - * - * @return the updated value. - */ - OffsetDateTime updated(); - - /** - * Gets the updatedBy property: Describes a user that updated the bookmark. - * - * @return the updatedBy value. - */ - UserInfo updatedBy(); - - /** - * Gets the eventTime property: The bookmark event time. - * - * @return the eventTime value. - */ - OffsetDateTime eventTime(); - - /** - * Gets the queryStartTime property: The start time for the query. - * - * @return the queryStartTime value. - */ - OffsetDateTime queryStartTime(); - - /** - * Gets the queryEndTime property: The end time for the query. - * - * @return the queryEndTime value. - */ - OffsetDateTime queryEndTime(); - - /** - * Gets the incidentInfo property: Describes an incident that relates to bookmark. - * - * @return the incidentInfo value. - */ - IncidentInfo incidentInfo(); - - /** - * Gets the entityMappings property: Describes the entity mappings of the bookmark. - * - * @return the entityMappings value. - */ - List entityMappings(); - - /** - * Gets the tactics property: A list of relevant mitre attacks. - * - * @return the tactics value. - */ - List tactics(); - - /** - * Gets the techniques property: A list of relevant mitre techniques. - * - * @return the techniques value. - */ - List techniques(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner object. - * - * @return the inner object. - */ - BookmarkInner innerModel(); - - /** The entirety of the Bookmark definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The Bookmark definition stages. */ - interface DefinitionStages { - /** The first stage of the Bookmark definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the Bookmark definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the Bookmark definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithEtag, - DefinitionStages.WithCreated, - DefinitionStages.WithCreatedBy, - DefinitionStages.WithDisplayName, - DefinitionStages.WithLabels, - DefinitionStages.WithNotes, - DefinitionStages.WithQuery, - DefinitionStages.WithQueryResult, - DefinitionStages.WithUpdated, - DefinitionStages.WithUpdatedBy, - DefinitionStages.WithEventTime, - DefinitionStages.WithQueryStartTime, - DefinitionStages.WithQueryEndTime, - DefinitionStages.WithIncidentInfo, - DefinitionStages.WithEntityMappings, - DefinitionStages.WithTactics, - DefinitionStages.WithTechniques { - /** - * Executes the create request. - * - * @return the created resource. - */ - Bookmark create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Bookmark create(Context context); - } - /** The stage of the Bookmark definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the Bookmark definition allowing to specify created. */ - interface WithCreated { - /** - * Specifies the created property: The time the bookmark was created. - * - * @param created The time the bookmark was created. - * @return the next definition stage. - */ - WithCreate withCreated(OffsetDateTime created); - } - /** The stage of the Bookmark definition allowing to specify createdBy. */ - interface WithCreatedBy { - /** - * Specifies the createdBy property: Describes a user that created the bookmark. - * - * @param createdBy Describes a user that created the bookmark. - * @return the next definition stage. - */ - WithCreate withCreatedBy(UserInfo createdBy); - } - /** The stage of the Bookmark definition allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The display name of the bookmark. - * - * @param displayName The display name of the bookmark. - * @return the next definition stage. - */ - WithCreate withDisplayName(String displayName); - } - /** The stage of the Bookmark definition allowing to specify labels. */ - interface WithLabels { - /** - * Specifies the labels property: List of labels relevant to this bookmark. - * - * @param labels List of labels relevant to this bookmark. - * @return the next definition stage. - */ - WithCreate withLabels(List labels); - } - /** The stage of the Bookmark definition allowing to specify notes. */ - interface WithNotes { - /** - * Specifies the notes property: The notes of the bookmark. - * - * @param notes The notes of the bookmark. - * @return the next definition stage. - */ - WithCreate withNotes(String notes); - } - /** The stage of the Bookmark definition allowing to specify query. */ - interface WithQuery { - /** - * Specifies the query property: The query of the bookmark.. - * - * @param query The query of the bookmark. - * @return the next definition stage. - */ - WithCreate withQuery(String query); - } - /** The stage of the Bookmark definition allowing to specify queryResult. */ - interface WithQueryResult { - /** - * Specifies the queryResult property: The query result of the bookmark.. - * - * @param queryResult The query result of the bookmark. - * @return the next definition stage. - */ - WithCreate withQueryResult(String queryResult); - } - /** The stage of the Bookmark definition allowing to specify updated. */ - interface WithUpdated { - /** - * Specifies the updated property: The last time the bookmark was updated. - * - * @param updated The last time the bookmark was updated. - * @return the next definition stage. - */ - WithCreate withUpdated(OffsetDateTime updated); - } - /** The stage of the Bookmark definition allowing to specify updatedBy. */ - interface WithUpdatedBy { - /** - * Specifies the updatedBy property: Describes a user that updated the bookmark. - * - * @param updatedBy Describes a user that updated the bookmark. - * @return the next definition stage. - */ - WithCreate withUpdatedBy(UserInfo updatedBy); - } - /** The stage of the Bookmark definition allowing to specify eventTime. */ - interface WithEventTime { - /** - * Specifies the eventTime property: The bookmark event time. - * - * @param eventTime The bookmark event time. - * @return the next definition stage. - */ - WithCreate withEventTime(OffsetDateTime eventTime); - } - /** The stage of the Bookmark definition allowing to specify queryStartTime. */ - interface WithQueryStartTime { - /** - * Specifies the queryStartTime property: The start time for the query. - * - * @param queryStartTime The start time for the query. - * @return the next definition stage. - */ - WithCreate withQueryStartTime(OffsetDateTime queryStartTime); - } - /** The stage of the Bookmark definition allowing to specify queryEndTime. */ - interface WithQueryEndTime { - /** - * Specifies the queryEndTime property: The end time for the query. - * - * @param queryEndTime The end time for the query. - * @return the next definition stage. - */ - WithCreate withQueryEndTime(OffsetDateTime queryEndTime); - } - /** The stage of the Bookmark definition allowing to specify incidentInfo. */ - interface WithIncidentInfo { - /** - * Specifies the incidentInfo property: Describes an incident that relates to bookmark. - * - * @param incidentInfo Describes an incident that relates to bookmark. - * @return the next definition stage. - */ - WithCreate withIncidentInfo(IncidentInfo incidentInfo); - } - /** The stage of the Bookmark definition allowing to specify entityMappings. */ - interface WithEntityMappings { - /** - * Specifies the entityMappings property: Describes the entity mappings of the bookmark. - * - * @param entityMappings Describes the entity mappings of the bookmark. - * @return the next definition stage. - */ - WithCreate withEntityMappings(List entityMappings); - } - /** The stage of the Bookmark definition allowing to specify tactics. */ - interface WithTactics { - /** - * Specifies the tactics property: A list of relevant mitre attacks. - * - * @param tactics A list of relevant mitre attacks. - * @return the next definition stage. - */ - WithCreate withTactics(List tactics); - } - /** The stage of the Bookmark definition allowing to specify techniques. */ - interface WithTechniques { - /** - * Specifies the techniques property: A list of relevant mitre techniques. - * - * @param techniques A list of relevant mitre techniques. - * @return the next definition stage. - */ - WithCreate withTechniques(List techniques); - } - } - /** - * Begins update for the Bookmark resource. - * - * @return the stage of resource update. - */ - Bookmark.Update update(); - - /** The template for Bookmark update. */ - interface Update - extends UpdateStages.WithEtag, - UpdateStages.WithCreated, - UpdateStages.WithCreatedBy, - UpdateStages.WithDisplayName, - UpdateStages.WithLabels, - UpdateStages.WithNotes, - UpdateStages.WithQuery, - UpdateStages.WithQueryResult, - UpdateStages.WithUpdated, - UpdateStages.WithUpdatedBy, - UpdateStages.WithEventTime, - UpdateStages.WithQueryStartTime, - UpdateStages.WithQueryEndTime, - UpdateStages.WithIncidentInfo, - UpdateStages.WithEntityMappings, - UpdateStages.WithTactics, - UpdateStages.WithTechniques { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Bookmark apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Bookmark apply(Context context); - } - /** The Bookmark update stages. */ - interface UpdateStages { - /** The stage of the Bookmark update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the Bookmark update allowing to specify created. */ - interface WithCreated { - /** - * Specifies the created property: The time the bookmark was created. - * - * @param created The time the bookmark was created. - * @return the next definition stage. - */ - Update withCreated(OffsetDateTime created); - } - /** The stage of the Bookmark update allowing to specify createdBy. */ - interface WithCreatedBy { - /** - * Specifies the createdBy property: Describes a user that created the bookmark. - * - * @param createdBy Describes a user that created the bookmark. - * @return the next definition stage. - */ - Update withCreatedBy(UserInfo createdBy); - } - /** The stage of the Bookmark update allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The display name of the bookmark. - * - * @param displayName The display name of the bookmark. - * @return the next definition stage. - */ - Update withDisplayName(String displayName); - } - /** The stage of the Bookmark update allowing to specify labels. */ - interface WithLabels { - /** - * Specifies the labels property: List of labels relevant to this bookmark. - * - * @param labels List of labels relevant to this bookmark. - * @return the next definition stage. - */ - Update withLabels(List labels); - } - /** The stage of the Bookmark update allowing to specify notes. */ - interface WithNotes { - /** - * Specifies the notes property: The notes of the bookmark. - * - * @param notes The notes of the bookmark. - * @return the next definition stage. - */ - Update withNotes(String notes); - } - /** The stage of the Bookmark update allowing to specify query. */ - interface WithQuery { - /** - * Specifies the query property: The query of the bookmark.. - * - * @param query The query of the bookmark. - * @return the next definition stage. - */ - Update withQuery(String query); - } - /** The stage of the Bookmark update allowing to specify queryResult. */ - interface WithQueryResult { - /** - * Specifies the queryResult property: The query result of the bookmark.. - * - * @param queryResult The query result of the bookmark. - * @return the next definition stage. - */ - Update withQueryResult(String queryResult); - } - /** The stage of the Bookmark update allowing to specify updated. */ - interface WithUpdated { - /** - * Specifies the updated property: The last time the bookmark was updated. - * - * @param updated The last time the bookmark was updated. - * @return the next definition stage. - */ - Update withUpdated(OffsetDateTime updated); - } - /** The stage of the Bookmark update allowing to specify updatedBy. */ - interface WithUpdatedBy { - /** - * Specifies the updatedBy property: Describes a user that updated the bookmark. - * - * @param updatedBy Describes a user that updated the bookmark. - * @return the next definition stage. - */ - Update withUpdatedBy(UserInfo updatedBy); - } - /** The stage of the Bookmark update allowing to specify eventTime. */ - interface WithEventTime { - /** - * Specifies the eventTime property: The bookmark event time. - * - * @param eventTime The bookmark event time. - * @return the next definition stage. - */ - Update withEventTime(OffsetDateTime eventTime); - } - /** The stage of the Bookmark update allowing to specify queryStartTime. */ - interface WithQueryStartTime { - /** - * Specifies the queryStartTime property: The start time for the query. - * - * @param queryStartTime The start time for the query. - * @return the next definition stage. - */ - Update withQueryStartTime(OffsetDateTime queryStartTime); - } - /** The stage of the Bookmark update allowing to specify queryEndTime. */ - interface WithQueryEndTime { - /** - * Specifies the queryEndTime property: The end time for the query. - * - * @param queryEndTime The end time for the query. - * @return the next definition stage. - */ - Update withQueryEndTime(OffsetDateTime queryEndTime); - } - /** The stage of the Bookmark update allowing to specify incidentInfo. */ - interface WithIncidentInfo { - /** - * Specifies the incidentInfo property: Describes an incident that relates to bookmark. - * - * @param incidentInfo Describes an incident that relates to bookmark. - * @return the next definition stage. - */ - Update withIncidentInfo(IncidentInfo incidentInfo); - } - /** The stage of the Bookmark update allowing to specify entityMappings. */ - interface WithEntityMappings { - /** - * Specifies the entityMappings property: Describes the entity mappings of the bookmark. - * - * @param entityMappings Describes the entity mappings of the bookmark. - * @return the next definition stage. - */ - Update withEntityMappings(List entityMappings); - } - /** The stage of the Bookmark update allowing to specify tactics. */ - interface WithTactics { - /** - * Specifies the tactics property: A list of relevant mitre attacks. - * - * @param tactics A list of relevant mitre attacks. - * @return the next definition stage. - */ - Update withTactics(List tactics); - } - /** The stage of the Bookmark update allowing to specify techniques. */ - interface WithTechniques { - /** - * Specifies the techniques property: A list of relevant mitre techniques. - * - * @param techniques A list of relevant mitre techniques. - * @return the next definition stage. - */ - Update withTechniques(List techniques); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Bookmark refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Bookmark refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java deleted file mode 100644 index b46a2d88c95d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the entity mappings of a single entity. */ -@Fluent -public final class BookmarkEntityMappings { - /* - * The entity type - */ - @JsonProperty(value = "entityType") - private String entityType; - - /* - * Array of fields mapping for that entity type - */ - @JsonProperty(value = "fieldMappings") - private List fieldMappings; - - /** - * Get the entityType property: The entity type. - * - * @return the entityType value. - */ - public String entityType() { - return this.entityType; - } - - /** - * Set the entityType property: The entity type. - * - * @param entityType the entityType value to set. - * @return the BookmarkEntityMappings object itself. - */ - public BookmarkEntityMappings withEntityType(String entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the fieldMappings property: Array of fields mapping for that entity type. - * - * @return the fieldMappings value. - */ - public List fieldMappings() { - return this.fieldMappings; - } - - /** - * Set the fieldMappings property: Array of fields mapping for that entity type. - * - * @param fieldMappings the fieldMappings value to set. - * @return the BookmarkEntityMappings object itself. - */ - public BookmarkEntityMappings withFieldMappings(List fieldMappings) { - this.fieldMappings = fieldMappings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fieldMappings() != null) { - fieldMappings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java deleted file mode 100644 index ea70e0521448..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java +++ /dev/null @@ -1,100 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** The parameters required to execute an expand operation on the given bookmark. */ -@Fluent -public final class BookmarkExpandParameters { - /* - * The end date filter, so the only expansion results returned are before this date. - */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; - - /* - * The Id of the expansion to perform. - */ - @JsonProperty(value = "expansionId") - private UUID expansionId; - - /* - * The start date filter, so the only expansion results returned are after this date. - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /** - * Get the endTime property: The end date filter, so the only expansion results returned are before this date. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end date filter, so the only expansion results returned are before this date. - * - * @param endTime the endTime value to set. - * @return the BookmarkExpandParameters object itself. - */ - public BookmarkExpandParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the expansionId property: The Id of the expansion to perform. - * - * @return the expansionId value. - */ - public UUID expansionId() { - return this.expansionId; - } - - /** - * Set the expansionId property: The Id of the expansion to perform. - * - * @param expansionId the expansionId value to set. - * @return the BookmarkExpandParameters object itself. - */ - public BookmarkExpandParameters withExpansionId(UUID expansionId) { - this.expansionId = expansionId; - return this; - } - - /** - * Get the startTime property: The start date filter, so the only expansion results returned are after this date. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start date filter, so the only expansion results returned are after this date. - * - * @param startTime the startTime value to set. - * @return the BookmarkExpandParameters object itself. - */ - public BookmarkExpandParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponse.java deleted file mode 100644 index 0df634388d5e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponse.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; - -/** An immutable client-side representation of BookmarkExpandResponse. */ -public interface BookmarkExpandResponse { - /** - * Gets the metadata property: The metadata from the expansion operation results. - * - * @return the metadata value. - */ - ExpansionResultsMetadata metadata(); - - /** - * Gets the value property: The expansion result values. - * - * @return the value value. - */ - BookmarkExpandResponseValue value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner object. - * - * @return the inner object. - */ - BookmarkExpandResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java deleted file mode 100644 index b9b48339a131..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The expansion result values. */ -@Fluent -public final class BookmarkExpandResponseValue { - /* - * Array of the expansion result entities. - */ - @JsonProperty(value = "entities") - private List entities; - - /* - * Array of expansion result connected entities - */ - @JsonProperty(value = "edges") - private List edges; - - /** - * Get the entities property: Array of the expansion result entities. - * - * @return the entities value. - */ - public List entities() { - return this.entities; - } - - /** - * Set the entities property: Array of the expansion result entities. - * - * @param entities the entities value to set. - * @return the BookmarkExpandResponseValue object itself. - */ - public BookmarkExpandResponseValue withEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the edges property: Array of expansion result connected entities. - * - * @return the edges value. - */ - public List edges() { - return this.edges; - } - - /** - * Set the edges property: Array of expansion result connected entities. - * - * @param edges the edges value to set. - * @return the BookmarkExpandResponseValue object itself. - */ - public BookmarkExpandResponseValue withEdges(List edges) { - this.edges = edges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entities() != null) { - entities().forEach(e -> e.validate()); - } - if (edges() != null) { - edges().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java deleted file mode 100644 index f89890b19242..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the bookmarks. */ -@Fluent -public final class BookmarkList { - /* - * URL to fetch the next set of bookmarks. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of bookmarks. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of bookmarks. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of bookmarks. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of bookmarks. - * - * @param value the value value to set. - * @return the BookmarkList object itself. - */ - public BookmarkList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model BookmarkList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BookmarkList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java deleted file mode 100644 index cf54322f2c78..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of BookmarkOperations. */ -public interface BookmarkOperations { - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @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 the entity expansion result operation response. - */ - BookmarkExpandResponse expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @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 the entity expansion result operation response along with {@link Response}. - */ - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java deleted file mode 100644 index e1db491640d0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java +++ /dev/null @@ -1,165 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of BookmarkRelations. */ -public interface BookmarkRelations { - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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 all bookmark relations as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId); - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all bookmark relations as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @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 bookmark relation. - */ - Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @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 bookmark relation along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); - - /** - * Gets a bookmark relation. - * - * @param id the resource ID. - * @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 bookmark relation along with {@link Response}. - */ - Relation getById(String id); - - /** - * Gets a bookmark relation. - * - * @param id the resource ID. - * @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 bookmark relation along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the bookmark relation. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete the bookmark relation. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Relation resource. - * - * @param name resource name. - * @return the first stage of the new Relation definition. - */ - Relation.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java deleted file mode 100644 index bfad411f1ce6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java +++ /dev/null @@ -1,248 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents bookmark timeline item. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Bookmark") -@Fluent -public final class BookmarkTimelineItem extends EntityTimelineItem { - /* - * The bookmark azure resource id. - */ - @JsonProperty(value = "azureResourceId", required = true) - private String azureResourceId; - - /* - * The bookmark display name. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The notes of the bookmark - */ - @JsonProperty(value = "notes") - private String notes; - - /* - * The bookmark end time. - */ - @JsonProperty(value = "endTimeUtc") - private OffsetDateTime endTimeUtc; - - /* - * The bookmark start time. - */ - @JsonProperty(value = "startTimeUtc") - private OffsetDateTime startTimeUtc; - - /* - * The bookmark event time. - */ - @JsonProperty(value = "eventTime") - private OffsetDateTime eventTime; - - /* - * Describes a user that created the bookmark - */ - @JsonProperty(value = "createdBy") - private UserInfo createdBy; - - /* - * List of labels relevant to this bookmark - */ - @JsonProperty(value = "labels") - private List labels; - - /** - * Get the azureResourceId property: The bookmark azure resource id. - * - * @return the azureResourceId value. - */ - public String azureResourceId() { - return this.azureResourceId; - } - - /** - * Set the azureResourceId property: The bookmark azure resource id. - * - * @param azureResourceId the azureResourceId value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withAzureResourceId(String azureResourceId) { - this.azureResourceId = azureResourceId; - return this; - } - - /** - * Get the displayName property: The bookmark display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The bookmark display name. - * - * @param displayName the displayName value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the notes property: The notes of the bookmark. - * - * @return the notes value. - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes property: The notes of the bookmark. - * - * @param notes the notes value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the endTimeUtc property: The bookmark end time. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The bookmark end time. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the startTimeUtc property: The bookmark start time. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The bookmark start time. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the eventTime property: The bookmark event time. - * - * @return the eventTime value. - */ - public OffsetDateTime eventTime() { - return this.eventTime; - } - - /** - * Set the eventTime property: The bookmark event time. - * - * @param eventTime the eventTime value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withEventTime(OffsetDateTime eventTime) { - this.eventTime = eventTime; - return this; - } - - /** - * Get the createdBy property: Describes a user that created the bookmark. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: Describes a user that created the bookmark. - * - * @param createdBy the createdBy value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withCreatedBy(UserInfo createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the labels property: List of labels relevant to this bookmark. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: List of labels relevant to this bookmark. - * - * @param labels the labels value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (azureResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property azureResourceId in model BookmarkTimelineItem")); - } - if (createdBy() != null) { - createdBy().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BookmarkTimelineItem.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java deleted file mode 100644 index 3b3706f36fd8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java +++ /dev/null @@ -1,145 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Bookmarks. */ -public interface Bookmarks { - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all bookmarks as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all bookmarks as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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 bookmark. - */ - Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); - - /** - * Gets a bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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 bookmark along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId); - - /** - * Delete the bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); - - /** - * Gets a bookmark. - * - * @param id the resource ID. - * @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 bookmark along with {@link Response}. - */ - Bookmark getById(String id); - - /** - * Gets a bookmark. - * - * @param id the resource ID. - * @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 bookmark along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the bookmark. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete the bookmark. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Bookmark resource. - * - * @param name resource name. - * @return the first stage of the new Bookmark definition. - */ - Bookmark.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java deleted file mode 100644 index be26717140de..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition that applies a boolean operator (e.g AND, OR) to conditions. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("Boolean") -@Fluent -public final class BooleanConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRuleBooleanCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRuleBooleanCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the BooleanConditionProperties object itself. - */ - public BooleanConditionProperties withConditionProperties(AutomationRuleBooleanCondition conditionProperties) { - this.conditionProperties = conditionProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (conditionProperties() != null) { - conditionProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java deleted file mode 100644 index 9d6d5e61b586..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java +++ /dev/null @@ -1,125 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** Information on the client (user or application) that made some action. */ -@Fluent -public final class ClientInfo { - /* - * The email of the client. - */ - @JsonProperty(value = "email") - private String email; - - /* - * The name of the client. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The object id of the client. - */ - @JsonProperty(value = "objectId") - private UUID objectId; - - /* - * The user principal name of the client. - */ - @JsonProperty(value = "userPrincipalName") - private String userPrincipalName; - - /** - * Get the email property: The email of the client. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: The email of the client. - * - * @param email the email value to set. - * @return the ClientInfo object itself. - */ - public ClientInfo withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the name property: The name of the client. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the client. - * - * @param name the name value to set. - * @return the ClientInfo object itself. - */ - public ClientInfo withName(String name) { - this.name = name; - return this; - } - - /** - * Get the objectId property: The object id of the client. - * - * @return the objectId value. - */ - public UUID objectId() { - return this.objectId; - } - - /** - * Set the objectId property: The object id of the client. - * - * @param objectId the objectId value to set. - * @return the ClientInfo object itself. - */ - public ClientInfo withObjectId(UUID objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the userPrincipalName property: The user principal name of the client. - * - * @return the userPrincipalName value. - */ - public String userPrincipalName() { - return this.userPrincipalName; - } - - /** - * Set the userPrincipalName property: The user principal name of the client. - * - * @param userPrincipalName the userPrincipalName value to set. - * @return the ClientInfo object itself. - */ - public ClientInfo withUserPrincipalName(String userPrincipalName) { - this.userPrincipalName = userPrincipalName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java deleted file mode 100644 index 2d0908e927da..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.CloudApplicationEntityProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Represents a cloud application entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("CloudApplication") -@Fluent -public final class CloudApplicationEntity extends EntityInner { - /* - * CloudApplication entity properties - */ - @JsonProperty(value = "properties") - private CloudApplicationEntityProperties innerProperties; - - /** - * Get the innerProperties property: CloudApplication entity properties. - * - * @return the innerProperties value. - */ - private CloudApplicationEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the appId property: The technical identifier of the application. - * - * @return the appId value. - */ - public Integer appId() { - return this.innerProperties() == null ? null : this.innerProperties().appId(); - } - - /** - * Get the appName property: The name of the related cloud application. - * - * @return the appName value. - */ - public String appName() { - return this.innerProperties() == null ? null : this.innerProperties().appName(); - } - - /** - * Get the instanceName property: The user defined instance name of the cloud application. It is often used to - * distinguish between several applications of the same type that a customer has. - * - * @return the instanceName value. - */ - public String instanceName() { - return this.innerProperties() == null ? null : this.innerProperties().instanceName(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java deleted file mode 100644 index 396d69282da3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java +++ /dev/null @@ -1,100 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.ApiPollingParameters; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Codeless API Polling data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("APIPolling") -@Fluent -public final class CodelessApiPollingDataConnector extends DataConnectorInner { - /* - * Codeless poling data connector properties - */ - @JsonProperty(value = "properties") - private ApiPollingParameters innerProperties; - - /** - * Get the innerProperties property: Codeless poling data connector properties. - * - * @return the innerProperties value. - */ - private ApiPollingParameters innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public CodelessApiPollingDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the connectorUiConfig property: Config to describe the instructions blade. - * - * @return the connectorUiConfig value. - */ - public CodelessUiConnectorConfigProperties connectorUiConfig() { - return this.innerProperties() == null ? null : this.innerProperties().connectorUiConfig(); - } - - /** - * Set the connectorUiConfig property: Config to describe the instructions blade. - * - * @param connectorUiConfig the connectorUiConfig value to set. - * @return the CodelessApiPollingDataConnector object itself. - */ - public CodelessApiPollingDataConnector withConnectorUiConfig( - CodelessUiConnectorConfigProperties connectorUiConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new ApiPollingParameters(); - } - this.innerProperties().withConnectorUiConfig(connectorUiConfig); - return this; - } - - /** - * Get the pollingConfig property: Config to describe the polling instructions. - * - * @return the pollingConfig value. - */ - public CodelessConnectorPollingConfigProperties pollingConfig() { - return this.innerProperties() == null ? null : this.innerProperties().pollingConfig(); - } - - /** - * Set the pollingConfig property: Config to describe the polling instructions. - * - * @param pollingConfig the pollingConfig value to set. - * @return the CodelessApiPollingDataConnector object itself. - */ - public CodelessApiPollingDataConnector withPollingConfig(CodelessConnectorPollingConfigProperties pollingConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new ApiPollingParameters(); - } - this.innerProperties().withPollingConfig(pollingConfig); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java deleted file mode 100644 index a9a781b14c94..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java +++ /dev/null @@ -1,377 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describe the authentication properties needed to successfully authenticate with the server. */ -@Fluent -public final class CodelessConnectorPollingAuthProperties { - /* - * The authentication type - */ - @JsonProperty(value = "authType", required = true) - private String authType; - - /* - * The header name which the token is sent with - */ - @JsonProperty(value = "apiKeyName") - private String apiKeyName; - - /* - * A prefix send in the header before the actual token - */ - @JsonProperty(value = "apiKeyIdentifier") - private String apiKeyIdentifier; - - /* - * Marks if the key should sent in header - */ - @JsonProperty(value = "isApiKeyInPostPayload") - private String isApiKeyInPostPayload; - - /* - * Describes the flow name, for example 'AuthCode' for Oauth 2.0 - */ - @JsonProperty(value = "flowName") - private String flowName; - - /* - * The endpoint used to issue a token, used in Oauth 2.0 flow - */ - @JsonProperty(value = "tokenEndpoint") - private String tokenEndpoint; - - /* - * The endpoint used to authorize the user, used in Oauth 2.0 flow - */ - @JsonProperty(value = "authorizationEndpoint") - private String authorizationEndpoint; - - /* - * The query parameters used in authorization request, used in Oauth 2.0 flow - */ - @JsonProperty(value = "authorizationEndpointQueryParameters") - private Object authorizationEndpointQueryParameters; - - /* - * The redirect endpoint where we will get the authorization code, used in Oauth 2.0 flow - */ - @JsonProperty(value = "redirectionEndpoint") - private String redirectionEndpoint; - - /* - * The query headers used in token request, used in Oauth 2.0 flow - */ - @JsonProperty(value = "tokenEndpointHeaders") - private Object tokenEndpointHeaders; - - /* - * The query parameters used in token request, used in Oauth 2.0 flow - */ - @JsonProperty(value = "tokenEndpointQueryParameters") - private Object tokenEndpointQueryParameters; - - /* - * Marks if we should send the client secret in header or payload, used in Oauth 2.0 flow - */ - @JsonProperty(value = "isClientSecretInHeader") - private Boolean isClientSecretInHeader; - - /* - * The OAuth token scope - */ - @JsonProperty(value = "scope") - private String scope; - - /** - * Get the authType property: The authentication type. - * - * @return the authType value. - */ - public String authType() { - return this.authType; - } - - /** - * Set the authType property: The authentication type. - * - * @param authType the authType value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withAuthType(String authType) { - this.authType = authType; - return this; - } - - /** - * Get the apiKeyName property: The header name which the token is sent with. - * - * @return the apiKeyName value. - */ - public String apiKeyName() { - return this.apiKeyName; - } - - /** - * Set the apiKeyName property: The header name which the token is sent with. - * - * @param apiKeyName the apiKeyName value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withApiKeyName(String apiKeyName) { - this.apiKeyName = apiKeyName; - return this; - } - - /** - * Get the apiKeyIdentifier property: A prefix send in the header before the actual token. - * - * @return the apiKeyIdentifier value. - */ - public String apiKeyIdentifier() { - return this.apiKeyIdentifier; - } - - /** - * Set the apiKeyIdentifier property: A prefix send in the header before the actual token. - * - * @param apiKeyIdentifier the apiKeyIdentifier value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withApiKeyIdentifier(String apiKeyIdentifier) { - this.apiKeyIdentifier = apiKeyIdentifier; - return this; - } - - /** - * Get the isApiKeyInPostPayload property: Marks if the key should sent in header. - * - * @return the isApiKeyInPostPayload value. - */ - public String isApiKeyInPostPayload() { - return this.isApiKeyInPostPayload; - } - - /** - * Set the isApiKeyInPostPayload property: Marks if the key should sent in header. - * - * @param isApiKeyInPostPayload the isApiKeyInPostPayload value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withIsApiKeyInPostPayload(String isApiKeyInPostPayload) { - this.isApiKeyInPostPayload = isApiKeyInPostPayload; - return this; - } - - /** - * Get the flowName property: Describes the flow name, for example 'AuthCode' for Oauth 2.0. - * - * @return the flowName value. - */ - public String flowName() { - return this.flowName; - } - - /** - * Set the flowName property: Describes the flow name, for example 'AuthCode' for Oauth 2.0. - * - * @param flowName the flowName value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withFlowName(String flowName) { - this.flowName = flowName; - return this; - } - - /** - * Get the tokenEndpoint property: The endpoint used to issue a token, used in Oauth 2.0 flow. - * - * @return the tokenEndpoint value. - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * Set the tokenEndpoint property: The endpoint used to issue a token, used in Oauth 2.0 flow. - * - * @param tokenEndpoint the tokenEndpoint value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withTokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - return this; - } - - /** - * Get the authorizationEndpoint property: The endpoint used to authorize the user, used in Oauth 2.0 flow. - * - * @return the authorizationEndpoint value. - */ - public String authorizationEndpoint() { - return this.authorizationEndpoint; - } - - /** - * Set the authorizationEndpoint property: The endpoint used to authorize the user, used in Oauth 2.0 flow. - * - * @param authorizationEndpoint the authorizationEndpoint value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withAuthorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - /** - * Get the authorizationEndpointQueryParameters property: The query parameters used in authorization request, used - * in Oauth 2.0 flow. - * - * @return the authorizationEndpointQueryParameters value. - */ - public Object authorizationEndpointQueryParameters() { - return this.authorizationEndpointQueryParameters; - } - - /** - * Set the authorizationEndpointQueryParameters property: The query parameters used in authorization request, used - * in Oauth 2.0 flow. - * - * @param authorizationEndpointQueryParameters the authorizationEndpointQueryParameters value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withAuthorizationEndpointQueryParameters( - Object authorizationEndpointQueryParameters) { - this.authorizationEndpointQueryParameters = authorizationEndpointQueryParameters; - return this; - } - - /** - * Get the redirectionEndpoint property: The redirect endpoint where we will get the authorization code, used in - * Oauth 2.0 flow. - * - * @return the redirectionEndpoint value. - */ - public String redirectionEndpoint() { - return this.redirectionEndpoint; - } - - /** - * Set the redirectionEndpoint property: The redirect endpoint where we will get the authorization code, used in - * Oauth 2.0 flow. - * - * @param redirectionEndpoint the redirectionEndpoint value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withRedirectionEndpoint(String redirectionEndpoint) { - this.redirectionEndpoint = redirectionEndpoint; - return this; - } - - /** - * Get the tokenEndpointHeaders property: The query headers used in token request, used in Oauth 2.0 flow. - * - * @return the tokenEndpointHeaders value. - */ - public Object tokenEndpointHeaders() { - return this.tokenEndpointHeaders; - } - - /** - * Set the tokenEndpointHeaders property: The query headers used in token request, used in Oauth 2.0 flow. - * - * @param tokenEndpointHeaders the tokenEndpointHeaders value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withTokenEndpointHeaders(Object tokenEndpointHeaders) { - this.tokenEndpointHeaders = tokenEndpointHeaders; - return this; - } - - /** - * Get the tokenEndpointQueryParameters property: The query parameters used in token request, used in Oauth 2.0 - * flow. - * - * @return the tokenEndpointQueryParameters value. - */ - public Object tokenEndpointQueryParameters() { - return this.tokenEndpointQueryParameters; - } - - /** - * Set the tokenEndpointQueryParameters property: The query parameters used in token request, used in Oauth 2.0 - * flow. - * - * @param tokenEndpointQueryParameters the tokenEndpointQueryParameters value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withTokenEndpointQueryParameters( - Object tokenEndpointQueryParameters) { - this.tokenEndpointQueryParameters = tokenEndpointQueryParameters; - return this; - } - - /** - * Get the isClientSecretInHeader property: Marks if we should send the client secret in header or payload, used in - * Oauth 2.0 flow. - * - * @return the isClientSecretInHeader value. - */ - public Boolean isClientSecretInHeader() { - return this.isClientSecretInHeader; - } - - /** - * Set the isClientSecretInHeader property: Marks if we should send the client secret in header or payload, used in - * Oauth 2.0 flow. - * - * @param isClientSecretInHeader the isClientSecretInHeader value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withIsClientSecretInHeader(Boolean isClientSecretInHeader) { - this.isClientSecretInHeader = isClientSecretInHeader; - return this; - } - - /** - * Get the scope property: The OAuth token scope. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Set the scope property: The OAuth token scope. - * - * @param scope the scope value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withScope(String scope) { - this.scope = scope; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (authType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property authType in model CodelessConnectorPollingAuthProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingAuthProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java deleted file mode 100644 index b1040c30de77..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java +++ /dev/null @@ -1,175 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Config to describe the polling config for API poller connector. */ -@Fluent -public final class CodelessConnectorPollingConfigProperties { - /* - * The poller active status - */ - @JsonProperty(value = "isActive") - private Boolean isActive; - - /* - * Describe the authentication type of the poller - */ - @JsonProperty(value = "auth", required = true) - private CodelessConnectorPollingAuthProperties auth; - - /* - * Describe the poll request config parameters of the poller - */ - @JsonProperty(value = "request", required = true) - private CodelessConnectorPollingRequestProperties request; - - /* - * Describe the poll request paging config of the poller - */ - @JsonProperty(value = "paging") - private CodelessConnectorPollingPagingProperties paging; - - /* - * Describe the response config parameters of the poller - */ - @JsonProperty(value = "response") - private CodelessConnectorPollingResponseProperties response; - - /** - * Get the isActive property: The poller active status. - * - * @return the isActive value. - */ - public Boolean isActive() { - return this.isActive; - } - - /** - * Set the isActive property: The poller active status. - * - * @param isActive the isActive value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withIsActive(Boolean isActive) { - this.isActive = isActive; - return this; - } - - /** - * Get the auth property: Describe the authentication type of the poller. - * - * @return the auth value. - */ - public CodelessConnectorPollingAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Describe the authentication type of the poller. - * - * @param auth the auth value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withAuth(CodelessConnectorPollingAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Get the request property: Describe the poll request config parameters of the poller. - * - * @return the request value. - */ - public CodelessConnectorPollingRequestProperties request() { - return this.request; - } - - /** - * Set the request property: Describe the poll request config parameters of the poller. - * - * @param request the request value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withRequest(CodelessConnectorPollingRequestProperties request) { - this.request = request; - return this; - } - - /** - * Get the paging property: Describe the poll request paging config of the poller. - * - * @return the paging value. - */ - public CodelessConnectorPollingPagingProperties paging() { - return this.paging; - } - - /** - * Set the paging property: Describe the poll request paging config of the poller. - * - * @param paging the paging value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withPaging(CodelessConnectorPollingPagingProperties paging) { - this.paging = paging; - return this; - } - - /** - * Get the response property: Describe the response config parameters of the poller. - * - * @return the response value. - */ - public CodelessConnectorPollingResponseProperties response() { - return this.response; - } - - /** - * Set the response property: Describe the response config parameters of the poller. - * - * @param response the response value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withResponse(CodelessConnectorPollingResponseProperties response) { - this.response = response; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property auth in model CodelessConnectorPollingConfigProperties")); - } else { - auth().validate(); - } - if (request() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property request in model CodelessConnectorPollingConfigProperties")); - } else { - request().validate(); - } - if (paging() != null) { - paging().validate(); - } - if (response() != null) { - response().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingConfigProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java deleted file mode 100644 index a0d01a5af717..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java +++ /dev/null @@ -1,267 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describe the properties needed to make a pagination call. */ -@Fluent -public final class CodelessConnectorPollingPagingProperties { - /* - * Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp' - */ - @JsonProperty(value = "pagingType", required = true) - private String pagingType; - - /* - * Defines the name of a next page attribute - */ - @JsonProperty(value = "nextPageParaName") - private String nextPageParaName; - - /* - * Defines the path to a next page token JSON - */ - @JsonProperty(value = "nextPageTokenJsonPath") - private String nextPageTokenJsonPath; - - /* - * Defines the path to a page count attribute - */ - @JsonProperty(value = "pageCountAttributePath") - private String pageCountAttributePath; - - /* - * Defines the path to a page total count attribute - */ - @JsonProperty(value = "pageTotalCountAttributePath") - private String pageTotalCountAttributePath; - - /* - * Defines the path to a paging time stamp attribute - */ - @JsonProperty(value = "pageTimeStampAttributePath") - private String pageTimestampAttributePath; - - /* - * Determines whether to search for the latest time stamp in the events list - */ - @JsonProperty(value = "searchTheLatestTimeStampFromEventsList") - private String searchTheLatestTimestampFromEventsList; - - /* - * Defines the name of the page size parameter - */ - @JsonProperty(value = "pageSizeParaName") - private String pageSizeParaName; - - /* - * Defines the paging size - */ - @JsonProperty(value = "pageSize") - private Integer pageSize; - - /** - * Get the pagingType property: Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp'. - * - * @return the pagingType value. - */ - public String pagingType() { - return this.pagingType; - } - - /** - * Set the pagingType property: Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp'. - * - * @param pagingType the pagingType value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPagingType(String pagingType) { - this.pagingType = pagingType; - return this; - } - - /** - * Get the nextPageParaName property: Defines the name of a next page attribute. - * - * @return the nextPageParaName value. - */ - public String nextPageParaName() { - return this.nextPageParaName; - } - - /** - * Set the nextPageParaName property: Defines the name of a next page attribute. - * - * @param nextPageParaName the nextPageParaName value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withNextPageParaName(String nextPageParaName) { - this.nextPageParaName = nextPageParaName; - return this; - } - - /** - * Get the nextPageTokenJsonPath property: Defines the path to a next page token JSON. - * - * @return the nextPageTokenJsonPath value. - */ - public String nextPageTokenJsonPath() { - return this.nextPageTokenJsonPath; - } - - /** - * Set the nextPageTokenJsonPath property: Defines the path to a next page token JSON. - * - * @param nextPageTokenJsonPath the nextPageTokenJsonPath value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withNextPageTokenJsonPath(String nextPageTokenJsonPath) { - this.nextPageTokenJsonPath = nextPageTokenJsonPath; - return this; - } - - /** - * Get the pageCountAttributePath property: Defines the path to a page count attribute. - * - * @return the pageCountAttributePath value. - */ - public String pageCountAttributePath() { - return this.pageCountAttributePath; - } - - /** - * Set the pageCountAttributePath property: Defines the path to a page count attribute. - * - * @param pageCountAttributePath the pageCountAttributePath value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageCountAttributePath(String pageCountAttributePath) { - this.pageCountAttributePath = pageCountAttributePath; - return this; - } - - /** - * Get the pageTotalCountAttributePath property: Defines the path to a page total count attribute. - * - * @return the pageTotalCountAttributePath value. - */ - public String pageTotalCountAttributePath() { - return this.pageTotalCountAttributePath; - } - - /** - * Set the pageTotalCountAttributePath property: Defines the path to a page total count attribute. - * - * @param pageTotalCountAttributePath the pageTotalCountAttributePath value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageTotalCountAttributePath( - String pageTotalCountAttributePath) { - this.pageTotalCountAttributePath = pageTotalCountAttributePath; - return this; - } - - /** - * Get the pageTimestampAttributePath property: Defines the path to a paging time stamp attribute. - * - * @return the pageTimestampAttributePath value. - */ - public String pageTimestampAttributePath() { - return this.pageTimestampAttributePath; - } - - /** - * Set the pageTimestampAttributePath property: Defines the path to a paging time stamp attribute. - * - * @param pageTimestampAttributePath the pageTimestampAttributePath value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageTimestampAttributePath(String pageTimestampAttributePath) { - this.pageTimestampAttributePath = pageTimestampAttributePath; - return this; - } - - /** - * Get the searchTheLatestTimestampFromEventsList property: Determines whether to search for the latest time stamp - * in the events list. - * - * @return the searchTheLatestTimestampFromEventsList value. - */ - public String searchTheLatestTimestampFromEventsList() { - return this.searchTheLatestTimestampFromEventsList; - } - - /** - * Set the searchTheLatestTimestampFromEventsList property: Determines whether to search for the latest time stamp - * in the events list. - * - * @param searchTheLatestTimestampFromEventsList the searchTheLatestTimestampFromEventsList value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withSearchTheLatestTimestampFromEventsList( - String searchTheLatestTimestampFromEventsList) { - this.searchTheLatestTimestampFromEventsList = searchTheLatestTimestampFromEventsList; - return this; - } - - /** - * Get the pageSizeParaName property: Defines the name of the page size parameter. - * - * @return the pageSizeParaName value. - */ - public String pageSizeParaName() { - return this.pageSizeParaName; - } - - /** - * Set the pageSizeParaName property: Defines the name of the page size parameter. - * - * @param pageSizeParaName the pageSizeParaName value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageSizeParaName(String pageSizeParaName) { - this.pageSizeParaName = pageSizeParaName; - return this; - } - - /** - * Get the pageSize property: Defines the paging size. - * - * @return the pageSize value. - */ - public Integer pageSize() { - return this.pageSize; - } - - /** - * Set the pageSize property: Defines the paging size. - * - * @param pageSize the pageSize value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pagingType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property pagingType in model CodelessConnectorPollingPagingProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingPagingProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java deleted file mode 100644 index cf4d6e8754b9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java +++ /dev/null @@ -1,356 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describe the request properties needed to successfully pull from the server. */ -@Fluent -public final class CodelessConnectorPollingRequestProperties { - /* - * Describe the endpoint we should pull the data from - */ - @JsonProperty(value = "apiEndpoint", required = true) - private String apiEndpoint; - - /* - * Defines the rate limit QPS - */ - @JsonProperty(value = "rateLimitQps") - private Integer rateLimitQps; - - /* - * The window interval we will use the pull the data - */ - @JsonProperty(value = "queryWindowInMin", required = true) - private int queryWindowInMin; - - /* - * The http method type we will use in the poll request, GET or POST - */ - @JsonProperty(value = "httpMethod", required = true) - private String httpMethod; - - /* - * The time format will be used the query events in a specific window - */ - @JsonProperty(value = "queryTimeFormat", required = true) - private String queryTimeFormat; - - /* - * Describe the amount of time we should try and poll the data in case of failure - */ - @JsonProperty(value = "retryCount") - private Integer retryCount; - - /* - * The number of seconds we will consider as a request timeout - */ - @JsonProperty(value = "timeoutInSeconds") - private Integer timeoutInSeconds; - - /* - * Describe the headers sent in the poll request - */ - @JsonProperty(value = "headers") - private Object headers; - - /* - * Describe the query parameters sent in the poll request - */ - @JsonProperty(value = "queryParameters") - private Object queryParameters; - - /* - * For advanced scenarios for example user name/password embedded in nested JSON payload - */ - @JsonProperty(value = "queryParametersTemplate") - private String queryParametersTemplate; - - /* - * This will be used the query events from a start of the time window - */ - @JsonProperty(value = "startTimeAttributeName") - private String startTimeAttributeName; - - /* - * This will be used the query events from the end of the time window - */ - @JsonProperty(value = "endTimeAttributeName") - private String endTimeAttributeName; - - /** - * Get the apiEndpoint property: Describe the endpoint we should pull the data from. - * - * @return the apiEndpoint value. - */ - public String apiEndpoint() { - return this.apiEndpoint; - } - - /** - * Set the apiEndpoint property: Describe the endpoint we should pull the data from. - * - * @param apiEndpoint the apiEndpoint value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withApiEndpoint(String apiEndpoint) { - this.apiEndpoint = apiEndpoint; - return this; - } - - /** - * Get the rateLimitQps property: Defines the rate limit QPS. - * - * @return the rateLimitQps value. - */ - public Integer rateLimitQps() { - return this.rateLimitQps; - } - - /** - * Set the rateLimitQps property: Defines the rate limit QPS. - * - * @param rateLimitQps the rateLimitQps value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withRateLimitQps(Integer rateLimitQps) { - this.rateLimitQps = rateLimitQps; - return this; - } - - /** - * Get the queryWindowInMin property: The window interval we will use the pull the data. - * - * @return the queryWindowInMin value. - */ - public int queryWindowInMin() { - return this.queryWindowInMin; - } - - /** - * Set the queryWindowInMin property: The window interval we will use the pull the data. - * - * @param queryWindowInMin the queryWindowInMin value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withQueryWindowInMin(int queryWindowInMin) { - this.queryWindowInMin = queryWindowInMin; - return this; - } - - /** - * Get the httpMethod property: The http method type we will use in the poll request, GET or POST. - * - * @return the httpMethod value. - */ - public String httpMethod() { - return this.httpMethod; - } - - /** - * Set the httpMethod property: The http method type we will use in the poll request, GET or POST. - * - * @param httpMethod the httpMethod value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withHttpMethod(String httpMethod) { - this.httpMethod = httpMethod; - return this; - } - - /** - * Get the queryTimeFormat property: The time format will be used the query events in a specific window. - * - * @return the queryTimeFormat value. - */ - public String queryTimeFormat() { - return this.queryTimeFormat; - } - - /** - * Set the queryTimeFormat property: The time format will be used the query events in a specific window. - * - * @param queryTimeFormat the queryTimeFormat value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withQueryTimeFormat(String queryTimeFormat) { - this.queryTimeFormat = queryTimeFormat; - return this; - } - - /** - * Get the retryCount property: Describe the amount of time we should try and poll the data in case of failure. - * - * @return the retryCount value. - */ - public Integer retryCount() { - return this.retryCount; - } - - /** - * Set the retryCount property: Describe the amount of time we should try and poll the data in case of failure. - * - * @param retryCount the retryCount value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withRetryCount(Integer retryCount) { - this.retryCount = retryCount; - return this; - } - - /** - * Get the timeoutInSeconds property: The number of seconds we will consider as a request timeout. - * - * @return the timeoutInSeconds value. - */ - public Integer timeoutInSeconds() { - return this.timeoutInSeconds; - } - - /** - * Set the timeoutInSeconds property: The number of seconds we will consider as a request timeout. - * - * @param timeoutInSeconds the timeoutInSeconds value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withTimeoutInSeconds(Integer timeoutInSeconds) { - this.timeoutInSeconds = timeoutInSeconds; - return this; - } - - /** - * Get the headers property: Describe the headers sent in the poll request. - * - * @return the headers value. - */ - public Object headers() { - return this.headers; - } - - /** - * Set the headers property: Describe the headers sent in the poll request. - * - * @param headers the headers value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withHeaders(Object headers) { - this.headers = headers; - return this; - } - - /** - * Get the queryParameters property: Describe the query parameters sent in the poll request. - * - * @return the queryParameters value. - */ - public Object queryParameters() { - return this.queryParameters; - } - - /** - * Set the queryParameters property: Describe the query parameters sent in the poll request. - * - * @param queryParameters the queryParameters value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withQueryParameters(Object queryParameters) { - this.queryParameters = queryParameters; - return this; - } - - /** - * Get the queryParametersTemplate property: For advanced scenarios for example user name/password embedded in - * nested JSON payload. - * - * @return the queryParametersTemplate value. - */ - public String queryParametersTemplate() { - return this.queryParametersTemplate; - } - - /** - * Set the queryParametersTemplate property: For advanced scenarios for example user name/password embedded in - * nested JSON payload. - * - * @param queryParametersTemplate the queryParametersTemplate value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withQueryParametersTemplate(String queryParametersTemplate) { - this.queryParametersTemplate = queryParametersTemplate; - return this; - } - - /** - * Get the startTimeAttributeName property: This will be used the query events from a start of the time window. - * - * @return the startTimeAttributeName value. - */ - public String startTimeAttributeName() { - return this.startTimeAttributeName; - } - - /** - * Set the startTimeAttributeName property: This will be used the query events from a start of the time window. - * - * @param startTimeAttributeName the startTimeAttributeName value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withStartTimeAttributeName(String startTimeAttributeName) { - this.startTimeAttributeName = startTimeAttributeName; - return this; - } - - /** - * Get the endTimeAttributeName property: This will be used the query events from the end of the time window. - * - * @return the endTimeAttributeName value. - */ - public String endTimeAttributeName() { - return this.endTimeAttributeName; - } - - /** - * Set the endTimeAttributeName property: This will be used the query events from the end of the time window. - * - * @param endTimeAttributeName the endTimeAttributeName value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withEndTimeAttributeName(String endTimeAttributeName) { - this.endTimeAttributeName = endTimeAttributeName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (apiEndpoint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property apiEndpoint in model CodelessConnectorPollingRequestProperties")); - } - if (httpMethod() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property httpMethod in model CodelessConnectorPollingRequestProperties")); - } - if (queryTimeFormat() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property queryTimeFormat in model" - + " CodelessConnectorPollingRequestProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingRequestProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java deleted file mode 100644 index 561f409ee82f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java +++ /dev/null @@ -1,135 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the response from the external server. */ -@Fluent -public final class CodelessConnectorPollingResponseProperties { - /* - * Describes the path we should extract the data in the response - */ - @JsonProperty(value = "eventsJsonPaths", required = true) - private List eventsJsonPaths; - - /* - * Describes the path we should extract the status code in the response - */ - @JsonProperty(value = "successStatusJsonPath") - private String successStatusJsonPath; - - /* - * Describes the path we should extract the status value in the response - */ - @JsonProperty(value = "successStatusValue") - private String successStatusValue; - - /* - * Describes if the data in the response is Gzip - */ - @JsonProperty(value = "isGzipCompressed") - private Boolean isGzipCompressed; - - /** - * Get the eventsJsonPaths property: Describes the path we should extract the data in the response. - * - * @return the eventsJsonPaths value. - */ - public List eventsJsonPaths() { - return this.eventsJsonPaths; - } - - /** - * Set the eventsJsonPaths property: Describes the path we should extract the data in the response. - * - * @param eventsJsonPaths the eventsJsonPaths value to set. - * @return the CodelessConnectorPollingResponseProperties object itself. - */ - public CodelessConnectorPollingResponseProperties withEventsJsonPaths(List eventsJsonPaths) { - this.eventsJsonPaths = eventsJsonPaths; - return this; - } - - /** - * Get the successStatusJsonPath property: Describes the path we should extract the status code in the response. - * - * @return the successStatusJsonPath value. - */ - public String successStatusJsonPath() { - return this.successStatusJsonPath; - } - - /** - * Set the successStatusJsonPath property: Describes the path we should extract the status code in the response. - * - * @param successStatusJsonPath the successStatusJsonPath value to set. - * @return the CodelessConnectorPollingResponseProperties object itself. - */ - public CodelessConnectorPollingResponseProperties withSuccessStatusJsonPath(String successStatusJsonPath) { - this.successStatusJsonPath = successStatusJsonPath; - return this; - } - - /** - * Get the successStatusValue property: Describes the path we should extract the status value in the response. - * - * @return the successStatusValue value. - */ - public String successStatusValue() { - return this.successStatusValue; - } - - /** - * Set the successStatusValue property: Describes the path we should extract the status value in the response. - * - * @param successStatusValue the successStatusValue value to set. - * @return the CodelessConnectorPollingResponseProperties object itself. - */ - public CodelessConnectorPollingResponseProperties withSuccessStatusValue(String successStatusValue) { - this.successStatusValue = successStatusValue; - return this; - } - - /** - * Get the isGzipCompressed property: Describes if the data in the response is Gzip. - * - * @return the isGzipCompressed value. - */ - public Boolean isGzipCompressed() { - return this.isGzipCompressed; - } - - /** - * Set the isGzipCompressed property: Describes if the data in the response is Gzip. - * - * @param isGzipCompressed the isGzipCompressed value to set. - * @return the CodelessConnectorPollingResponseProperties object itself. - */ - public CodelessConnectorPollingResponseProperties withIsGzipCompressed(Boolean isGzipCompressed) { - this.isGzipCompressed = isGzipCompressed; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (eventsJsonPaths() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property eventsJsonPaths in model" - + " CodelessConnectorPollingResponseProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingResponseProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java deleted file mode 100644 index bf0ae2f7d8b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java +++ /dev/null @@ -1,424 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Config to describe the instructions blade. */ -@Fluent -public final class CodelessUiConnectorConfigProperties { - /* - * Connector blade title - */ - @JsonProperty(value = "title", required = true) - private String title; - - /* - * Connector publisher name - */ - @JsonProperty(value = "publisher", required = true) - private String publisher; - - /* - * Connector description - */ - @JsonProperty(value = "descriptionMarkdown", required = true) - private String descriptionMarkdown; - - /* - * An optional custom image to be used when displaying the connector within Azure Sentinel's connector's gallery - */ - @JsonProperty(value = "customImage") - private String customImage; - - /* - * Name of the table the connector will insert the data to - */ - @JsonProperty(value = "graphQueriesTableName", required = true) - private String graphQueriesTableName; - - /* - * The graph query to show the current data status - */ - @JsonProperty(value = "graphQueries", required = true) - private List graphQueries; - - /* - * The sample queries for the connector - */ - @JsonProperty(value = "sampleQueries", required = true) - private List sampleQueries; - - /* - * Data types to check for last data received - */ - @JsonProperty(value = "dataTypes", required = true) - private List dataTypes; - - /* - * Define the way the connector check connectivity - */ - @JsonProperty(value = "connectivityCriteria", required = true) - private List connectivityCriteria; - - /* - * Connector Availability Status - */ - @JsonProperty(value = "availability", required = true) - private Availability availability; - - /* - * Permissions required for the connector - */ - @JsonProperty(value = "permissions", required = true) - private Permissions permissions; - - /* - * Instruction steps to enable the connector - */ - @JsonProperty(value = "instructionSteps", required = true) - private List instructionSteps; - - /** - * Get the title property: Connector blade title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Connector blade title. - * - * @param title the title value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the publisher property: Connector publisher name. - * - * @return the publisher value. - */ - public String publisher() { - return this.publisher; - } - - /** - * Set the publisher property: Connector publisher name. - * - * @param publisher the publisher value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the descriptionMarkdown property: Connector description. - * - * @return the descriptionMarkdown value. - */ - public String descriptionMarkdown() { - return this.descriptionMarkdown; - } - - /** - * Set the descriptionMarkdown property: Connector description. - * - * @param descriptionMarkdown the descriptionMarkdown value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withDescriptionMarkdown(String descriptionMarkdown) { - this.descriptionMarkdown = descriptionMarkdown; - return this; - } - - /** - * Get the customImage property: An optional custom image to be used when displaying the connector within Azure - * Sentinel's connector's gallery. - * - * @return the customImage value. - */ - public String customImage() { - return this.customImage; - } - - /** - * Set the customImage property: An optional custom image to be used when displaying the connector within Azure - * Sentinel's connector's gallery. - * - * @param customImage the customImage value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withCustomImage(String customImage) { - this.customImage = customImage; - return this; - } - - /** - * Get the graphQueriesTableName property: Name of the table the connector will insert the data to. - * - * @return the graphQueriesTableName value. - */ - public String graphQueriesTableName() { - return this.graphQueriesTableName; - } - - /** - * Set the graphQueriesTableName property: Name of the table the connector will insert the data to. - * - * @param graphQueriesTableName the graphQueriesTableName value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withGraphQueriesTableName(String graphQueriesTableName) { - this.graphQueriesTableName = graphQueriesTableName; - return this; - } - - /** - * Get the graphQueries property: The graph query to show the current data status. - * - * @return the graphQueries value. - */ - public List graphQueries() { - return this.graphQueries; - } - - /** - * Set the graphQueries property: The graph query to show the current data status. - * - * @param graphQueries the graphQueries value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withGraphQueries( - List graphQueries) { - this.graphQueries = graphQueries; - return this; - } - - /** - * Get the sampleQueries property: The sample queries for the connector. - * - * @return the sampleQueries value. - */ - public List sampleQueries() { - return this.sampleQueries; - } - - /** - * Set the sampleQueries property: The sample queries for the connector. - * - * @param sampleQueries the sampleQueries value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withSampleQueries( - List sampleQueries) { - this.sampleQueries = sampleQueries; - return this; - } - - /** - * Get the dataTypes property: Data types to check for last data received. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: Data types to check for last data received. - * - * @param dataTypes the dataTypes value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withDataTypes( - List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Get the connectivityCriteria property: Define the way the connector check connectivity. - * - * @return the connectivityCriteria value. - */ - public List connectivityCriteria() { - return this.connectivityCriteria; - } - - /** - * Set the connectivityCriteria property: Define the way the connector check connectivity. - * - * @param connectivityCriteria the connectivityCriteria value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withConnectivityCriteria( - List connectivityCriteria) { - this.connectivityCriteria = connectivityCriteria; - return this; - } - - /** - * Get the availability property: Connector Availability Status. - * - * @return the availability value. - */ - public Availability availability() { - return this.availability; - } - - /** - * Set the availability property: Connector Availability Status. - * - * @param availability the availability value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withAvailability(Availability availability) { - this.availability = availability; - return this; - } - - /** - * Get the permissions property: Permissions required for the connector. - * - * @return the permissions value. - */ - public Permissions permissions() { - return this.permissions; - } - - /** - * Set the permissions property: Permissions required for the connector. - * - * @param permissions the permissions value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withPermissions(Permissions permissions) { - this.permissions = permissions; - return this; - } - - /** - * Get the instructionSteps property: Instruction steps to enable the connector. - * - * @return the instructionSteps value. - */ - public List instructionSteps() { - return this.instructionSteps; - } - - /** - * Set the instructionSteps property: Instruction steps to enable the connector. - * - * @param instructionSteps the instructionSteps value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withInstructionSteps( - List instructionSteps) { - this.instructionSteps = instructionSteps; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (title() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property title in model CodelessUiConnectorConfigProperties")); - } - if (publisher() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property publisher in model CodelessUiConnectorConfigProperties")); - } - if (descriptionMarkdown() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property descriptionMarkdown in model CodelessUiConnectorConfigProperties")); - } - if (graphQueriesTableName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property graphQueriesTableName in model" - + " CodelessUiConnectorConfigProperties")); - } - if (graphQueries() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property graphQueries in model CodelessUiConnectorConfigProperties")); - } else { - graphQueries().forEach(e -> e.validate()); - } - if (sampleQueries() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sampleQueries in model CodelessUiConnectorConfigProperties")); - } else { - sampleQueries().forEach(e -> e.validate()); - } - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model CodelessUiConnectorConfigProperties")); - } else { - dataTypes().forEach(e -> e.validate()); - } - if (connectivityCriteria() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property connectivityCriteria in model CodelessUiConnectorConfigProperties")); - } else { - connectivityCriteria().forEach(e -> e.validate()); - } - if (availability() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property availability in model CodelessUiConnectorConfigProperties")); - } else { - availability().validate(); - } - if (permissions() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property permissions in model CodelessUiConnectorConfigProperties")); - } else { - permissions().validate(); - } - if (instructionSteps() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property instructionSteps in model CodelessUiConnectorConfigProperties")); - } else { - instructionSteps().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessUiConnectorConfigProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java deleted file mode 100644 index c57fe3ddde43..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java +++ /dev/null @@ -1,36 +0,0 @@ -// 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.annotation.Fluent; -import java.util.List; - -/** The CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem extends ConnectivityCriteria { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem withType(ConnectivityType type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem withValue(List value) { - super.withValue(value); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java deleted file mode 100644 index 1f9a8f78eb43..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.annotation.Fluent; - -/** The CodelessUiConnectorConfigPropertiesDataTypesItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesDataTypesItem extends LastDataReceivedDataType { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesDataTypesItem withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesDataTypesItem withLastDataReceivedQuery(String lastDataReceivedQuery) { - super.withLastDataReceivedQuery(lastDataReceivedQuery); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java deleted file mode 100644 index 80ff447db0ad..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java +++ /dev/null @@ -1,42 +0,0 @@ -// 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.annotation.Fluent; - -/** The CodelessUiConnectorConfigPropertiesGraphQueriesItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesGraphQueriesItem extends GraphQueries { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesGraphQueriesItem withMetricName(String metricName) { - super.withMetricName(metricName); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesGraphQueriesItem withLegend(String legend) { - super.withLegend(legend); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesGraphQueriesItem withBaseQuery(String baseQuery) { - super.withBaseQuery(baseQuery); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java deleted file mode 100644 index 187727984833..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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.annotation.Fluent; -import java.util.List; - -/** The CodelessUiConnectorConfigPropertiesInstructionStepsItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesInstructionStepsItem extends InstructionSteps { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesInstructionStepsItem withTitle(String title) { - super.withTitle(title); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesInstructionStepsItem withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesInstructionStepsItem withInstructions( - List instructions) { - super.withInstructions(instructions); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java deleted file mode 100644 index 288bd8d550f8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.annotation.Fluent; - -/** The CodelessUiConnectorConfigPropertiesSampleQueriesItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesSampleQueriesItem extends SampleQueries { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesSampleQueriesItem withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesSampleQueriesItem withQuery(String query) { - super.withQuery(query); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java deleted file mode 100644 index 06cd156687bb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.CodelessParameters; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Codeless UI data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("GenericUI") -@Fluent -public final class CodelessUiDataConnector extends DataConnectorInner { - /* - * Codeless UI data connector properties - */ - @JsonProperty(value = "properties") - private CodelessParameters innerProperties; - - /** - * Get the innerProperties property: Codeless UI data connector properties. - * - * @return the innerProperties value. - */ - private CodelessParameters innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the connectorUiConfig property: Config to describe the instructions blade. - * - * @return the connectorUiConfig value. - */ - public CodelessUiConnectorConfigProperties connectorUiConfig() { - return this.innerProperties() == null ? null : this.innerProperties().connectorUiConfig(); - } - - /** - * Set the connectorUiConfig property: Config to describe the instructions blade. - * - * @param connectorUiConfig the connectorUiConfig value to set. - * @return the CodelessUiDataConnector object itself. - */ - public CodelessUiDataConnector withConnectorUiConfig(CodelessUiConnectorConfigProperties connectorUiConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new CodelessParameters(); - } - this.innerProperties().withConnectorUiConfig(connectorUiConfig); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java deleted file mode 100644 index 2e471ac418a2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java +++ /dev/null @@ -1,47 +0,0 @@ -// 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 ConditionType. */ -public final class ConditionType extends ExpandableStringEnum { - /** Static value Property for ConditionType. */ - public static final ConditionType PROPERTY = fromString("Property"); - - /** Static value PropertyArray for ConditionType. */ - public static final ConditionType PROPERTY_ARRAY = fromString("PropertyArray"); - - /** Static value PropertyChanged for ConditionType. */ - public static final ConditionType PROPERTY_CHANGED = fromString("PropertyChanged"); - - /** Static value PropertyArrayChanged for ConditionType. */ - public static final ConditionType PROPERTY_ARRAY_CHANGED = fromString("PropertyArrayChanged"); - - /** Static value Boolean for ConditionType. */ - public static final ConditionType BOOLEAN = fromString("Boolean"); - - /** - * Creates or finds a ConditionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConditionType. - */ - @JsonCreator - public static ConditionType fromString(String name) { - return fromString(name, ConditionType.class); - } - - /** - * Gets known ConditionType values. - * - * @return known ConditionType values. - */ - public static Collection values() { - return values(ConditionType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java deleted file mode 100644 index 7e6818923a42..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The confidence level of this alert. */ -public final class ConfidenceLevel extends ExpandableStringEnum { - /** Static value Unknown for ConfidenceLevel. */ - public static final ConfidenceLevel UNKNOWN = fromString("Unknown"); - - /** Static value Low for ConfidenceLevel. */ - public static final ConfidenceLevel LOW = fromString("Low"); - - /** Static value High for ConfidenceLevel. */ - public static final ConfidenceLevel HIGH = fromString("High"); - - /** - * Creates or finds a ConfidenceLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConfidenceLevel. - */ - @JsonCreator - public static ConfidenceLevel fromString(String name) { - return fromString(name, ConfidenceLevel.class); - } - - /** - * Gets known ConfidenceLevel values. - * - * @return known ConfidenceLevel values. - */ - public static Collection values() { - return values(ConfidenceLevel.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java deleted file mode 100644 index 1f8966323364..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java +++ /dev/null @@ -1,47 +0,0 @@ -// 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; - -/** - * The confidence score calculation status, i.e. indicating if score calculation is pending for this alert, not - * applicable or final. - */ -public final class ConfidenceScoreStatus extends ExpandableStringEnum { - /** Static value NotApplicable for ConfidenceScoreStatus. */ - public static final ConfidenceScoreStatus NOT_APPLICABLE = fromString("NotApplicable"); - - /** Static value InProcess for ConfidenceScoreStatus. */ - public static final ConfidenceScoreStatus IN_PROCESS = fromString("InProcess"); - - /** Static value NotFinal for ConfidenceScoreStatus. */ - public static final ConfidenceScoreStatus NOT_FINAL = fromString("NotFinal"); - - /** Static value Final for ConfidenceScoreStatus. */ - public static final ConfidenceScoreStatus FINAL = fromString("Final"); - - /** - * Creates or finds a ConfidenceScoreStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConfidenceScoreStatus. - */ - @JsonCreator - public static ConfidenceScoreStatus fromString(String name) { - return fromString(name, ConfidenceScoreStatus.class); - } - - /** - * Gets known ConfidenceScoreStatus values. - * - * @return known ConfidenceScoreStatus values. - */ - public static Collection values() { - return values(ConfidenceScoreStatus.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectAuthKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectAuthKind.java deleted file mode 100644 index 689962ec3325..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectAuthKind.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The authentication kind used to poll the data. */ -public final class ConnectAuthKind extends ExpandableStringEnum { - /** Static value Basic for ConnectAuthKind. */ - public static final ConnectAuthKind BASIC = fromString("Basic"); - - /** Static value OAuth2 for ConnectAuthKind. */ - public static final ConnectAuthKind OAUTH2 = fromString("OAuth2"); - - /** Static value APIKey for ConnectAuthKind. */ - public static final ConnectAuthKind APIKEY = fromString("APIKey"); - - /** - * Creates or finds a ConnectAuthKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectAuthKind. - */ - @JsonCreator - public static ConnectAuthKind fromString(String name) { - return fromString(name, ConnectAuthKind.class); - } - - /** - * Gets known ConnectAuthKind values. - * - * @return known ConnectAuthKind values. - */ - public static Collection values() { - return values(ConnectAuthKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java deleted file mode 100644 index 655facb3559a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Expansion result connected entities. */ -@Fluent -public final class ConnectedEntity { - /* - * Entity Id of the connected entity - */ - @JsonProperty(value = "targetEntityId") - private String targetEntityId; - - /* - * key-value pairs for a connected entity mapping - */ - @JsonProperty(value = "additionalData") - private Object additionalData; - - /** - * Get the targetEntityId property: Entity Id of the connected entity. - * - * @return the targetEntityId value. - */ - public String targetEntityId() { - return this.targetEntityId; - } - - /** - * Set the targetEntityId property: Entity Id of the connected entity. - * - * @param targetEntityId the targetEntityId value to set. - * @return the ConnectedEntity object itself. - */ - public ConnectedEntity withTargetEntityId(String targetEntityId) { - this.targetEntityId = targetEntityId; - return this; - } - - /** - * Get the additionalData property: key-value pairs for a connected entity mapping. - * - * @return the additionalData value. - */ - public Object additionalData() { - return this.additionalData; - } - - /** - * Set the additionalData property: key-value pairs for a connected entity mapping. - * - * @param additionalData the additionalData value to set. - * @return the ConnectedEntity object itself. - */ - public ConnectedEntity withAdditionalData(Object additionalData) { - this.additionalData = additionalData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java deleted file mode 100644 index da5f0724d422..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Setting for the connector check connectivity. */ -@Fluent -public class ConnectivityCriteria { - /* - * type of connectivity - */ - @JsonProperty(value = "type") - private ConnectivityType type; - - /* - * Queries for checking connectivity - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the type property: type of connectivity. - * - * @return the type value. - */ - public ConnectivityType type() { - return this.type; - } - - /** - * Set the type property: type of connectivity. - * - * @param type the type value to set. - * @return the ConnectivityCriteria object itself. - */ - public ConnectivityCriteria withType(ConnectivityType type) { - this.type = type; - return this; - } - - /** - * Get the value property: Queries for checking connectivity. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Queries for checking connectivity. - * - * @param value the value value to set. - * @return the ConnectivityCriteria object itself. - */ - public ConnectivityCriteria withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java deleted file mode 100644 index d3298e56cbd9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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; - -/** type of connectivity. */ -public final class ConnectivityType extends ExpandableStringEnum { - /** Static value IsConnectedQuery for ConnectivityType. */ - public static final ConnectivityType IS_CONNECTED_QUERY = fromString("IsConnectedQuery"); - - /** - * Creates or finds a ConnectivityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectivityType. - */ - @JsonCreator - public static ConnectivityType fromString(String name) { - return fromString(name, ConnectivityType.class); - } - - /** - * Gets known ConnectivityType values. - * - * @return known ConnectivityType values. - */ - public static Collection values() { - return values(ConnectivityType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java deleted file mode 100644 index c710b1b251e2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Instruction step details. */ -@Fluent -public class ConnectorInstructionModelBase { - /* - * The parameters for the setting - */ - @JsonProperty(value = "parameters") - private Object parameters; - - /* - * The kind of the setting - */ - @JsonProperty(value = "type", required = true) - private SettingType type; - - /** - * Get the parameters property: The parameters for the setting. - * - * @return the parameters value. - */ - public Object parameters() { - return this.parameters; - } - - /** - * Set the parameters property: The parameters for the setting. - * - * @param parameters the parameters value to set. - * @return the ConnectorInstructionModelBase object itself. - */ - public ConnectorInstructionModelBase withParameters(Object parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the type property: The kind of the setting. - * - * @return the type value. - */ - public SettingType type() { - return this.type; - } - - /** - * Set the type property: The kind of the setting. - * - * @param type the type value to set. - * @return the ConnectorInstructionModelBase object itself. - */ - public ConnectorInstructionModelBase withType(SettingType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property type in model ConnectorInstructionModelBase")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConnectorInstructionModelBase.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant88.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant88.java deleted file mode 100644 index 32293661fa1d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant88.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for Constant88. */ -public enum Constant88 { - /** Enum value Activity. */ - ACTIVITY("Activity"); - - /** The actual serialized value for a Constant88 instance. */ - private final String value; - - Constant88(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Constant88 instance. - * - * @param value the serialized value to parse. - * @return the parsed Constant88 object, or null if unable to parse. - */ - @JsonCreator - public static Constant88 fromString(String value) { - if (value == null) { - return null; - } - Constant88[] items = Constant88.values(); - for (Constant88 item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java deleted file mode 100644 index 55e4aa0cd259..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The mapping of content type to a repo path. */ -@Fluent -public final class ContentPathMap { - /* - * Content type. - */ - @JsonProperty(value = "contentType") - private ContentType contentType; - - /* - * The path to the content. - */ - @JsonProperty(value = "path") - private String path; - - /** - * Get the contentType property: Content type. - * - * @return the contentType value. - */ - public ContentType contentType() { - return this.contentType; - } - - /** - * Set the contentType property: Content type. - * - * @param contentType the contentType value to set. - * @return the ContentPathMap object itself. - */ - public ContentPathMap withContentType(ContentType contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the path property: The path to the content. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path to the content. - * - * @param path the path value to set. - * @return the ContentPathMap object itself. - */ - public ContentPathMap withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java deleted file mode 100644 index d9976250f875..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The content type of a source control path. */ -public final class ContentType extends ExpandableStringEnum { - /** Static value AnalyticRule for ContentType. */ - public static final ContentType ANALYTIC_RULE = fromString("AnalyticRule"); - - /** Static value Workbook for ContentType. */ - public static final ContentType WORKBOOK = fromString("Workbook"); - - /** - * Creates or finds a ContentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContentType. - */ - @JsonCreator - public static ContentType fromString(String name) { - return fromString(name, ContentType.class); - } - - /** - * Gets known ContentType values. - * - * @return known ContentType values. - */ - public static Collection values() { - return values(ContentType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java deleted file mode 100644 index 76169a7542b0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Specific entity query that supports put requests. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = CustomEntityQuery.class) -@JsonTypeName("CustomEntityQuery") -@JsonSubTypes({@JsonSubTypes.Type(name = "Activity", value = ActivityCustomEntityQuery.class)}) -@Fluent -public class CustomEntityQuery extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public CustomEntityQuery withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java deleted file mode 100644 index b0e8395c6c5f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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; - -/** The kind of the entity query that supports put request. */ -public final class CustomEntityQueryKind extends ExpandableStringEnum { - /** Static value Activity for CustomEntityQueryKind. */ - public static final CustomEntityQueryKind ACTIVITY = fromString("Activity"); - - /** - * Creates or finds a CustomEntityQueryKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding CustomEntityQueryKind. - */ - @JsonCreator - public static CustomEntityQueryKind fromString(String name) { - return fromString(name, CustomEntityQueryKind.class); - } - - /** - * Gets known CustomEntityQueryKind values. - * - * @return known CustomEntityQueryKind values. - */ - public static Collection values() { - return values(CustomEntityQueryKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java deleted file mode 100644 index 9507f46b98de..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.annotation.Fluent; - -/** Customs permissions required for the connector. */ -@Fluent -public class Customs extends CustomsPermission { - /** {@inheritDoc} */ - @Override - public Customs withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public Customs withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java deleted file mode 100644 index a7ade225346b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Customs permissions required for the connector. */ -@Fluent -public class CustomsPermission { - /* - * Customs permissions name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Customs permissions description - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the name property: Customs permissions name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Customs permissions name. - * - * @param name the name value to set. - * @return the CustomsPermission object itself. - */ - public CustomsPermission withName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Customs permissions description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Customs permissions description. - * - * @param description the description value to set. - * @return the CustomsPermission object itself. - */ - public CustomsPermission withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnector.java deleted file mode 100644 index 2a1b02e65c82..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnector.java +++ /dev/null @@ -1,53 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; - -/** An immutable client-side representation of DataConnector. */ -public interface DataConnector { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner object. - * - * @return the inner object. - */ - DataConnectorInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorAuthorizationState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorAuthorizationState.java deleted file mode 100644 index 52380b5cedc2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorAuthorizationState.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** Describes the state of user's authorization for a connector kind. */ -public final class DataConnectorAuthorizationState extends ExpandableStringEnum { - /** Static value Valid for DataConnectorAuthorizationState. */ - public static final DataConnectorAuthorizationState VALID = fromString("Valid"); - - /** Static value Invalid for DataConnectorAuthorizationState. */ - public static final DataConnectorAuthorizationState INVALID = fromString("Invalid"); - - /** - * Creates or finds a DataConnectorAuthorizationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataConnectorAuthorizationState. - */ - @JsonCreator - public static DataConnectorAuthorizationState fromString(String name) { - return fromString(name, DataConnectorAuthorizationState.class); - } - - /** - * Gets known DataConnectorAuthorizationState values. - * - * @return known DataConnectorAuthorizationState values. - */ - public static Collection values() { - return values(DataConnectorAuthorizationState.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java deleted file mode 100644 index 331014e42fa0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java +++ /dev/null @@ -1,315 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents Codeless API Polling data connector. */ -@Fluent -public final class DataConnectorConnectBody { - /* - * The authentication kind used to poll the data - */ - @JsonProperty(value = "kind") - private ConnectAuthKind kind; - - /* - * The API key of the audit server. - */ - @JsonProperty(value = "apiKey") - private String apiKey; - - /* - * Used in v2 logs connector. Represents the data collection ingestion endpoint in log analytics. - */ - @JsonProperty(value = "dataCollectionEndpoint") - private String dataCollectionEndpoint; - - /* - * Used in v2 logs connector. The data collection rule immutable id, the rule defines the transformation and data - * destination. - */ - @JsonProperty(value = "dataCollectionRuleImmutableId") - private String dataCollectionRuleImmutableId; - - /* - * Used in v2 logs connector. The stream we are sending the data to, this is the name of the streamDeclarations - * defined in the DCR. - */ - @JsonProperty(value = "outputStream") - private String outputStream; - - /* - * The client secret of the OAuth 2.0 application. - */ - @JsonProperty(value = "clientSecret") - private String clientSecret; - - /* - * The client id of the OAuth 2.0 application. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /* - * The authorization code used in OAuth 2.0 code flow to issue a token. - */ - @JsonProperty(value = "authorizationCode") - private String authorizationCode; - - /* - * The user name in the audit log server. - */ - @JsonProperty(value = "userName") - private String username; - - /* - * The user password in the audit log server. - */ - @JsonProperty(value = "password") - private String password; - - /* - * The requestConfigUserInputValues property. - */ - @JsonProperty(value = "requestConfigUserInputValues") - private List requestConfigUserInputValues; - - /** - * Get the kind property: The authentication kind used to poll the data. - * - * @return the kind value. - */ - public ConnectAuthKind kind() { - return this.kind; - } - - /** - * Set the kind property: The authentication kind used to poll the data. - * - * @param kind the kind value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withKind(ConnectAuthKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the apiKey property: The API key of the audit server. - * - * @return the apiKey value. - */ - public String apiKey() { - return this.apiKey; - } - - /** - * Set the apiKey property: The API key of the audit server. - * - * @param apiKey the apiKey value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withApiKey(String apiKey) { - this.apiKey = apiKey; - return this; - } - - /** - * Get the dataCollectionEndpoint property: Used in v2 logs connector. Represents the data collection ingestion - * endpoint in log analytics. - * - * @return the dataCollectionEndpoint value. - */ - public String dataCollectionEndpoint() { - return this.dataCollectionEndpoint; - } - - /** - * Set the dataCollectionEndpoint property: Used in v2 logs connector. Represents the data collection ingestion - * endpoint in log analytics. - * - * @param dataCollectionEndpoint the dataCollectionEndpoint value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withDataCollectionEndpoint(String dataCollectionEndpoint) { - this.dataCollectionEndpoint = dataCollectionEndpoint; - return this; - } - - /** - * Get the dataCollectionRuleImmutableId property: Used in v2 logs connector. The data collection rule immutable id, - * the rule defines the transformation and data destination. - * - * @return the dataCollectionRuleImmutableId value. - */ - public String dataCollectionRuleImmutableId() { - return this.dataCollectionRuleImmutableId; - } - - /** - * Set the dataCollectionRuleImmutableId property: Used in v2 logs connector. The data collection rule immutable id, - * the rule defines the transformation and data destination. - * - * @param dataCollectionRuleImmutableId the dataCollectionRuleImmutableId value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withDataCollectionRuleImmutableId(String dataCollectionRuleImmutableId) { - this.dataCollectionRuleImmutableId = dataCollectionRuleImmutableId; - return this; - } - - /** - * Get the outputStream property: Used in v2 logs connector. The stream we are sending the data to, this is the name - * of the streamDeclarations defined in the DCR. - * - * @return the outputStream value. - */ - public String outputStream() { - return this.outputStream; - } - - /** - * Set the outputStream property: Used in v2 logs connector. The stream we are sending the data to, this is the name - * of the streamDeclarations defined in the DCR. - * - * @param outputStream the outputStream value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withOutputStream(String outputStream) { - this.outputStream = outputStream; - return this; - } - - /** - * Get the clientSecret property: The client secret of the OAuth 2.0 application. - * - * @return the clientSecret value. - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret property: The client secret of the OAuth 2.0 application. - * - * @param clientSecret the clientSecret value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the clientId property: The client id of the OAuth 2.0 application. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The client id of the OAuth 2.0 application. - * - * @param clientId the clientId value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the authorizationCode property: The authorization code used in OAuth 2.0 code flow to issue a token. - * - * @return the authorizationCode value. - */ - public String authorizationCode() { - return this.authorizationCode; - } - - /** - * Set the authorizationCode property: The authorization code used in OAuth 2.0 code flow to issue a token. - * - * @param authorizationCode the authorizationCode value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withAuthorizationCode(String authorizationCode) { - this.authorizationCode = authorizationCode; - return this; - } - - /** - * Get the username property: The user name in the audit log server. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The user name in the audit log server. - * - * @param username the username value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The user password in the audit log server. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The user password in the audit log server. - * - * @param password the password value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the requestConfigUserInputValues property: The requestConfigUserInputValues property. - * - * @return the requestConfigUserInputValues value. - */ - public List requestConfigUserInputValues() { - return this.requestConfigUserInputValues; - } - - /** - * Set the requestConfigUserInputValues property: The requestConfigUserInputValues property. - * - * @param requestConfigUserInputValues the requestConfigUserInputValues value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withRequestConfigUserInputValues(List requestConfigUserInputValues) { - this.requestConfigUserInputValues = requestConfigUserInputValues; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java deleted file mode 100644 index 936cd58c9114..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Common field for data type in data connectors. */ -@Fluent -public class DataConnectorDataTypeCommon { - /* - * Describe whether this data type connection is enabled or not. - */ - @JsonProperty(value = "state", required = true) - private DataTypeState state; - - /** - * Get the state property: Describe whether this data type connection is enabled or not. - * - * @return the state value. - */ - public DataTypeState state() { - return this.state; - } - - /** - * Set the state property: Describe whether this data type connection is enabled or not. - * - * @param state the state value to set. - * @return the DataConnectorDataTypeCommon object itself. - */ - public DataConnectorDataTypeCommon withState(DataTypeState state) { - this.state = state; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model DataConnectorDataTypeCommon")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataConnectorDataTypeCommon.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java deleted file mode 100644 index b140a12dfff7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java +++ /dev/null @@ -1,94 +0,0 @@ -// 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; - -/** The kind of the data connector. */ -public final class DataConnectorKind extends ExpandableStringEnum { - /** Static value AzureActiveDirectory for DataConnectorKind. */ - public static final DataConnectorKind AZURE_ACTIVE_DIRECTORY = fromString("AzureActiveDirectory"); - - /** Static value AzureSecurityCenter for DataConnectorKind. */ - public static final DataConnectorKind AZURE_SECURITY_CENTER = fromString("AzureSecurityCenter"); - - /** Static value MicrosoftCloudAppSecurity for DataConnectorKind. */ - public static final DataConnectorKind MICROSOFT_CLOUD_APP_SECURITY = fromString("MicrosoftCloudAppSecurity"); - - /** Static value ThreatIntelligence for DataConnectorKind. */ - public static final DataConnectorKind THREAT_INTELLIGENCE = fromString("ThreatIntelligence"); - - /** Static value ThreatIntelligenceTaxii for DataConnectorKind. */ - public static final DataConnectorKind THREAT_INTELLIGENCE_TAXII = fromString("ThreatIntelligenceTaxii"); - - /** Static value Office365 for DataConnectorKind. */ - public static final DataConnectorKind OFFICE365 = fromString("Office365"); - - /** Static value OfficeATP for DataConnectorKind. */ - public static final DataConnectorKind OFFICE_ATP = fromString("OfficeATP"); - - /** Static value OfficeIRM for DataConnectorKind. */ - public static final DataConnectorKind OFFICE_IRM = fromString("OfficeIRM"); - - /** Static value Office365Project for DataConnectorKind. */ - public static final DataConnectorKind OFFICE365PROJECT = fromString("Office365Project"); - - /** Static value OfficePowerBI for DataConnectorKind. */ - public static final DataConnectorKind OFFICE_POWER_BI = fromString("OfficePowerBI"); - - /** Static value AmazonWebServicesCloudTrail for DataConnectorKind. */ - public static final DataConnectorKind AMAZON_WEB_SERVICES_CLOUD_TRAIL = fromString("AmazonWebServicesCloudTrail"); - - /** Static value AmazonWebServicesS3 for DataConnectorKind. */ - public static final DataConnectorKind AMAZON_WEB_SERVICES_S3 = fromString("AmazonWebServicesS3"); - - /** Static value AzureAdvancedThreatProtection for DataConnectorKind. */ - public static final DataConnectorKind AZURE_ADVANCED_THREAT_PROTECTION = - fromString("AzureAdvancedThreatProtection"); - - /** Static value MicrosoftDefenderAdvancedThreatProtection for DataConnectorKind. */ - public static final DataConnectorKind MICROSOFT_DEFENDER_ADVANCED_THREAT_PROTECTION = - fromString("MicrosoftDefenderAdvancedThreatProtection"); - - /** Static value Dynamics365 for DataConnectorKind. */ - public static final DataConnectorKind DYNAMICS365 = fromString("Dynamics365"); - - /** Static value MicrosoftThreatProtection for DataConnectorKind. */ - public static final DataConnectorKind MICROSOFT_THREAT_PROTECTION = fromString("MicrosoftThreatProtection"); - - /** Static value MicrosoftThreatIntelligence for DataConnectorKind. */ - public static final DataConnectorKind MICROSOFT_THREAT_INTELLIGENCE = fromString("MicrosoftThreatIntelligence"); - - /** Static value GenericUI for DataConnectorKind. */ - public static final DataConnectorKind GENERIC_UI = fromString("GenericUI"); - - /** Static value APIPolling for DataConnectorKind. */ - public static final DataConnectorKind APIPOLLING = fromString("APIPolling"); - - /** Static value IOT for DataConnectorKind. */ - public static final DataConnectorKind IOT = fromString("IOT"); - - /** - * Creates or finds a DataConnectorKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataConnectorKind. - */ - @JsonCreator - public static DataConnectorKind fromString(String name) { - return fromString(name, DataConnectorKind.class); - } - - /** - * Gets known DataConnectorKind values. - * - * @return known DataConnectorKind values. - */ - public static Collection values() { - return values(DataConnectorKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorLicenseState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorLicenseState.java deleted file mode 100644 index 2d507206aaab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorLicenseState.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** Describes the state of user's license for a connector kind. */ -public final class DataConnectorLicenseState extends ExpandableStringEnum { - /** Static value Valid for DataConnectorLicenseState. */ - public static final DataConnectorLicenseState VALID = fromString("Valid"); - - /** Static value Invalid for DataConnectorLicenseState. */ - public static final DataConnectorLicenseState INVALID = fromString("Invalid"); - - /** Static value Unknown for DataConnectorLicenseState. */ - public static final DataConnectorLicenseState UNKNOWN = fromString("Unknown"); - - /** - * Creates or finds a DataConnectorLicenseState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataConnectorLicenseState. - */ - @JsonCreator - public static DataConnectorLicenseState fromString(String name) { - return fromString(name, DataConnectorLicenseState.class); - } - - /** - * Gets known DataConnectorLicenseState values. - * - * @return known DataConnectorLicenseState values. - */ - public static Collection values() { - return values(DataConnectorLicenseState.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorList.java deleted file mode 100644 index 623d64d420bd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the data connectors. */ -@Fluent -public final class DataConnectorList { - /* - * URL to fetch the next set of data connectors. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of data connectors. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of data connectors. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of data connectors. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of data connectors. - * - * @param value the value value to set. - * @return the DataConnectorList object itself. - */ - public DataConnectorList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DataConnectorList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataConnectorList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorRequirementsState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorRequirementsState.java deleted file mode 100644 index 96aa7a63791f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorRequirementsState.java +++ /dev/null @@ -1,32 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; - -/** An immutable client-side representation of DataConnectorRequirementsState. */ -public interface DataConnectorRequirementsState { - /** - * Gets the authorizationState property: Authorization state for this connector. - * - * @return the authorizationState value. - */ - DataConnectorAuthorizationState authorizationState(); - - /** - * Gets the licenseState property: License state for this connector. - * - * @return the licenseState value. - */ - DataConnectorLicenseState licenseState(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner - * object. - * - * @return the inner object. - */ - DataConnectorRequirementsStateInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java deleted file mode 100644 index 36d4914ce98b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties data connector on tenant level. */ -@Fluent -public class DataConnectorTenantId { - /* - * The tenant id to connect to, and get the data from. - */ - @JsonProperty(value = "tenantId", required = true) - private String tenantId; - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the DataConnectorTenantId object itself. - */ - public DataConnectorTenantId withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tenantId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tenantId in model DataConnectorTenantId")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataConnectorTenantId.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java deleted file mode 100644 index e0bbbf5d0334..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java +++ /dev/null @@ -1,49 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Data connector properties. */ -@Fluent -public class DataConnectorWithAlertsProperties { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes") - private AlertsDataTypeOfDataConnector dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the DataConnectorWithAlertsProperties object itself. - */ - public DataConnectorWithAlertsProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataTypes() != null) { - dataTypes().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java deleted file mode 100644 index f80628152117..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java +++ /dev/null @@ -1,189 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; - -/** Resource collection API of DataConnectors. */ -public interface DataConnectors { - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all data connectors as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all data connectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all data connectors as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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 data connector. - */ - DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId); - - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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 data connector along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context); - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @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 connector. - */ - DataConnector createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); - - /** - * Creates or updates the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. - * @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 connector along with {@link Response}. - */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorInner dataConnector, - Context context); - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String dataConnectorId); - - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context); - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @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. - */ - void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @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 the {@link Response}. - */ - Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context); - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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. - */ - void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @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 the {@link Response}. - */ - Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java deleted file mode 100644 index 57317f6ffc3c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java +++ /dev/null @@ -1,47 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Data connector requirements properties. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = DataConnectorsCheckRequirements.class) -@JsonTypeName("DataConnectorsCheckRequirements") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AzureActiveDirectory", value = AadCheckRequirements.class), - @JsonSubTypes.Type(name = "AzureAdvancedThreatProtection", value = AatpCheckRequirements.class), - @JsonSubTypes.Type(name = "AzureSecurityCenter", value = AscCheckRequirements.class), - @JsonSubTypes.Type(name = "AmazonWebServicesCloudTrail", value = AwsCloudTrailCheckRequirements.class), - @JsonSubTypes.Type(name = "AmazonWebServicesS3", value = AwsS3CheckRequirements.class), - @JsonSubTypes.Type(name = "Dynamics365", value = Dynamics365CheckRequirements.class), - @JsonSubTypes.Type(name = "MicrosoftCloudAppSecurity", value = McasCheckRequirements.class), - @JsonSubTypes.Type(name = "MicrosoftDefenderAdvancedThreatProtection", value = MdatpCheckRequirements.class), - @JsonSubTypes.Type(name = "MicrosoftThreatIntelligence", value = MstiCheckRequirements.class), - @JsonSubTypes.Type(name = "MicrosoftThreatProtection", value = MtpCheckRequirements.class), - @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpCheckRequirements.class), - @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmCheckRequirements.class), - @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectCheckRequirements.class), - @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBICheckRequirements.class), - @JsonSubTypes.Type(name = "ThreatIntelligence", value = TICheckRequirements.class), - @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiCheckRequirements.class), - @JsonSubTypes.Type(name = "IOT", value = IoTCheckRequirements.class) -}) -@Immutable -public class DataConnectorsCheckRequirements { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java deleted file mode 100644 index 6524d59b3515..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of DataConnectorsCheckRequirementsOperations. */ -public interface DataConnectorsCheckRequirementsOperations { - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @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 requirements state for a data connector type. - */ - DataConnectorRequirementsState post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements); - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @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 requirements state for a data connector type along with {@link Response}. - */ - Response postWithResponse( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java deleted file mode 100644 index 419ceca40540..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The data type definition. */ -@Fluent -public final class DataTypeDefinitions { - /* - * The data type name - */ - @JsonProperty(value = "dataType") - private String dataType; - - /** - * Get the dataType property: The data type name. - * - * @return the dataType value. - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType property: The data type name. - * - * @param dataType the dataType value to set. - * @return the DataTypeDefinitions object itself. - */ - public DataTypeDefinitions withDataType(String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java deleted file mode 100644 index f0851844c733..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** Describe whether this data type connection is enabled or not. */ -public final class DataTypeState extends ExpandableStringEnum { - /** Static value Enabled for DataTypeState. */ - public static final DataTypeState ENABLED = fromString("Enabled"); - - /** Static value Disabled for DataTypeState. */ - public static final DataTypeState DISABLED = fromString("Disabled"); - - /** - * Creates or finds a DataTypeState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataTypeState. - */ - @JsonCreator - public static DataTypeState fromString(String name) { - return fromString(name, DataTypeState.class); - } - - /** - * Gets known DataTypeState values. - * - * @return known DataTypeState values. - */ - public static Collection values() { - return values(DataTypeState.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java deleted file mode 100644 index f0501a0e1fbc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** Indicates whether the file was deleted from the storage account. */ -public final class DeleteStatus extends ExpandableStringEnum { - /** Static value Deleted for DeleteStatus. */ - public static final DeleteStatus DELETED = fromString("Deleted"); - - /** Static value NotDeleted for DeleteStatus. */ - public static final DeleteStatus NOT_DELETED = fromString("NotDeleted"); - - /** Static value Unspecified for DeleteStatus. */ - public static final DeleteStatus UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a DeleteStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeleteStatus. - */ - @JsonCreator - public static DeleteStatus fromString(String name) { - return fromString(name, DeleteStatus.class); - } - - /** - * Gets known DeleteStatus values. - * - * @return known DeleteStatus values. - */ - public static Collection values() { - return values(DeleteStatus.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeliveryAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeliveryAction.java deleted file mode 100644 index 236b4cc28563..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeliveryAction.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The delivery action of this mail message like Delivered, Blocked, Replaced etc. */ -public enum DeliveryAction { - /** Enum value Unknown. */ - UNKNOWN("Unknown"), - - /** Enum value DeliveredAsSpam. */ - DELIVERED_AS_SPAM("DeliveredAsSpam"), - - /** Enum value Delivered. */ - DELIVERED("Delivered"), - - /** Enum value Blocked. */ - BLOCKED("Blocked"), - - /** Enum value Replaced. */ - REPLACED("Replaced"); - - /** The actual serialized value for a DeliveryAction instance. */ - private final String value; - - DeliveryAction(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DeliveryAction instance. - * - * @param value the serialized value to parse. - * @return the parsed DeliveryAction object, or null if unable to parse. - */ - @JsonCreator - public static DeliveryAction fromString(String value) { - if (value == null) { - return null; - } - DeliveryAction[] items = DeliveryAction.values(); - for (DeliveryAction item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeliveryLocation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeliveryLocation.java deleted file mode 100644 index cc29c09ff4c3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeliveryLocation.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The delivery location of this mail message like Inbox, JunkFolder etc. */ -public enum DeliveryLocation { - /** Enum value Unknown. */ - UNKNOWN("Unknown"), - - /** Enum value Inbox. */ - INBOX("Inbox"), - - /** Enum value JunkFolder. */ - JUNK_FOLDER("JunkFolder"), - - /** Enum value DeletedFolder. */ - DELETED_FOLDER("DeletedFolder"), - - /** Enum value Quarantine. */ - QUARANTINE("Quarantine"), - - /** Enum value External. */ - EXTERNAL("External"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Dropped. */ - DROPPED("Dropped"), - - /** Enum value Forwarded. */ - FORWARDED("Forwarded"); - - /** The actual serialized value for a DeliveryLocation instance. */ - private final String value; - - DeliveryLocation(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DeliveryLocation instance. - * - * @param value the serialized value to parse. - * @return the parsed DeliveryLocation object, or null if unable to parse. - */ - @JsonCreator - public static DeliveryLocation fromString(String value) { - if (value == null) { - return null; - } - DeliveryLocation[] items = DeliveryLocation.values(); - for (DeliveryLocation item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java deleted file mode 100644 index f500a22a553e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java +++ /dev/null @@ -1,151 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Description about a deployment. */ -@Fluent -public final class Deployment { - /* - * Deployment identifier. - */ - @JsonProperty(value = "deploymentId") - private String deploymentId; - - /* - * Current status of the deployment. - */ - @JsonProperty(value = "deploymentState") - private DeploymentState deploymentState; - - /* - * The outcome of the deployment. - */ - @JsonProperty(value = "deploymentResult") - private DeploymentResult deploymentResult; - - /* - * The time when the deployment finished. - */ - @JsonProperty(value = "deploymentTime") - private OffsetDateTime deploymentTime; - - /* - * Url to access repository action logs. - */ - @JsonProperty(value = "deploymentLogsUrl") - private String deploymentLogsUrl; - - /** - * Get the deploymentId property: Deployment identifier. - * - * @return the deploymentId value. - */ - public String deploymentId() { - return this.deploymentId; - } - - /** - * Set the deploymentId property: Deployment identifier. - * - * @param deploymentId the deploymentId value to set. - * @return the Deployment object itself. - */ - public Deployment withDeploymentId(String deploymentId) { - this.deploymentId = deploymentId; - return this; - } - - /** - * Get the deploymentState property: Current status of the deployment. - * - * @return the deploymentState value. - */ - public DeploymentState deploymentState() { - return this.deploymentState; - } - - /** - * Set the deploymentState property: Current status of the deployment. - * - * @param deploymentState the deploymentState value to set. - * @return the Deployment object itself. - */ - public Deployment withDeploymentState(DeploymentState deploymentState) { - this.deploymentState = deploymentState; - return this; - } - - /** - * Get the deploymentResult property: The outcome of the deployment. - * - * @return the deploymentResult value. - */ - public DeploymentResult deploymentResult() { - return this.deploymentResult; - } - - /** - * Set the deploymentResult property: The outcome of the deployment. - * - * @param deploymentResult the deploymentResult value to set. - * @return the Deployment object itself. - */ - public Deployment withDeploymentResult(DeploymentResult deploymentResult) { - this.deploymentResult = deploymentResult; - return this; - } - - /** - * Get the deploymentTime property: The time when the deployment finished. - * - * @return the deploymentTime value. - */ - public OffsetDateTime deploymentTime() { - return this.deploymentTime; - } - - /** - * Set the deploymentTime property: The time when the deployment finished. - * - * @param deploymentTime the deploymentTime value to set. - * @return the Deployment object itself. - */ - public Deployment withDeploymentTime(OffsetDateTime deploymentTime) { - this.deploymentTime = deploymentTime; - return this; - } - - /** - * Get the deploymentLogsUrl property: Url to access repository action logs. - * - * @return the deploymentLogsUrl value. - */ - public String deploymentLogsUrl() { - return this.deploymentLogsUrl; - } - - /** - * Set the deploymentLogsUrl property: Url to access repository action logs. - * - * @param deploymentLogsUrl the deploymentLogsUrl value to set. - * @return the Deployment object itself. - */ - public Deployment withDeploymentLogsUrl(String deploymentLogsUrl) { - this.deploymentLogsUrl = deploymentLogsUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java deleted file mode 100644 index 0cfc63e3b5a8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** Status while trying to fetch the deployment information. */ -public final class DeploymentFetchStatus extends ExpandableStringEnum { - /** Static value Success for DeploymentFetchStatus. */ - public static final DeploymentFetchStatus SUCCESS = fromString("Success"); - - /** Static value Unauthorized for DeploymentFetchStatus. */ - public static final DeploymentFetchStatus UNAUTHORIZED = fromString("Unauthorized"); - - /** Static value NotFound for DeploymentFetchStatus. */ - public static final DeploymentFetchStatus NOT_FOUND = fromString("NotFound"); - - /** - * Creates or finds a DeploymentFetchStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentFetchStatus. - */ - @JsonCreator - public static DeploymentFetchStatus fromString(String name) { - return fromString(name, DeploymentFetchStatus.class); - } - - /** - * Gets known DeploymentFetchStatus values. - * - * @return known DeploymentFetchStatus values. - */ - public static Collection values() { - return values(DeploymentFetchStatus.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java deleted file mode 100644 index 6f8b486f4c2e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java +++ /dev/null @@ -1,101 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information regarding a deployment. */ -@Fluent -public final class DeploymentInfo { - /* - * Status while fetching the last deployment. - */ - @JsonProperty(value = "deploymentFetchStatus") - private DeploymentFetchStatus deploymentFetchStatus; - - /* - * Deployment information. - */ - @JsonProperty(value = "deployment") - private Deployment deployment; - - /* - * Additional details about the deployment that can be shown to the user. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the deploymentFetchStatus property: Status while fetching the last deployment. - * - * @return the deploymentFetchStatus value. - */ - public DeploymentFetchStatus deploymentFetchStatus() { - return this.deploymentFetchStatus; - } - - /** - * Set the deploymentFetchStatus property: Status while fetching the last deployment. - * - * @param deploymentFetchStatus the deploymentFetchStatus value to set. - * @return the DeploymentInfo object itself. - */ - public DeploymentInfo withDeploymentFetchStatus(DeploymentFetchStatus deploymentFetchStatus) { - this.deploymentFetchStatus = deploymentFetchStatus; - return this; - } - - /** - * Get the deployment property: Deployment information. - * - * @return the deployment value. - */ - public Deployment deployment() { - return this.deployment; - } - - /** - * Set the deployment property: Deployment information. - * - * @param deployment the deployment value to set. - * @return the DeploymentInfo object itself. - */ - public DeploymentInfo withDeployment(Deployment deployment) { - this.deployment = deployment; - return this; - } - - /** - * Get the message property: Additional details about the deployment that can be shown to the user. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Additional details about the deployment that can be shown to the user. - * - * @param message the message value to set. - * @return the DeploymentInfo object itself. - */ - public DeploymentInfo withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deployment() != null) { - deployment().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java deleted file mode 100644 index b9bc8016e8c4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** Status while trying to fetch the deployment information. */ -public final class DeploymentResult extends ExpandableStringEnum { - /** Static value Success for DeploymentResult. */ - public static final DeploymentResult SUCCESS = fromString("Success"); - - /** Static value Canceled for DeploymentResult. */ - public static final DeploymentResult CANCELED = fromString("Canceled"); - - /** Static value Failed for DeploymentResult. */ - public static final DeploymentResult FAILED = fromString("Failed"); - - /** - * Creates or finds a DeploymentResult from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentResult. - */ - @JsonCreator - public static DeploymentResult fromString(String name) { - return fromString(name, DeploymentResult.class); - } - - /** - * Gets known DeploymentResult values. - * - * @return known DeploymentResult values. - */ - public static Collection values() { - return values(DeploymentResult.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java deleted file mode 100644 index 770b490ee8bc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The current state of the deployment. */ -public final class DeploymentState extends ExpandableStringEnum { - /** Static value In_Progress for DeploymentState. */ - public static final DeploymentState IN_PROGRESS = fromString("In_Progress"); - - /** Static value Completed for DeploymentState. */ - public static final DeploymentState COMPLETED = fromString("Completed"); - - /** Static value Queued for DeploymentState. */ - public static final DeploymentState QUEUED = fromString("Queued"); - - /** Static value Canceling for DeploymentState. */ - public static final DeploymentState CANCELING = fromString("Canceling"); - - /** - * Creates or finds a DeploymentState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentState. - */ - @JsonCreator - public static DeploymentState fromString(String name) { - return fromString(name, DeploymentState.class); - } - - /** - * Gets known DeploymentState values. - * - * @return known DeploymentState values. - */ - public static Collection values() { - return values(DeploymentState.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java deleted file mode 100644 index 2a78da582b0b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** Device importance, determines if the device classified as 'crown jewel'. */ -public final class DeviceImportance extends ExpandableStringEnum { - /** Static value Unknown for DeviceImportance. */ - public static final DeviceImportance UNKNOWN = fromString("Unknown"); - - /** Static value Low for DeviceImportance. */ - public static final DeviceImportance LOW = fromString("Low"); - - /** Static value Normal for DeviceImportance. */ - public static final DeviceImportance NORMAL = fromString("Normal"); - - /** Static value High for DeviceImportance. */ - public static final DeviceImportance HIGH = fromString("High"); - - /** - * Creates or finds a DeviceImportance from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeviceImportance. - */ - @JsonCreator - public static DeviceImportance fromString(String name) { - return fromString(name, DeviceImportance.class); - } - - /** - * Gets known DeviceImportance values. - * - * @return known DeviceImportance values. - */ - public static Collection values() { - return values(DeviceImportance.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java deleted file mode 100644 index ed3969162e66..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java +++ /dev/null @@ -1,104 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DnsEntityProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** Represents a dns entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("DnsResolution") -@Fluent -public final class DnsEntity extends EntityInner { - /* - * Dns entity properties - */ - @JsonProperty(value = "properties") - private DnsEntityProperties innerProperties; - - /** - * Get the innerProperties property: Dns entity properties. - * - * @return the innerProperties value. - */ - private DnsEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the dnsServerIpEntityId property: An ip entity id for the dns server resolving the request. - * - * @return the dnsServerIpEntityId value. - */ - public String dnsServerIpEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().dnsServerIpEntityId(); - } - - /** - * Get the domainName property: The name of the dns record associated with the alert. - * - * @return the domainName value. - */ - public String domainName() { - return this.innerProperties() == null ? null : this.innerProperties().domainName(); - } - - /** - * Get the hostIpAddressEntityId property: An ip entity id for the dns request client. - * - * @return the hostIpAddressEntityId value. - */ - public String hostIpAddressEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().hostIpAddressEntityId(); - } - - /** - * Get the ipAddressEntityIds property: Ip entity identifiers for the resolved ip address. - * - * @return the ipAddressEntityIds value. - */ - public List ipAddressEntityIds() { - return this.innerProperties() == null ? null : this.innerProperties().ipAddressEntityIds(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DomainWhois.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DomainWhois.java deleted file mode 100644 index 56380b6e2f98..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DomainWhois.java +++ /dev/null @@ -1,36 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of DomainWhois. */ -public interface DomainWhois { - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @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 whois information for a single domain name. - */ - EnrichmentDomainWhois get(String resourceGroupName, String domain); - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @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 whois information for a single domain name along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String domain, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java deleted file mode 100644 index eaa3c125f567..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.Dynamics365CheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Dynamics365 requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Dynamics365") -@Fluent -public final class Dynamics365CheckRequirements extends DataConnectorsCheckRequirements { - /* - * Dynamics365 requirements check properties. - */ - @JsonProperty(value = "properties") - private Dynamics365CheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Dynamics365 requirements check properties. - * - * @return the innerProperties value. - */ - private Dynamics365CheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java deleted file mode 100644 index 653d886600c3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.Dynamics365DataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Dynamics365 data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Dynamics365") -@Fluent -public final class Dynamics365DataConnector extends DataConnectorInner { - /* - * Dynamics365 data connector properties. - */ - @JsonProperty(value = "properties") - private Dynamics365DataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Dynamics365 data connector properties. - * - * @return the innerProperties value. - */ - private Dynamics365DataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public Dynamics365DataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public Dynamics365DataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the Dynamics365DataConnector object itself. - */ - public Dynamics365DataConnector withDataTypes(Dynamics365DataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new Dynamics365DataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the Dynamics365DataConnector object itself. - */ - public Dynamics365DataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new Dynamics365DataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java deleted file mode 100644 index 0df0a2723965..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java +++ /dev/null @@ -1,59 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Dynamics365 data connector. */ -@Fluent -public final class Dynamics365DataConnectorDataTypes { - /* - * Common Data Service data type connection. - */ - @JsonProperty(value = "dynamics365CdsActivities", required = true) - private Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities; - - /** - * Get the dynamics365CdsActivities property: Common Data Service data type connection. - * - * @return the dynamics365CdsActivities value. - */ - public Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities() { - return this.dynamics365CdsActivities; - } - - /** - * Set the dynamics365CdsActivities property: Common Data Service data type connection. - * - * @param dynamics365CdsActivities the dynamics365CdsActivities value to set. - * @return the Dynamics365DataConnectorDataTypes object itself. - */ - public Dynamics365DataConnectorDataTypes withDynamics365CdsActivities( - Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities) { - this.dynamics365CdsActivities = dynamics365CdsActivities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dynamics365CdsActivities() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dynamics365CdsActivities in model" - + " Dynamics365DataConnectorDataTypes")); - } else { - dynamics365CdsActivities().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Dynamics365DataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java deleted file mode 100644 index d1ed289fd67c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Common Data Service data type connection. */ -@Fluent -public final class Dynamics365DataConnectorDataTypesDynamics365CdsActivities extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public Dynamics365DataConnectorDataTypesDynamics365CdsActivities withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ElevationToken.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ElevationToken.java deleted file mode 100644 index 9b7dbc62e5dc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ElevationToken.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The elevation token associated with the process. */ -public enum ElevationToken { - /** Enum value Default. */ - DEFAULT("Default"), - - /** Enum value Full. */ - FULL("Full"), - - /** Enum value Limited. */ - LIMITED("Limited"); - - /** The actual serialized value for a ElevationToken instance. */ - private final String value; - - ElevationToken(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ElevationToken instance. - * - * @param value the serialized value to parse. - * @return the parsed ElevationToken object, or null if unable to parse. - */ - @JsonCreator - public static ElevationToken fromString(String value) { - if (value == null) { - return null; - } - ElevationToken[] items = ElevationToken.values(); - for (ElevationToken item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhois.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhois.java deleted file mode 100644 index 5b903538b5db..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhois.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of EnrichmentDomainWhois. */ -public interface EnrichmentDomainWhois { - /** - * Gets the domain property: The domain for this whois record. - * - * @return the domain value. - */ - String domain(); - - /** - * Gets the server property: The hostname of this registrar's whois server. - * - * @return the server value. - */ - String server(); - - /** - * Gets the created property: The timestamp at which this record was created. - * - * @return the created value. - */ - OffsetDateTime created(); - - /** - * Gets the updated property: The timestamp at which this record was last updated. - * - * @return the updated value. - */ - OffsetDateTime updated(); - - /** - * Gets the expires property: The timestamp at which this record will expire. - * - * @return the expires value. - */ - OffsetDateTime expires(); - - /** - * Gets the parsedWhois property: The whois record for a given domain. - * - * @return the parsedWhois value. - */ - EnrichmentDomainWhoisDetails parsedWhois(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner object. - * - * @return the inner object. - */ - EnrichmentDomainWhoisInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java deleted file mode 100644 index d75c0f24e472..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java +++ /dev/null @@ -1,281 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An individual contact associated with this domain. */ -@Fluent -public final class EnrichmentDomainWhoisContact { - /* - * The name of this contact - */ - @JsonProperty(value = "name") - private String name; - - /* - * The organization for this contact - */ - @JsonProperty(value = "org") - private String org; - - /* - * A list describing the street address for this contact - */ - @JsonProperty(value = "street") - private List street; - - /* - * The city for this contact - */ - @JsonProperty(value = "city") - private String city; - - /* - * The state for this contact - */ - @JsonProperty(value = "state") - private String state; - - /* - * The postal code for this contact - */ - @JsonProperty(value = "postal") - private String postal; - - /* - * The country for this contact - */ - @JsonProperty(value = "country") - private String country; - - /* - * The phone number for this contact - */ - @JsonProperty(value = "phone") - private String phone; - - /* - * The fax number for this contact - */ - @JsonProperty(value = "fax") - private String fax; - - /* - * The email address for this contact - */ - @JsonProperty(value = "email") - private String email; - - /** - * Get the name property: The name of this contact. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of this contact. - * - * @param name the name value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withName(String name) { - this.name = name; - return this; - } - - /** - * Get the org property: The organization for this contact. - * - * @return the org value. - */ - public String org() { - return this.org; - } - - /** - * Set the org property: The organization for this contact. - * - * @param org the org value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withOrg(String org) { - this.org = org; - return this; - } - - /** - * Get the street property: A list describing the street address for this contact. - * - * @return the street value. - */ - public List street() { - return this.street; - } - - /** - * Set the street property: A list describing the street address for this contact. - * - * @param street the street value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withStreet(List street) { - this.street = street; - return this; - } - - /** - * Get the city property: The city for this contact. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: The city for this contact. - * - * @param city the city value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the state property: The state for this contact. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: The state for this contact. - * - * @param state the state value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withState(String state) { - this.state = state; - return this; - } - - /** - * Get the postal property: The postal code for this contact. - * - * @return the postal value. - */ - public String postal() { - return this.postal; - } - - /** - * Set the postal property: The postal code for this contact. - * - * @param postal the postal value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withPostal(String postal) { - this.postal = postal; - return this; - } - - /** - * Get the country property: The country for this contact. - * - * @return the country value. - */ - public String country() { - return this.country; - } - - /** - * Set the country property: The country for this contact. - * - * @param country the country value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the phone property: The phone number for this contact. - * - * @return the phone value. - */ - public String phone() { - return this.phone; - } - - /** - * Set the phone property: The phone number for this contact. - * - * @param phone the phone value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withPhone(String phone) { - this.phone = phone; - return this; - } - - /** - * Get the fax property: The fax number for this contact. - * - * @return the fax value. - */ - public String fax() { - return this.fax; - } - - /** - * Set the fax property: The fax number for this contact. - * - * @param fax the fax value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withFax(String fax) { - this.fax = fax; - return this; - } - - /** - * Get the email property: The email address for this contact. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: The email address for this contact. - * - * @param email the email value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withEmail(String email) { - this.email = email; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java deleted file mode 100644 index 869d7a774b30..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java +++ /dev/null @@ -1,136 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The set of contacts associated with this domain. */ -@Fluent -public final class EnrichmentDomainWhoisContacts { - /* - * The admin contact for this whois record - */ - @JsonProperty(value = "admin") - private EnrichmentDomainWhoisContact admin; - - /* - * The billing contact for this whois record - */ - @JsonProperty(value = "billing") - private EnrichmentDomainWhoisContact billing; - - /* - * The registrant contact for this whois record - */ - @JsonProperty(value = "registrant") - private EnrichmentDomainWhoisContact registrant; - - /* - * The technical contact for this whois record - */ - @JsonProperty(value = "tech") - private EnrichmentDomainWhoisContact tech; - - /** - * Get the admin property: The admin contact for this whois record. - * - * @return the admin value. - */ - public EnrichmentDomainWhoisContact admin() { - return this.admin; - } - - /** - * Set the admin property: The admin contact for this whois record. - * - * @param admin the admin value to set. - * @return the EnrichmentDomainWhoisContacts object itself. - */ - public EnrichmentDomainWhoisContacts withAdmin(EnrichmentDomainWhoisContact admin) { - this.admin = admin; - return this; - } - - /** - * Get the billing property: The billing contact for this whois record. - * - * @return the billing value. - */ - public EnrichmentDomainWhoisContact billing() { - return this.billing; - } - - /** - * Set the billing property: The billing contact for this whois record. - * - * @param billing the billing value to set. - * @return the EnrichmentDomainWhoisContacts object itself. - */ - public EnrichmentDomainWhoisContacts withBilling(EnrichmentDomainWhoisContact billing) { - this.billing = billing; - return this; - } - - /** - * Get the registrant property: The registrant contact for this whois record. - * - * @return the registrant value. - */ - public EnrichmentDomainWhoisContact registrant() { - return this.registrant; - } - - /** - * Set the registrant property: The registrant contact for this whois record. - * - * @param registrant the registrant value to set. - * @return the EnrichmentDomainWhoisContacts object itself. - */ - public EnrichmentDomainWhoisContacts withRegistrant(EnrichmentDomainWhoisContact registrant) { - this.registrant = registrant; - return this; - } - - /** - * Get the tech property: The technical contact for this whois record. - * - * @return the tech value. - */ - public EnrichmentDomainWhoisContact tech() { - return this.tech; - } - - /** - * Set the tech property: The technical contact for this whois record. - * - * @param tech the tech value to set. - * @return the EnrichmentDomainWhoisContacts object itself. - */ - public EnrichmentDomainWhoisContacts withTech(EnrichmentDomainWhoisContact tech) { - this.tech = tech; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (admin() != null) { - admin().validate(); - } - if (billing() != null) { - billing().validate(); - } - if (registrant() != null) { - registrant().validate(); - } - if (tech() != null) { - tech().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java deleted file mode 100644 index 7a22dff870a6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java +++ /dev/null @@ -1,131 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The whois record for a given domain. */ -@Fluent -public final class EnrichmentDomainWhoisDetails { - /* - * The registrar associated with this domain - */ - @JsonProperty(value = "registrar") - private EnrichmentDomainWhoisRegistrarDetails registrar; - - /* - * The set of contacts associated with this domain - */ - @JsonProperty(value = "contacts") - private EnrichmentDomainWhoisContacts contacts; - - /* - * A list of name servers associated with this domain - */ - @JsonProperty(value = "nameServers") - private List nameServers; - - /* - * The set of status flags for this whois record - */ - @JsonProperty(value = "statuses") - private List statuses; - - /** - * Get the registrar property: The registrar associated with this domain. - * - * @return the registrar value. - */ - public EnrichmentDomainWhoisRegistrarDetails registrar() { - return this.registrar; - } - - /** - * Set the registrar property: The registrar associated with this domain. - * - * @param registrar the registrar value to set. - * @return the EnrichmentDomainWhoisDetails object itself. - */ - public EnrichmentDomainWhoisDetails withRegistrar(EnrichmentDomainWhoisRegistrarDetails registrar) { - this.registrar = registrar; - return this; - } - - /** - * Get the contacts property: The set of contacts associated with this domain. - * - * @return the contacts value. - */ - public EnrichmentDomainWhoisContacts contacts() { - return this.contacts; - } - - /** - * Set the contacts property: The set of contacts associated with this domain. - * - * @param contacts the contacts value to set. - * @return the EnrichmentDomainWhoisDetails object itself. - */ - public EnrichmentDomainWhoisDetails withContacts(EnrichmentDomainWhoisContacts contacts) { - this.contacts = contacts; - return this; - } - - /** - * Get the nameServers property: A list of name servers associated with this domain. - * - * @return the nameServers value. - */ - public List nameServers() { - return this.nameServers; - } - - /** - * Set the nameServers property: A list of name servers associated with this domain. - * - * @param nameServers the nameServers value to set. - * @return the EnrichmentDomainWhoisDetails object itself. - */ - public EnrichmentDomainWhoisDetails withNameServers(List nameServers) { - this.nameServers = nameServers; - return this; - } - - /** - * Get the statuses property: The set of status flags for this whois record. - * - * @return the statuses value. - */ - public List statuses() { - return this.statuses; - } - - /** - * Set the statuses property: The set of status flags for this whois record. - * - * @param statuses the statuses value to set. - * @return the EnrichmentDomainWhoisDetails object itself. - */ - public EnrichmentDomainWhoisDetails withStatuses(List statuses) { - this.statuses = statuses; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registrar() != null) { - registrar().validate(); - } - if (contacts() != null) { - contacts().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java deleted file mode 100644 index 545f2a28b66b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java +++ /dev/null @@ -1,176 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The registrar associated with this domain. */ -@Fluent -public final class EnrichmentDomainWhoisRegistrarDetails { - /* - * The name of this registrar - */ - @JsonProperty(value = "name") - private String name; - - /* - * This registrar's abuse contact email - */ - @JsonProperty(value = "abuseContactEmail") - private String abuseContactEmail; - - /* - * This registrar's abuse contact phone number - */ - @JsonProperty(value = "abuseContactPhone") - private String abuseContactPhone; - - /* - * This registrar's Internet Assigned Numbers Authority id - */ - @JsonProperty(value = "ianaId") - private String ianaId; - - /* - * This registrar's URL - */ - @JsonProperty(value = "url") - private String url; - - /* - * The hostname of this registrar's whois server - */ - @JsonProperty(value = "whoisServer") - private String whoisServer; - - /** - * Get the name property: The name of this registrar. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of this registrar. - * - * @param name the name value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withName(String name) { - this.name = name; - return this; - } - - /** - * Get the abuseContactEmail property: This registrar's abuse contact email. - * - * @return the abuseContactEmail value. - */ - public String abuseContactEmail() { - return this.abuseContactEmail; - } - - /** - * Set the abuseContactEmail property: This registrar's abuse contact email. - * - * @param abuseContactEmail the abuseContactEmail value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withAbuseContactEmail(String abuseContactEmail) { - this.abuseContactEmail = abuseContactEmail; - return this; - } - - /** - * Get the abuseContactPhone property: This registrar's abuse contact phone number. - * - * @return the abuseContactPhone value. - */ - public String abuseContactPhone() { - return this.abuseContactPhone; - } - - /** - * Set the abuseContactPhone property: This registrar's abuse contact phone number. - * - * @param abuseContactPhone the abuseContactPhone value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withAbuseContactPhone(String abuseContactPhone) { - this.abuseContactPhone = abuseContactPhone; - return this; - } - - /** - * Get the ianaId property: This registrar's Internet Assigned Numbers Authority id. - * - * @return the ianaId value. - */ - public String ianaId() { - return this.ianaId; - } - - /** - * Set the ianaId property: This registrar's Internet Assigned Numbers Authority id. - * - * @param ianaId the ianaId value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withIanaId(String ianaId) { - this.ianaId = ianaId; - return this; - } - - /** - * Get the url property: This registrar's URL. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: This registrar's URL. - * - * @param url the url value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the whoisServer property: The hostname of this registrar's whois server. - * - * @return the whoisServer value. - */ - public String whoisServer() { - return this.whoisServer; - } - - /** - * Set the whoisServer property: The hostname of this registrar's whois server. - * - * @param whoisServer the whoisServer value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withWhoisServer(String whoisServer) { - this.whoisServer = whoisServer; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentIpGeodata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentIpGeodata.java deleted file mode 100644 index d8b2e8ec5925..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentIpGeodata.java +++ /dev/null @@ -1,139 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; - -/** An immutable client-side representation of EnrichmentIpGeodata. */ -public interface EnrichmentIpGeodata { - /** - * Gets the asn property: The autonomous system number associated with this IP address. - * - * @return the asn value. - */ - String asn(); - - /** - * Gets the carrier property: The name of the carrier for this IP address. - * - * @return the carrier value. - */ - String carrier(); - - /** - * Gets the city property: The city this IP address is located in. - * - * @return the city value. - */ - String city(); - - /** - * Gets the cityCf property: A numeric rating of confidence that the value in the 'city' field is correct, on a - * scale of 0-100. - * - * @return the cityCf value. - */ - Integer cityCf(); - - /** - * Gets the continent property: The continent this IP address is located on. - * - * @return the continent value. - */ - String continent(); - - /** - * Gets the country property: The county this IP address is located in. - * - * @return the country value. - */ - String country(); - - /** - * Gets the countryCf property: A numeric rating of confidence that the value in the 'country' field is correct on a - * scale of 0-100. - * - * @return the countryCf value. - */ - Integer countryCf(); - - /** - * Gets the ipAddr property: The dotted-decimal or colon-separated string representation of the IP address. - * - * @return the ipAddr value. - */ - String ipAddr(); - - /** - * Gets the ipRoutingType property: A description of the connection type of this IP address. - * - * @return the ipRoutingType value. - */ - String ipRoutingType(); - - /** - * Gets the latitude property: The latitude of this IP address. - * - * @return the latitude value. - */ - String latitude(); - - /** - * Gets the longitude property: The longitude of this IP address. - * - * @return the longitude value. - */ - String longitude(); - - /** - * Gets the organization property: The name of the organization for this IP address. - * - * @return the organization value. - */ - String organization(); - - /** - * Gets the organizationType property: The type of the organization for this IP address. - * - * @return the organizationType value. - */ - String organizationType(); - - /** - * Gets the region property: The geographic region this IP address is located in. - * - * @return the region value. - */ - String region(); - - /** - * Gets the state property: The state this IP address is located in. - * - * @return the state value. - */ - String state(); - - /** - * Gets the stateCf property: A numeric rating of confidence that the value in the 'state' field is correct on a - * scale of 0-100. - * - * @return the stateCf value. - */ - Integer stateCf(); - - /** - * Gets the stateCode property: The abbreviated name for the state this IP address is located in. - * - * @return the stateCode value. - */ - String stateCode(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner object. - * - * @return the inner object. - */ - EnrichmentIpGeodataInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java deleted file mode 100644 index 182172f2a926..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java +++ /dev/null @@ -1,165 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Entities. */ -public interface Entities { - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @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 an entity. - */ - Entity get(String resourceGroupName, String workspaceName, String entityId); - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @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 an entity along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String entityId, Context context); - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @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 the entity expansion result operation response. - */ - EntityExpandResponse expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @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 the entity expansion result operation response along with {@link Response}. - */ - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context); - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @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 insights and Activities for an entity. - */ - GetQueriesResponse queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @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 insights and Activities for an entity along with {@link Response}. - */ - Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context); - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @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 the Get Insights result operation response. - */ - EntityGetInsightsResponse getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @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 the Get Insights result operation response along with {@link Response}. - */ - Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java deleted file mode 100644 index 29a184b1bde3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EntitiesGetTimelines. */ -public interface EntitiesGetTimelines { - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @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 the entity timeline result operation response. - */ - EntityTimelineResponse list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @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 the entity timeline result operation response along with {@link Response}. - */ - Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java deleted file mode 100644 index aa1daf59c56e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java +++ /dev/null @@ -1,52 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of EntitiesRelations. */ -public interface EntitiesRelations { - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @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 all relations of an entity as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String entityId); - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all relations of an entity as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entity.java deleted file mode 100644 index 664d22e8eae5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entity.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; - -/** An immutable client-side representation of Entity. */ -public interface Entity { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityInner object. - * - * @return the inner object. - */ - EntityInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java deleted file mode 100644 index 7ebdadd6fc3c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityAnalyticsProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -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") -@JsonTypeName("EntityAnalytics") -@Fluent -public final class EntityAnalytics extends SettingsInner { - /* - * EntityAnalytics properties - */ - @JsonProperty(value = "properties") - private EntityAnalyticsProperties innerProperties; - - /** - * Get the innerProperties property: EntityAnalytics properties. - * - * @return the innerProperties value. - */ - private EntityAnalyticsProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public EntityAnalytics withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the entityProviders property: The relevant entity providers that are synced. - * - * @return the entityProviders value. - */ - public List 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) { - if (this.innerProperties() == null) { - this.innerProperties = new EntityAnalyticsProperties(); - } - this.innerProperties().withEntityProviders(entityProviders); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java deleted file mode 100644 index 49d3c8f895a1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Entity common property bag. */ -@Immutable -public class EntityCommonProperties { - /* - * A bag of custom fields that should be part of the entity and will be presented to the user. - */ - @JsonProperty(value = "additionalData", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map additionalData; - - /* - * The graph item display name which is a short humanly readable description of the graph item instance. This - * property is optional and might be system generated. - */ - @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) - private String friendlyName; - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.additionalData; - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java deleted file mode 100644 index e925912285eb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The edge that connects the entity to the other entity. */ -@Fluent -public final class EntityEdges { - /* - * The target entity Id. - */ - @JsonProperty(value = "targetEntityId") - private String targetEntityId; - - /* - * A bag of custom fields that should be part of the entity and will be presented to the user. - */ - @JsonProperty(value = "additionalData") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map additionalData; - - /** - * Get the targetEntityId property: The target entity Id. - * - * @return the targetEntityId value. - */ - public String targetEntityId() { - return this.targetEntityId; - } - - /** - * Set the targetEntityId property: The target entity Id. - * - * @param targetEntityId the targetEntityId value to set. - * @return the EntityEdges object itself. - */ - public EntityEdges withTargetEntityId(String targetEntityId) { - this.targetEntityId = targetEntityId; - return this; - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.additionalData; - } - - /** - * Set the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @param additionalData the additionalData value to set. - * @return the EntityEdges object itself. - */ - public EntityEdges withAdditionalData(Map additionalData) { - this.additionalData = additionalData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java deleted file mode 100644 index 8d0d6ec6ebdc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java +++ /dev/null @@ -1,100 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** The parameters required to execute an expand operation on the given entity. */ -@Fluent -public final class EntityExpandParameters { - /* - * The end date filter, so the only expansion results returned are before this date. - */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; - - /* - * The Id of the expansion to perform. - */ - @JsonProperty(value = "expansionId") - private UUID expansionId; - - /* - * The start date filter, so the only expansion results returned are after this date. - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /** - * Get the endTime property: The end date filter, so the only expansion results returned are before this date. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end date filter, so the only expansion results returned are before this date. - * - * @param endTime the endTime value to set. - * @return the EntityExpandParameters object itself. - */ - public EntityExpandParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the expansionId property: The Id of the expansion to perform. - * - * @return the expansionId value. - */ - public UUID expansionId() { - return this.expansionId; - } - - /** - * Set the expansionId property: The Id of the expansion to perform. - * - * @param expansionId the expansionId value to set. - * @return the EntityExpandParameters object itself. - */ - public EntityExpandParameters withExpansionId(UUID expansionId) { - this.expansionId = expansionId; - return this; - } - - /** - * Get the startTime property: The start date filter, so the only expansion results returned are after this date. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start date filter, so the only expansion results returned are after this date. - * - * @param startTime the startTime value to set. - * @return the EntityExpandParameters object itself. - */ - public EntityExpandParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponse.java deleted file mode 100644 index fb8e3981d534..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponse.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; - -/** An immutable client-side representation of EntityExpandResponse. */ -public interface EntityExpandResponse { - /** - * Gets the metadata property: The metadata from the expansion operation results. - * - * @return the metadata value. - */ - ExpansionResultsMetadata metadata(); - - /** - * Gets the value property: The expansion result values. - * - * @return the value value. - */ - EntityExpandResponseValue value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner object. - * - * @return the inner object. - */ - EntityExpandResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java deleted file mode 100644 index f8558de18c34..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The expansion result values. */ -@Fluent -public final class EntityExpandResponseValue { - /* - * Array of the expansion result entities. - */ - @JsonProperty(value = "entities") - private List entities; - - /* - * Array of edges that connects the entity to the list of entities. - */ - @JsonProperty(value = "edges") - private List edges; - - /** - * Get the entities property: Array of the expansion result entities. - * - * @return the entities value. - */ - public List entities() { - return this.entities; - } - - /** - * Set the entities property: Array of the expansion result entities. - * - * @param entities the entities value to set. - * @return the EntityExpandResponseValue object itself. - */ - public EntityExpandResponseValue withEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the edges property: Array of edges that connects the entity to the list of entities. - * - * @return the edges value. - */ - public List edges() { - return this.edges; - } - - /** - * Set the edges property: Array of edges that connects the entity to the list of entities. - * - * @param edges the edges value to set. - * @return the EntityExpandResponseValue object itself. - */ - public EntityExpandResponseValue withEdges(List edges) { - this.edges = edges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entities() != null) { - entities().forEach(e -> e.validate()); - } - if (edges() != null) { - edges().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java deleted file mode 100644 index 0d2682840793..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Map identifiers of a single entity. */ -@Fluent -public final class EntityFieldMapping { - /* - * Alert V3 identifier - */ - @JsonProperty(value = "identifier") - private String identifier; - - /* - * The value of the identifier - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the identifier property: Alert V3 identifier. - * - * @return the identifier value. - */ - public String identifier() { - return this.identifier; - } - - /** - * Set the identifier property: Alert V3 identifier. - * - * @param identifier the identifier value to set. - * @return the EntityFieldMapping object itself. - */ - public EntityFieldMapping withIdentifier(String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Get the value property: The value of the identifier. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value of the identifier. - * - * @param value the value value to set. - * @return the EntityFieldMapping object itself. - */ - public EntityFieldMapping withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java deleted file mode 100644 index 04a3e0d4c530..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java +++ /dev/null @@ -1,146 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.UUID; - -/** The parameters required to execute insights operation on the given entity. */ -@Fluent -public final class EntityGetInsightsParameters { - /* - * The start timeline date, so the results returned are after this date. - */ - @JsonProperty(value = "startTime", required = true) - private OffsetDateTime startTime; - - /* - * The end timeline date, so the results returned are before this date. - */ - @JsonProperty(value = "endTime", required = true) - private OffsetDateTime endTime; - - /* - * Indicates if query time range should be extended with default time range of the query. Default value is false - */ - @JsonProperty(value = "addDefaultExtendedTimeRange") - private Boolean addDefaultExtendedTimeRange; - - /* - * List of Insights Query Id. If empty, default value is all insights of this entity - */ - @JsonProperty(value = "insightQueryIds") - private List insightQueryIds; - - /** - * Get the startTime property: The start timeline date, so the results returned are after this date. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start timeline date, so the results returned are after this date. - * - * @param startTime the startTime value to set. - * @return the EntityGetInsightsParameters object itself. - */ - public EntityGetInsightsParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The end timeline date, so the results returned are before this date. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end timeline date, so the results returned are before this date. - * - * @param endTime the endTime value to set. - * @return the EntityGetInsightsParameters object itself. - */ - public EntityGetInsightsParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the addDefaultExtendedTimeRange property: Indicates if query time range should be extended with default time - * range of the query. Default value is false. - * - * @return the addDefaultExtendedTimeRange value. - */ - public Boolean addDefaultExtendedTimeRange() { - return this.addDefaultExtendedTimeRange; - } - - /** - * Set the addDefaultExtendedTimeRange property: Indicates if query time range should be extended with default time - * range of the query. Default value is false. - * - * @param addDefaultExtendedTimeRange the addDefaultExtendedTimeRange value to set. - * @return the EntityGetInsightsParameters object itself. - */ - public EntityGetInsightsParameters withAddDefaultExtendedTimeRange(Boolean addDefaultExtendedTimeRange) { - this.addDefaultExtendedTimeRange = addDefaultExtendedTimeRange; - return this; - } - - /** - * Get the insightQueryIds property: List of Insights Query Id. If empty, default value is all insights of this - * entity. - * - * @return the insightQueryIds value. - */ - public List insightQueryIds() { - return this.insightQueryIds; - } - - /** - * Set the insightQueryIds property: List of Insights Query Id. If empty, default value is all insights of this - * entity. - * - * @param insightQueryIds the insightQueryIds value to set. - * @return the EntityGetInsightsParameters object itself. - */ - public EntityGetInsightsParameters withInsightQueryIds(List insightQueryIds) { - this.insightQueryIds = insightQueryIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTime in model EntityGetInsightsParameters")); - } - if (endTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endTime in model EntityGetInsightsParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityGetInsightsParameters.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsResponse.java deleted file mode 100644 index dbb22861ff01..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsResponse.java +++ /dev/null @@ -1,32 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import java.util.List; - -/** An immutable client-side representation of EntityGetInsightsResponse. */ -public interface EntityGetInsightsResponse { - /** - * Gets the metadata property: The metadata from the get insights operation results. - * - * @return the metadata value. - */ - GetInsightsResultsMetadata metadata(); - - /** - * Gets the value property: The insights result values. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner object. - * - * @return the inner object. - */ - EntityGetInsightsResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java deleted file mode 100644 index 15d19b7473a9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java +++ /dev/null @@ -1,134 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Entity insight Item. */ -@Fluent -public final class EntityInsightItem { - /* - * The query id of the insight - */ - @JsonProperty(value = "queryId") - private String queryId; - - /* - * The Time interval that the query actually executed on. - */ - @JsonProperty(value = "queryTimeInterval") - private EntityInsightItemQueryTimeInterval queryTimeInterval; - - /* - * Query results for table insights query. - */ - @JsonProperty(value = "tableQueryResults") - private InsightsTableResult tableQueryResults; - - /* - * Query results for table insights query. - */ - @JsonProperty(value = "chartQueryResults") - private List chartQueryResults; - - /** - * Get the queryId property: The query id of the insight. - * - * @return the queryId value. - */ - public String queryId() { - return this.queryId; - } - - /** - * Set the queryId property: The query id of the insight. - * - * @param queryId the queryId value to set. - * @return the EntityInsightItem object itself. - */ - public EntityInsightItem withQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Get the queryTimeInterval property: The Time interval that the query actually executed on. - * - * @return the queryTimeInterval value. - */ - public EntityInsightItemQueryTimeInterval queryTimeInterval() { - return this.queryTimeInterval; - } - - /** - * Set the queryTimeInterval property: The Time interval that the query actually executed on. - * - * @param queryTimeInterval the queryTimeInterval value to set. - * @return the EntityInsightItem object itself. - */ - public EntityInsightItem withQueryTimeInterval(EntityInsightItemQueryTimeInterval queryTimeInterval) { - this.queryTimeInterval = queryTimeInterval; - return this; - } - - /** - * Get the tableQueryResults property: Query results for table insights query. - * - * @return the tableQueryResults value. - */ - public InsightsTableResult tableQueryResults() { - return this.tableQueryResults; - } - - /** - * Set the tableQueryResults property: Query results for table insights query. - * - * @param tableQueryResults the tableQueryResults value to set. - * @return the EntityInsightItem object itself. - */ - public EntityInsightItem withTableQueryResults(InsightsTableResult tableQueryResults) { - this.tableQueryResults = tableQueryResults; - return this; - } - - /** - * Get the chartQueryResults property: Query results for table insights query. - * - * @return the chartQueryResults value. - */ - public List chartQueryResults() { - return this.chartQueryResults; - } - - /** - * Set the chartQueryResults property: Query results for table insights query. - * - * @param chartQueryResults the chartQueryResults value to set. - * @return the EntityInsightItem object itself. - */ - public EntityInsightItem withChartQueryResults(List chartQueryResults) { - this.chartQueryResults = chartQueryResults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queryTimeInterval() != null) { - queryTimeInterval().validate(); - } - if (tableQueryResults() != null) { - tableQueryResults().validate(); - } - if (chartQueryResults() != null) { - chartQueryResults().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java deleted file mode 100644 index e04c157d5dc6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The Time interval that the query actually executed on. */ -@Fluent -public final class EntityInsightItemQueryTimeInterval { - /* - * Insight query start time - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /* - * Insight query end time - */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; - - /** - * Get the startTime property: Insight query start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Insight query start time. - * - * @param startTime the startTime value to set. - * @return the EntityInsightItemQueryTimeInterval object itself. - */ - public EntityInsightItemQueryTimeInterval withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: Insight query end time. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Insight query end time. - * - * @param endTime the endTime value to set. - * @return the EntityInsightItemQueryTimeInterval object itself. - */ - public EntityInsightItemQueryTimeInterval withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java deleted file mode 100644 index 3759170c00e3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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 EntityItemQueryKind. */ -public final class EntityItemQueryKind extends ExpandableStringEnum { - /** Static value Insight for EntityItemQueryKind. */ - public static final EntityItemQueryKind INSIGHT = fromString("Insight"); - - /** - * Creates or finds a EntityItemQueryKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityItemQueryKind. - */ - @JsonCreator - public static EntityItemQueryKind fromString(String name) { - return fromString(name, EntityItemQueryKind.class); - } - - /** - * Gets known EntityItemQueryKind values. - * - * @return known EntityItemQueryKind values. - */ - public static Collection values() { - return values(EntityItemQueryKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKind.java deleted file mode 100644 index 5968f17a56cd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKind.java +++ /dev/null @@ -1,98 +0,0 @@ -// 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; - -/** The kind of the entity. */ -public final class EntityKind extends ExpandableStringEnum { - /** Static value Account for EntityKind. */ - public static final EntityKind ACCOUNT = fromString("Account"); - - /** Static value Host for EntityKind. */ - public static final EntityKind HOST = fromString("Host"); - - /** Static value File for EntityKind. */ - public static final EntityKind FILE = fromString("File"); - - /** Static value AzureResource for EntityKind. */ - public static final EntityKind AZURE_RESOURCE = fromString("AzureResource"); - - /** Static value CloudApplication for EntityKind. */ - public static final EntityKind CLOUD_APPLICATION = fromString("CloudApplication"); - - /** Static value DnsResolution for EntityKind. */ - public static final EntityKind DNS_RESOLUTION = fromString("DnsResolution"); - - /** Static value FileHash for EntityKind. */ - public static final EntityKind FILE_HASH = fromString("FileHash"); - - /** Static value Ip for EntityKind. */ - public static final EntityKind IP = fromString("Ip"); - - /** Static value Malware for EntityKind. */ - public static final EntityKind MALWARE = fromString("Malware"); - - /** Static value Process for EntityKind. */ - public static final EntityKind PROCESS = fromString("Process"); - - /** Static value RegistryKey for EntityKind. */ - public static final EntityKind REGISTRY_KEY = fromString("RegistryKey"); - - /** Static value RegistryValue for EntityKind. */ - public static final EntityKind REGISTRY_VALUE = fromString("RegistryValue"); - - /** Static value SecurityGroup for EntityKind. */ - public static final EntityKind SECURITY_GROUP = fromString("SecurityGroup"); - - /** Static value Url for EntityKind. */ - public static final EntityKind URL = fromString("Url"); - - /** Static value IoTDevice for EntityKind. */ - public static final EntityKind IO_TDEVICE = fromString("IoTDevice"); - - /** Static value SecurityAlert for EntityKind. */ - public static final EntityKind SECURITY_ALERT = fromString("SecurityAlert"); - - /** Static value Bookmark for EntityKind. */ - public static final EntityKind BOOKMARK = fromString("Bookmark"); - - /** Static value MailCluster for EntityKind. */ - public static final EntityKind MAIL_CLUSTER = fromString("MailCluster"); - - /** Static value MailMessage for EntityKind. */ - public static final EntityKind MAIL_MESSAGE = fromString("MailMessage"); - - /** Static value Mailbox for EntityKind. */ - public static final EntityKind MAILBOX = fromString("Mailbox"); - - /** Static value SubmissionMail for EntityKind. */ - public static final EntityKind SUBMISSION_MAIL = fromString("SubmissionMail"); - - /** Static value Nic for EntityKind. */ - public static final EntityKind NIC = fromString("Nic"); - - /** - * Creates or finds a EntityKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityKind. - */ - @JsonCreator - public static EntityKind fromString(String name) { - return fromString(name, EntityKind.class); - } - - /** - * Gets known EntityKind values. - * - * @return known EntityKind values. - */ - public static Collection values() { - return values(EntityKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java deleted file mode 100644 index 0e160998fea5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the entities. */ -@Fluent -public final class EntityList { - /* - * URL to fetch the next set of entities. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of entities. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of entities. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of entities. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of entities. - * - * @param value the value value to set. - * @return the EntityList object itself. - */ - public EntityList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model EntityList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java deleted file mode 100644 index b5081a9937a3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Single entity mapping for the alert rule. */ -@Fluent -public final class EntityMapping { - /* - * The V3 type of the mapped entity - */ - @JsonProperty(value = "entityType") - private EntityMappingType entityType; - - /* - * array of field mappings for the given entity mapping - */ - @JsonProperty(value = "fieldMappings") - private List fieldMappings; - - /** - * Get the entityType property: The V3 type of the mapped entity. - * - * @return the entityType value. - */ - public EntityMappingType entityType() { - return this.entityType; - } - - /** - * Set the entityType property: The V3 type of the mapped entity. - * - * @param entityType the entityType value to set. - * @return the EntityMapping object itself. - */ - public EntityMapping withEntityType(EntityMappingType entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the fieldMappings property: array of field mappings for the given entity mapping. - * - * @return the fieldMappings value. - */ - public List fieldMappings() { - return this.fieldMappings; - } - - /** - * Set the fieldMappings property: array of field mappings for the given entity mapping. - * - * @param fieldMappings the fieldMappings value to set. - * @return the EntityMapping object itself. - */ - public EntityMapping withFieldMappings(List fieldMappings) { - this.fieldMappings = fieldMappings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fieldMappings() != null) { - fieldMappings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java deleted file mode 100644 index 5d33cc2b87a4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java +++ /dev/null @@ -1,86 +0,0 @@ -// 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; - -/** The V3 type of the mapped entity. */ -public final class EntityMappingType extends ExpandableStringEnum { - /** Static value Account for EntityMappingType. */ - public static final EntityMappingType ACCOUNT = fromString("Account"); - - /** Static value Host for EntityMappingType. */ - public static final EntityMappingType HOST = fromString("Host"); - - /** Static value IP for EntityMappingType. */ - public static final EntityMappingType IP = fromString("IP"); - - /** Static value Malware for EntityMappingType. */ - public static final EntityMappingType MALWARE = fromString("Malware"); - - /** Static value File for EntityMappingType. */ - public static final EntityMappingType FILE = fromString("File"); - - /** Static value Process for EntityMappingType. */ - public static final EntityMappingType PROCESS = fromString("Process"); - - /** Static value CloudApplication for EntityMappingType. */ - public static final EntityMappingType CLOUD_APPLICATION = fromString("CloudApplication"); - - /** Static value DNS for EntityMappingType. */ - public static final EntityMappingType DNS = fromString("DNS"); - - /** Static value AzureResource for EntityMappingType. */ - public static final EntityMappingType AZURE_RESOURCE = fromString("AzureResource"); - - /** Static value FileHash for EntityMappingType. */ - public static final EntityMappingType FILE_HASH = fromString("FileHash"); - - /** Static value RegistryKey for EntityMappingType. */ - public static final EntityMappingType REGISTRY_KEY = fromString("RegistryKey"); - - /** Static value RegistryValue for EntityMappingType. */ - public static final EntityMappingType REGISTRY_VALUE = fromString("RegistryValue"); - - /** Static value SecurityGroup for EntityMappingType. */ - public static final EntityMappingType SECURITY_GROUP = fromString("SecurityGroup"); - - /** Static value URL for EntityMappingType. */ - public static final EntityMappingType URL = fromString("URL"); - - /** Static value Mailbox for EntityMappingType. */ - public static final EntityMappingType MAILBOX = fromString("Mailbox"); - - /** Static value MailCluster for EntityMappingType. */ - public static final EntityMappingType MAIL_CLUSTER = fromString("MailCluster"); - - /** Static value MailMessage for EntityMappingType. */ - public static final EntityMappingType MAIL_MESSAGE = fromString("MailMessage"); - - /** Static value SubmissionMail for EntityMappingType. */ - public static final EntityMappingType SUBMISSION_MAIL = fromString("SubmissionMail"); - - /** - * Creates or finds a EntityMappingType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityMappingType. - */ - @JsonCreator - public static EntityMappingType fromString(String name) { - return fromString(name, EntityMappingType.class); - } - - /** - * Gets known EntityMappingType values. - * - * @return known EntityMappingType values. - */ - public static Collection values() { - return values(EntityMappingType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityProviders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityProviders.java deleted file mode 100644 index 3769c8ff2143..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityProviders.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The entity provider that is synced. */ -public final class EntityProviders extends ExpandableStringEnum { - /** 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); - } - - /** - * Gets known EntityProviders values. - * - * @return known EntityProviders values. - */ - public static Collection values() { - return values(EntityProviders.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java deleted file mode 100644 index d0f22a8e74b0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java +++ /dev/null @@ -1,129 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EntityQueries. */ -public interface EntityQueries { - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all entity queries as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @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 all entity queries as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @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 an entity query. - */ - EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @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 an entity query along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context); - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or 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 specific entity query. - */ - EntityQuery createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or 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 specific entity query along with {@link Response}. - */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context); - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String entityQueryId); - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java deleted file mode 100644 index 9af86d0f151c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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 EntityQueriesKind. */ -public final class EntityQueriesKind extends ExpandableStringEnum { - /** Static value Expansion for EntityQueriesKind. */ - public static final EntityQueriesKind EXPANSION = fromString("Expansion"); - - /** Static value Activity for EntityQueriesKind. */ - public static final EntityQueriesKind ACTIVITY = fromString("Activity"); - - /** - * Creates or finds a EntityQueriesKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityQueriesKind. - */ - @JsonCreator - public static EntityQueriesKind fromString(String name) { - return fromString(name, EntityQueriesKind.class); - } - - /** - * Gets known EntityQueriesKind values. - * - * @return known EntityQueriesKind values. - */ - public static Collection values() { - return values(EntityQueriesKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQuery.java deleted file mode 100644 index 3b7459c1f213..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQuery.java +++ /dev/null @@ -1,53 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; - -/** An immutable client-side representation of EntityQuery. */ -public interface EntityQuery { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner object. - * - * @return the inner object. - */ - EntityQueryInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java deleted file mode 100644 index edd51be3360f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java +++ /dev/null @@ -1,97 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** An abstract Query item for entity. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityQueryItem.class) -@JsonTypeName("EntityQueryItem") -@JsonSubTypes({@JsonSubTypes.Type(name = "Insight", value = InsightQueryItem.class)}) -@Fluent -public class EntityQueryItem { - /* - * Query Template ARM ID - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Query Template ARM Name - */ - @JsonProperty(value = "name") - private String name; - - /* - * ARM Type - */ - @JsonProperty(value = "type") - private String type; - - /** - * Get the id property: Query Template ARM ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Query Template ARM Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Query Template ARM Name. - * - * @param name the name value to set. - * @return the EntityQueryItem object itself. - */ - public EntityQueryItem withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: ARM Type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: ARM Type. - * - * @param type the type value to set. - * @return the EntityQueryItem object itself. - */ - public EntityQueryItem withType(String type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java deleted file mode 100644 index b1a3ce1e859b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An properties abstract Query item for entity. */ -@Fluent -public class EntityQueryItemProperties { - /* - * Data types for template - */ - @JsonProperty(value = "dataTypes") - private List dataTypes; - - /* - * The type of the entity - */ - @JsonProperty(value = "inputEntityType") - private EntityType inputEntityType; - - /* - * Data types for template - */ - @JsonProperty(value = "requiredInputFieldsSets") - private List> requiredInputFieldsSets; - - /* - * The query applied only to entities matching to all filters - */ - @JsonProperty(value = "entitiesFilter") - private Object entitiesFilter; - - /** - * Get the dataTypes property: Data types for template. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: Data types for template. - * - * @param dataTypes the dataTypes value to set. - * @return the EntityQueryItemProperties object itself. - */ - public EntityQueryItemProperties withDataTypes(List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Get the inputEntityType property: The type of the entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.inputEntityType; - } - - /** - * Set the inputEntityType property: The type of the entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the EntityQueryItemProperties object itself. - */ - public EntityQueryItemProperties withInputEntityType(EntityType inputEntityType) { - this.inputEntityType = inputEntityType; - return this; - } - - /** - * Get the requiredInputFieldsSets property: Data types for template. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.requiredInputFieldsSets; - } - - /** - * Set the requiredInputFieldsSets property: Data types for template. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the EntityQueryItemProperties object itself. - */ - public EntityQueryItemProperties withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - this.requiredInputFieldsSets = requiredInputFieldsSets; - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Object entitiesFilter() { - return this.entitiesFilter; - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the EntityQueryItemProperties object itself. - */ - public EntityQueryItemProperties withEntitiesFilter(Object entitiesFilter) { - this.entitiesFilter = entitiesFilter; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataTypes() != null) { - dataTypes().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java deleted file mode 100644 index f5b1c7988945..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The EntityQueryItemPropertiesDataTypesItem model. */ -@Fluent -public final class EntityQueryItemPropertiesDataTypesItem { - /* - * Data type name - */ - @JsonProperty(value = "dataType") - private String dataType; - - /** - * Get the dataType property: Data type name. - * - * @return the dataType value. - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType property: Data type name. - * - * @param dataType the dataType value to set. - * @return the EntityQueryItemPropertiesDataTypesItem object itself. - */ - public EntityQueryItemPropertiesDataTypesItem withDataType(String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryKind.java deleted file mode 100644 index 537821cbebab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryKind.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The kind of the entity query. */ -public final class EntityQueryKind extends ExpandableStringEnum { - /** Static value Expansion for EntityQueryKind. */ - public static final EntityQueryKind EXPANSION = fromString("Expansion"); - - /** Static value Insight for EntityQueryKind. */ - public static final EntityQueryKind INSIGHT = fromString("Insight"); - - /** Static value Activity for EntityQueryKind. */ - public static final EntityQueryKind ACTIVITY = fromString("Activity"); - - /** - * Creates or finds a EntityQueryKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityQueryKind. - */ - @JsonCreator - public static EntityQueryKind fromString(String name) { - return fromString(name, EntityQueryKind.class); - } - - /** - * Gets known EntityQueryKind values. - * - * @return known EntityQueryKind values. - */ - public static Collection values() { - return values(EntityQueryKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java deleted file mode 100644 index 28db9eb06460..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the entity queries. */ -@Fluent -public final class EntityQueryList { - /* - * URL to fetch the next set of entity queries. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of entity queries. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of entity queries. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of entity queries. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of entity queries. - * - * @param value the value value to set. - * @return the EntityQueryList object itself. - */ - public EntityQueryList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model EntityQueryList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityQueryList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplate.java deleted file mode 100644 index cb8a8e6b155e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplate.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; - -/** An immutable client-side representation of EntityQueryTemplate. */ -public interface EntityQueryTemplate { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner object. - * - * @return the inner object. - */ - EntityQueryTemplateInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java deleted file mode 100644 index 21ce0db46791..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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; - -/** The kind of the entity query template. */ -public final class EntityQueryTemplateKind extends ExpandableStringEnum { - /** Static value Activity for EntityQueryTemplateKind. */ - public static final EntityQueryTemplateKind ACTIVITY = fromString("Activity"); - - /** - * Creates or finds a EntityQueryTemplateKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityQueryTemplateKind. - */ - @JsonCreator - public static EntityQueryTemplateKind fromString(String name) { - return fromString(name, EntityQueryTemplateKind.class); - } - - /** - * Gets known EntityQueryTemplateKind values. - * - * @return known EntityQueryTemplateKind values. - */ - public static Collection values() { - return values(EntityQueryTemplateKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java deleted file mode 100644 index a767e8fea94d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the entity query templates. */ -@Fluent -public final class EntityQueryTemplateList { - /* - * URL to fetch the next set of entity query templates. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of entity query templates. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of entity query templates. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of entity query templates. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of entity query templates. - * - * @param value the value value to set. - * @return the EntityQueryTemplateList object itself. - */ - public EntityQueryTemplateList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model EntityQueryTemplateList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityQueryTemplateList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java deleted file mode 100644 index 4bddc9d19d91..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java +++ /dev/null @@ -1,67 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EntityQueryTemplates. */ -public interface EntityQueryTemplates { - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all entity query templates as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @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 all entity query templates as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @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 an entity query. - */ - EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @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 an entity query along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java deleted file mode 100644 index 28d08ca8e271..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EntityRelations. */ -public interface EntityRelations { - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @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 an entity relation. - */ - Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @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 an entity relation along with {@link Response}. - */ - Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java deleted file mode 100644 index fff8bc912310..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java +++ /dev/null @@ -1,34 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Entity timeline Item. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityTimelineItem.class) -@JsonTypeName("EntityTimelineItem") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Activity", value = ActivityTimelineItem.class), - @JsonSubTypes.Type(name = "Bookmark", value = BookmarkTimelineItem.class), - @JsonSubTypes.Type(name = "Anomaly", value = AnomalyTimelineItem.class), - @JsonSubTypes.Type(name = "SecurityAlert", value = SecurityAlertTimelineItem.class) -}) -@Immutable -public class EntityTimelineItem { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java deleted file mode 100644 index e5a502f1acfb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The entity query kind. */ -public final class EntityTimelineKind extends ExpandableStringEnum { - /** Static value Activity for EntityTimelineKind. */ - public static final EntityTimelineKind ACTIVITY = fromString("Activity"); - - /** Static value Bookmark for EntityTimelineKind. */ - public static final EntityTimelineKind BOOKMARK = fromString("Bookmark"); - - /** Static value SecurityAlert for EntityTimelineKind. */ - public static final EntityTimelineKind SECURITY_ALERT = fromString("SecurityAlert"); - - /** Static value Anomaly for EntityTimelineKind. */ - public static final EntityTimelineKind ANOMALY = fromString("Anomaly"); - - /** - * Creates or finds a EntityTimelineKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityTimelineKind. - */ - @JsonCreator - public static EntityTimelineKind fromString(String name) { - return fromString(name, EntityTimelineKind.class); - } - - /** - * Gets known EntityTimelineKind values. - * - * @return known EntityTimelineKind values. - */ - public static Collection values() { - return values(EntityTimelineKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java deleted file mode 100644 index 5f024f5132c6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java +++ /dev/null @@ -1,141 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** The parameters required to execute s timeline operation on the given entity. */ -@Fluent -public final class EntityTimelineParameters { - /* - * Array of timeline Item kinds. - */ - @JsonProperty(value = "kinds") - private List kinds; - - /* - * The start timeline date, so the results returned are after this date. - */ - @JsonProperty(value = "startTime", required = true) - private OffsetDateTime startTime; - - /* - * The end timeline date, so the results returned are before this date. - */ - @JsonProperty(value = "endTime", required = true) - private OffsetDateTime endTime; - - /* - * The number of bucket for timeline queries aggregation. - */ - @JsonProperty(value = "numberOfBucket") - private Integer numberOfBucket; - - /** - * Get the kinds property: Array of timeline Item kinds. - * - * @return the kinds value. - */ - public List kinds() { - return this.kinds; - } - - /** - * Set the kinds property: Array of timeline Item kinds. - * - * @param kinds the kinds value to set. - * @return the EntityTimelineParameters object itself. - */ - public EntityTimelineParameters withKinds(List kinds) { - this.kinds = kinds; - return this; - } - - /** - * Get the startTime property: The start timeline date, so the results returned are after this date. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start timeline date, so the results returned are after this date. - * - * @param startTime the startTime value to set. - * @return the EntityTimelineParameters object itself. - */ - public EntityTimelineParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The end timeline date, so the results returned are before this date. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end timeline date, so the results returned are before this date. - * - * @param endTime the endTime value to set. - * @return the EntityTimelineParameters object itself. - */ - public EntityTimelineParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the numberOfBucket property: The number of bucket for timeline queries aggregation. - * - * @return the numberOfBucket value. - */ - public Integer numberOfBucket() { - return this.numberOfBucket; - } - - /** - * Set the numberOfBucket property: The number of bucket for timeline queries aggregation. - * - * @param numberOfBucket the numberOfBucket value to set. - * @return the EntityTimelineParameters object itself. - */ - public EntityTimelineParameters withNumberOfBucket(Integer numberOfBucket) { - this.numberOfBucket = numberOfBucket; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTime in model EntityTimelineParameters")); - } - if (endTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endTime in model EntityTimelineParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityTimelineParameters.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineResponse.java deleted file mode 100644 index f06f9e561d6b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineResponse.java +++ /dev/null @@ -1,32 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import java.util.List; - -/** An immutable client-side representation of EntityTimelineResponse. */ -public interface EntityTimelineResponse { - /** - * Gets the metadata property: The metadata from the timeline operation results. - * - * @return the metadata value. - */ - TimelineResultsMetadata metadata(); - - /** - * Gets the value property: The timeline result values. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner object. - * - * @return the inner object. - */ - EntityTimelineResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityType.java deleted file mode 100644 index e18fee517f1d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityType.java +++ /dev/null @@ -1,98 +0,0 @@ -// 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; - -/** The type of the entity. */ -public final class EntityType extends ExpandableStringEnum { - /** Static value Account for EntityType. */ - public static final EntityType ACCOUNT = fromString("Account"); - - /** Static value Host for EntityType. */ - public static final EntityType HOST = fromString("Host"); - - /** Static value File for EntityType. */ - public static final EntityType FILE = fromString("File"); - - /** Static value AzureResource for EntityType. */ - public static final EntityType AZURE_RESOURCE = fromString("AzureResource"); - - /** Static value CloudApplication for EntityType. */ - public static final EntityType CLOUD_APPLICATION = fromString("CloudApplication"); - - /** Static value DNS for EntityType. */ - public static final EntityType DNS = fromString("DNS"); - - /** Static value FileHash for EntityType. */ - public static final EntityType FILE_HASH = fromString("FileHash"); - - /** Static value IP for EntityType. */ - public static final EntityType IP = fromString("IP"); - - /** Static value Malware for EntityType. */ - public static final EntityType MALWARE = fromString("Malware"); - - /** Static value Process for EntityType. */ - public static final EntityType PROCESS = fromString("Process"); - - /** Static value RegistryKey for EntityType. */ - public static final EntityType REGISTRY_KEY = fromString("RegistryKey"); - - /** Static value RegistryValue for EntityType. */ - public static final EntityType REGISTRY_VALUE = fromString("RegistryValue"); - - /** Static value SecurityGroup for EntityType. */ - public static final EntityType SECURITY_GROUP = fromString("SecurityGroup"); - - /** Static value URL for EntityType. */ - public static final EntityType URL = fromString("URL"); - - /** Static value IoTDevice for EntityType. */ - public static final EntityType IO_TDEVICE = fromString("IoTDevice"); - - /** Static value SecurityAlert for EntityType. */ - public static final EntityType SECURITY_ALERT = fromString("SecurityAlert"); - - /** Static value HuntingBookmark for EntityType. */ - public static final EntityType HUNTING_BOOKMARK = fromString("HuntingBookmark"); - - /** Static value MailCluster for EntityType. */ - public static final EntityType MAIL_CLUSTER = fromString("MailCluster"); - - /** Static value MailMessage for EntityType. */ - public static final EntityType MAIL_MESSAGE = fromString("MailMessage"); - - /** Static value Mailbox for EntityType. */ - public static final EntityType MAILBOX = fromString("Mailbox"); - - /** Static value SubmissionMail for EntityType. */ - public static final EntityType SUBMISSION_MAIL = fromString("SubmissionMail"); - - /** Static value Nic for EntityType. */ - public static final EntityType NIC = fromString("Nic"); - - /** - * Creates or finds a EntityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityType. - */ - @JsonCreator - public static EntityType fromString(String name) { - return fromString(name, EntityType.class); - } - - /** - * Gets known EntityType values. - * - * @return known EntityType values. - */ - public static Collection values() { - return values(EntityType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java deleted file mode 100644 index 8849d5c4a7b9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The event grouping aggregation kinds. */ -public final class EventGroupingAggregationKind extends ExpandableStringEnum { - /** Static value SingleAlert for EventGroupingAggregationKind. */ - public static final EventGroupingAggregationKind SINGLE_ALERT = fromString("SingleAlert"); - - /** Static value AlertPerResult for EventGroupingAggregationKind. */ - public static final EventGroupingAggregationKind ALERT_PER_RESULT = fromString("AlertPerResult"); - - /** - * Creates or finds a EventGroupingAggregationKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EventGroupingAggregationKind. - */ - @JsonCreator - public static EventGroupingAggregationKind fromString(String name) { - return fromString(name, EventGroupingAggregationKind.class); - } - - /** - * Gets known EventGroupingAggregationKind values. - * - * @return known EventGroupingAggregationKind values. - */ - public static Collection values() { - return values(EventGroupingAggregationKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java deleted file mode 100644 index ed1b01e323bc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Event grouping settings property bag. */ -@Fluent -public final class EventGroupingSettings { - /* - * The event grouping aggregation kinds - */ - @JsonProperty(value = "aggregationKind") - private EventGroupingAggregationKind aggregationKind; - - /** - * Get the aggregationKind property: The event grouping aggregation kinds. - * - * @return the aggregationKind value. - */ - public EventGroupingAggregationKind aggregationKind() { - return this.aggregationKind; - } - - /** - * Set the aggregationKind property: The event grouping aggregation kinds. - * - * @param aggregationKind the aggregationKind value to set. - * @return the EventGroupingSettings object itself. - */ - public EventGroupingSettings withAggregationKind(EventGroupingAggregationKind aggregationKind) { - this.aggregationKind = aggregationKind; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java deleted file mode 100644 index 368b2563e16c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java +++ /dev/null @@ -1,192 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ExpansionEntityQueriesProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Represents Expansion entity query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Expansion") -@Fluent -public final class ExpansionEntityQuery extends EntityQueryInner { - /* - * Expansion entity query properties - */ - @JsonProperty(value = "properties") - private ExpansionEntityQueriesProperties innerProperties; - - /** - * Get the innerProperties property: Expansion entity query properties. - * - * @return the innerProperties value. - */ - private ExpansionEntityQueriesProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ExpansionEntityQuery withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataSources property: List of the data sources that are required to run the query. - * - * @return the dataSources value. - */ - public List dataSources() { - return this.innerProperties() == null ? null : this.innerProperties().dataSources(); - } - - /** - * Set the dataSources property: List of the data sources that are required to run the query. - * - * @param dataSources the dataSources value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withDataSources(List dataSources) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withDataSources(dataSources); - return this; - } - - /** - * Get the displayName property: The query display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The query display name. - * - * @param displayName the displayName value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.innerProperties() == null ? null : this.innerProperties().inputEntityType(); - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withInputEntityType(EntityType inputEntityType) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withInputEntityType(inputEntityType); - return this; - } - - /** - * Get the inputFields property: List of the fields of the source entity that are required to run the query. - * - * @return the inputFields value. - */ - public List inputFields() { - return this.innerProperties() == null ? null : this.innerProperties().inputFields(); - } - - /** - * Set the inputFields property: List of the fields of the source entity that are required to run the query. - * - * @param inputFields the inputFields value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withInputFields(List inputFields) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withInputFields(inputFields); - return this; - } - - /** - * Get the outputEntityTypes property: List of the desired output types to be constructed from the result. - * - * @return the outputEntityTypes value. - */ - public List outputEntityTypes() { - return this.innerProperties() == null ? null : this.innerProperties().outputEntityTypes(); - } - - /** - * Set the outputEntityTypes property: List of the desired output types to be constructed from the result. - * - * @param outputEntityTypes the outputEntityTypes value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withOutputEntityTypes(List outputEntityTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withOutputEntityTypes(outputEntityTypes); - return this; - } - - /** - * Get the queryTemplate property: The template query string to be parsed and formatted. - * - * @return the queryTemplate value. - */ - public String queryTemplate() { - return this.innerProperties() == null ? null : this.innerProperties().queryTemplate(); - } - - /** - * Set the queryTemplate property: The template query string to be parsed and formatted. - * - * @param queryTemplate the queryTemplate value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withQueryTemplate(String queryTemplate) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withQueryTemplate(queryTemplate); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java deleted file mode 100644 index a3620d7458fc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java +++ /dev/null @@ -1,135 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information of a specific aggregation in the expansion result. */ -@Fluent -public final class ExpansionResultAggregation { - /* - * The common type of the aggregation. (for e.g. entity field name) - */ - @JsonProperty(value = "aggregationType") - private String aggregationType; - - /* - * Total number of aggregations of the given kind (and aggregationType if given) in the expansion result. - */ - @JsonProperty(value = "count", required = true) - private int count; - - /* - * The display name of the aggregation by type. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The kind of the aggregated entity. - */ - @JsonProperty(value = "entityKind", required = true) - private EntityKind entityKind; - - /** - * Get the aggregationType property: The common type of the aggregation. (for e.g. entity field name). - * - * @return the aggregationType value. - */ - public String aggregationType() { - return this.aggregationType; - } - - /** - * Set the aggregationType property: The common type of the aggregation. (for e.g. entity field name). - * - * @param aggregationType the aggregationType value to set. - * @return the ExpansionResultAggregation object itself. - */ - public ExpansionResultAggregation withAggregationType(String aggregationType) { - this.aggregationType = aggregationType; - return this; - } - - /** - * Get the count property: Total number of aggregations of the given kind (and aggregationType if given) in the - * expansion result. - * - * @return the count value. - */ - public int count() { - return this.count; - } - - /** - * Set the count property: Total number of aggregations of the given kind (and aggregationType if given) in the - * expansion result. - * - * @param count the count value to set. - * @return the ExpansionResultAggregation object itself. - */ - public ExpansionResultAggregation withCount(int count) { - this.count = count; - return this; - } - - /** - * Get the displayName property: The display name of the aggregation by type. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the aggregation by type. - * - * @param displayName the displayName value to set. - * @return the ExpansionResultAggregation object itself. - */ - public ExpansionResultAggregation withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the entityKind property: The kind of the aggregated entity. - * - * @return the entityKind value. - */ - public EntityKind entityKind() { - return this.entityKind; - } - - /** - * Set the entityKind property: The kind of the aggregated entity. - * - * @param entityKind the entityKind value to set. - * @return the ExpansionResultAggregation object itself. - */ - public ExpansionResultAggregation withEntityKind(EntityKind entityKind) { - this.entityKind = entityKind; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entityKind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property entityKind in model ExpansionResultAggregation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExpansionResultAggregation.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java deleted file mode 100644 index 79231d5f4fcd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Expansion result metadata. */ -@Fluent -public final class ExpansionResultsMetadata { - /* - * Information of the aggregated nodes in the expansion result. - */ - @JsonProperty(value = "aggregations") - private List aggregations; - - /** - * Get the aggregations property: Information of the aggregated nodes in the expansion result. - * - * @return the aggregations value. - */ - public List aggregations() { - return this.aggregations; - } - - /** - * Set the aggregations property: Information of the aggregated nodes in the expansion result. - * - * @param aggregations the aggregations value to set. - * @return the ExpansionResultsMetadata object itself. - */ - public ExpansionResultsMetadata withAggregations(List aggregations) { - this.aggregations = aggregations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (aggregations() != null) { - aggregations().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java deleted file mode 100644 index 05d0db1cba99..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java +++ /dev/null @@ -1,62 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EyesOnSettingsProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Settings with single toggle. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("EyesOn") -@Fluent -public final class EyesOn extends SettingsInner { - /* - * EyesOn properties - */ - @JsonProperty(value = "properties") - private EyesOnSettingsProperties innerProperties; - - /** - * Get the innerProperties property: EyesOn properties. - * - * @return the innerProperties value. - */ - private EyesOnSettingsProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public EyesOn withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the isEnabled property: Determines whether the setting is enable or disabled. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java deleted file mode 100644 index d01e4fca5f25..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A single field mapping of the mapped entity. */ -@Fluent -public final class FieldMapping { - /* - * the V3 identifier of the entity - */ - @JsonProperty(value = "identifier") - private String identifier; - - /* - * the column name to be mapped to the identifier - */ - @JsonProperty(value = "columnName") - private String columnName; - - /** - * Get the identifier property: the V3 identifier of the entity. - * - * @return the identifier value. - */ - public String identifier() { - return this.identifier; - } - - /** - * Set the identifier property: the V3 identifier of the entity. - * - * @param identifier the identifier value to set. - * @return the FieldMapping object itself. - */ - public FieldMapping withIdentifier(String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Get the columnName property: the column name to be mapped to the identifier. - * - * @return the columnName value. - */ - public String columnName() { - return this.columnName; - } - - /** - * Set the columnName property: the column name to be mapped to the identifier. - * - * @param columnName the columnName value to set. - * @return the FieldMapping object itself. - */ - public FieldMapping withColumnName(String columnName) { - this.columnName = columnName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java deleted file mode 100644 index 7cfc51143dbb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java +++ /dev/null @@ -1,104 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.FileEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** Represents a file entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("File") -@Fluent -public final class FileEntity extends EntityInner { - /* - * File entity properties - */ - @JsonProperty(value = "properties") - private FileEntityProperties innerProperties; - - /** - * Get the innerProperties property: File entity properties. - * - * @return the innerProperties value. - */ - private FileEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the directory property: The full path to the file. - * - * @return the directory value. - */ - public String directory() { - return this.innerProperties() == null ? null : this.innerProperties().directory(); - } - - /** - * Get the fileHashEntityIds property: The file hash entity identifiers associated with this file. - * - * @return the fileHashEntityIds value. - */ - public List fileHashEntityIds() { - return this.innerProperties() == null ? null : this.innerProperties().fileHashEntityIds(); - } - - /** - * Get the fileName property: The file name without path (some alerts might not include path). - * - * @return the fileName value. - */ - public String fileName() { - return this.innerProperties() == null ? null : this.innerProperties().fileName(); - } - - /** - * Get the hostEntityId property: The Host entity id which the file belongs to. - * - * @return the hostEntityId value. - */ - public String hostEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().hostEntityId(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java deleted file mode 100644 index b75ccaba87f1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The format of the file. */ -public final class FileFormat extends ExpandableStringEnum { - /** Static value CSV for FileFormat. */ - public static final FileFormat CSV = fromString("CSV"); - - /** Static value JSON for FileFormat. */ - public static final FileFormat JSON = fromString("JSON"); - - /** Static value Unspecified for FileFormat. */ - public static final FileFormat UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a FileFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileFormat. - */ - @JsonCreator - public static FileFormat fromString(String name) { - return fromString(name, FileFormat.class); - } - - /** - * Gets known FileFormat values. - * - * @return known FileFormat values. - */ - public static Collection values() { - return values(FileFormat.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java deleted file mode 100644 index 60f2e72f165e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java +++ /dev/null @@ -1,47 +0,0 @@ -// 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; - -/** The hash algorithm type. */ -public final class FileHashAlgorithm extends ExpandableStringEnum { - /** Static value Unknown for FileHashAlgorithm. */ - public static final FileHashAlgorithm UNKNOWN = fromString("Unknown"); - - /** Static value MD5 for FileHashAlgorithm. */ - public static final FileHashAlgorithm MD5 = fromString("MD5"); - - /** Static value SHA1 for FileHashAlgorithm. */ - public static final FileHashAlgorithm SHA1 = fromString("SHA1"); - - /** Static value SHA256 for FileHashAlgorithm. */ - public static final FileHashAlgorithm SHA256 = fromString("SHA256"); - - /** Static value SHA256AC for FileHashAlgorithm. */ - public static final FileHashAlgorithm SHA256AC = fromString("SHA256AC"); - - /** - * Creates or finds a FileHashAlgorithm from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileHashAlgorithm. - */ - @JsonCreator - public static FileHashAlgorithm fromString(String name) { - return fromString(name, FileHashAlgorithm.class); - } - - /** - * Gets known FileHashAlgorithm values. - * - * @return known FileHashAlgorithm values. - */ - public static Collection values() { - return values(FileHashAlgorithm.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java deleted file mode 100644 index d6252ed9ffe6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java +++ /dev/null @@ -1,85 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.FileHashEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Represents a file hash entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("FileHash") -@Fluent -public final class FileHashEntity extends EntityInner { - /* - * FileHash entity properties - */ - @JsonProperty(value = "properties") - private FileHashEntityProperties innerProperties; - - /** - * Get the innerProperties property: FileHash entity properties. - * - * @return the innerProperties value. - */ - private FileHashEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the algorithm property: The hash algorithm type. - * - * @return the algorithm value. - */ - public FileHashAlgorithm algorithm() { - return this.innerProperties() == null ? null : this.innerProperties().algorithm(); - } - - /** - * Get the hashValue property: The file hash value. - * - * @return the hashValue value. - */ - public String hashValue() { - return this.innerProperties() == null ? null : this.innerProperties().hashValue(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImport.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImport.java deleted file mode 100644 index eba802fc7782..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImport.java +++ /dev/null @@ -1,243 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of FileImport. */ -public interface FileImport { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the ingestionMode property: Describes how to ingest the records in the file. - * - * @return the ingestionMode value. - */ - IngestionMode ingestionMode(); - - /** - * Gets the contentType property: The content type of this file. - * - * @return the contentType value. - */ - FileImportContentType contentType(); - - /** - * Gets the createdTimeUtc property: The time the file was imported. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - - /** - * Gets the errorFile property: Represents the error file (if the import was ingested with errors or failed the - * validation). - * - * @return the errorFile value. - */ - FileMetadata errorFile(); - - /** - * Gets the errorsPreview property: An ordered list of some of the errors that were encountered during validation. - * - * @return the errorsPreview value. - */ - List errorsPreview(); - - /** - * Gets the importFile property: Represents the imported file. - * - * @return the importFile value. - */ - FileMetadata importFile(); - - /** - * Gets the ingestedRecordCount property: The number of records that have been successfully ingested. - * - * @return the ingestedRecordCount value. - */ - Integer ingestedRecordCount(); - - /** - * Gets the source property: The source for the data in the file. - * - * @return the source value. - */ - String source(); - - /** - * Gets the state property: The state of the file import. - * - * @return the state value. - */ - FileImportState state(); - - /** - * Gets the totalRecordCount property: The number of records in the file. - * - * @return the totalRecordCount value. - */ - Integer totalRecordCount(); - - /** - * Gets the validRecordCount property: The number of records that have passed validation. - * - * @return the validRecordCount value. - */ - Integer validRecordCount(); - - /** - * Gets the filesValidUntilTimeUtc property: The time the files associated with this import are deleted from the - * storage account. - * - * @return the filesValidUntilTimeUtc value. - */ - OffsetDateTime filesValidUntilTimeUtc(); - - /** - * Gets the importValidUntilTimeUtc property: The time the file import record is soft deleted from the database and - * history. - * - * @return the importValidUntilTimeUtc value. - */ - OffsetDateTime importValidUntilTimeUtc(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner object. - * - * @return the inner object. - */ - FileImportInner innerModel(); - - /** The entirety of the FileImport definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The FileImport definition stages. */ - interface DefinitionStages { - /** The first stage of the FileImport definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the FileImport definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the FileImport definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithIngestionMode, - DefinitionStages.WithContentType, - DefinitionStages.WithImportFile, - DefinitionStages.WithSource { - /** - * Executes the create request. - * - * @return the created resource. - */ - FileImport create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - FileImport create(Context context); - } - /** The stage of the FileImport definition allowing to specify ingestionMode. */ - interface WithIngestionMode { - /** - * Specifies the ingestionMode property: Describes how to ingest the records in the file.. - * - * @param ingestionMode Describes how to ingest the records in the file. - * @return the next definition stage. - */ - WithCreate withIngestionMode(IngestionMode ingestionMode); - } - /** The stage of the FileImport definition allowing to specify contentType. */ - interface WithContentType { - /** - * Specifies the contentType property: The content type of this file.. - * - * @param contentType The content type of this file. - * @return the next definition stage. - */ - WithCreate withContentType(FileImportContentType contentType); - } - /** The stage of the FileImport definition allowing to specify importFile. */ - interface WithImportFile { - /** - * Specifies the importFile property: Represents the imported file.. - * - * @param importFile Represents the imported file. - * @return the next definition stage. - */ - WithCreate withImportFile(FileMetadata importFile); - } - /** The stage of the FileImport definition allowing to specify source. */ - interface WithSource { - /** - * Specifies the source property: The source for the data in the file.. - * - * @param source The source for the data in the file. - * @return the next definition stage. - */ - WithCreate withSource(String source); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - FileImport refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - FileImport refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportContentType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportContentType.java deleted file mode 100644 index 0be57c4ae5d8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportContentType.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The content type of this file. */ -public final class FileImportContentType extends ExpandableStringEnum { - /** Static value BasicIndicator for FileImportContentType. */ - public static final FileImportContentType BASIC_INDICATOR = fromString("BasicIndicator"); - - /** Static value StixIndicator for FileImportContentType. */ - public static final FileImportContentType STIX_INDICATOR = fromString("StixIndicator"); - - /** Static value Unspecified for FileImportContentType. */ - public static final FileImportContentType UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a FileImportContentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileImportContentType. - */ - @JsonCreator - public static FileImportContentType fromString(String name) { - return fromString(name, FileImportContentType.class); - } - - /** - * Gets known FileImportContentType values. - * - * @return known FileImportContentType values. - */ - public static Collection values() { - return values(FileImportContentType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportList.java deleted file mode 100644 index 5037750b2957..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the file imports. */ -@Fluent -public final class FileImportList { - /* - * URL to fetch the next set of file imports. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of file imports. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of file imports. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of file imports. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of file imports. - * - * @param value the value value to set. - * @return the FileImportList object itself. - */ - public FileImportList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model FileImportList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FileImportList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java deleted file mode 100644 index 865e69307352..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java +++ /dev/null @@ -1,53 +0,0 @@ -// 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; - -/** The state of the file import. */ -public final class FileImportState extends ExpandableStringEnum { - /** Static value FatalError for FileImportState. */ - public static final FileImportState FATAL_ERROR = fromString("FatalError"); - - /** Static value Ingested for FileImportState. */ - public static final FileImportState INGESTED = fromString("Ingested"); - - /** Static value IngestedWithErrors for FileImportState. */ - public static final FileImportState INGESTED_WITH_ERRORS = fromString("IngestedWithErrors"); - - /** Static value InProgress for FileImportState. */ - public static final FileImportState IN_PROGRESS = fromString("InProgress"); - - /** Static value Invalid for FileImportState. */ - public static final FileImportState INVALID = fromString("Invalid"); - - /** Static value WaitingForUpload for FileImportState. */ - public static final FileImportState WAITING_FOR_UPLOAD = fromString("WaitingForUpload"); - - /** Static value Unspecified for FileImportState. */ - public static final FileImportState UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a FileImportState from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileImportState. - */ - @JsonCreator - public static FileImportState fromString(String name) { - return fromString(name, FileImportState.class); - } - - /** - * Gets known FileImportState values. - * - * @return known FileImportState values. - */ - public static Collection values() { - return values(FileImportState.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java deleted file mode 100644 index ae0a2d6348d2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java +++ /dev/null @@ -1,159 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of FileImports. */ -public interface FileImports { - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all file imports as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all file imports as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 file import. - */ - FileImport get(String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 file import along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 represents a file import in Azure Security Insights. - */ - FileImport delete(String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @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 represents a file import in Azure Security Insights. - */ - FileImport delete(String resourceGroupName, String workspaceName, String fileImportId, Context context); - - /** - * Gets a file import. - * - * @param id the resource ID. - * @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 file import along with {@link Response}. - */ - FileImport getById(String id); - - /** - * Gets a file import. - * - * @param id the resource ID. - * @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 file import along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the file import. - * - * @param id the resource ID. - * @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 represents a file import in Azure Security Insights. - */ - FileImport deleteById(String id); - - /** - * Delete the file import. - * - * @param id the resource ID. - * @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 represents a file import in Azure Security Insights. - */ - FileImport deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new FileImport resource. - * - * @param name resource name. - * @return the first stage of the new FileImport definition. - */ - FileImport.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java deleted file mode 100644 index 39027c4f608c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java +++ /dev/null @@ -1,128 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a file. */ -@Fluent -public final class FileMetadata { - /* - * The format of the file - */ - @JsonProperty(value = "fileFormat") - private FileFormat fileFormat; - - /* - * The name of the file. - */ - @JsonProperty(value = "fileName") - private String fileName; - - /* - * The size of the file. - */ - @JsonProperty(value = "fileSize") - private Integer fileSize; - - /* - * A URI with a valid SAS token to allow uploading / downloading the file. - */ - @JsonProperty(value = "fileContentUri", access = JsonProperty.Access.WRITE_ONLY) - private String fileContentUri; - - /* - * Indicates whether the file was deleted from the storage account. - */ - @JsonProperty(value = "deleteStatus", access = JsonProperty.Access.WRITE_ONLY) - private DeleteStatus deleteStatus; - - /** - * Get the fileFormat property: The format of the file. - * - * @return the fileFormat value. - */ - public FileFormat fileFormat() { - return this.fileFormat; - } - - /** - * Set the fileFormat property: The format of the file. - * - * @param fileFormat the fileFormat value to set. - * @return the FileMetadata object itself. - */ - public FileMetadata withFileFormat(FileFormat fileFormat) { - this.fileFormat = fileFormat; - return this; - } - - /** - * Get the fileName property: The name of the file. - * - * @return the fileName value. - */ - public String fileName() { - return this.fileName; - } - - /** - * Set the fileName property: The name of the file. - * - * @param fileName the fileName value to set. - * @return the FileMetadata object itself. - */ - public FileMetadata withFileName(String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Get the fileSize property: The size of the file. - * - * @return the fileSize value. - */ - public Integer fileSize() { - return this.fileSize; - } - - /** - * Set the fileSize property: The size of the file. - * - * @param fileSize the fileSize value to set. - * @return the FileMetadata object itself. - */ - public FileMetadata withFileSize(Integer fileSize) { - this.fileSize = fileSize; - return this; - } - - /** - * Get the fileContentUri property: A URI with a valid SAS token to allow uploading / downloading the file. - * - * @return the fileContentUri value. - */ - public String fileContentUri() { - return this.fileContentUri; - } - - /** - * Get the deleteStatus property: Indicates whether the file was deleted from the storage account. - * - * @return the deleteStatus value. - */ - public DeleteStatus deleteStatus() { - return this.deleteStatus; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java deleted file mode 100644 index 792e517d8d10..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java +++ /dev/null @@ -1,202 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.FusionAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents Fusion alert rule. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Fusion") -@Fluent -public final class FusionAlertRule extends AlertRuleInner { - /* - * Fusion alert rule properties - */ - @JsonProperty(value = "properties") - private FusionAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: Fusion alert rule properties. - * - * @return the innerProperties value. - */ - private FusionAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public FusionAlertRule withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.innerProperties() == null ? null : this.innerProperties().alertRuleTemplateName(); - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the FusionAlertRule object itself. - */ - public FusionAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleProperties(); - } - this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the FusionAlertRule object itself. - */ - public FusionAlertRule withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the sourceSettings property: Configuration for all supported source signals in fusion detection. - * - * @return the sourceSettings value. - */ - public List sourceSettings() { - return this.innerProperties() == null ? null : this.innerProperties().sourceSettings(); - } - - /** - * Set the sourceSettings property: Configuration for all supported source signals in fusion detection. - * - * @param sourceSettings the sourceSettings value to set. - * @return the FusionAlertRule object itself. - */ - public FusionAlertRule withSourceSettings(List sourceSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleProperties(); - } - this.innerProperties().withSourceSettings(sourceSettings); - return this; - } - - /** - * Get the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. - * - * @return the scenarioExclusionPatterns value. - */ - public List scenarioExclusionPatterns() { - return this.innerProperties() == null ? null : this.innerProperties().scenarioExclusionPatterns(); - } - - /** - * Set the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. - * - * @param scenarioExclusionPatterns the scenarioExclusionPatterns value to set. - * @return the FusionAlertRule object itself. - */ - public FusionAlertRule withScenarioExclusionPatterns( - List scenarioExclusionPatterns) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleProperties(); - } - this.innerProperties().withScenarioExclusionPatterns(scenarioExclusionPatterns); - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java deleted file mode 100644 index ce4da38707f0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java +++ /dev/null @@ -1,274 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.FusionAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents Fusion alert rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Fusion") -@Fluent -public final class FusionAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * Fusion alert rule template properties - */ - @JsonProperty(value = "properties") - private FusionAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: Fusion alert rule template properties. - * - * @return the innerProperties value. - */ - private FusionAlertRuleTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data connectors for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data connectors for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Get the sourceSettings property: All supported source signal configurations consumed in fusion detection. - * - * @return the sourceSettings value. - */ - public List sourceSettings() { - return this.innerProperties() == null ? null : this.innerProperties().sourceSettings(); - } - - /** - * Set the sourceSettings property: All supported source signal configurations consumed in fusion detection. - * - * @param sourceSettings the sourceSettings value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withSourceSettings(List sourceSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withSourceSettings(sourceSettings); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java deleted file mode 100644 index 018fafeb7256..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java +++ /dev/null @@ -1,87 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a Fusion scenario exclusion patterns in Fusion detection. */ -@Fluent -public final class FusionScenarioExclusionPattern { - /* - * Scenario exclusion pattern. - */ - @JsonProperty(value = "exclusionPattern", required = true) - private String exclusionPattern; - - /* - * DateTime when scenario exclusion pattern is added in UTC. - */ - @JsonProperty(value = "dateAddedInUTC", required = true) - private String dateAddedInUtc; - - /** - * Get the exclusionPattern property: Scenario exclusion pattern. - * - * @return the exclusionPattern value. - */ - public String exclusionPattern() { - return this.exclusionPattern; - } - - /** - * Set the exclusionPattern property: Scenario exclusion pattern. - * - * @param exclusionPattern the exclusionPattern value to set. - * @return the FusionScenarioExclusionPattern object itself. - */ - public FusionScenarioExclusionPattern withExclusionPattern(String exclusionPattern) { - this.exclusionPattern = exclusionPattern; - return this; - } - - /** - * Get the dateAddedInUtc property: DateTime when scenario exclusion pattern is added in UTC. - * - * @return the dateAddedInUtc value. - */ - public String dateAddedInUtc() { - return this.dateAddedInUtc; - } - - /** - * Set the dateAddedInUtc property: DateTime when scenario exclusion pattern is added in UTC. - * - * @param dateAddedInUtc the dateAddedInUtc value to set. - * @return the FusionScenarioExclusionPattern object itself. - */ - public FusionScenarioExclusionPattern withDateAddedInUtc(String dateAddedInUtc) { - this.dateAddedInUtc = dateAddedInUtc; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (exclusionPattern() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property exclusionPattern in model FusionScenarioExclusionPattern")); - } - if (dateAddedInUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dateAddedInUtc in model FusionScenarioExclusionPattern")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionScenarioExclusionPattern.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java deleted file mode 100644 index e551140636d8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java +++ /dev/null @@ -1,114 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents a supported source signal configuration in Fusion detection. */ -@Fluent -public final class FusionSourceSettings { - /* - * Determines whether this source signal is enabled or disabled in Fusion detection. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * Name of the Fusion source signal. Refer to Fusion alert rule template for supported values. - */ - @JsonProperty(value = "sourceName", required = true) - private String sourceName; - - /* - * Configuration for all source subtypes under this source signal consumed in fusion detection. - */ - @JsonProperty(value = "sourceSubTypes") - private List sourceSubTypes; - - /** - * Get the enabled property: Determines whether this source signal is enabled or disabled in Fusion detection. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this source signal is enabled or disabled in Fusion detection. - * - * @param enabled the enabled value to set. - * @return the FusionSourceSettings object itself. - */ - public FusionSourceSettings withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the sourceName property: Name of the Fusion source signal. Refer to Fusion alert rule template for supported - * values. - * - * @return the sourceName value. - */ - public String sourceName() { - return this.sourceName; - } - - /** - * Set the sourceName property: Name of the Fusion source signal. Refer to Fusion alert rule template for supported - * values. - * - * @param sourceName the sourceName value to set. - * @return the FusionSourceSettings object itself. - */ - public FusionSourceSettings withSourceName(String sourceName) { - this.sourceName = sourceName; - return this; - } - - /** - * Get the sourceSubTypes property: Configuration for all source subtypes under this source signal consumed in - * fusion detection. - * - * @return the sourceSubTypes value. - */ - public List sourceSubTypes() { - return this.sourceSubTypes; - } - - /** - * Set the sourceSubTypes property: Configuration for all source subtypes under this source signal consumed in - * fusion detection. - * - * @param sourceSubTypes the sourceSubTypes value to set. - * @return the FusionSourceSettings object itself. - */ - public FusionSourceSettings withSourceSubTypes(List sourceSubTypes) { - this.sourceSubTypes = sourceSubTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sourceName in model FusionSourceSettings")); - } - if (sourceSubTypes() != null) { - sourceSubTypes().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionSourceSettings.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java deleted file mode 100644 index cdf5cd5f9269..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java +++ /dev/null @@ -1,136 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a supported source subtype configuration under a source signal in Fusion detection. */ -@Fluent -public final class FusionSourceSubTypeSetting { - /* - * Determines whether this source subtype under source signal is enabled or disabled in Fusion detection. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The Name of the source subtype under a given source signal in Fusion detection. Refer to Fusion alert rule - * template for supported values. - */ - @JsonProperty(value = "sourceSubTypeName", required = true) - private String sourceSubTypeName; - - /* - * The display name of source subtype under a source signal consumed in Fusion detection. - */ - @JsonProperty(value = "sourceSubTypeDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String sourceSubTypeDisplayName; - - /* - * Severity configuration for a source subtype consumed in fusion detection. - */ - @JsonProperty(value = "severityFilters", required = true) - private FusionSubTypeSeverityFilter severityFilters; - - /** - * Get the enabled property: Determines whether this source subtype under source signal is enabled or disabled in - * Fusion detection. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this source subtype under source signal is enabled or disabled in - * Fusion detection. - * - * @param enabled the enabled value to set. - * @return the FusionSourceSubTypeSetting object itself. - */ - public FusionSourceSubTypeSetting withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the sourceSubTypeName property: The Name of the source subtype under a given source signal in Fusion - * detection. Refer to Fusion alert rule template for supported values. - * - * @return the sourceSubTypeName value. - */ - public String sourceSubTypeName() { - return this.sourceSubTypeName; - } - - /** - * Set the sourceSubTypeName property: The Name of the source subtype under a given source signal in Fusion - * detection. Refer to Fusion alert rule template for supported values. - * - * @param sourceSubTypeName the sourceSubTypeName value to set. - * @return the FusionSourceSubTypeSetting object itself. - */ - public FusionSourceSubTypeSetting withSourceSubTypeName(String sourceSubTypeName) { - this.sourceSubTypeName = sourceSubTypeName; - return this; - } - - /** - * Get the sourceSubTypeDisplayName property: The display name of source subtype under a source signal consumed in - * Fusion detection. - * - * @return the sourceSubTypeDisplayName value. - */ - public String sourceSubTypeDisplayName() { - return this.sourceSubTypeDisplayName; - } - - /** - * Get the severityFilters property: Severity configuration for a source subtype consumed in fusion detection. - * - * @return the severityFilters value. - */ - public FusionSubTypeSeverityFilter severityFilters() { - return this.severityFilters; - } - - /** - * Set the severityFilters property: Severity configuration for a source subtype consumed in fusion detection. - * - * @param severityFilters the severityFilters value to set. - * @return the FusionSourceSubTypeSetting object itself. - */ - public FusionSourceSubTypeSetting withSeverityFilters(FusionSubTypeSeverityFilter severityFilters) { - this.severityFilters = severityFilters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceSubTypeName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceSubTypeName in model FusionSourceSubTypeSetting")); - } - if (severityFilters() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severityFilters in model FusionSourceSubTypeSetting")); - } else { - severityFilters().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionSourceSubTypeSetting.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java deleted file mode 100644 index c6ae35c72337..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java +++ /dev/null @@ -1,67 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents severity configuration for a source subtype consumed in Fusion detection. */ -@Fluent -public final class FusionSubTypeSeverityFilter { - /* - * Determines whether this source subtype supports severity configuration or not. - */ - @JsonProperty(value = "isSupported", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isSupported; - - /* - * Individual Severity configuration settings for a given source subtype consumed in Fusion detection. - */ - @JsonProperty(value = "filters") - private List filters; - - /** - * Get the isSupported property: Determines whether this source subtype supports severity configuration or not. - * - * @return the isSupported value. - */ - public Boolean isSupported() { - return this.isSupported; - } - - /** - * Get the filters property: Individual Severity configuration settings for a given source subtype consumed in - * Fusion detection. - * - * @return the filters value. - */ - public List filters() { - return this.filters; - } - - /** - * Set the filters property: Individual Severity configuration settings for a given source subtype consumed in - * Fusion detection. - * - * @param filters the filters value to set. - * @return the FusionSubTypeSeverityFilter object itself. - */ - public FusionSubTypeSeverityFilter withFilters(List filters) { - this.filters = filters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (filters() != null) { - filters().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java deleted file mode 100644 index 0892d2a46323..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java +++ /dev/null @@ -1,83 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a Severity filter setting for a given source subtype consumed in Fusion detection. */ -@Fluent -public final class FusionSubTypeSeverityFiltersItem { - /* - * The Severity for a given source subtype consumed in Fusion detection. - */ - @JsonProperty(value = "severity", required = true) - private AlertSeverity severity; - - /* - * Determines whether this severity is enabled or disabled for this source subtype consumed in Fusion detection. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /** - * Get the severity property: The Severity for a given source subtype consumed in Fusion detection. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The Severity for a given source subtype consumed in Fusion detection. - * - * @param severity the severity value to set. - * @return the FusionSubTypeSeverityFiltersItem object itself. - */ - public FusionSubTypeSeverityFiltersItem withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the enabled property: Determines whether this severity is enabled or disabled for this source subtype - * consumed in Fusion detection. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this severity is enabled or disabled for this source subtype - * consumed in Fusion detection. - * - * @param enabled the enabled value to set. - * @return the FusionSubTypeSeverityFiltersItem object itself. - */ - public FusionSubTypeSeverityFiltersItem withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model FusionSubTypeSeverityFiltersItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionSubTypeSeverityFiltersItem.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java deleted file mode 100644 index 1f2111a56b48..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java +++ /dev/null @@ -1,87 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents a source signal consumed in Fusion detection. */ -@Fluent -public final class FusionTemplateSourceSetting { - /* - * The name of a source signal consumed in Fusion detection. - */ - @JsonProperty(value = "sourceName", required = true) - private String sourceName; - - /* - * All supported source subtypes under this source signal consumed in fusion detection. - */ - @JsonProperty(value = "sourceSubTypes") - private List sourceSubTypes; - - /** - * Get the sourceName property: The name of a source signal consumed in Fusion detection. - * - * @return the sourceName value. - */ - public String sourceName() { - return this.sourceName; - } - - /** - * Set the sourceName property: The name of a source signal consumed in Fusion detection. - * - * @param sourceName the sourceName value to set. - * @return the FusionTemplateSourceSetting object itself. - */ - public FusionTemplateSourceSetting withSourceName(String sourceName) { - this.sourceName = sourceName; - return this; - } - - /** - * Get the sourceSubTypes property: All supported source subtypes under this source signal consumed in fusion - * detection. - * - * @return the sourceSubTypes value. - */ - public List sourceSubTypes() { - return this.sourceSubTypes; - } - - /** - * Set the sourceSubTypes property: All supported source subtypes under this source signal consumed in fusion - * detection. - * - * @param sourceSubTypes the sourceSubTypes value to set. - * @return the FusionTemplateSourceSetting object itself. - */ - public FusionTemplateSourceSetting withSourceSubTypes(List sourceSubTypes) { - this.sourceSubTypes = sourceSubTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceName in model FusionTemplateSourceSetting")); - } - if (sourceSubTypes() != null) { - sourceSubTypes().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionTemplateSourceSetting.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java deleted file mode 100644 index 89bfdf241a52..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java +++ /dev/null @@ -1,109 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a source subtype under a source signal consumed in Fusion detection. */ -@Fluent -public final class FusionTemplateSourceSubType { - /* - * The name of source subtype under a source signal consumed in Fusion detection. - */ - @JsonProperty(value = "sourceSubTypeName", required = true) - private String sourceSubTypeName; - - /* - * The display name of source subtype under a source signal consumed in Fusion detection. - */ - @JsonProperty(value = "sourceSubTypeDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String sourceSubTypeDisplayName; - - /* - * Severity configuration available for a source subtype consumed in fusion detection. - */ - @JsonProperty(value = "severityFilter", required = true) - private FusionTemplateSubTypeSeverityFilter severityFilter; - - /** - * Get the sourceSubTypeName property: The name of source subtype under a source signal consumed in Fusion - * detection. - * - * @return the sourceSubTypeName value. - */ - public String sourceSubTypeName() { - return this.sourceSubTypeName; - } - - /** - * Set the sourceSubTypeName property: The name of source subtype under a source signal consumed in Fusion - * detection. - * - * @param sourceSubTypeName the sourceSubTypeName value to set. - * @return the FusionTemplateSourceSubType object itself. - */ - public FusionTemplateSourceSubType withSourceSubTypeName(String sourceSubTypeName) { - this.sourceSubTypeName = sourceSubTypeName; - return this; - } - - /** - * Get the sourceSubTypeDisplayName property: The display name of source subtype under a source signal consumed in - * Fusion detection. - * - * @return the sourceSubTypeDisplayName value. - */ - public String sourceSubTypeDisplayName() { - return this.sourceSubTypeDisplayName; - } - - /** - * Get the severityFilter property: Severity configuration available for a source subtype consumed in fusion - * detection. - * - * @return the severityFilter value. - */ - public FusionTemplateSubTypeSeverityFilter severityFilter() { - return this.severityFilter; - } - - /** - * Set the severityFilter property: Severity configuration available for a source subtype consumed in fusion - * detection. - * - * @param severityFilter the severityFilter value to set. - * @return the FusionTemplateSourceSubType object itself. - */ - public FusionTemplateSourceSubType withSeverityFilter(FusionTemplateSubTypeSeverityFilter severityFilter) { - this.severityFilter = severityFilter; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceSubTypeName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceSubTypeName in model FusionTemplateSourceSubType")); - } - if (severityFilter() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severityFilter in model FusionTemplateSourceSubType")); - } else { - severityFilter().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionTemplateSourceSubType.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java deleted file mode 100644 index ef8388621d5a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents severity configurations available for a source subtype consumed in Fusion detection. */ -@Fluent -public final class FusionTemplateSubTypeSeverityFilter { - /* - * Determines whether severity configuration is supported for this source subtype consumed in Fusion detection. - */ - @JsonProperty(value = "isSupported", required = true) - private boolean isSupported; - - /* - * List of all supported severities for this source subtype consumed in Fusion detection. - */ - @JsonProperty(value = "severityFilters") - private List severityFilters; - - /** - * Get the isSupported property: Determines whether severity configuration is supported for this source subtype - * consumed in Fusion detection. - * - * @return the isSupported value. - */ - public boolean isSupported() { - return this.isSupported; - } - - /** - * Set the isSupported property: Determines whether severity configuration is supported for this source subtype - * consumed in Fusion detection. - * - * @param isSupported the isSupported value to set. - * @return the FusionTemplateSubTypeSeverityFilter object itself. - */ - public FusionTemplateSubTypeSeverityFilter withIsSupported(boolean isSupported) { - this.isSupported = isSupported; - return this; - } - - /** - * Get the severityFilters property: List of all supported severities for this source subtype consumed in Fusion - * detection. - * - * @return the severityFilters value. - */ - public List severityFilters() { - return this.severityFilters; - } - - /** - * Set the severityFilters property: List of all supported severities for this source subtype consumed in Fusion - * detection. - * - * @param severityFilters the severityFilters value to set. - * @return the FusionTemplateSubTypeSeverityFilter object itself. - */ - public FusionTemplateSubTypeSeverityFilter withSeverityFilters(List severityFilters) { - this.severityFilters = severityFilters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java deleted file mode 100644 index 675f38adbbe9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java +++ /dev/null @@ -1,134 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The geo-location context attached to the ip entity. */ -@Immutable -public final class GeoLocation { - /* - * Autonomous System Number - */ - @JsonProperty(value = "asn", access = JsonProperty.Access.WRITE_ONLY) - private Integer asn; - - /* - * City name - */ - @JsonProperty(value = "city", access = JsonProperty.Access.WRITE_ONLY) - private String city; - - /* - * The country code according to ISO 3166 format - */ - @JsonProperty(value = "countryCode", access = JsonProperty.Access.WRITE_ONLY) - private String countryCode; - - /* - * Country name according to ISO 3166 Alpha 2: the lowercase of the English Short Name - */ - @JsonProperty(value = "countryName", access = JsonProperty.Access.WRITE_ONLY) - private String countryName; - - /* - * The longitude of the identified location, expressed as a floating point number with range of -180 to 180, with - * positive numbers representing East and negative numbers representing West. Latitude and longitude are derived - * from the city or postal code. - */ - @JsonProperty(value = "latitude", access = JsonProperty.Access.WRITE_ONLY) - private Double latitude; - - /* - * The latitude of the identified location, expressed as a floating point number with range of - 90 to 90, with - * positive numbers representing North and negative numbers representing South. Latitude and longitude are derived - * from the city or postal code. - */ - @JsonProperty(value = "longitude", access = JsonProperty.Access.WRITE_ONLY) - private Double longitude; - - /* - * State name - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private String state; - - /** - * Get the asn property: Autonomous System Number. - * - * @return the asn value. - */ - public Integer asn() { - return this.asn; - } - - /** - * Get the city property: City name. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Get the countryCode property: The country code according to ISO 3166 format. - * - * @return the countryCode value. - */ - public String countryCode() { - return this.countryCode; - } - - /** - * Get the countryName property: Country name according to ISO 3166 Alpha 2: the lowercase of the English Short - * Name. - * - * @return the countryName value. - */ - public String countryName() { - return this.countryName; - } - - /** - * Get the latitude property: The longitude of the identified location, expressed as a floating point number with - * range of -180 to 180, with positive numbers representing East and negative numbers representing West. Latitude - * and longitude are derived from the city or postal code. - * - * @return the latitude value. - */ - public Double latitude() { - return this.latitude; - } - - /** - * Get the longitude property: The latitude of the identified location, expressed as a floating point number with - * range of - 90 to 90, with positive numbers representing North and negative numbers representing South. Latitude - * and longitude are derived from the city or postal code. - * - * @return the longitude value. - */ - public Double longitude() { - return this.longitude; - } - - /** - * Get the state property: State name. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java deleted file mode 100644 index cc444f69cd21..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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; - -/** the query kind. */ -public final class GetInsightsError extends ExpandableStringEnum { - /** Static value Insight for GetInsightsError. */ - public static final GetInsightsError INSIGHT = fromString("Insight"); - - /** - * Creates or finds a GetInsightsError from its string representation. - * - * @param name a name to look for. - * @return the corresponding GetInsightsError. - */ - @JsonCreator - public static GetInsightsError fromString(String name) { - return fromString(name, GetInsightsError.class); - } - - /** - * Gets known GetInsightsError values. - * - * @return known GetInsightsError values. - */ - public static Collection values() { - return values(GetInsightsError.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsErrorKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsErrorKind.java deleted file mode 100644 index 8717c6a073ff..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsErrorKind.java +++ /dev/null @@ -1,112 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** GetInsights Query Errors. */ -@Fluent -public final class GetInsightsErrorKind { - /* - * the query kind - */ - @JsonProperty(value = "kind", required = true) - private GetInsightsError kind; - - /* - * the query id - */ - @JsonProperty(value = "queryId") - private String queryId; - - /* - * the error message - */ - @JsonProperty(value = "errorMessage", required = true) - private String errorMessage; - - /** - * Get the kind property: the query kind. - * - * @return the kind value. - */ - public GetInsightsError kind() { - return this.kind; - } - - /** - * Set the kind property: the query kind. - * - * @param kind the kind value to set. - * @return the GetInsightsErrorKind object itself. - */ - public GetInsightsErrorKind withKind(GetInsightsError kind) { - this.kind = kind; - return this; - } - - /** - * Get the queryId property: the query id. - * - * @return the queryId value. - */ - public String queryId() { - return this.queryId; - } - - /** - * Set the queryId property: the query id. - * - * @param queryId the queryId value to set. - * @return the GetInsightsErrorKind object itself. - */ - public GetInsightsErrorKind withQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Get the errorMessage property: the error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: the error message. - * - * @param errorMessage the errorMessage value to set. - * @return the GetInsightsErrorKind object itself. - */ - public GetInsightsErrorKind withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model GetInsightsErrorKind")); - } - if (errorMessage() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property errorMessage in model GetInsightsErrorKind")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(GetInsightsErrorKind.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java deleted file mode 100644 index c02767abf5e7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Get Insights result metadata. */ -@Fluent -public final class GetInsightsResultsMetadata { - /* - * the total items found for the insights request - */ - @JsonProperty(value = "totalCount", required = true) - private int totalCount; - - /* - * information about the failed queries - */ - @JsonProperty(value = "errors") - private List errors; - - /** - * Get the totalCount property: the total items found for the insights request. - * - * @return the totalCount value. - */ - public int totalCount() { - return this.totalCount; - } - - /** - * Set the totalCount property: the total items found for the insights request. - * - * @param totalCount the totalCount value to set. - * @return the GetInsightsResultsMetadata object itself. - */ - public GetInsightsResultsMetadata withTotalCount(int totalCount) { - this.totalCount = totalCount; - return this; - } - - /** - * Get the errors property: information about the failed queries. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: information about the failed queries. - * - * @param errors the errors value to set. - * @return the GetInsightsResultsMetadata object itself. - */ - public GetInsightsResultsMetadata withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetQueriesResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetQueriesResponse.java deleted file mode 100644 index bb0a74c7e027..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetQueriesResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import java.util.List; - -/** An immutable client-side representation of GetQueriesResponse. */ -public interface GetQueriesResponse { - /** - * Gets the value property: The query result values. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner object. - * - * @return the inner object. - */ - GetQueriesResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java deleted file mode 100644 index 07ee2d932d26..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Resources created in GitHub repository. */ -@Fluent -public final class GitHubResourceInfo { - /* - * GitHub application installation id. - */ - @JsonProperty(value = "appInstallationId") - private String appInstallationId; - - /** - * Get the appInstallationId property: GitHub application installation id. - * - * @return the appInstallationId value. - */ - public String appInstallationId() { - return this.appInstallationId; - } - - /** - * Set the appInstallationId property: GitHub application installation id. - * - * @param appInstallationId the appInstallationId value to set. - * @return the GitHubResourceInfo object itself. - */ - public GitHubResourceInfo withAppInstallationId(String appInstallationId) { - this.appInstallationId = appInstallationId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java deleted file mode 100644 index a0f7e3b56450..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java +++ /dev/null @@ -1,98 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The graph query to show the current data status. */ -@Fluent -public class GraphQueries { - /* - * the metric that the query is checking - */ - @JsonProperty(value = "metricName") - private String metricName; - - /* - * The legend for the graph - */ - @JsonProperty(value = "legend") - private String legend; - - /* - * The base query for the graph - */ - @JsonProperty(value = "baseQuery") - private String baseQuery; - - /** - * Get the metricName property: the metric that the query is checking. - * - * @return the metricName value. - */ - public String metricName() { - return this.metricName; - } - - /** - * Set the metricName property: the metric that the query is checking. - * - * @param metricName the metricName value to set. - * @return the GraphQueries object itself. - */ - public GraphQueries withMetricName(String metricName) { - this.metricName = metricName; - return this; - } - - /** - * Get the legend property: The legend for the graph. - * - * @return the legend value. - */ - public String legend() { - return this.legend; - } - - /** - * Set the legend property: The legend for the graph. - * - * @param legend the legend value to set. - * @return the GraphQueries object itself. - */ - public GraphQueries withLegend(String legend) { - this.legend = legend; - return this; - } - - /** - * Get the baseQuery property: The base query for the graph. - * - * @return the baseQuery value. - */ - public String baseQuery() { - return this.baseQuery; - } - - /** - * Set the baseQuery property: The base query for the graph. - * - * @param baseQuery the baseQuery value to set. - * @return the GraphQueries object itself. - */ - public GraphQueries withBaseQuery(String baseQuery) { - this.baseQuery = baseQuery; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java deleted file mode 100644 index c6a5e97fd9ca..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java +++ /dev/null @@ -1,230 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.util.List; - -/** Grouping configuration property bag. */ -@Fluent -public final class GroupingConfiguration { - /* - * Grouping enabled - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * Re-open closed matching incidents - */ - @JsonProperty(value = "reopenClosedIncident", required = true) - private boolean reopenClosedIncident; - - /* - * Limit the group to alerts created within the lookback duration (in ISO 8601 duration format) - */ - @JsonProperty(value = "lookbackDuration", required = true) - private Duration lookbackDuration; - - /* - * Grouping matching method. When method is Selected at least one of groupByEntities, groupByAlertDetails, - * groupByCustomDetails must be provided and not empty. - */ - @JsonProperty(value = "matchingMethod", required = true) - private MatchingMethod matchingMethod; - - /* - * A list of entity types to group by (when matchingMethod is Selected). Only entities defined in the current alert - * rule may be used. - */ - @JsonProperty(value = "groupByEntities") - private List groupByEntities; - - /* - * A list of alert details to group by (when matchingMethod is Selected) - */ - @JsonProperty(value = "groupByAlertDetails") - private List groupByAlertDetails; - - /* - * A list of custom details keys to group by (when matchingMethod is Selected). Only keys defined in the current - * alert rule may be used. - */ - @JsonProperty(value = "groupByCustomDetails") - private List groupByCustomDetails; - - /** - * Get the enabled property: Grouping enabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Grouping enabled. - * - * @param enabled the enabled value to set. - * @return the GroupingConfiguration object itself. - */ - public GroupingConfiguration withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the reopenClosedIncident property: Re-open closed matching incidents. - * - * @return the reopenClosedIncident value. - */ - public boolean reopenClosedIncident() { - return this.reopenClosedIncident; - } - - /** - * Set the reopenClosedIncident property: Re-open closed matching incidents. - * - * @param reopenClosedIncident the reopenClosedIncident value to set. - * @return the GroupingConfiguration object itself. - */ - public GroupingConfiguration withReopenClosedIncident(boolean reopenClosedIncident) { - this.reopenClosedIncident = reopenClosedIncident; - return this; - } - - /** - * Get the lookbackDuration property: Limit the group to alerts created within the lookback duration (in ISO 8601 - * duration format). - * - * @return the lookbackDuration value. - */ - public Duration lookbackDuration() { - return this.lookbackDuration; - } - - /** - * Set the lookbackDuration property: Limit the group to alerts created within the lookback duration (in ISO 8601 - * duration format). - * - * @param lookbackDuration the lookbackDuration value to set. - * @return the GroupingConfiguration object itself. - */ - public GroupingConfiguration withLookbackDuration(Duration lookbackDuration) { - this.lookbackDuration = lookbackDuration; - return this; - } - - /** - * Get the matchingMethod property: Grouping matching method. When method is Selected at least one of - * groupByEntities, groupByAlertDetails, groupByCustomDetails must be provided and not empty. - * - * @return the matchingMethod value. - */ - public MatchingMethod matchingMethod() { - return this.matchingMethod; - } - - /** - * Set the matchingMethod property: Grouping matching method. When method is Selected at least one of - * groupByEntities, groupByAlertDetails, groupByCustomDetails must be provided and not empty. - * - * @param matchingMethod the matchingMethod value to set. - * @return the GroupingConfiguration object itself. - */ - public GroupingConfiguration withMatchingMethod(MatchingMethod matchingMethod) { - this.matchingMethod = matchingMethod; - return this; - } - - /** - * Get the groupByEntities property: A list of entity types to group by (when matchingMethod is Selected). Only - * entities defined in the current alert rule may be used. - * - * @return the groupByEntities value. - */ - public List groupByEntities() { - return this.groupByEntities; - } - - /** - * Set the groupByEntities property: A list of entity types to group by (when matchingMethod is Selected). Only - * entities defined in the current alert rule may be used. - * - * @param groupByEntities the groupByEntities value to set. - * @return the GroupingConfiguration object itself. - */ - public GroupingConfiguration withGroupByEntities(List groupByEntities) { - this.groupByEntities = groupByEntities; - return this; - } - - /** - * Get the groupByAlertDetails property: A list of alert details to group by (when matchingMethod is Selected). - * - * @return the groupByAlertDetails value. - */ - public List groupByAlertDetails() { - return this.groupByAlertDetails; - } - - /** - * Set the groupByAlertDetails property: A list of alert details to group by (when matchingMethod is Selected). - * - * @param groupByAlertDetails the groupByAlertDetails value to set. - * @return the GroupingConfiguration object itself. - */ - public GroupingConfiguration withGroupByAlertDetails(List groupByAlertDetails) { - this.groupByAlertDetails = groupByAlertDetails; - return this; - } - - /** - * Get the groupByCustomDetails property: A list of custom details keys to group by (when matchingMethod is - * Selected). Only keys defined in the current alert rule may be used. - * - * @return the groupByCustomDetails value. - */ - public List groupByCustomDetails() { - return this.groupByCustomDetails; - } - - /** - * Set the groupByCustomDetails property: A list of custom details keys to group by (when matchingMethod is - * Selected). Only keys defined in the current alert rule may be used. - * - * @param groupByCustomDetails the groupByCustomDetails value to set. - * @return the GroupingConfiguration object itself. - */ - public GroupingConfiguration withGroupByCustomDetails(List groupByCustomDetails) { - this.groupByCustomDetails = groupByCustomDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (lookbackDuration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property lookbackDuration in model GroupingConfiguration")); - } - if (matchingMethod() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property matchingMethod in model GroupingConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(GroupingConfiguration.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java deleted file mode 100644 index 08e75c45b2b3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java +++ /dev/null @@ -1,164 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.HostEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Represents a host entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Host") -@Fluent -public final class HostEntity extends EntityInner { - /* - * Host entity properties - */ - @JsonProperty(value = "properties") - private HostEntityProperties innerProperties; - - /** - * Get the innerProperties property: Host entity properties. - * - * @return the innerProperties value. - */ - private HostEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the azureId property: The azure resource id of the VM. - * - * @return the azureId value. - */ - public String azureId() { - return this.innerProperties() == null ? null : this.innerProperties().azureId(); - } - - /** - * Get the dnsDomain property: The DNS domain that this host belongs to. Should contain the compete DNS suffix for - * the domain. - * - * @return the dnsDomain value. - */ - public String dnsDomain() { - return this.innerProperties() == null ? null : this.innerProperties().dnsDomain(); - } - - /** - * Get the hostname property: The hostname without the domain suffix. - * - * @return the hostname value. - */ - public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); - } - - /** - * Get the isDomainJoined property: Determines whether this host belongs to a domain. - * - * @return the isDomainJoined value. - */ - public Boolean isDomainJoined() { - return this.innerProperties() == null ? null : this.innerProperties().isDomainJoined(); - } - - /** - * Get the netBiosName property: The host name (pre-windows2000). - * - * @return the netBiosName value. - */ - public String netBiosName() { - return this.innerProperties() == null ? null : this.innerProperties().netBiosName(); - } - - /** - * Get the ntDomain property: The NT domain that this host belongs to. - * - * @return the ntDomain value. - */ - public String ntDomain() { - return this.innerProperties() == null ? null : this.innerProperties().ntDomain(); - } - - /** - * Get the omsAgentId property: The OMS agent id, if the host has OMS agent installed. - * - * @return the omsAgentId value. - */ - public String omsAgentId() { - return this.innerProperties() == null ? null : this.innerProperties().omsAgentId(); - } - - /** - * Get the osFamily property: The operating system type. - * - * @return the osFamily value. - */ - public OSFamily osFamily() { - return this.innerProperties() == null ? null : this.innerProperties().osFamily(); - } - - /** - * Set the osFamily property: The operating system type. - * - * @param osFamily the osFamily value to set. - * @return the HostEntity object itself. - */ - public HostEntity withOsFamily(OSFamily osFamily) { - if (this.innerProperties() == null) { - this.innerProperties = new HostEntityProperties(); - } - this.innerProperties().withOsFamily(osFamily); - return this; - } - - /** - * Get the osVersion property: A free text representation of the operating system. This field is meant to hold - * specific versions the are more fine grained than OSFamily or future values not supported by OSFamily enumeration. - * - * @return the osVersion value. - */ - public String osVersion() { - return this.innerProperties() == null ? null : this.innerProperties().osVersion(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java deleted file mode 100644 index 3ea294c0b3b5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java +++ /dev/null @@ -1,322 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.HuntingBookmarkProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents a Hunting bookmark entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Bookmark") -@Fluent -public final class HuntingBookmark extends EntityInner { - /* - * HuntingBookmark entity properties - */ - @JsonProperty(value = "properties") - private HuntingBookmarkProperties innerProperties; - - /** - * Get the innerProperties property: HuntingBookmark entity properties. - * - * @return the innerProperties value. - */ - private HuntingBookmarkProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the created property: The time the bookmark was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); - } - - /** - * Set the created property: The time the bookmark was created. - * - * @param created the created value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withCreated(OffsetDateTime created) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withCreated(created); - return this; - } - - /** - * Get the createdBy property: Describes a user that created the bookmark. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); - } - - /** - * Set the createdBy property: Describes a user that created the bookmark. - * - * @param createdBy the createdBy value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withCreatedBy(UserInfo createdBy) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withCreatedBy(createdBy); - return this; - } - - /** - * Get the displayName property: The display name of the bookmark. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name of the bookmark. - * - * @param displayName the displayName value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the eventTime property: The time of the event. - * - * @return the eventTime value. - */ - public OffsetDateTime eventTime() { - return this.innerProperties() == null ? null : this.innerProperties().eventTime(); - } - - /** - * Set the eventTime property: The time of the event. - * - * @param eventTime the eventTime value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withEventTime(OffsetDateTime eventTime) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withEventTime(eventTime); - return this; - } - - /** - * Get the labels property: List of labels relevant to this bookmark. - * - * @return the labels value. - */ - public List labels() { - return this.innerProperties() == null ? null : this.innerProperties().labels(); - } - - /** - * Set the labels property: List of labels relevant to this bookmark. - * - * @param labels the labels value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withLabels(List labels) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withLabels(labels); - return this; - } - - /** - * Get the notes property: The notes of the bookmark. - * - * @return the notes value. - */ - public String notes() { - return this.innerProperties() == null ? null : this.innerProperties().notes(); - } - - /** - * Set the notes property: The notes of the bookmark. - * - * @param notes the notes value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withNotes(String notes) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withNotes(notes); - return this; - } - - /** - * Get the query property: The query of the bookmark. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Set the query property: The query of the bookmark. - * - * @param query the query value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withQuery(query); - return this; - } - - /** - * Get the queryResult property: The query result of the bookmark. - * - * @return the queryResult value. - */ - public String queryResult() { - return this.innerProperties() == null ? null : this.innerProperties().queryResult(); - } - - /** - * Set the queryResult property: The query result of the bookmark. - * - * @param queryResult the queryResult value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withQueryResult(String queryResult) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withQueryResult(queryResult); - return this; - } - - /** - * Get the updated property: The last time the bookmark was updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.innerProperties() == null ? null : this.innerProperties().updated(); - } - - /** - * Set the updated property: The last time the bookmark was updated. - * - * @param updated the updated value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withUpdated(OffsetDateTime updated) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withUpdated(updated); - return this; - } - - /** - * Get the updatedBy property: Describes a user that updated the bookmark. - * - * @return the updatedBy value. - */ - public UserInfo updatedBy() { - return this.innerProperties() == null ? null : this.innerProperties().updatedBy(); - } - - /** - * Set the updatedBy property: Describes a user that updated the bookmark. - * - * @param updatedBy the updatedBy value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withUpdatedBy(UserInfo updatedBy) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withUpdatedBy(updatedBy); - return this; - } - - /** - * Get the incidentInfo property: Describes an incident that relates to bookmark. - * - * @return the incidentInfo value. - */ - public IncidentInfo incidentInfo() { - return this.innerProperties() == null ? null : this.innerProperties().incidentInfo(); - } - - /** - * Set the incidentInfo property: Describes an incident that relates to bookmark. - * - * @param incidentInfo the incidentInfo value to set. - * @return the HuntingBookmark object itself. - */ - public HuntingBookmark withIncidentInfo(IncidentInfo incidentInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new HuntingBookmarkProperties(); - } - this.innerProperties().withIncidentInfo(incidentInfo); - return this; - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java deleted file mode 100644 index 2d051e853f0f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java +++ /dev/null @@ -1,701 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Incident. */ -public interface Incident { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - IncidentAdditionalData additionalData(); - - /** - * Gets the classification property: The reason the incident was closed. - * - * @return the classification value. - */ - IncidentClassification classification(); - - /** - * Gets the classificationComment property: Describes the reason the incident was closed. - * - * @return the classificationComment value. - */ - String classificationComment(); - - /** - * Gets the classificationReason property: The classification reason the incident was closed with. - * - * @return the classificationReason value. - */ - IncidentClassificationReason classificationReason(); - - /** - * Gets the createdTimeUtc property: The time the incident was created. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - - /** - * Gets the description property: The description of the incident. - * - * @return the description value. - */ - String description(); - - /** - * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @return the firstActivityTimeUtc value. - */ - OffsetDateTime firstActivityTimeUtc(); - - /** - * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. - * - * @return the incidentUrl value. - */ - String incidentUrl(); - - /** - * Gets the incidentNumber property: A sequential number. - * - * @return the incidentNumber value. - */ - Integer incidentNumber(); - - /** - * Gets the labels property: List of labels relevant to this incident. - * - * @return the labels value. - */ - List labels(); - - /** - * Gets the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @return the providerIncidentId value. - */ - String providerIncidentId(); - - /** - * Gets the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @return the lastActivityTimeUtc value. - */ - OffsetDateTime lastActivityTimeUtc(); - - /** - * Gets the lastModifiedTimeUtc property: The last time the incident was updated. - * - * @return the lastModifiedTimeUtc value. - */ - OffsetDateTime lastModifiedTimeUtc(); - - /** - * Gets the owner property: Describes a user that the incident is assigned to. - * - * @return the owner value. - */ - IncidentOwnerInfo owner(); - - /** - * Gets the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. - * - * @return the relatedAnalyticRuleIds value. - */ - List relatedAnalyticRuleIds(); - - /** - * Gets the severity property: The severity of the incident. - * - * @return the severity value. - */ - IncidentSeverity severity(); - - /** - * Gets the status property: The status of the incident. - * - * @return the status value. - */ - IncidentStatus status(); - - /** - * Gets the teamInformation property: Describes a team for the incident. - * - * @return the teamInformation value. - */ - TeamInformation teamInformation(); - - /** - * Gets the title property: The title of the incident. - * - * @return the title value. - */ - String title(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner object. - * - * @return the inner object. - */ - IncidentInner innerModel(); - - /** The entirety of the Incident definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The Incident definition stages. */ - interface DefinitionStages { - /** The first stage of the Incident definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the Incident definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the Incident definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithEtag, - DefinitionStages.WithClassification, - DefinitionStages.WithClassificationComment, - DefinitionStages.WithClassificationReason, - DefinitionStages.WithDescription, - DefinitionStages.WithFirstActivityTimeUtc, - DefinitionStages.WithLabels, - DefinitionStages.WithProviderName, - DefinitionStages.WithProviderIncidentId, - DefinitionStages.WithLastActivityTimeUtc, - DefinitionStages.WithOwner, - DefinitionStages.WithSeverity, - DefinitionStages.WithStatus, - DefinitionStages.WithTeamInformation, - DefinitionStages.WithTitle { - /** - * Executes the create request. - * - * @return the created resource. - */ - Incident create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Incident create(Context context); - } - /** The stage of the Incident definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the Incident definition allowing to specify classification. */ - interface WithClassification { - /** - * Specifies the classification property: The reason the incident was closed. - * - * @param classification The reason the incident was closed. - * @return the next definition stage. - */ - WithCreate withClassification(IncidentClassification classification); - } - /** The stage of the Incident definition allowing to specify classificationComment. */ - interface WithClassificationComment { - /** - * Specifies the classificationComment property: Describes the reason the incident was closed. - * - * @param classificationComment Describes the reason the incident was closed. - * @return the next definition stage. - */ - WithCreate withClassificationComment(String classificationComment); - } - /** The stage of the Incident definition allowing to specify classificationReason. */ - interface WithClassificationReason { - /** - * Specifies the classificationReason property: The classification reason the incident was closed with. - * - * @param classificationReason The classification reason the incident was closed with. - * @return the next definition stage. - */ - WithCreate withClassificationReason(IncidentClassificationReason classificationReason); - } - /** The stage of the Incident definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The description of the incident. - * - * @param description The description of the incident. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the Incident definition allowing to specify firstActivityTimeUtc. */ - interface WithFirstActivityTimeUtc { - /** - * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @param firstActivityTimeUtc The time of the first activity in the incident. - * @return the next definition stage. - */ - WithCreate withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); - } - /** The stage of the Incident definition allowing to specify labels. */ - interface WithLabels { - /** - * Specifies the labels property: List of labels relevant to this incident. - * - * @param labels List of labels relevant to this incident. - * @return the next definition stage. - */ - WithCreate withLabels(List labels); - } - /** The stage of the Incident definition allowing to specify providerName. */ - interface WithProviderName { - /** - * Specifies the providerName property: The name of the source provider that generated the incident. - * - * @param providerName The name of the source provider that generated the incident. - * @return the next definition stage. - */ - WithCreate withProviderName(String providerName); - } - /** The stage of the Incident definition allowing to specify providerIncidentId. */ - interface WithProviderIncidentId { - /** - * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @param providerIncidentId The incident ID assigned by the incident provider. - * @return the next definition stage. - */ - WithCreate withProviderIncidentId(String providerIncidentId); - } - /** The stage of the Incident definition allowing to specify lastActivityTimeUtc. */ - interface WithLastActivityTimeUtc { - /** - * Specifies the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @param lastActivityTimeUtc The time of the last activity in the incident. - * @return the next definition stage. - */ - WithCreate withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc); - } - /** The stage of the Incident definition allowing to specify owner. */ - interface WithOwner { - /** - * Specifies the owner property: Describes a user that the incident is assigned to. - * - * @param owner Describes a user that the incident is assigned to. - * @return the next definition stage. - */ - WithCreate withOwner(IncidentOwnerInfo owner); - } - /** The stage of the Incident definition allowing to specify severity. */ - interface WithSeverity { - /** - * Specifies the severity property: The severity of the incident. - * - * @param severity The severity of the incident. - * @return the next definition stage. - */ - WithCreate withSeverity(IncidentSeverity severity); - } - /** The stage of the Incident definition allowing to specify status. */ - interface WithStatus { - /** - * Specifies the status property: The status of the incident. - * - * @param status The status of the incident. - * @return the next definition stage. - */ - WithCreate withStatus(IncidentStatus status); - } - /** The stage of the Incident definition allowing to specify teamInformation. */ - interface WithTeamInformation { - /** - * Specifies the teamInformation property: Describes a team for the incident. - * - * @param teamInformation Describes a team for the incident. - * @return the next definition stage. - */ - WithCreate withTeamInformation(TeamInformationInner teamInformation); - } - /** The stage of the Incident definition allowing to specify title. */ - interface WithTitle { - /** - * Specifies the title property: The title of the incident. - * - * @param title The title of the incident. - * @return the next definition stage. - */ - WithCreate withTitle(String title); - } - } - /** - * Begins update for the Incident resource. - * - * @return the stage of resource update. - */ - Incident.Update update(); - - /** The template for Incident update. */ - interface Update - extends UpdateStages.WithEtag, - UpdateStages.WithClassification, - UpdateStages.WithClassificationComment, - UpdateStages.WithClassificationReason, - UpdateStages.WithDescription, - UpdateStages.WithFirstActivityTimeUtc, - UpdateStages.WithLabels, - UpdateStages.WithProviderName, - UpdateStages.WithProviderIncidentId, - UpdateStages.WithLastActivityTimeUtc, - UpdateStages.WithOwner, - UpdateStages.WithSeverity, - UpdateStages.WithStatus, - UpdateStages.WithTeamInformation, - UpdateStages.WithTitle { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Incident apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Incident apply(Context context); - } - /** The Incident update stages. */ - interface UpdateStages { - /** The stage of the Incident update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the Incident update allowing to specify classification. */ - interface WithClassification { - /** - * Specifies the classification property: The reason the incident was closed. - * - * @param classification The reason the incident was closed. - * @return the next definition stage. - */ - Update withClassification(IncidentClassification classification); - } - /** The stage of the Incident update allowing to specify classificationComment. */ - interface WithClassificationComment { - /** - * Specifies the classificationComment property: Describes the reason the incident was closed. - * - * @param classificationComment Describes the reason the incident was closed. - * @return the next definition stage. - */ - Update withClassificationComment(String classificationComment); - } - /** The stage of the Incident update allowing to specify classificationReason. */ - interface WithClassificationReason { - /** - * Specifies the classificationReason property: The classification reason the incident was closed with. - * - * @param classificationReason The classification reason the incident was closed with. - * @return the next definition stage. - */ - Update withClassificationReason(IncidentClassificationReason classificationReason); - } - /** The stage of the Incident update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The description of the incident. - * - * @param description The description of the incident. - * @return the next definition stage. - */ - Update withDescription(String description); - } - /** The stage of the Incident update allowing to specify firstActivityTimeUtc. */ - interface WithFirstActivityTimeUtc { - /** - * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @param firstActivityTimeUtc The time of the first activity in the incident. - * @return the next definition stage. - */ - Update withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); - } - /** The stage of the Incident update allowing to specify labels. */ - interface WithLabels { - /** - * Specifies the labels property: List of labels relevant to this incident. - * - * @param labels List of labels relevant to this incident. - * @return the next definition stage. - */ - Update withLabels(List labels); - } - /** The stage of the Incident update allowing to specify providerName. */ - interface WithProviderName { - /** - * Specifies the providerName property: The name of the source provider that generated the incident. - * - * @param providerName The name of the source provider that generated the incident. - * @return the next definition stage. - */ - Update withProviderName(String providerName); - } - /** The stage of the Incident update allowing to specify providerIncidentId. */ - interface WithProviderIncidentId { - /** - * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @param providerIncidentId The incident ID assigned by the incident provider. - * @return the next definition stage. - */ - Update withProviderIncidentId(String providerIncidentId); - } - /** The stage of the Incident update allowing to specify lastActivityTimeUtc. */ - interface WithLastActivityTimeUtc { - /** - * Specifies the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @param lastActivityTimeUtc The time of the last activity in the incident. - * @return the next definition stage. - */ - Update withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc); - } - /** The stage of the Incident update allowing to specify owner. */ - interface WithOwner { - /** - * Specifies the owner property: Describes a user that the incident is assigned to. - * - * @param owner Describes a user that the incident is assigned to. - * @return the next definition stage. - */ - Update withOwner(IncidentOwnerInfo owner); - } - /** The stage of the Incident update allowing to specify severity. */ - interface WithSeverity { - /** - * Specifies the severity property: The severity of the incident. - * - * @param severity The severity of the incident. - * @return the next definition stage. - */ - Update withSeverity(IncidentSeverity severity); - } - /** The stage of the Incident update allowing to specify status. */ - interface WithStatus { - /** - * Specifies the status property: The status of the incident. - * - * @param status The status of the incident. - * @return the next definition stage. - */ - Update withStatus(IncidentStatus status); - } - /** The stage of the Incident update allowing to specify teamInformation. */ - interface WithTeamInformation { - /** - * Specifies the teamInformation property: Describes a team for the incident. - * - * @param teamInformation Describes a team for the incident. - * @return the next definition stage. - */ - Update withTeamInformation(TeamInformationInner teamInformation); - } - /** The stage of the Incident update allowing to specify title. */ - interface WithTitle { - /** - * Specifies the title property: The title of the incident. - * - * @param title The title of the incident. - * @return the next definition stage. - */ - Update withTitle(String title); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Incident refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Incident refresh(Context context); - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param teamProperties Team properties. - * @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 describes team information. - */ - TeamInformation createTeam(TeamProperties teamProperties); - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param teamProperties Team properties. - * @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 describes team information along with {@link Response}. - */ - Response createTeamWithResponse(TeamProperties teamProperties, Context context); - - /** - * Gets all incident alerts. - * - * @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 all incident alerts. - */ - IncidentAlertList listAlerts(); - - /** - * Gets all incident alerts. - * - * @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 all incident alerts along with {@link Response}. - */ - Response listAlertsWithResponse(Context context); - - /** - * Gets all incident bookmarks. - * - * @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 all incident bookmarks. - */ - IncidentBookmarkList listBookmarks(); - - /** - * Gets all incident bookmarks. - * - * @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 all incident bookmarks along with {@link Response}. - */ - Response listBookmarksWithResponse(Context context); - - /** - * Gets all incident related entities. - * - * @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 all incident related entities. - */ - IncidentEntitiesResponse listEntities(); - - /** - * Gets all incident related entities. - * - * @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 all incident related entities along with {@link Response}. - */ - Response listEntitiesWithResponse(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java deleted file mode 100644 index f86ce54b9f24..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java +++ /dev/null @@ -1,126 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Incident additional data property bag. */ -@Immutable -public final class IncidentAdditionalData { - /* - * The number of alerts in the incident - */ - @JsonProperty(value = "alertsCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer alertsCount; - - /* - * The number of bookmarks in the incident - */ - @JsonProperty(value = "bookmarksCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer bookmarksCount; - - /* - * The number of comments in the incident - */ - @JsonProperty(value = "commentsCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer commentsCount; - - /* - * List of product names of alerts in the incident - */ - @JsonProperty(value = "alertProductNames", access = JsonProperty.Access.WRITE_ONLY) - private List alertProductNames; - - /* - * The provider incident url to the incident in Microsoft 365 Defender portal - */ - @JsonProperty(value = "providerIncidentUrl", access = JsonProperty.Access.WRITE_ONLY) - private String providerIncidentUrl; - - /* - * The tactics associated with incident - */ - @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) - private List tactics; - - /* - * The techniques associated with incident's tactics' - */ - @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) - private List techniques; - - /** - * Get the alertsCount property: The number of alerts in the incident. - * - * @return the alertsCount value. - */ - public Integer alertsCount() { - return this.alertsCount; - } - - /** - * Get the bookmarksCount property: The number of bookmarks in the incident. - * - * @return the bookmarksCount value. - */ - public Integer bookmarksCount() { - return this.bookmarksCount; - } - - /** - * Get the commentsCount property: The number of comments in the incident. - * - * @return the commentsCount value. - */ - public Integer commentsCount() { - return this.commentsCount; - } - - /** - * Get the alertProductNames property: List of product names of alerts in the incident. - * - * @return the alertProductNames value. - */ - public List alertProductNames() { - return this.alertProductNames; - } - - /** - * Get the providerIncidentUrl property: The provider incident url to the incident in Microsoft 365 Defender portal. - * - * @return the providerIncidentUrl value. - */ - public String providerIncidentUrl() { - return this.providerIncidentUrl; - } - - /** - * Get the tactics property: The tactics associated with incident. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Get the techniques property: The techniques associated with incident's tactics'. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAlertList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAlertList.java deleted file mode 100644 index afbf75330535..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAlertList.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.IncidentAlertListInner; -import java.util.List; - -/** An immutable client-side representation of IncidentAlertList. */ -public interface IncidentAlertList { - /** - * Gets the value property: Array of incident alerts. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentAlertListInner object. - * - * @return the inner object. - */ - IncidentAlertListInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentBookmarkList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentBookmarkList.java deleted file mode 100644 index 8bcb3e64a075..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentBookmarkList.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; -import java.util.List; - -/** An immutable client-side representation of IncidentBookmarkList. */ -public interface IncidentBookmarkList { - /** - * Gets the value property: Array of incident bookmarks. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner object. - * - * @return the inner object. - */ - IncidentBookmarkListInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java deleted file mode 100644 index 400aa8f0d0c4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The reason the incident was closed. */ -public final class IncidentClassification extends ExpandableStringEnum { - /** Static value Undetermined for IncidentClassification. */ - public static final IncidentClassification UNDETERMINED = fromString("Undetermined"); - - /** Static value TruePositive for IncidentClassification. */ - public static final IncidentClassification TRUE_POSITIVE = fromString("TruePositive"); - - /** Static value BenignPositive for IncidentClassification. */ - public static final IncidentClassification BENIGN_POSITIVE = fromString("BenignPositive"); - - /** Static value FalsePositive for IncidentClassification. */ - public static final IncidentClassification FALSE_POSITIVE = fromString("FalsePositive"); - - /** - * Creates or finds a IncidentClassification from its string representation. - * - * @param name a name to look for. - * @return the corresponding IncidentClassification. - */ - @JsonCreator - public static IncidentClassification fromString(String name) { - return fromString(name, IncidentClassification.class); - } - - /** - * Gets known IncidentClassification values. - * - * @return known IncidentClassification values. - */ - public static Collection values() { - return values(IncidentClassification.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassificationReason.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassificationReason.java deleted file mode 100644 index 89ed586fd181..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassificationReason.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The classification reason the incident was closed with. */ -public final class IncidentClassificationReason extends ExpandableStringEnum { - /** Static value SuspiciousActivity for IncidentClassificationReason. */ - public static final IncidentClassificationReason SUSPICIOUS_ACTIVITY = fromString("SuspiciousActivity"); - - /** Static value SuspiciousButExpected for IncidentClassificationReason. */ - public static final IncidentClassificationReason SUSPICIOUS_BUT_EXPECTED = fromString("SuspiciousButExpected"); - - /** Static value IncorrectAlertLogic for IncidentClassificationReason. */ - public static final IncidentClassificationReason INCORRECT_ALERT_LOGIC = fromString("IncorrectAlertLogic"); - - /** Static value InaccurateData for IncidentClassificationReason. */ - public static final IncidentClassificationReason INACCURATE_DATA = fromString("InaccurateData"); - - /** - * Creates or finds a IncidentClassificationReason from its string representation. - * - * @param name a name to look for. - * @return the corresponding IncidentClassificationReason. - */ - @JsonCreator - public static IncidentClassificationReason fromString(String name) { - return fromString(name, IncidentClassificationReason.class); - } - - /** - * Gets known IncidentClassificationReason values. - * - * @return known IncidentClassificationReason values. - */ - public static Collection values() { - return values(IncidentClassificationReason.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComment.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComment.java deleted file mode 100644 index 0385b56f71c1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComment.java +++ /dev/null @@ -1,214 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of IncidentComment. */ -public interface IncidentComment { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the createdTimeUtc property: The time the comment was created. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - - /** - * Gets the lastModifiedTimeUtc property: The time the comment was updated. - * - * @return the lastModifiedTimeUtc value. - */ - OffsetDateTime lastModifiedTimeUtc(); - - /** - * Gets the message property: The comment message. - * - * @return the message value. - */ - String message(); - - /** - * Gets the author property: Describes the client that created the comment. - * - * @return the author value. - */ - ClientInfo author(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner object. - * - * @return the inner object. - */ - IncidentCommentInner innerModel(); - - /** The entirety of the IncidentComment definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The IncidentComment definition stages. */ - interface DefinitionStages { - /** The first stage of the IncidentComment definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the IncidentComment definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, incidentId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @return the next definition stage. - */ - WithCreate withExistingIncident(String resourceGroupName, String workspaceName, String incidentId); - } - /** - * The stage of the IncidentComment definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithEtag, DefinitionStages.WithMessage { - /** - * Executes the create request. - * - * @return the created resource. - */ - IncidentComment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - IncidentComment create(Context context); - } - /** The stage of the IncidentComment definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the IncidentComment definition allowing to specify message. */ - interface WithMessage { - /** - * Specifies the message property: The comment message. - * - * @param message The comment message. - * @return the next definition stage. - */ - WithCreate withMessage(String message); - } - } - /** - * Begins update for the IncidentComment resource. - * - * @return the stage of resource update. - */ - IncidentComment.Update update(); - - /** The template for IncidentComment update. */ - interface Update extends UpdateStages.WithEtag, UpdateStages.WithMessage { - /** - * Executes the update request. - * - * @return the updated resource. - */ - IncidentComment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - IncidentComment apply(Context context); - } - /** The IncidentComment update stages. */ - interface UpdateStages { - /** The stage of the IncidentComment update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the IncidentComment update allowing to specify message. */ - interface WithMessage { - /** - * Specifies the message property: The comment message. - * - * @param message The comment message. - * @return the next definition stage. - */ - Update withMessage(String message); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - IncidentComment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - IncidentComment refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java deleted file mode 100644 index 2304ded52a75..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of incident comments. */ -@Fluent -public final class IncidentCommentList { - /* - * URL to fetch the next set of comments. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of comments. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of comments. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of comments. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of comments. - * - * @param value the value value to set. - * @return the IncidentCommentList object itself. - */ - public IncidentCommentList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model IncidentCommentList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IncidentCommentList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java deleted file mode 100644 index 3e39bb7cd39c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java +++ /dev/null @@ -1,165 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of IncidentComments. */ -public interface IncidentComments { - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident comments as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident comments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all incident comments as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @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 an incident comment. - */ - IncidentComment get(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); - - /** - * Gets an incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @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 an incident comment along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); - - /** - * Delete the incident comment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param incidentCommentId Incident comment ID. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); - - /** - * Gets an incident comment. - * - * @param id the resource ID. - * @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 an incident comment along with {@link Response}. - */ - IncidentComment getById(String id); - - /** - * Gets an incident comment. - * - * @param id the resource ID. - * @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 an incident comment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the incident comment. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete the incident comment. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new IncidentComment resource. - * - * @param name resource name. - * @return the first stage of the new IncidentComment definition. - */ - IncidentComment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java deleted file mode 100644 index 3746be98a60a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Incident Configuration property bag. */ -@Fluent -public final class IncidentConfiguration { - /* - * Create incidents from alerts triggered by this analytics rule - */ - @JsonProperty(value = "createIncident", required = true) - private boolean createIncident; - - /* - * Set how the alerts that are triggered by this analytics rule, are grouped into incidents - */ - @JsonProperty(value = "groupingConfiguration") - private GroupingConfiguration groupingConfiguration; - - /** - * Get the createIncident property: Create incidents from alerts triggered by this analytics rule. - * - * @return the createIncident value. - */ - public boolean createIncident() { - return this.createIncident; - } - - /** - * Set the createIncident property: Create incidents from alerts triggered by this analytics rule. - * - * @param createIncident the createIncident value to set. - * @return the IncidentConfiguration object itself. - */ - public IncidentConfiguration withCreateIncident(boolean createIncident) { - this.createIncident = createIncident; - return this; - } - - /** - * Get the groupingConfiguration property: Set how the alerts that are triggered by this analytics rule, are grouped - * into incidents. - * - * @return the groupingConfiguration value. - */ - public GroupingConfiguration groupingConfiguration() { - return this.groupingConfiguration; - } - - /** - * Set the groupingConfiguration property: Set how the alerts that are triggered by this analytics rule, are grouped - * into incidents. - * - * @param groupingConfiguration the groupingConfiguration value to set. - * @return the IncidentConfiguration object itself. - */ - public IncidentConfiguration withGroupingConfiguration(GroupingConfiguration groupingConfiguration) { - this.groupingConfiguration = groupingConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (groupingConfiguration() != null) { - groupingConfiguration().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResponse.java deleted file mode 100644 index 4e3fdd26852c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResponse.java +++ /dev/null @@ -1,32 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner; -import java.util.List; - -/** An immutable client-side representation of IncidentEntitiesResponse. */ -public interface IncidentEntitiesResponse { - /** - * Gets the entities property: Array of the incident related entities. - * - * @return the entities value. - */ - List entities(); - - /** - * Gets the metadata property: The metadata from the incident related entities results. - * - * @return the metadata value. - */ - List metadata(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner object. - * - * @return the inner object. - */ - IncidentEntitiesResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java deleted file mode 100644 index f282c15e2c9d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java +++ /dev/null @@ -1,81 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information of a specific aggregation in the incident related entities result. */ -@Fluent -public final class IncidentEntitiesResultsMetadata { - /* - * Total number of aggregations of the given kind in the incident related entities result. - */ - @JsonProperty(value = "count", required = true) - private int count; - - /* - * The kind of the aggregated entity. - */ - @JsonProperty(value = "entityKind", required = true) - private EntityKind entityKind; - - /** - * Get the count property: Total number of aggregations of the given kind in the incident related entities result. - * - * @return the count value. - */ - public int count() { - return this.count; - } - - /** - * Set the count property: Total number of aggregations of the given kind in the incident related entities result. - * - * @param count the count value to set. - * @return the IncidentEntitiesResultsMetadata object itself. - */ - public IncidentEntitiesResultsMetadata withCount(int count) { - this.count = count; - return this; - } - - /** - * Get the entityKind property: The kind of the aggregated entity. - * - * @return the entityKind value. - */ - public EntityKind entityKind() { - return this.entityKind; - } - - /** - * Set the entityKind property: The kind of the aggregated entity. - * - * @param entityKind the entityKind value to set. - * @return the IncidentEntitiesResultsMetadata object itself. - */ - public IncidentEntitiesResultsMetadata withEntityKind(EntityKind entityKind) { - this.entityKind = entityKind; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entityKind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property entityKind in model IncidentEntitiesResultsMetadata")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IncidentEntitiesResultsMetadata.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java deleted file mode 100644 index e8ee0d18e29b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java +++ /dev/null @@ -1,124 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes related incident information for the bookmark. */ -@Fluent -public final class IncidentInfo { - /* - * Incident Id - */ - @JsonProperty(value = "incidentId") - private String incidentId; - - /* - * The severity of the incident - */ - @JsonProperty(value = "severity") - private IncidentSeverity severity; - - /* - * The title of the incident - */ - @JsonProperty(value = "title") - private String title; - - /* - * Relation Name - */ - @JsonProperty(value = "relationName") - private String relationName; - - /** - * Get the incidentId property: Incident Id. - * - * @return the incidentId value. - */ - public String incidentId() { - return this.incidentId; - } - - /** - * Set the incidentId property: Incident Id. - * - * @param incidentId the incidentId value to set. - * @return the IncidentInfo object itself. - */ - public IncidentInfo withIncidentId(String incidentId) { - this.incidentId = incidentId; - return this; - } - - /** - * Get the severity property: The severity of the incident. - * - * @return the severity value. - */ - public IncidentSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity of the incident. - * - * @param severity the severity value to set. - * @return the IncidentInfo object itself. - */ - public IncidentInfo withSeverity(IncidentSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the title property: The title of the incident. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The title of the incident. - * - * @param title the title value to set. - * @return the IncidentInfo object itself. - */ - public IncidentInfo withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the relationName property: Relation Name. - * - * @return the relationName value. - */ - public String relationName() { - return this.relationName; - } - - /** - * Set the relationName property: Relation Name. - * - * @param relationName the relationName value to set. - * @return the IncidentInfo object itself. - */ - public IncidentInfo withRelationName(String relationName) { - this.relationName = relationName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java deleted file mode 100644 index c24c4a8522ea..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java +++ /dev/null @@ -1,69 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents an incident label. */ -@Fluent -public final class IncidentLabel { - /* - * The name of the label - */ - @JsonProperty(value = "labelName", required = true) - private String labelName; - - /* - * The type of the label - */ - @JsonProperty(value = "labelType", access = JsonProperty.Access.WRITE_ONLY) - private IncidentLabelType labelType; - - /** - * Get the labelName property: The name of the label. - * - * @return the labelName value. - */ - public String labelName() { - return this.labelName; - } - - /** - * Set the labelName property: The name of the label. - * - * @param labelName the labelName value to set. - * @return the IncidentLabel object itself. - */ - public IncidentLabel withLabelName(String labelName) { - this.labelName = labelName; - return this; - } - - /** - * Get the labelType property: The type of the label. - * - * @return the labelType value. - */ - public IncidentLabelType labelType() { - return this.labelType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (labelName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property labelName in model IncidentLabel")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IncidentLabel.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java deleted file mode 100644 index 19999e0261f6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The type of the label. */ -public final class IncidentLabelType extends ExpandableStringEnum { - /** Static value User for IncidentLabelType. */ - public static final IncidentLabelType USER = fromString("User"); - - /** Static value AutoAssigned for IncidentLabelType. */ - public static final IncidentLabelType AUTO_ASSIGNED = fromString("AutoAssigned"); - - /** - * Creates or finds a IncidentLabelType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IncidentLabelType. - */ - @JsonCreator - public static IncidentLabelType fromString(String name) { - return fromString(name, IncidentLabelType.class); - } - - /** - * Gets known IncidentLabelType values. - * - * @return known IncidentLabelType values. - */ - public static Collection values() { - return values(IncidentLabelType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentList.java deleted file mode 100644 index 11cec266205d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the incidents. */ -@Fluent -public final class IncidentList { - /* - * URL to fetch the next set of incidents. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of incidents. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of incidents. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of incidents. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of incidents. - * - * @param value the value value to set. - * @return the IncidentList object itself. - */ - public IncidentList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model IncidentList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IncidentList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java deleted file mode 100644 index dee86cc22860..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java +++ /dev/null @@ -1,151 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** Information on the user an incident is assigned to. */ -@Fluent -public final class IncidentOwnerInfo { - /* - * The email of the user the incident is assigned to. - */ - @JsonProperty(value = "email") - private String email; - - /* - * The name of the user the incident is assigned to. - */ - @JsonProperty(value = "assignedTo") - private String assignedTo; - - /* - * The object id of the user the incident is assigned to. - */ - @JsonProperty(value = "objectId") - private UUID objectId; - - /* - * The user principal name of the user the incident is assigned to. - */ - @JsonProperty(value = "userPrincipalName") - private String userPrincipalName; - - /* - * The type of the owner the incident is assigned to. - */ - @JsonProperty(value = "ownerType") - private OwnerType ownerType; - - /** - * Get the email property: The email of the user the incident is assigned to. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: The email of the user the incident is assigned to. - * - * @param email the email value to set. - * @return the IncidentOwnerInfo object itself. - */ - public IncidentOwnerInfo withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the assignedTo property: The name of the user the incident is assigned to. - * - * @return the assignedTo value. - */ - public String assignedTo() { - return this.assignedTo; - } - - /** - * Set the assignedTo property: The name of the user the incident is assigned to. - * - * @param assignedTo the assignedTo value to set. - * @return the IncidentOwnerInfo object itself. - */ - public IncidentOwnerInfo withAssignedTo(String assignedTo) { - this.assignedTo = assignedTo; - return this; - } - - /** - * Get the objectId property: The object id of the user the incident is assigned to. - * - * @return the objectId value. - */ - public UUID objectId() { - return this.objectId; - } - - /** - * Set the objectId property: The object id of the user the incident is assigned to. - * - * @param objectId the objectId value to set. - * @return the IncidentOwnerInfo object itself. - */ - public IncidentOwnerInfo withObjectId(UUID objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the userPrincipalName property: The user principal name of the user the incident is assigned to. - * - * @return the userPrincipalName value. - */ - public String userPrincipalName() { - return this.userPrincipalName; - } - - /** - * Set the userPrincipalName property: The user principal name of the user the incident is assigned to. - * - * @param userPrincipalName the userPrincipalName value to set. - * @return the IncidentOwnerInfo object itself. - */ - public IncidentOwnerInfo withUserPrincipalName(String userPrincipalName) { - this.userPrincipalName = userPrincipalName; - return this; - } - - /** - * Get the ownerType property: The type of the owner the incident is assigned to. - * - * @return the ownerType value. - */ - 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java deleted file mode 100644 index 924ddce626e4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java +++ /dev/null @@ -1,159 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.IncidentPropertiesInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of IncidentProperties. */ -public interface IncidentProperties { - /** - * Gets the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - IncidentAdditionalData additionalData(); - - /** - * Gets the classification property: The reason the incident was closed. - * - * @return the classification value. - */ - IncidentClassification classification(); - - /** - * Gets the classificationComment property: Describes the reason the incident was closed. - * - * @return the classificationComment value. - */ - String classificationComment(); - - /** - * Gets the classificationReason property: The classification reason the incident was closed with. - * - * @return the classificationReason value. - */ - IncidentClassificationReason classificationReason(); - - /** - * Gets the createdTimeUtc property: The time the incident was created. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - - /** - * Gets the description property: The description of the incident. - * - * @return the description value. - */ - String description(); - - /** - * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @return the firstActivityTimeUtc value. - */ - OffsetDateTime firstActivityTimeUtc(); - - /** - * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. - * - * @return the incidentUrl value. - */ - String incidentUrl(); - - /** - * Gets the incidentNumber property: A sequential number. - * - * @return the incidentNumber value. - */ - Integer incidentNumber(); - - /** - * Gets the labels property: List of labels relevant to this incident. - * - * @return the labels value. - */ - List labels(); - - /** - * Gets the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @return the providerIncidentId value. - */ - String providerIncidentId(); - - /** - * Gets the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @return the lastActivityTimeUtc value. - */ - OffsetDateTime lastActivityTimeUtc(); - - /** - * Gets the lastModifiedTimeUtc property: The last time the incident was updated. - * - * @return the lastModifiedTimeUtc value. - */ - OffsetDateTime lastModifiedTimeUtc(); - - /** - * Gets the owner property: Describes a user that the incident is assigned to. - * - * @return the owner value. - */ - IncidentOwnerInfo owner(); - - /** - * Gets the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. - * - * @return the relatedAnalyticRuleIds value. - */ - List relatedAnalyticRuleIds(); - - /** - * Gets the severity property: The severity of the incident. - * - * @return the severity value. - */ - IncidentSeverity severity(); - - /** - * Gets the status property: The status of the incident. - * - * @return the status value. - */ - IncidentStatus status(); - - /** - * Gets the teamInformation property: Describes a team for the incident. - * - * @return the teamInformation value. - */ - TeamInformation teamInformation(); - - /** - * Gets the title property: The title of the incident. - * - * @return the title value. - */ - String title(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentPropertiesInner object. - * - * @return the inner object. - */ - IncidentPropertiesInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java deleted file mode 100644 index 0278075d0b46..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java +++ /dev/null @@ -1,209 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The IncidentPropertiesAction model. */ -@Fluent -public final class IncidentPropertiesAction { - /* - * The severity of the incident - */ - @JsonProperty(value = "severity") - private IncidentSeverity severity; - - /* - * The status of the incident - */ - @JsonProperty(value = "status") - private IncidentStatus status; - - /* - * The reason the incident was closed - */ - @JsonProperty(value = "classification") - private IncidentClassification classification; - - /* - * The classification reason the incident was closed with - */ - @JsonProperty(value = "classificationReason") - private IncidentClassificationReason classificationReason; - - /* - * Describes the reason the incident was closed. - */ - @JsonProperty(value = "classificationComment") - private String classificationComment; - - /* - * Information on the user an incident is assigned to - */ - @JsonProperty(value = "owner") - private IncidentOwnerInfo owner; - - /* - * List of labels to add to the incident. - */ - @JsonProperty(value = "labels") - private List labels; - - /** - * Get the severity property: The severity of the incident. - * - * @return the severity value. - */ - public IncidentSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity of the incident. - * - * @param severity the severity value to set. - * @return the IncidentPropertiesAction object itself. - */ - public IncidentPropertiesAction withSeverity(IncidentSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the status property: The status of the incident. - * - * @return the status value. - */ - public IncidentStatus status() { - return this.status; - } - - /** - * Set the status property: The status of the incident. - * - * @param status the status value to set. - * @return the IncidentPropertiesAction object itself. - */ - public IncidentPropertiesAction withStatus(IncidentStatus status) { - this.status = status; - return this; - } - - /** - * Get the classification property: The reason the incident was closed. - * - * @return the classification value. - */ - public IncidentClassification classification() { - return this.classification; - } - - /** - * Set the classification property: The reason the incident was closed. - * - * @param classification the classification value to set. - * @return the IncidentPropertiesAction object itself. - */ - public IncidentPropertiesAction withClassification(IncidentClassification classification) { - this.classification = classification; - return this; - } - - /** - * Get the classificationReason property: The classification reason the incident was closed with. - * - * @return the classificationReason value. - */ - public IncidentClassificationReason classificationReason() { - return this.classificationReason; - } - - /** - * Set the classificationReason property: The classification reason the incident was closed with. - * - * @param classificationReason the classificationReason value to set. - * @return the IncidentPropertiesAction object itself. - */ - public IncidentPropertiesAction withClassificationReason(IncidentClassificationReason classificationReason) { - this.classificationReason = classificationReason; - return this; - } - - /** - * Get the classificationComment property: Describes the reason the incident was closed. - * - * @return the classificationComment value. - */ - public String classificationComment() { - return this.classificationComment; - } - - /** - * Set the classificationComment property: Describes the reason the incident was closed. - * - * @param classificationComment the classificationComment value to set. - * @return the IncidentPropertiesAction object itself. - */ - public IncidentPropertiesAction withClassificationComment(String classificationComment) { - this.classificationComment = classificationComment; - return this; - } - - /** - * Get the owner property: Information on the user an incident is assigned to. - * - * @return the owner value. - */ - public IncidentOwnerInfo owner() { - return this.owner; - } - - /** - * Set the owner property: Information on the user an incident is assigned to. - * - * @param owner the owner value to set. - * @return the IncidentPropertiesAction object itself. - */ - public IncidentPropertiesAction withOwner(IncidentOwnerInfo owner) { - this.owner = owner; - return this; - } - - /** - * Get the labels property: List of labels to add to the incident. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: List of labels to add to the incident. - * - * @param labels the labels value to set. - * @return the IncidentPropertiesAction object itself. - */ - public IncidentPropertiesAction withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (owner() != null) { - owner().validate(); - } - if (labels() != null) { - labels().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java deleted file mode 100644 index 078c2fce6eb8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java +++ /dev/null @@ -1,151 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** Resource collection API of IncidentRelations. */ -public interface IncidentRelations { - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident relations as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all incident relations as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String incidentId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @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 an incident relation. - */ - Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName); - - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @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 an incident relation along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @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 represents a relation between two resources. - */ - Relation createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); - - /** - * Creates or updates the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @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 represents a relation between two resources along with {@link Response}. - */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation, - Context context); - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); - - /** - * Delete the incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java deleted file mode 100644 index 4be03522b9c5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The severity of the incident. */ -public final class IncidentSeverity extends ExpandableStringEnum { - /** Static value High for IncidentSeverity. */ - public static final IncidentSeverity HIGH = fromString("High"); - - /** Static value Medium for IncidentSeverity. */ - public static final IncidentSeverity MEDIUM = fromString("Medium"); - - /** Static value Low for IncidentSeverity. */ - public static final IncidentSeverity LOW = fromString("Low"); - - /** Static value Informational for IncidentSeverity. */ - public static final IncidentSeverity INFORMATIONAL = fromString("Informational"); - - /** - * Creates or finds a IncidentSeverity from its string representation. - * - * @param name a name to look for. - * @return the corresponding IncidentSeverity. - */ - @JsonCreator - public static IncidentSeverity fromString(String name) { - return fromString(name, IncidentSeverity.class); - } - - /** - * Gets known IncidentSeverity values. - * - * @return known IncidentSeverity values. - */ - public static Collection values() { - return values(IncidentSeverity.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentStatus.java deleted file mode 100644 index 7c4059c354f2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentStatus.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The status of the incident. */ -public final class IncidentStatus extends ExpandableStringEnum { - /** Static value New for IncidentStatus. */ - public static final IncidentStatus NEW = fromString("New"); - - /** Static value Active for IncidentStatus. */ - public static final IncidentStatus ACTIVE = fromString("Active"); - - /** Static value Closed for IncidentStatus. */ - public static final IncidentStatus CLOSED = fromString("Closed"); - - /** - * Creates or finds a IncidentStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding IncidentStatus. - */ - @JsonCreator - public static IncidentStatus fromString(String name) { - return fromString(name, IncidentStatus.class); - } - - /** - * Gets known IncidentStatus values. - * - * @return known IncidentStatus values. - */ - public static Collection values() { - return values(IncidentStatus.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java deleted file mode 100644 index 3a2710c7cad6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java +++ /dev/null @@ -1,310 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Incidents. */ -public interface Incidents { - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @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 any object. - */ - Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @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 any object along with {@link Response}. - */ - Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context); - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all incidents as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all incidents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all incidents as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 an incident. - */ - Incident get(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 an incident along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @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 describes team information. - */ - TeamInformation createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties); - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @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 describes team information along with {@link Response}. - */ - Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context); - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident alerts. - */ - IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident alerts. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident alerts along with {@link Response}. - */ - Response listAlertsWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident bookmarks. - */ - IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident bookmarks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident bookmarks along with {@link Response}. - */ - Response listBookmarksWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident related entities. - */ - IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @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 all incident related entities along with {@link Response}. - */ - Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Gets an incident. - * - * @param id the resource ID. - * @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 an incident along with {@link Response}. - */ - Incident getById(String id); - - /** - * Gets an incident. - * - * @param id the resource ID. - * @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 an incident along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the incident. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete the incident. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Incident resource. - * - * @param name resource name. - * @return the first stage of the new Incident definition. - */ - Incident.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java deleted file mode 100644 index 7cb969486ee3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** Describes how to ingest the records in the file. */ -public final class IngestionMode extends ExpandableStringEnum { - /** Static value IngestOnlyIfAllAreValid for IngestionMode. */ - public static final IngestionMode INGEST_ONLY_IF_ALL_ARE_VALID = fromString("IngestOnlyIfAllAreValid"); - - /** Static value IngestAnyValidRecords for IngestionMode. */ - public static final IngestionMode INGEST_ANY_VALID_RECORDS = fromString("IngestAnyValidRecords"); - - /** Static value Unspecified for IngestionMode. */ - public static final IngestionMode UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a IngestionMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding IngestionMode. - */ - @JsonCreator - public static IngestionMode fromString(String name) { - return fromString(name, IngestionMode.class); - } - - /** - * Gets known IngestionMode values. - * - * @return known IngestionMode values. - */ - public static Collection values() { - return values(IngestionMode.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java deleted file mode 100644 index 0efb0bc5aff8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java +++ /dev/null @@ -1,69 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Insight Query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Insight") -@Fluent -public final class InsightQueryItem extends EntityQueryItem { - /* - * Properties bag for InsightQueryItem - */ - @JsonProperty(value = "properties") - private InsightQueryItemProperties properties; - - /** - * Get the properties property: Properties bag for InsightQueryItem. - * - * @return the properties value. - */ - public InsightQueryItemProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties bag for InsightQueryItem. - * - * @param properties the properties value to set. - * @return the InsightQueryItem object itself. - */ - public InsightQueryItem withProperties(InsightQueryItemProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItem withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItem withType(String type) { - super.withType(type); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java deleted file mode 100644 index e69737b5e3c8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java +++ /dev/null @@ -1,273 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents Insight Query. */ -@Fluent -public final class InsightQueryItemProperties extends EntityQueryItemProperties { - /* - * The insight display name. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The insight description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The base query of the insight. - */ - @JsonProperty(value = "baseQuery") - private String baseQuery; - - /* - * The insight table query. - */ - @JsonProperty(value = "tableQuery") - private InsightQueryItemPropertiesTableQuery tableQuery; - - /* - * The insight chart query. - */ - @JsonProperty(value = "chartQuery") - private Object chartQuery; - - /* - * The activity query definitions. - */ - @JsonProperty(value = "additionalQuery") - private InsightQueryItemPropertiesAdditionalQuery additionalQuery; - - /* - * The insight chart query. - */ - @JsonProperty(value = "defaultTimeRange") - private InsightQueryItemPropertiesDefaultTimeRange defaultTimeRange; - - /* - * The insight chart query. - */ - @JsonProperty(value = "referenceTimeRange") - private InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange; - - /** - * Get the displayName property: The insight display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The insight display name. - * - * @param displayName the displayName value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: The insight description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The insight description. - * - * @param description the description value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the baseQuery property: The base query of the insight. - * - * @return the baseQuery value. - */ - public String baseQuery() { - return this.baseQuery; - } - - /** - * Set the baseQuery property: The base query of the insight. - * - * @param baseQuery the baseQuery value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withBaseQuery(String baseQuery) { - this.baseQuery = baseQuery; - return this; - } - - /** - * Get the tableQuery property: The insight table query. - * - * @return the tableQuery value. - */ - public InsightQueryItemPropertiesTableQuery tableQuery() { - return this.tableQuery; - } - - /** - * Set the tableQuery property: The insight table query. - * - * @param tableQuery the tableQuery value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withTableQuery(InsightQueryItemPropertiesTableQuery tableQuery) { - this.tableQuery = tableQuery; - return this; - } - - /** - * Get the chartQuery property: The insight chart query. - * - * @return the chartQuery value. - */ - public Object chartQuery() { - return this.chartQuery; - } - - /** - * Set the chartQuery property: The insight chart query. - * - * @param chartQuery the chartQuery value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withChartQuery(Object chartQuery) { - this.chartQuery = chartQuery; - return this; - } - - /** - * Get the additionalQuery property: The activity query definitions. - * - * @return the additionalQuery value. - */ - public InsightQueryItemPropertiesAdditionalQuery additionalQuery() { - return this.additionalQuery; - } - - /** - * Set the additionalQuery property: The activity query definitions. - * - * @param additionalQuery the additionalQuery value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withAdditionalQuery(InsightQueryItemPropertiesAdditionalQuery additionalQuery) { - this.additionalQuery = additionalQuery; - return this; - } - - /** - * Get the defaultTimeRange property: The insight chart query. - * - * @return the defaultTimeRange value. - */ - public InsightQueryItemPropertiesDefaultTimeRange defaultTimeRange() { - return this.defaultTimeRange; - } - - /** - * Set the defaultTimeRange property: The insight chart query. - * - * @param defaultTimeRange the defaultTimeRange value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withDefaultTimeRange( - InsightQueryItemPropertiesDefaultTimeRange defaultTimeRange) { - this.defaultTimeRange = defaultTimeRange; - return this; - } - - /** - * Get the referenceTimeRange property: The insight chart query. - * - * @return the referenceTimeRange value. - */ - public InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange() { - return this.referenceTimeRange; - } - - /** - * Set the referenceTimeRange property: The insight chart query. - * - * @param referenceTimeRange the referenceTimeRange value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withReferenceTimeRange( - InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange) { - this.referenceTimeRange = referenceTimeRange; - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItemProperties withDataTypes(List dataTypes) { - super.withDataTypes(dataTypes); - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItemProperties withInputEntityType(EntityType inputEntityType) { - super.withInputEntityType(inputEntityType); - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItemProperties withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - super.withRequiredInputFieldsSets(requiredInputFieldsSets); - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItemProperties withEntitiesFilter(Object entitiesFilter) { - super.withEntitiesFilter(entitiesFilter); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (tableQuery() != null) { - tableQuery().validate(); - } - if (additionalQuery() != null) { - additionalQuery().validate(); - } - if (defaultTimeRange() != null) { - defaultTimeRange().validate(); - } - if (referenceTimeRange() != null) { - referenceTimeRange().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java deleted file mode 100644 index c9877e7f9273..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The activity query definitions. */ -@Fluent -public final class InsightQueryItemPropertiesAdditionalQuery { - /* - * The insight query. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The insight text. - */ - @JsonProperty(value = "text") - private String text; - - /** - * Get the query property: The insight query. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The insight query. - * - * @param query the query value to set. - * @return the InsightQueryItemPropertiesAdditionalQuery object itself. - */ - public InsightQueryItemPropertiesAdditionalQuery withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the text property: The insight text. - * - * @return the text value. - */ - public String text() { - return this.text; - } - - /** - * Set the text property: The insight text. - * - * @param text the text value to set. - * @return the InsightQueryItemPropertiesAdditionalQuery object itself. - */ - public InsightQueryItemPropertiesAdditionalQuery withText(String text) { - this.text = text; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java deleted file mode 100644 index f870634fb199..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The insight chart query. */ -@Fluent -public final class InsightQueryItemPropertiesDefaultTimeRange { - /* - * The padding for the start time of the query. - */ - @JsonProperty(value = "beforeRange") - private String beforeRange; - - /* - * The padding for the end time of the query. - */ - @JsonProperty(value = "afterRange") - private String afterRange; - - /** - * Get the beforeRange property: The padding for the start time of the query. - * - * @return the beforeRange value. - */ - public String beforeRange() { - return this.beforeRange; - } - - /** - * Set the beforeRange property: The padding for the start time of the query. - * - * @param beforeRange the beforeRange value to set. - * @return the InsightQueryItemPropertiesDefaultTimeRange object itself. - */ - public InsightQueryItemPropertiesDefaultTimeRange withBeforeRange(String beforeRange) { - this.beforeRange = beforeRange; - return this; - } - - /** - * Get the afterRange property: The padding for the end time of the query. - * - * @return the afterRange value. - */ - public String afterRange() { - return this.afterRange; - } - - /** - * Set the afterRange property: The padding for the end time of the query. - * - * @param afterRange the afterRange value to set. - * @return the InsightQueryItemPropertiesDefaultTimeRange object itself. - */ - public InsightQueryItemPropertiesDefaultTimeRange withAfterRange(String afterRange) { - this.afterRange = afterRange; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java deleted file mode 100644 index 6dd0b8e28f15..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The insight chart query. */ -@Fluent -public final class InsightQueryItemPropertiesReferenceTimeRange { - /* - * Additional query time for looking back. - */ - @JsonProperty(value = "beforeRange") - private String beforeRange; - - /** - * Get the beforeRange property: Additional query time for looking back. - * - * @return the beforeRange value. - */ - public String beforeRange() { - return this.beforeRange; - } - - /** - * Set the beforeRange property: Additional query time for looking back. - * - * @param beforeRange the beforeRange value to set. - * @return the InsightQueryItemPropertiesReferenceTimeRange object itself. - */ - public InsightQueryItemPropertiesReferenceTimeRange withBeforeRange(String beforeRange) { - this.beforeRange = beforeRange; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java deleted file mode 100644 index 3c889abbed88..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java +++ /dev/null @@ -1,81 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The insight table query. */ -@Fluent -public final class InsightQueryItemPropertiesTableQuery { - /* - * List of insight column definitions. - */ - @JsonProperty(value = "columnsDefinitions") - private List columnsDefinitions; - - /* - * List of insight queries definitions. - */ - @JsonProperty(value = "queriesDefinitions") - private List queriesDefinitions; - - /** - * Get the columnsDefinitions property: List of insight column definitions. - * - * @return the columnsDefinitions value. - */ - public List columnsDefinitions() { - return this.columnsDefinitions; - } - - /** - * Set the columnsDefinitions property: List of insight column definitions. - * - * @param columnsDefinitions the columnsDefinitions value to set. - * @return the InsightQueryItemPropertiesTableQuery object itself. - */ - public InsightQueryItemPropertiesTableQuery withColumnsDefinitions( - List columnsDefinitions) { - this.columnsDefinitions = columnsDefinitions; - return this; - } - - /** - * Get the queriesDefinitions property: List of insight queries definitions. - * - * @return the queriesDefinitions value. - */ - public List queriesDefinitions() { - return this.queriesDefinitions; - } - - /** - * Set the queriesDefinitions property: List of insight queries definitions. - * - * @param queriesDefinitions the queriesDefinitions value to set. - * @return the InsightQueryItemPropertiesTableQuery object itself. - */ - public InsightQueryItemPropertiesTableQuery withQueriesDefinitions( - List queriesDefinitions) { - this.queriesDefinitions = queriesDefinitions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (columnsDefinitions() != null) { - columnsDefinitions().forEach(e -> e.validate()); - } - if (queriesDefinitions() != null) { - queriesDefinitions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java deleted file mode 100644 index f9428faa609a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java +++ /dev/null @@ -1,98 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem model. */ -@Fluent -public final class InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem { - /* - * Insight column header. - */ - @JsonProperty(value = "header") - private String headerProperty; - - /* - * Insights Column type. - */ - @JsonProperty(value = "outputType") - private OutputType outputType; - - /* - * Is query supports deep-link. - */ - @JsonProperty(value = "supportDeepLink") - private Boolean supportDeepLink; - - /** - * Get the headerProperty property: Insight column header. - * - * @return the headerProperty value. - */ - public String headerProperty() { - return this.headerProperty; - } - - /** - * Set the headerProperty property: Insight column header. - * - * @param headerProperty the headerProperty value to set. - * @return the InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem withHeaderProperty(String headerProperty) { - this.headerProperty = headerProperty; - return this; - } - - /** - * Get the outputType property: Insights Column type. - * - * @return the outputType value. - */ - public OutputType outputType() { - return this.outputType; - } - - /** - * Set the outputType property: Insights Column type. - * - * @param outputType the outputType value to set. - * @return the InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem withOutputType(OutputType outputType) { - this.outputType = outputType; - return this; - } - - /** - * Get the supportDeepLink property: Is query supports deep-link. - * - * @return the supportDeepLink value. - */ - public Boolean supportDeepLink() { - return this.supportDeepLink; - } - - /** - * Set the supportDeepLink property: Is query supports deep-link. - * - * @param supportDeepLink the supportDeepLink value to set. - * @return the InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem withSupportDeepLink(Boolean supportDeepLink) { - this.supportDeepLink = supportDeepLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java deleted file mode 100644 index ea811b7bdc9a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java +++ /dev/null @@ -1,129 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem model. */ -@Fluent -public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem { - /* - * Insight column header. - */ - @JsonProperty(value = "filter") - private String filter; - - /* - * Insight column header. - */ - @JsonProperty(value = "summarize") - private String summarize; - - /* - * Insight column header. - */ - @JsonProperty(value = "project") - private String project; - - /* - * Insight column header. - */ - @JsonProperty(value = "linkColumnsDefinitions") - private List linkColumnsDefinitions; - - /** - * Get the filter property: Insight column header. - * - * @return the filter value. - */ - public String filter() { - return this.filter; - } - - /** - * Set the filter property: Insight column header. - * - * @param filter the filter value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem withFilter(String filter) { - this.filter = filter; - return this; - } - - /** - * Get the summarize property: Insight column header. - * - * @return the summarize value. - */ - public String summarize() { - return this.summarize; - } - - /** - * Set the summarize property: Insight column header. - * - * @param summarize the summarize value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem withSummarize(String summarize) { - this.summarize = summarize; - return this; - } - - /** - * Get the project property: Insight column header. - * - * @return the project value. - */ - public String project() { - return this.project; - } - - /** - * Set the project property: Insight column header. - * - * @param project the project value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem withProject(String project) { - this.project = project; - return this; - } - - /** - * Get the linkColumnsDefinitions property: Insight column header. - * - * @return the linkColumnsDefinitions value. - */ - public List linkColumnsDefinitions() { - return this.linkColumnsDefinitions; - } - - /** - * Set the linkColumnsDefinitions property: Insight column header. - * - * @param linkColumnsDefinitions the linkColumnsDefinitions value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem withLinkColumnsDefinitions( - List linkColumnsDefinitions) { - this.linkColumnsDefinitions = linkColumnsDefinitions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (linkColumnsDefinitions() != null) { - linkColumnsDefinitions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java deleted file mode 100644 index 626304571d5c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem model. */ -@Fluent -public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem { - /* - * Insight Link Definition Projected Name. - */ - @JsonProperty(value = "projectedName") - private String projectedName; - - /* - * Insight Link Definition Query. - */ - @JsonProperty(value = "Query") - private String query; - - /** - * Get the projectedName property: Insight Link Definition Projected Name. - * - * @return the projectedName value. - */ - public String projectedName() { - return this.projectedName; - } - - /** - * Set the projectedName property: Insight Link Definition Projected Name. - * - * @param projectedName the projectedName value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem withProjectedName( - String projectedName) { - this.projectedName = projectedName; - return this; - } - - /** - * Get the query property: Insight Link Definition Query. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: Insight Link Definition Query. - * - * @param query the query value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem withQuery(String query) { - this.query = query; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java deleted file mode 100644 index 08c5f7cb09c2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Query results for table insights query. */ -@Fluent -public final class InsightsTableResult { - /* - * Columns Metadata of the table - */ - @JsonProperty(value = "columns") - private List columns; - - /* - * Rows data of the table - */ - @JsonProperty(value = "rows") - private List> rows; - - /** - * Get the columns property: Columns Metadata of the table. - * - * @return the columns value. - */ - public List columns() { - return this.columns; - } - - /** - * Set the columns property: Columns Metadata of the table. - * - * @param columns the columns value to set. - * @return the InsightsTableResult object itself. - */ - public InsightsTableResult withColumns(List columns) { - this.columns = columns; - return this; - } - - /** - * Get the rows property: Rows data of the table. - * - * @return the rows value. - */ - public List> rows() { - return this.rows; - } - - /** - * Set the rows property: Rows data of the table. - * - * @param rows the rows value to set. - * @return the InsightsTableResult object itself. - */ - public InsightsTableResult withRows(List> rows) { - this.rows = rows; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (columns() != null) { - columns().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java deleted file mode 100644 index 486e7914039c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InsightsTableResultColumnsItem model. */ -@Fluent -public final class InsightsTableResultColumnsItem { - /* - * the type of the colum - */ - @JsonProperty(value = "type") - private String type; - - /* - * the name of the colum - */ - @JsonProperty(value = "name") - private String name; - - /** - * Get the type property: the type of the colum. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: the type of the colum. - * - * @param type the type value to set. - * @return the InsightsTableResultColumnsItem object itself. - */ - public InsightsTableResultColumnsItem withType(String type) { - this.type = type; - return this; - } - - /** - * Get the name property: the name of the colum. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: the name of the colum. - * - * @param name the name value to set. - * @return the InsightsTableResultColumnsItem object itself. - */ - public InsightsTableResultColumnsItem withName(String name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java deleted file mode 100644 index 227c38863a55..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java +++ /dev/null @@ -1,102 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Instruction steps to enable the connector. */ -@Fluent -public class InstructionSteps { - /* - * Instruction step title - */ - @JsonProperty(value = "title") - private String title; - - /* - * Instruction step description - */ - @JsonProperty(value = "description") - private String description; - - /* - * Instruction step details - */ - @JsonProperty(value = "instructions") - private List instructions; - - /** - * Get the title property: Instruction step title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Instruction step title. - * - * @param title the title value to set. - * @return the InstructionSteps object itself. - */ - public InstructionSteps withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description property: Instruction step description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Instruction step description. - * - * @param description the description value to set. - * @return the InstructionSteps object itself. - */ - public InstructionSteps withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the instructions property: Instruction step details. - * - * @return the instructions value. - */ - public List instructions() { - return this.instructions; - } - - /** - * Set the instructions property: Instruction step details. - * - * @param instructions the instructions value to set. - * @return the InstructionSteps object itself. - */ - public InstructionSteps withInstructions(List instructions) { - this.instructions = instructions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (instructions() != null) { - instructions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java deleted file mode 100644 index 45cf764a6a76..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.annotation.Fluent; - -/** The InstructionStepsInstructionsItem model. */ -@Fluent -public final class InstructionStepsInstructionsItem extends ConnectorInstructionModelBase { - /** {@inheritDoc} */ - @Override - public InstructionStepsInstructionsItem withParameters(Object parameters) { - super.withParameters(parameters); - return this; - } - - /** {@inheritDoc} */ - @Override - public InstructionStepsInstructionsItem withType(SettingType type) { - super.withType(type); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java deleted file mode 100644 index cf5ebc9db245..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.IoTCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents IoT requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("IOT") -@Fluent -public final class IoTCheckRequirements extends DataConnectorsCheckRequirements { - /* - * IoT requirements check properties. - */ - @JsonProperty(value = "properties") - private IoTCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: IoT requirements check properties. - * - * @return the innerProperties value. - */ - private IoTCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); - } - - /** - * Set the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the IoTCheckRequirements object itself. - */ - public IoTCheckRequirements withSubscriptionId(String subscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new IoTCheckRequirementsProperties(); - } - this.innerProperties().withSubscriptionId(subscriptionId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java deleted file mode 100644 index 787fff5098c3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IoTDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents IoT data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("IOT") -@Fluent -public final class IoTDataConnector extends DataConnectorInner { - /* - * IoT data connector properties. - */ - @JsonProperty(value = "properties") - private IoTDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: IoT data connector properties. - * - * @return the innerProperties value. - */ - private IoTDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public IoTDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); - } - - /** - * Set the subscriptionId property: The subscription id to connect to, and get the data from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the IoTDataConnector object itself. - */ - public IoTDataConnector withSubscriptionId(String subscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new IoTDataConnectorProperties(); - } - this.innerProperties().withSubscriptionId(subscriptionId); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the IoTDataConnector object itself. - */ - public IoTDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new IoTDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java deleted file mode 100644 index 06ab4d1c051d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java +++ /dev/null @@ -1,335 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IoTDeviceEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -/** Represents an IoT device entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("IoTDevice") -@Fluent -public final class IoTDeviceEntity extends EntityInner { - /* - * IoTDevice entity properties - */ - @JsonProperty(value = "properties") - private IoTDeviceEntityProperties innerProperties; - - /** - * Get the innerProperties property: IoTDevice entity properties. - * - * @return the innerProperties value. - */ - private IoTDeviceEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the deviceId property: The ID of the IoT Device in the IoT Hub. - * - * @return the deviceId value. - */ - public String deviceId() { - return this.innerProperties() == null ? null : this.innerProperties().deviceId(); - } - - /** - * Get the deviceName property: The friendly name of the device. - * - * @return the deviceName value. - */ - public String deviceName() { - return this.innerProperties() == null ? null : this.innerProperties().deviceName(); - } - - /** - * Get the source property: The source of the device. - * - * @return the source value. - */ - public String source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Get the iotSecurityAgentId property: The ID of the security agent running on the device. - * - * @return the iotSecurityAgentId value. - */ - public UUID iotSecurityAgentId() { - return this.innerProperties() == null ? null : this.innerProperties().iotSecurityAgentId(); - } - - /** - * Get the deviceType property: The type of the device. - * - * @return the deviceType value. - */ - public String deviceType() { - return this.innerProperties() == null ? null : this.innerProperties().deviceType(); - } - - /** - * Get the vendor property: The vendor of the device. - * - * @return the vendor value. - */ - public String vendor() { - return this.innerProperties() == null ? null : this.innerProperties().vendor(); - } - - /** - * Get the edgeId property: The ID of the edge device. - * - * @return the edgeId value. - */ - public String edgeId() { - return this.innerProperties() == null ? null : this.innerProperties().edgeId(); - } - - /** - * Get the macAddress property: The MAC address of the device. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.innerProperties() == null ? null : this.innerProperties().macAddress(); - } - - /** - * Get the model property: The model of the device. - * - * @return the model value. - */ - public String model() { - return this.innerProperties() == null ? null : this.innerProperties().model(); - } - - /** - * Get the serialNumber property: The serial number of the device. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); - } - - /** - * Get the firmwareVersion property: The firmware version of the device. - * - * @return the firmwareVersion value. - */ - public String firmwareVersion() { - return this.innerProperties() == null ? null : this.innerProperties().firmwareVersion(); - } - - /** - * Get the operatingSystem property: The operating system of the device. - * - * @return the operatingSystem value. - */ - public String operatingSystem() { - return this.innerProperties() == null ? null : this.innerProperties().operatingSystem(); - } - - /** - * Get the iotHubEntityId property: The AzureResource entity id of the IoT Hub. - * - * @return the iotHubEntityId value. - */ - public String iotHubEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().iotHubEntityId(); - } - - /** - * Get the hostEntityId property: The Host entity id of this device. - * - * @return the hostEntityId value. - */ - public String hostEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().hostEntityId(); - } - - /** - * Get the ipAddressEntityId property: The IP entity if of this device. - * - * @return the ipAddressEntityId value. - */ - public String ipAddressEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().ipAddressEntityId(); - } - - /** - * Get the threatIntelligence property: A list of TI contexts attached to the IoTDevice entity. - * - * @return the threatIntelligence value. - */ - public List threatIntelligence() { - return this.innerProperties() == null ? null : this.innerProperties().threatIntelligence(); - } - - /** - * Get the protocols property: A list of protocols of the IoTDevice entity. - * - * @return the protocols value. - */ - public List protocols() { - return this.innerProperties() == null ? null : this.innerProperties().protocols(); - } - - /** - * Get the owners property: A list of owners of the IoTDevice entity. - * - * @return the owners value. - */ - public List owners() { - return this.innerProperties() == null ? null : this.innerProperties().owners(); - } - - /** - * Get the nicEntityIds property: A list of Nic entity ids of the IoTDevice entity. - * - * @return the nicEntityIds value. - */ - public List nicEntityIds() { - return this.innerProperties() == null ? null : this.innerProperties().nicEntityIds(); - } - - /** - * Get the site property: The site of the device. - * - * @return the site value. - */ - public String site() { - return this.innerProperties() == null ? null : this.innerProperties().site(); - } - - /** - * Get the zone property: The zone location of the device within a site. - * - * @return the zone value. - */ - public String zone() { - return this.innerProperties() == null ? null : this.innerProperties().zone(); - } - - /** - * Get the sensor property: The sensor the device is monitored by. - * - * @return the sensor value. - */ - public String sensor() { - return this.innerProperties() == null ? null : this.innerProperties().sensor(); - } - - /** - * Get the deviceSubType property: The subType of the device ('PLC', 'HMI', 'EWS', etc.). - * - * @return the deviceSubType value. - */ - public String deviceSubType() { - return this.innerProperties() == null ? null : this.innerProperties().deviceSubType(); - } - - /** - * Get the importance property: Device importance, determines if the device classified as 'crown jewel'. - * - * @return the importance value. - */ - public DeviceImportance importance() { - return this.innerProperties() == null ? null : this.innerProperties().importance(); - } - - /** - * Set the importance property: Device importance, determines if the device classified as 'crown jewel'. - * - * @param importance the importance value to set. - * @return the IoTDeviceEntity object itself. - */ - public IoTDeviceEntity withImportance(DeviceImportance importance) { - if (this.innerProperties() == null) { - this.innerProperties = new IoTDeviceEntityProperties(); - } - this.innerProperties().withImportance(importance); - return this; - } - - /** - * Get the purdueLayer property: The Purdue Layer of the device. - * - * @return the purdueLayer value. - */ - public String purdueLayer() { - return this.innerProperties() == null ? null : this.innerProperties().purdueLayer(); - } - - /** - * Get the isAuthorized property: Determines whether the device classified as authorized device. - * - * @return the isAuthorized value. - */ - public Boolean isAuthorized() { - return this.innerProperties() == null ? null : this.innerProperties().isAuthorized(); - } - - /** - * Get the isProgramming property: Determines whether the device classified as programming device. - * - * @return the isProgramming value. - */ - public Boolean isProgramming() { - return this.innerProperties() == null ? null : this.innerProperties().isProgramming(); - } - - /** - * Get the isScanner property: Is the device classified as a scanner device. - * - * @return the isScanner value. - */ - public Boolean isScanner() { - return this.innerProperties() == null ? null : this.innerProperties().isScanner(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java deleted file mode 100644 index beeac5a11a60..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IpEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** Represents an ip entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Ip") -@Fluent -public final class IpEntity extends EntityInner { - /* - * Ip entity properties - */ - @JsonProperty(value = "properties") - private IpEntityProperties innerProperties; - - /** - * Get the innerProperties property: Ip entity properties. - * - * @return the innerProperties value. - */ - private IpEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the address property: The IP address as string, e.g. 127.0.0.1 (either in Ipv4 or Ipv6). - * - * @return the address value. - */ - public String address() { - return this.innerProperties() == null ? null : this.innerProperties().address(); - } - - /** - * Get the location property: The geo-location context attached to the ip entity. - * - * @return the location value. - */ - public GeoLocation location() { - return this.innerProperties() == null ? null : this.innerProperties().location(); - } - - /** - * Get the threatIntelligence property: A list of TI contexts attached to the ip entity. - * - * @return the threatIntelligence value. - */ - public List threatIntelligence() { - return this.innerProperties() == null ? null : this.innerProperties().threatIntelligence(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java deleted file mode 100644 index c85e9c1ab375..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java +++ /dev/null @@ -1,36 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of IpGeodatas. */ -public interface IpGeodatas { - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @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 geodata for a single IP address. - */ - EnrichmentIpGeodata get(String resourceGroupName, String ipAddress); - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @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 geodata for a single IP address along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String ipAddress, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java deleted file mode 100644 index ff0016d01c52..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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; - -/** Holds the alert intent stage(s) mapping for this alert. */ -public final class KillChainIntent extends ExpandableStringEnum { - /** Static value Unknown for KillChainIntent. */ - public static final KillChainIntent UNKNOWN = fromString("Unknown"); - - /** Static value Probing for KillChainIntent. */ - public static final KillChainIntent PROBING = fromString("Probing"); - - /** Static value Exploitation for KillChainIntent. */ - public static final KillChainIntent EXPLOITATION = fromString("Exploitation"); - - /** Static value Persistence for KillChainIntent. */ - public static final KillChainIntent PERSISTENCE = fromString("Persistence"); - - /** Static value PrivilegeEscalation for KillChainIntent. */ - public static final KillChainIntent PRIVILEGE_ESCALATION = fromString("PrivilegeEscalation"); - - /** Static value DefenseEvasion for KillChainIntent. */ - public static final KillChainIntent DEFENSE_EVASION = fromString("DefenseEvasion"); - - /** Static value CredentialAccess for KillChainIntent. */ - public static final KillChainIntent CREDENTIAL_ACCESS = fromString("CredentialAccess"); - - /** Static value Discovery for KillChainIntent. */ - public static final KillChainIntent DISCOVERY = fromString("Discovery"); - - /** Static value LateralMovement for KillChainIntent. */ - public static final KillChainIntent LATERAL_MOVEMENT = fromString("LateralMovement"); - - /** Static value Execution for KillChainIntent. */ - public static final KillChainIntent EXECUTION = fromString("Execution"); - - /** Static value Collection for KillChainIntent. */ - public static final KillChainIntent COLLECTION = fromString("Collection"); - - /** Static value Exfiltration for KillChainIntent. */ - public static final KillChainIntent EXFILTRATION = fromString("Exfiltration"); - - /** Static value CommandAndControl for KillChainIntent. */ - public static final KillChainIntent COMMAND_AND_CONTROL = fromString("CommandAndControl"); - - /** Static value Impact for KillChainIntent. */ - public static final KillChainIntent IMPACT = fromString("Impact"); - - /** - * Creates or finds a KillChainIntent from its string representation. - * - * @param name a name to look for. - * @return the corresponding KillChainIntent. - */ - @JsonCreator - public static KillChainIntent fromString(String name) { - return fromString(name, KillChainIntent.class); - } - - /** - * Gets known KillChainIntent values. - * - * @return known KillChainIntent values. - */ - public static Collection values() { - return values(KillChainIntent.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java deleted file mode 100644 index b8879fab665f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java +++ /dev/null @@ -1,83 +0,0 @@ -// 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; - -/** The kind of content the metadata is for. */ -public final class Kind extends ExpandableStringEnum { - /** Static value DataConnector for Kind. */ - public static final Kind DATA_CONNECTOR = fromString("DataConnector"); - - /** Static value DataType for Kind. */ - public static final Kind DATA_TYPE = fromString("DataType"); - - /** Static value Workbook for Kind. */ - public static final Kind WORKBOOK = fromString("Workbook"); - - /** Static value WorkbookTemplate for Kind. */ - public static final Kind WORKBOOK_TEMPLATE = fromString("WorkbookTemplate"); - - /** Static value Playbook for Kind. */ - public static final Kind PLAYBOOK = fromString("Playbook"); - - /** Static value PlaybookTemplate for Kind. */ - public static final Kind PLAYBOOK_TEMPLATE = fromString("PlaybookTemplate"); - - /** Static value AnalyticsRuleTemplate for Kind. */ - public static final Kind ANALYTICS_RULE_TEMPLATE = fromString("AnalyticsRuleTemplate"); - - /** Static value AnalyticsRule for Kind. */ - public static final Kind ANALYTICS_RULE = fromString("AnalyticsRule"); - - /** Static value HuntingQuery for Kind. */ - public static final Kind HUNTING_QUERY = fromString("HuntingQuery"); - - /** Static value InvestigationQuery for Kind. */ - public static final Kind INVESTIGATION_QUERY = fromString("InvestigationQuery"); - - /** Static value Parser for Kind. */ - public static final Kind PARSER = fromString("Parser"); - - /** Static value Watchlist for Kind. */ - public static final Kind WATCHLIST = fromString("Watchlist"); - - /** Static value WatchlistTemplate for Kind. */ - public static final Kind WATCHLIST_TEMPLATE = fromString("WatchlistTemplate"); - - /** Static value Solution for Kind. */ - public static final Kind SOLUTION = fromString("Solution"); - - /** Static value AzureFunction for Kind. */ - public static final Kind AZURE_FUNCTION = fromString("AzureFunction"); - - /** Static value LogicAppsCustomConnector for Kind. */ - public static final Kind LOGIC_APPS_CUSTOM_CONNECTOR = fromString("LogicAppsCustomConnector"); - - /** Static value AutomationRule for Kind. */ - public static final Kind AUTOMATION_RULE = fromString("AutomationRule"); - - /** - * Creates or finds a Kind from its string representation. - * - * @param name a name to look for. - * @return the corresponding Kind. - */ - @JsonCreator - public static Kind fromString(String name) { - return fromString(name, Kind.class); - } - - /** - * Gets known Kind values. - * - * @return known Kind values. - */ - public static Collection values() { - return values(Kind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java deleted file mode 100644 index ee71cb19cfb9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Data type for last data received. */ -@Fluent -public class LastDataReceivedDataType { - /* - * Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} placeholder - */ - @JsonProperty(value = "name") - private String name; - - /* - * Query for indicate last data received - */ - @JsonProperty(value = "lastDataReceivedQuery") - private String lastDataReceivedQuery; - - /** - * Get the name property: Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} - * placeholder. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} - * placeholder. - * - * @param name the name value to set. - * @return the LastDataReceivedDataType object itself. - */ - public LastDataReceivedDataType withName(String name) { - this.name = name; - return this; - } - - /** - * Get the lastDataReceivedQuery property: Query for indicate last data received. - * - * @return the lastDataReceivedQuery value. - */ - public String lastDataReceivedQuery() { - return this.lastDataReceivedQuery; - } - - /** - * Set the lastDataReceivedQuery property: Query for indicate last data received. - * - * @param lastDataReceivedQuery the lastDataReceivedQuery value to set. - * @return the LastDataReceivedDataType object itself. - */ - public LastDataReceivedDataType withLastDataReceivedQuery(String lastDataReceivedQuery) { - this.lastDataReceivedQuery = lastDataReceivedQuery; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java deleted file mode 100644 index 9538371ea2c4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java +++ /dev/null @@ -1,155 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MLBehaviorAnalyticsAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents MLBehaviorAnalytics alert rule. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MLBehaviorAnalytics") -@Fluent -public final class MLBehaviorAnalyticsAlertRule extends AlertRuleInner { - /* - * MLBehaviorAnalytics alert rule properties - */ - @JsonProperty(value = "properties") - private MLBehaviorAnalyticsAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: MLBehaviorAnalytics alert rule properties. - * - * @return the innerProperties value. - */ - private MLBehaviorAnalyticsAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRule withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.innerProperties() == null ? null : this.innerProperties().alertRuleTemplateName(); - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the MLBehaviorAnalyticsAlertRule object itself. - */ - public MLBehaviorAnalyticsAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleProperties(); - } - this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the MLBehaviorAnalyticsAlertRule object itself. - */ - public MLBehaviorAnalyticsAlertRule withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert rule has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java deleted file mode 100644 index 3dc6cb43070c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java +++ /dev/null @@ -1,252 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MLBehaviorAnalyticsAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents MLBehaviorAnalytics alert rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MLBehaviorAnalytics") -@Fluent -public final class MLBehaviorAnalyticsAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * MLBehaviorAnalytics alert rule template properties. - */ - @JsonProperty(value = "properties") - private MLBehaviorAnalyticsAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: MLBehaviorAnalytics alert rule template properties. - * - * @return the innerProperties value. - */ - private MLBehaviorAnalyticsAlertRuleTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java deleted file mode 100644 index 1f8aeca643cc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java +++ /dev/null @@ -1,204 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MailClusterEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents a mail cluster entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MailCluster") -@Fluent -public final class MailClusterEntity extends EntityInner { - /* - * Mail cluster entity properties - */ - @JsonProperty(value = "properties") - private MailClusterEntityProperties innerProperties; - - /** - * Get the innerProperties property: Mail cluster entity properties. - * - * @return the innerProperties value. - */ - private MailClusterEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the networkMessageIds property: The mail message IDs that are part of the mail cluster. - * - * @return the networkMessageIds value. - */ - public List networkMessageIds() { - return this.innerProperties() == null ? null : this.innerProperties().networkMessageIds(); - } - - /** - * Get the countByDeliveryStatus property: Count of mail messages by DeliveryStatus string representation. - * - * @return the countByDeliveryStatus value. - */ - public Object countByDeliveryStatus() { - return this.innerProperties() == null ? null : this.innerProperties().countByDeliveryStatus(); - } - - /** - * Get the countByThreatType property: Count of mail messages by ThreatType string representation. - * - * @return the countByThreatType value. - */ - public Object countByThreatType() { - return this.innerProperties() == null ? null : this.innerProperties().countByThreatType(); - } - - /** - * Get the countByProtectionStatus property: Count of mail messages by ProtectionStatus string representation. - * - * @return the countByProtectionStatus value. - */ - public Object countByProtectionStatus() { - return this.innerProperties() == null ? null : this.innerProperties().countByProtectionStatus(); - } - - /** - * Get the threats property: The threats of mail messages that are part of the mail cluster. - * - * @return the threats value. - */ - public List threats() { - return this.innerProperties() == null ? null : this.innerProperties().threats(); - } - - /** - * Get the query property: The query that was used to identify the messages of the mail cluster. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Get the queryTime property: The query time. - * - * @return the queryTime value. - */ - public OffsetDateTime queryTime() { - return this.innerProperties() == null ? null : this.innerProperties().queryTime(); - } - - /** - * Get the mailCount property: The number of mail messages that are part of the mail cluster. - * - * @return the mailCount value. - */ - public Integer mailCount() { - return this.innerProperties() == null ? null : this.innerProperties().mailCount(); - } - - /** - * Get the isVolumeAnomaly property: Is this a volume anomaly mail cluster. - * - * @return the isVolumeAnomaly value. - */ - public Boolean isVolumeAnomaly() { - return this.innerProperties() == null ? null : this.innerProperties().isVolumeAnomaly(); - } - - /** - * Get the source property: The source of the mail cluster (default is 'O365 ATP'). - * - * @return the source value. - */ - public String source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Get the clusterSourceIdentifier property: The id of the cluster source. - * - * @return the clusterSourceIdentifier value. - */ - public String clusterSourceIdentifier() { - return this.innerProperties() == null ? null : this.innerProperties().clusterSourceIdentifier(); - } - - /** - * Get the clusterSourceType property: The type of the cluster source. - * - * @return the clusterSourceType value. - */ - public String clusterSourceType() { - return this.innerProperties() == null ? null : this.innerProperties().clusterSourceType(); - } - - /** - * Get the clusterQueryStartTime property: The cluster query start time. - * - * @return the clusterQueryStartTime value. - */ - public OffsetDateTime clusterQueryStartTime() { - return this.innerProperties() == null ? null : this.innerProperties().clusterQueryStartTime(); - } - - /** - * Get the clusterQueryEndTime property: The cluster query end time. - * - * @return the clusterQueryEndTime value. - */ - public OffsetDateTime clusterQueryEndTime() { - return this.innerProperties() == null ? null : this.innerProperties().clusterQueryEndTime(); - } - - /** - * Get the clusterGroup property: The cluster group. - * - * @return the clusterGroup value. - */ - public String clusterGroup() { - return this.innerProperties() == null ? null : this.innerProperties().clusterGroup(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java deleted file mode 100644 index 8d4c01ef2b89..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java +++ /dev/null @@ -1,408 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MailMessageEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -/** Represents a mail message entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MailMessage") -@Fluent -public final class MailMessageEntity extends EntityInner { - /* - * Mail message entity properties - */ - @JsonProperty(value = "properties") - private MailMessageEntityProperties innerProperties; - - /** - * Get the innerProperties property: Mail message entity properties. - * - * @return the innerProperties value. - */ - private MailMessageEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the fileEntityIds property: The File entity ids of this mail message's attachments. - * - * @return the fileEntityIds value. - */ - public List fileEntityIds() { - return this.innerProperties() == null ? null : this.innerProperties().fileEntityIds(); - } - - /** - * Get the recipient property: The recipient of this mail message. Note that in case of multiple recipients the mail - * message is forked and each copy has one recipient. - * - * @return the recipient value. - */ - public String recipient() { - return this.innerProperties() == null ? null : this.innerProperties().recipient(); - } - - /** - * Get the urls property: The Urls contained in this mail message. - * - * @return the urls value. - */ - public List urls() { - return this.innerProperties() == null ? null : this.innerProperties().urls(); - } - - /** - * Get the threats property: The threats of this mail message. - * - * @return the threats value. - */ - public List threats() { - return this.innerProperties() == null ? null : this.innerProperties().threats(); - } - - /** - * Get the p1Sender property: The p1 sender's email address. - * - * @return the p1Sender value. - */ - public String p1Sender() { - return this.innerProperties() == null ? null : this.innerProperties().p1Sender(); - } - - /** - * Get the p1SenderDisplayName property: The p1 sender's display name. - * - * @return the p1SenderDisplayName value. - */ - public String p1SenderDisplayName() { - return this.innerProperties() == null ? null : this.innerProperties().p1SenderDisplayName(); - } - - /** - * Get the p1SenderDomain property: The p1 sender's domain. - * - * @return the p1SenderDomain value. - */ - public String p1SenderDomain() { - return this.innerProperties() == null ? null : this.innerProperties().p1SenderDomain(); - } - - /** - * Get the senderIp property: The sender's IP address. - * - * @return the senderIp value. - */ - public String senderIp() { - return this.innerProperties() == null ? null : this.innerProperties().senderIp(); - } - - /** - * Get the p2Sender property: The p2 sender's email address. - * - * @return the p2Sender value. - */ - public String p2Sender() { - return this.innerProperties() == null ? null : this.innerProperties().p2Sender(); - } - - /** - * Get the p2SenderDisplayName property: The p2 sender's display name. - * - * @return the p2SenderDisplayName value. - */ - public String p2SenderDisplayName() { - return this.innerProperties() == null ? null : this.innerProperties().p2SenderDisplayName(); - } - - /** - * Get the p2SenderDomain property: The p2 sender's domain. - * - * @return the p2SenderDomain value. - */ - public String p2SenderDomain() { - return this.innerProperties() == null ? null : this.innerProperties().p2SenderDomain(); - } - - /** - * Get the receiveDate property: The receive date of this message. - * - * @return the receiveDate value. - */ - public OffsetDateTime receiveDate() { - return this.innerProperties() == null ? null : this.innerProperties().receiveDate(); - } - - /** - * Get the networkMessageId property: The network message id of this mail message. - * - * @return the networkMessageId value. - */ - public UUID networkMessageId() { - return this.innerProperties() == null ? null : this.innerProperties().networkMessageId(); - } - - /** - * Get the internetMessageId property: The internet message id of this mail message. - * - * @return the internetMessageId value. - */ - public String internetMessageId() { - return this.innerProperties() == null ? null : this.innerProperties().internetMessageId(); - } - - /** - * Get the subject property: The subject of this mail message. - * - * @return the subject value. - */ - public String subject() { - return this.innerProperties() == null ? null : this.innerProperties().subject(); - } - - /** - * Get the language property: The language of this mail message. - * - * @return the language value. - */ - public String language() { - return this.innerProperties() == null ? null : this.innerProperties().language(); - } - - /** - * Get the threatDetectionMethods property: The threat detection methods. - * - * @return the threatDetectionMethods value. - */ - public List threatDetectionMethods() { - return this.innerProperties() == null ? null : this.innerProperties().threatDetectionMethods(); - } - - /** - * Get the bodyFingerprintBin1 property: The bodyFingerprintBin1. - * - * @return the bodyFingerprintBin1 value. - */ - public Integer bodyFingerprintBin1() { - return this.innerProperties() == null ? null : this.innerProperties().bodyFingerprintBin1(); - } - - /** - * Set the bodyFingerprintBin1 property: The bodyFingerprintBin1. - * - * @param bodyFingerprintBin1 the bodyFingerprintBin1 value to set. - * @return the MailMessageEntity object itself. - */ - public MailMessageEntity withBodyFingerprintBin1(Integer bodyFingerprintBin1) { - if (this.innerProperties() == null) { - this.innerProperties = new MailMessageEntityProperties(); - } - this.innerProperties().withBodyFingerprintBin1(bodyFingerprintBin1); - return this; - } - - /** - * Get the bodyFingerprintBin2 property: The bodyFingerprintBin2. - * - * @return the bodyFingerprintBin2 value. - */ - public Integer bodyFingerprintBin2() { - return this.innerProperties() == null ? null : this.innerProperties().bodyFingerprintBin2(); - } - - /** - * Set the bodyFingerprintBin2 property: The bodyFingerprintBin2. - * - * @param bodyFingerprintBin2 the bodyFingerprintBin2 value to set. - * @return the MailMessageEntity object itself. - */ - public MailMessageEntity withBodyFingerprintBin2(Integer bodyFingerprintBin2) { - if (this.innerProperties() == null) { - this.innerProperties = new MailMessageEntityProperties(); - } - this.innerProperties().withBodyFingerprintBin2(bodyFingerprintBin2); - return this; - } - - /** - * Get the bodyFingerprintBin3 property: The bodyFingerprintBin3. - * - * @return the bodyFingerprintBin3 value. - */ - public Integer bodyFingerprintBin3() { - return this.innerProperties() == null ? null : this.innerProperties().bodyFingerprintBin3(); - } - - /** - * Set the bodyFingerprintBin3 property: The bodyFingerprintBin3. - * - * @param bodyFingerprintBin3 the bodyFingerprintBin3 value to set. - * @return the MailMessageEntity object itself. - */ - public MailMessageEntity withBodyFingerprintBin3(Integer bodyFingerprintBin3) { - if (this.innerProperties() == null) { - this.innerProperties = new MailMessageEntityProperties(); - } - this.innerProperties().withBodyFingerprintBin3(bodyFingerprintBin3); - return this; - } - - /** - * Get the bodyFingerprintBin4 property: The bodyFingerprintBin4. - * - * @return the bodyFingerprintBin4 value. - */ - public Integer bodyFingerprintBin4() { - return this.innerProperties() == null ? null : this.innerProperties().bodyFingerprintBin4(); - } - - /** - * Set the bodyFingerprintBin4 property: The bodyFingerprintBin4. - * - * @param bodyFingerprintBin4 the bodyFingerprintBin4 value to set. - * @return the MailMessageEntity object itself. - */ - public MailMessageEntity withBodyFingerprintBin4(Integer bodyFingerprintBin4) { - if (this.innerProperties() == null) { - this.innerProperties = new MailMessageEntityProperties(); - } - this.innerProperties().withBodyFingerprintBin4(bodyFingerprintBin4); - return this; - } - - /** - * Get the bodyFingerprintBin5 property: The bodyFingerprintBin5. - * - * @return the bodyFingerprintBin5 value. - */ - public Integer bodyFingerprintBin5() { - return this.innerProperties() == null ? null : this.innerProperties().bodyFingerprintBin5(); - } - - /** - * Set the bodyFingerprintBin5 property: The bodyFingerprintBin5. - * - * @param bodyFingerprintBin5 the bodyFingerprintBin5 value to set. - * @return the MailMessageEntity object itself. - */ - public MailMessageEntity withBodyFingerprintBin5(Integer bodyFingerprintBin5) { - if (this.innerProperties() == null) { - this.innerProperties = new MailMessageEntityProperties(); - } - this.innerProperties().withBodyFingerprintBin5(bodyFingerprintBin5); - return this; - } - - /** - * Get the antispamDirection property: The directionality of this mail message. - * - * @return the antispamDirection value. - */ - public AntispamMailDirection antispamDirection() { - return this.innerProperties() == null ? null : this.innerProperties().antispamDirection(); - } - - /** - * Set the antispamDirection property: The directionality of this mail message. - * - * @param antispamDirection the antispamDirection value to set. - * @return the MailMessageEntity object itself. - */ - public MailMessageEntity withAntispamDirection(AntispamMailDirection antispamDirection) { - if (this.innerProperties() == null) { - this.innerProperties = new MailMessageEntityProperties(); - } - this.innerProperties().withAntispamDirection(antispamDirection); - return this; - } - - /** - * Get the deliveryAction property: The delivery action of this mail message like Delivered, Blocked, Replaced etc. - * - * @return the deliveryAction value. - */ - public DeliveryAction deliveryAction() { - return this.innerProperties() == null ? null : this.innerProperties().deliveryAction(); - } - - /** - * Set the deliveryAction property: The delivery action of this mail message like Delivered, Blocked, Replaced etc. - * - * @param deliveryAction the deliveryAction value to set. - * @return the MailMessageEntity object itself. - */ - public MailMessageEntity withDeliveryAction(DeliveryAction deliveryAction) { - if (this.innerProperties() == null) { - this.innerProperties = new MailMessageEntityProperties(); - } - this.innerProperties().withDeliveryAction(deliveryAction); - return this; - } - - /** - * Get the deliveryLocation property: The delivery location of this mail message like Inbox, JunkFolder etc. - * - * @return the deliveryLocation value. - */ - public DeliveryLocation deliveryLocation() { - return this.innerProperties() == null ? null : this.innerProperties().deliveryLocation(); - } - - /** - * Set the deliveryLocation property: The delivery location of this mail message like Inbox, JunkFolder etc. - * - * @param deliveryLocation the deliveryLocation value to set. - * @return the MailMessageEntity object itself. - */ - public MailMessageEntity withDeliveryLocation(DeliveryLocation deliveryLocation) { - if (this.innerProperties() == null) { - this.innerProperties = new MailMessageEntityProperties(); - } - this.innerProperties().withDeliveryLocation(deliveryLocation); - return this; - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java deleted file mode 100644 index 9441ac626ef0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java +++ /dev/null @@ -1,105 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MailboxEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; -import java.util.UUID; - -/** Represents a mailbox entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Mailbox") -@Fluent -public final class MailboxEntity extends EntityInner { - /* - * Mailbox entity properties - */ - @JsonProperty(value = "properties") - private MailboxEntityProperties innerProperties; - - /** - * Get the innerProperties property: Mailbox entity properties. - * - * @return the innerProperties value. - */ - private MailboxEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the mailboxPrimaryAddress property: The mailbox's primary address. - * - * @return the mailboxPrimaryAddress value. - */ - public String mailboxPrimaryAddress() { - return this.innerProperties() == null ? null : this.innerProperties().mailboxPrimaryAddress(); - } - - /** - * Get the displayName property: The mailbox's display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Get the upn property: The mailbox's UPN. - * - * @return the upn value. - */ - public String upn() { - return this.innerProperties() == null ? null : this.innerProperties().upn(); - } - - /** - * Get the externalDirectoryObjectId property: The AzureAD identifier of mailbox. Similar to AadUserId in account - * entity but this property is specific to mailbox object on office side. - * - * @return the externalDirectoryObjectId value. - */ - public UUID externalDirectoryObjectId() { - return this.innerProperties() == null ? null : this.innerProperties().externalDirectoryObjectId(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java deleted file mode 100644 index efcd2bbb952b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java +++ /dev/null @@ -1,104 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MalwareEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** Represents a malware entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Malware") -@Fluent -public final class MalwareEntity extends EntityInner { - /* - * File entity properties - */ - @JsonProperty(value = "properties") - private MalwareEntityProperties innerProperties; - - /** - * Get the innerProperties property: File entity properties. - * - * @return the innerProperties value. - */ - private MalwareEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the category property: The malware category by the vendor, e.g. Trojan. - * - * @return the category value. - */ - public String category() { - return this.innerProperties() == null ? null : this.innerProperties().category(); - } - - /** - * Get the fileEntityIds property: List of linked file entity identifiers on which the malware was found. - * - * @return the fileEntityIds value. - */ - public List fileEntityIds() { - return this.innerProperties() == null ? null : this.innerProperties().fileEntityIds(); - } - - /** - * Get the malwareName property: The malware name by the vendor, e.g. Win32/Toga!rfn. - * - * @return the malwareName value. - */ - public String malwareName() { - return this.innerProperties() == null ? null : this.innerProperties().malwareName(); - } - - /** - * Get the processEntityIds property: List of linked process entity identifiers on which the malware was found. - * - * @return the processEntityIds value. - */ - public List processEntityIds() { - return this.innerProperties() == null ? null : this.innerProperties().processEntityIds(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java deleted file mode 100644 index ab2433df85a5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java +++ /dev/null @@ -1,82 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** The ManualTriggerRequestBody model. */ -@Fluent -public final class ManualTriggerRequestBody { - /* - * The tenantId property. - */ - @JsonProperty(value = "tenantId") - private UUID tenantId; - - /* - * The logicAppsResourceId property. - */ - @JsonProperty(value = "logicAppsResourceId", required = true) - private String logicAppsResourceId; - - /** - * Get the tenantId property: The tenantId property. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenantId property. - * - * @param tenantId the tenantId value to set. - * @return the ManualTriggerRequestBody object itself. - */ - public ManualTriggerRequestBody withTenantId(UUID tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the logicAppsResourceId property: The logicAppsResourceId property. - * - * @return the logicAppsResourceId value. - */ - public String logicAppsResourceId() { - return this.logicAppsResourceId; - } - - /** - * Set the logicAppsResourceId property: The logicAppsResourceId property. - * - * @param logicAppsResourceId the logicAppsResourceId value to set. - * @return the ManualTriggerRequestBody object itself. - */ - public ManualTriggerRequestBody withLogicAppsResourceId(String logicAppsResourceId) { - this.logicAppsResourceId = logicAppsResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logicAppsResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property logicAppsResourceId in model ManualTriggerRequestBody")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManualTriggerRequestBody.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java deleted file mode 100644 index 412bb642d81e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** - * Grouping matching method. When method is Selected at least one of groupByEntities, groupByAlertDetails, - * groupByCustomDetails must be provided and not empty. - */ -public final class MatchingMethod extends ExpandableStringEnum { - /** Static value AllEntities for MatchingMethod. */ - public static final MatchingMethod ALL_ENTITIES = fromString("AllEntities"); - - /** Static value AnyAlert for MatchingMethod. */ - public static final MatchingMethod ANY_ALERT = fromString("AnyAlert"); - - /** Static value Selected for MatchingMethod. */ - public static final MatchingMethod SELECTED = fromString("Selected"); - - /** - * Creates or finds a MatchingMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding MatchingMethod. - */ - @JsonCreator - public static MatchingMethod fromString(String name) { - return fromString(name, MatchingMethod.class); - } - - /** - * Gets known MatchingMethod values. - * - * @return known MatchingMethod values. - */ - public static Collection values() { - return values(MatchingMethod.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java deleted file mode 100644 index bf543c75aaaf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.McasCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents MCAS (Microsoft Cloud App Security) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftCloudAppSecurity") -@Fluent -public final class McasCheckRequirements extends DataConnectorsCheckRequirements { - /* - * MCAS (Microsoft Cloud App Security) requirements check properties. - */ - @JsonProperty(value = "properties") - private McasCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: MCAS (Microsoft Cloud App Security) requirements check properties. - * - * @return the innerProperties value. - */ - private McasCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java deleted file mode 100644 index 4849da973db9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.McasDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents MCAS (Microsoft Cloud App Security) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftCloudAppSecurity") -@Fluent -public final class McasDataConnector extends DataConnectorInner { - /* - * MCAS (Microsoft Cloud App Security) data connector properties. - */ - @JsonProperty(value = "properties") - private McasDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: MCAS (Microsoft Cloud App Security) data connector properties. - * - * @return the innerProperties value. - */ - private McasDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public McasDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public McasDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the McasDataConnector object itself. - */ - public McasDataConnector withDataTypes(McasDataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new McasDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the McasDataConnector object itself. - */ - public McasDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new McasDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java deleted file mode 100644 index ced242cf519f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java +++ /dev/null @@ -1,58 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for MCAS (Microsoft Cloud App Security) data connector. */ -@Fluent -public final class McasDataConnectorDataTypes extends AlertsDataTypeOfDataConnector { - /* - * Discovery log data type connection. - */ - @JsonProperty(value = "discoveryLogs") - private DataConnectorDataTypeCommon discoveryLogs; - - /** - * Get the discoveryLogs property: Discovery log data type connection. - * - * @return the discoveryLogs value. - */ - public DataConnectorDataTypeCommon discoveryLogs() { - return this.discoveryLogs; - } - - /** - * Set the discoveryLogs property: Discovery log data type connection. - * - * @param discoveryLogs the discoveryLogs value to set. - * @return the McasDataConnectorDataTypes object itself. - */ - public McasDataConnectorDataTypes withDiscoveryLogs(DataConnectorDataTypeCommon discoveryLogs) { - this.discoveryLogs = discoveryLogs; - return this; - } - - /** {@inheritDoc} */ - @Override - public McasDataConnectorDataTypes withAlerts(DataConnectorDataTypeCommon alerts) { - super.withAlerts(alerts); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (discoveryLogs() != null) { - discoveryLogs().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java deleted file mode 100644 index 97b1be834a33..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.MdatpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents MDATP (Microsoft Defender Advanced Threat Protection) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftDefenderAdvancedThreatProtection") -@Fluent -public final class MdatpCheckRequirements extends DataConnectorsCheckRequirements { - /* - * MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. - */ - @JsonProperty(value = "properties") - private MdatpCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: MDATP (Microsoft Defender Advanced Threat Protection) requirements check - * properties. - * - * @return the innerProperties value. - */ - private MdatpCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java deleted file mode 100644 index be4c5abc500b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java +++ /dev/null @@ -1,100 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MdatpDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents MDATP (Microsoft Defender Advanced Threat Protection) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftDefenderAdvancedThreatProtection") -@Fluent -public final class MdatpDataConnector extends DataConnectorInner { - /* - * MDATP (Microsoft Defender Advanced Threat Protection) data connector properties. - */ - @JsonProperty(value = "properties") - private MdatpDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: MDATP (Microsoft Defender Advanced Threat Protection) data connector - * properties. - * - * @return the innerProperties value. - */ - private MdatpDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MdatpDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the MdatpDataConnector object itself. - */ - public MdatpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new MdatpDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the MdatpDataConnector object itself. - */ - public MdatpDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new MdatpDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java deleted file mode 100644 index 568297b27c57..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java +++ /dev/null @@ -1,98 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Publisher or creator of the content item. */ -@Fluent -public final class MetadataAuthor { - /* - * Name of the author. Company or person. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Email of author contact - */ - @JsonProperty(value = "email") - private String email; - - /* - * Link for author/vendor page - */ - @JsonProperty(value = "link") - private String link; - - /** - * Get the name property: Name of the author. Company or person. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the author. Company or person. - * - * @param name the name value to set. - * @return the MetadataAuthor object itself. - */ - public MetadataAuthor withName(String name) { - this.name = name; - return this; - } - - /** - * Get the email property: Email of author contact. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: Email of author contact. - * - * @param email the email value to set. - * @return the MetadataAuthor object itself. - */ - public MetadataAuthor withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the link property: Link for author/vendor page. - * - * @return the link value. - */ - public String link() { - return this.link; - } - - /** - * Set the link property: Link for author/vendor page. - * - * @param link the link value to set. - * @return the MetadataAuthor object itself. - */ - public MetadataAuthor withLink(String link) { - this.link = link; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java deleted file mode 100644 index d2101c1cc1cf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** ies for the solution content item. */ -@Fluent -public final class MetadataCategories { - /* - * domain for the solution content item - */ - @JsonProperty(value = "domains") - private List domains; - - /* - * Industry verticals for the solution content item - */ - @JsonProperty(value = "verticals") - private List verticals; - - /** - * Get the domains property: domain for the solution content item. - * - * @return the domains value. - */ - public List domains() { - return this.domains; - } - - /** - * Set the domains property: domain for the solution content item. - * - * @param domains the domains value to set. - * @return the MetadataCategories object itself. - */ - public MetadataCategories withDomains(List domains) { - this.domains = domains; - return this; - } - - /** - * Get the verticals property: Industry verticals for the solution content item. - * - * @return the verticals value. - */ - public List verticals() { - return this.verticals; - } - - /** - * Set the verticals property: Industry verticals for the solution content item. - * - * @param verticals the verticals value to set. - * @return the MetadataCategories object itself. - */ - public MetadataCategories withVerticals(List verticals) { - this.verticals = verticals; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java deleted file mode 100644 index 0fcabe6da5cd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java +++ /dev/null @@ -1,189 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Dependencies for the content item, what other content items it requires to work. Can describe more complex - * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or - * operator/criteria for complex dependencies. - */ -@Fluent -public final class MetadataDependencies { - /* - * Id of the content item we depend on - */ - @JsonProperty(value = "contentId") - private String contentId; - - /* - * Type of the content item we depend on - */ - @JsonProperty(value = "kind") - private Kind kind; - - /* - * Version of the the content item we depend on. Can be blank, * or missing to indicate any version fulfills the - * dependency. If version does not match our defined numeric format then an exact match is required. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Name of the content item - */ - @JsonProperty(value = "name") - private String name; - - /* - * Operator used for list of dependencies in criteria array. - */ - @JsonProperty(value = "operator") - private Operator operator; - - /* - * This is the list of dependencies we must fulfill, according to the AND/OR operator - */ - @JsonProperty(value = "criteria") - private List criteria; - - /** - * Get the contentId property: Id of the content item we depend on. - * - * @return the contentId value. - */ - public String contentId() { - return this.contentId; - } - - /** - * Set the contentId property: Id of the content item we depend on. - * - * @param contentId the contentId value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withContentId(String contentId) { - this.contentId = contentId; - return this; - } - - /** - * Get the kind property: Type of the content item we depend on. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: Type of the content item we depend on. - * - * @param kind the kind value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the version property: Version of the the content item we depend on. Can be blank, * or missing to indicate - * any version fulfills the dependency. If version does not match our defined numeric format then an exact match is - * required. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the the content item we depend on. Can be blank, * or missing to indicate - * any version fulfills the dependency. If version does not match our defined numeric format then an exact match is - * required. - * - * @param version the version value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the name property: Name of the content item. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the content item. - * - * @param name the name value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withName(String name) { - this.name = name; - return this; - } - - /** - * Get the operator property: Operator used for list of dependencies in criteria array. - * - * @return the operator value. - */ - public Operator operator() { - return this.operator; - } - - /** - * Set the operator property: Operator used for list of dependencies in criteria array. - * - * @param operator the operator value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withOperator(Operator operator) { - this.operator = operator; - return this; - } - - /** - * Get the criteria property: This is the list of dependencies we must fulfill, according to the AND/OR operator. - * - * @return the criteria value. - */ - public List criteria() { - return this.criteria; - } - - /** - * Set the criteria property: This is the list of dependencies we must fulfill, according to the AND/OR operator. - * - * @param criteria the criteria value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withCriteria(List criteria) { - this.criteria = criteria; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (criteria() != null) { - criteria().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java deleted file mode 100644 index a5a93f7aa39f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the metadata. */ -@Fluent -public final class MetadataList { - /* - * Array of metadata. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * URL to fetch the next page of metadata. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: Array of metadata. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of metadata. - * - * @param value the value value to set. - * @return the MetadataList object itself. - */ - public MetadataList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to fetch the next page of metadata. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model MetadataList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MetadataList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java deleted file mode 100644 index 392d45ae5499..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java +++ /dev/null @@ -1,773 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import java.time.LocalDate; -import java.util.List; - -/** An immutable client-side representation of MetadataModel. */ -public interface MetadataModel { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @return the contentId value. - */ - String contentId(); - - /** - * Gets the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - String parentId(); - - /** - * Gets the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - String version(); - - /** - * Gets the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - Kind kind(); - - /** - * Gets the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - MetadataSource source(); - - /** - * Gets the author property: The creator of the content item. - * - * @return the author value. - */ - MetadataAuthor author(); - - /** - * Gets the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - MetadataSupport support(); - - /** - * Gets the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - MetadataDependencies dependencies(); - - /** - * Gets the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - MetadataCategories categories(); - - /** - * Gets the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - List providers(); - - /** - * Gets the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - LocalDate firstPublishDate(); - - /** - * Gets the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - LocalDate lastPublishDate(); - - /** - * Gets the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - String customVersion(); - - /** - * Gets the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @return the contentSchemaVersion value. - */ - String contentSchemaVersion(); - - /** - * Gets the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @return the icon value. - */ - String icon(); - - /** - * Gets the threatAnalysisTactics property: the tactics the resource covers. - * - * @return the threatAnalysisTactics value. - */ - List threatAnalysisTactics(); - - /** - * Gets the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @return the threatAnalysisTechniques value. - */ - List threatAnalysisTechniques(); - - /** - * Gets the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @return the previewImages value. - */ - List previewImages(); - - /** - * Gets the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @return the previewImagesDark value. - */ - List previewImagesDark(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner object. - * - * @return the inner object. - */ - MetadataModelInner innerModel(); - - /** The entirety of the MetadataModel definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The MetadataModel definition stages. */ - interface DefinitionStages { - /** The first stage of the MetadataModel definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the MetadataModel definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the MetadataModel definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithEtag, - DefinitionStages.WithContentId, - DefinitionStages.WithParentId, - DefinitionStages.WithVersion, - DefinitionStages.WithKind, - DefinitionStages.WithSource, - DefinitionStages.WithAuthor, - DefinitionStages.WithSupport, - DefinitionStages.WithDependencies, - DefinitionStages.WithCategories, - DefinitionStages.WithProviders, - DefinitionStages.WithFirstPublishDate, - DefinitionStages.WithLastPublishDate, - DefinitionStages.WithCustomVersion, - DefinitionStages.WithContentSchemaVersion, - DefinitionStages.WithIcon, - DefinitionStages.WithThreatAnalysisTactics, - DefinitionStages.WithThreatAnalysisTechniques, - DefinitionStages.WithPreviewImages, - DefinitionStages.WithPreviewImagesDark { - /** - * Executes the create request. - * - * @return the created resource. - */ - MetadataModel create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - MetadataModel create(Context context); - } - /** The stage of the MetadataModel definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the MetadataModel definition allowing to specify contentId. */ - interface WithContentId { - /** - * Specifies the contentId property: Static ID for the content. Used to identify dependencies and content - * from solutions or community. Hard-coded/static for out of the box content and solutions. Dynamic for - * user-created. This is the resource name. - * - * @param contentId Static ID for the content. Used to identify dependencies and content from solutions or - * community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This - * is the resource name. - * @return the next definition stage. - */ - WithCreate withContentId(String contentId); - } - /** The stage of the MetadataModel definition allowing to specify parentId. */ - interface WithParentId { - /** - * Specifies the parentId property: Full parent resource ID of the content item the metadata is for. This is - * the full resource ID including the scope (subscription and resource group). - * - * @param parentId Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * @return the next definition stage. - */ - WithCreate withParentId(String parentId); - } - /** The stage of the MetadataModel definition allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: Version of the content. Default and recommended format is numeric (e.g. - * 1, 1.0, 1.0.0, 1.0.0.0), following ARM template best practices. Can also be any string, but then we - * cannot guarantee any version checks. - * - * @param version Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee - * any version checks. - * @return the next definition stage. - */ - WithCreate withVersion(String version); - } - /** The stage of the MetadataModel definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of content the metadata is for.. - * - * @param kind The kind of content the metadata is for. - * @return the next definition stage. - */ - WithCreate withKind(Kind kind); - } - /** The stage of the MetadataModel definition allowing to specify source. */ - interface WithSource { - /** - * Specifies the source property: Source of the content. This is where/how it was created.. - * - * @param source Source of the content. This is where/how it was created. - * @return the next definition stage. - */ - WithCreate withSource(MetadataSource source); - } - /** The stage of the MetadataModel definition allowing to specify author. */ - interface WithAuthor { - /** - * Specifies the author property: The creator of the content item.. - * - * @param author The creator of the content item. - * @return the next definition stage. - */ - WithCreate withAuthor(MetadataAuthor author); - } - /** The stage of the MetadataModel definition allowing to specify support. */ - interface WithSupport { - /** - * Specifies the support property: Support information for the metadata - type, name, contact information. - * - * @param support Support information for the metadata - type, name, contact information. - * @return the next definition stage. - */ - WithCreate withSupport(MetadataSupport support); - } - /** The stage of the MetadataModel definition allowing to specify dependencies. */ - interface WithDependencies { - /** - * Specifies the dependencies property: Dependencies for the content item, what other content items it - * requires to work. Can describe more complex dependencies using a recursive/nested structure. For a single - * dependency an id/kind/version can be supplied or operator/criteria for complex formats.. - * - * @param dependencies Dependencies for the content item, what other content items it requires to work. Can - * describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * @return the next definition stage. - */ - WithCreate withDependencies(MetadataDependencies dependencies); - } - /** The stage of the MetadataModel definition allowing to specify categories. */ - interface WithCategories { - /** - * Specifies the categories property: Categories for the solution content item. - * - * @param categories Categories for the solution content item. - * @return the next definition stage. - */ - WithCreate withCategories(MetadataCategories categories); - } - /** The stage of the MetadataModel definition allowing to specify providers. */ - interface WithProviders { - /** - * Specifies the providers property: Providers for the solution content item. - * - * @param providers Providers for the solution content item. - * @return the next definition stage. - */ - WithCreate withProviders(List providers); - } - /** The stage of the MetadataModel definition allowing to specify firstPublishDate. */ - interface WithFirstPublishDate { - /** - * Specifies the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate first publish date solution content item. - * @return the next definition stage. - */ - WithCreate withFirstPublishDate(LocalDate firstPublishDate); - } - /** The stage of the MetadataModel definition allowing to specify lastPublishDate. */ - interface WithLastPublishDate { - /** - * Specifies the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate last publish date for the solution content item. - * @return the next definition stage. - */ - WithCreate withLastPublishDate(LocalDate lastPublishDate); - } - /** The stage of the MetadataModel definition allowing to specify customVersion. */ - interface WithCustomVersion { - /** - * Specifies the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion The custom version of the content. A optional free text. - * @return the next definition stage. - */ - WithCreate withCustomVersion(String customVersion); - } - /** The stage of the MetadataModel definition allowing to specify contentSchemaVersion. */ - interface WithContentSchemaVersion { - /** - * Specifies the contentSchemaVersion property: Schema version of the content. Can be used to distinguish - * between different flow based on the schema version. - * - * @param contentSchemaVersion Schema version of the content. Can be used to distinguish between different - * flow based on the schema version. - * @return the next definition stage. - */ - WithCreate withContentSchemaVersion(String contentSchemaVersion); - } - /** The stage of the MetadataModel definition allowing to specify icon. */ - interface WithIcon { - /** - * Specifies the icon property: the icon identifier. this id can later be fetched from the solution - * template. - * - * @param icon the icon identifier. this id can later be fetched from the solution template. - * @return the next definition stage. - */ - WithCreate withIcon(String icon); - } - /** The stage of the MetadataModel definition allowing to specify threatAnalysisTactics. */ - interface WithThreatAnalysisTactics { - /** - * Specifies the threatAnalysisTactics property: the tactics the resource covers. - * - * @param threatAnalysisTactics the tactics the resource covers. - * @return the next definition stage. - */ - WithCreate withThreatAnalysisTactics(List threatAnalysisTactics); - } - /** The stage of the MetadataModel definition allowing to specify threatAnalysisTechniques. */ - interface WithThreatAnalysisTechniques { - /** - * Specifies the threatAnalysisTechniques property: the techniques the resource covers, these have to be - * aligned with the tactics being used. - * - * @param threatAnalysisTechniques the techniques the resource covers, these have to be aligned with the - * tactics being used. - * @return the next definition stage. - */ - WithCreate withThreatAnalysisTechniques(List threatAnalysisTechniques); - } - /** The stage of the MetadataModel definition allowing to specify previewImages. */ - interface WithPreviewImages { - /** - * Specifies the previewImages property: preview image file names. These will be taken from the solution - * artifacts. - * - * @param previewImages preview image file names. These will be taken from the solution artifacts. - * @return the next definition stage. - */ - WithCreate withPreviewImages(List previewImages); - } - /** The stage of the MetadataModel definition allowing to specify previewImagesDark. */ - interface WithPreviewImagesDark { - /** - * Specifies the previewImagesDark property: preview image file names. These will be taken from the solution - * artifacts. used for dark theme support. - * - * @param previewImagesDark preview image file names. These will be taken from the solution artifacts. used - * for dark theme support. - * @return the next definition stage. - */ - WithCreate withPreviewImagesDark(List previewImagesDark); - } - } - /** - * Begins update for the MetadataModel resource. - * - * @return the stage of resource update. - */ - MetadataModel.Update update(); - - /** The template for MetadataModel update. */ - interface Update - extends UpdateStages.WithEtag, - UpdateStages.WithContentId, - UpdateStages.WithParentId, - UpdateStages.WithVersion, - UpdateStages.WithKind, - UpdateStages.WithSource, - UpdateStages.WithAuthor, - UpdateStages.WithSupport, - UpdateStages.WithDependencies, - UpdateStages.WithCategories, - UpdateStages.WithProviders, - UpdateStages.WithFirstPublishDate, - UpdateStages.WithLastPublishDate, - UpdateStages.WithCustomVersion, - UpdateStages.WithContentSchemaVersion, - UpdateStages.WithIcon, - UpdateStages.WithThreatAnalysisTactics, - UpdateStages.WithThreatAnalysisTechniques, - UpdateStages.WithPreviewImages, - UpdateStages.WithPreviewImagesDark { - /** - * Executes the update request. - * - * @return the updated resource. - */ - MetadataModel apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - MetadataModel apply(Context context); - } - /** The MetadataModel update stages. */ - interface UpdateStages { - /** The stage of the MetadataModel update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the MetadataModel update allowing to specify contentId. */ - interface WithContentId { - /** - * Specifies the contentId property: Static ID for the content. Used to identify dependencies and content - * from solutions or community. Hard-coded/static for out of the box content and solutions. Dynamic for - * user-created. This is the resource name. - * - * @param contentId Static ID for the content. Used to identify dependencies and content from solutions or - * community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This - * is the resource name. - * @return the next definition stage. - */ - Update withContentId(String contentId); - } - /** The stage of the MetadataModel update allowing to specify parentId. */ - interface WithParentId { - /** - * Specifies the parentId property: Full parent resource ID of the content item the metadata is for. This is - * the full resource ID including the scope (subscription and resource group). - * - * @param parentId Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * @return the next definition stage. - */ - Update withParentId(String parentId); - } - /** The stage of the MetadataModel update allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: Version of the content. Default and recommended format is numeric (e.g. - * 1, 1.0, 1.0.0, 1.0.0.0), following ARM template best practices. Can also be any string, but then we - * cannot guarantee any version checks. - * - * @param version Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee - * any version checks. - * @return the next definition stage. - */ - Update withVersion(String version); - } - /** The stage of the MetadataModel update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of content the metadata is for.. - * - * @param kind The kind of content the metadata is for. - * @return the next definition stage. - */ - Update withKind(Kind kind); - } - /** The stage of the MetadataModel update allowing to specify source. */ - interface WithSource { - /** - * Specifies the source property: Source of the content. This is where/how it was created.. - * - * @param source Source of the content. This is where/how it was created. - * @return the next definition stage. - */ - Update withSource(MetadataSource source); - } - /** The stage of the MetadataModel update allowing to specify author. */ - interface WithAuthor { - /** - * Specifies the author property: The creator of the content item.. - * - * @param author The creator of the content item. - * @return the next definition stage. - */ - Update withAuthor(MetadataAuthor author); - } - /** The stage of the MetadataModel update allowing to specify support. */ - interface WithSupport { - /** - * Specifies the support property: Support information for the metadata - type, name, contact information. - * - * @param support Support information for the metadata - type, name, contact information. - * @return the next definition stage. - */ - Update withSupport(MetadataSupport support); - } - /** The stage of the MetadataModel update allowing to specify dependencies. */ - interface WithDependencies { - /** - * Specifies the dependencies property: Dependencies for the content item, what other content items it - * requires to work. Can describe more complex dependencies using a recursive/nested structure. For a single - * dependency an id/kind/version can be supplied or operator/criteria for complex formats.. - * - * @param dependencies Dependencies for the content item, what other content items it requires to work. Can - * describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * @return the next definition stage. - */ - Update withDependencies(MetadataDependencies dependencies); - } - /** The stage of the MetadataModel update allowing to specify categories. */ - interface WithCategories { - /** - * Specifies the categories property: Categories for the solution content item. - * - * @param categories Categories for the solution content item. - * @return the next definition stage. - */ - Update withCategories(MetadataCategories categories); - } - /** The stage of the MetadataModel update allowing to specify providers. */ - interface WithProviders { - /** - * Specifies the providers property: Providers for the solution content item. - * - * @param providers Providers for the solution content item. - * @return the next definition stage. - */ - Update withProviders(List providers); - } - /** The stage of the MetadataModel update allowing to specify firstPublishDate. */ - interface WithFirstPublishDate { - /** - * Specifies the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate first publish date solution content item. - * @return the next definition stage. - */ - Update withFirstPublishDate(LocalDate firstPublishDate); - } - /** The stage of the MetadataModel update allowing to specify lastPublishDate. */ - interface WithLastPublishDate { - /** - * Specifies the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate last publish date for the solution content item. - * @return the next definition stage. - */ - Update withLastPublishDate(LocalDate lastPublishDate); - } - /** The stage of the MetadataModel update allowing to specify customVersion. */ - interface WithCustomVersion { - /** - * Specifies the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion The custom version of the content. A optional free text. - * @return the next definition stage. - */ - Update withCustomVersion(String customVersion); - } - /** The stage of the MetadataModel update allowing to specify contentSchemaVersion. */ - interface WithContentSchemaVersion { - /** - * Specifies the contentSchemaVersion property: Schema version of the content. Can be used to distinguish - * between different flow based on the schema version. - * - * @param contentSchemaVersion Schema version of the content. Can be used to distinguish between different - * flow based on the schema version. - * @return the next definition stage. - */ - Update withContentSchemaVersion(String contentSchemaVersion); - } - /** The stage of the MetadataModel update allowing to specify icon. */ - interface WithIcon { - /** - * Specifies the icon property: the icon identifier. this id can later be fetched from the solution - * template. - * - * @param icon the icon identifier. this id can later be fetched from the solution template. - * @return the next definition stage. - */ - Update withIcon(String icon); - } - /** The stage of the MetadataModel update allowing to specify threatAnalysisTactics. */ - interface WithThreatAnalysisTactics { - /** - * Specifies the threatAnalysisTactics property: the tactics the resource covers. - * - * @param threatAnalysisTactics the tactics the resource covers. - * @return the next definition stage. - */ - Update withThreatAnalysisTactics(List threatAnalysisTactics); - } - /** The stage of the MetadataModel update allowing to specify threatAnalysisTechniques. */ - interface WithThreatAnalysisTechniques { - /** - * Specifies the threatAnalysisTechniques property: the techniques the resource covers, these have to be - * aligned with the tactics being used. - * - * @param threatAnalysisTechniques the techniques the resource covers, these have to be aligned with the - * tactics being used. - * @return the next definition stage. - */ - Update withThreatAnalysisTechniques(List threatAnalysisTechniques); - } - /** The stage of the MetadataModel update allowing to specify previewImages. */ - interface WithPreviewImages { - /** - * Specifies the previewImages property: preview image file names. These will be taken from the solution - * artifacts. - * - * @param previewImages preview image file names. These will be taken from the solution artifacts. - * @return the next definition stage. - */ - Update withPreviewImages(List previewImages); - } - /** The stage of the MetadataModel update allowing to specify previewImagesDark. */ - interface WithPreviewImagesDark { - /** - * Specifies the previewImagesDark property: preview image file names. These will be taken from the solution - * artifacts. used for dark theme support. - * - * @param previewImagesDark preview image file names. These will be taken from the solution artifacts. used - * for dark theme support. - * @return the next definition stage. - */ - Update withPreviewImagesDark(List previewImagesDark); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - MetadataModel refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - MetadataModel refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java deleted file mode 100644 index 7556f02585fb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java +++ /dev/null @@ -1,507 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataPropertiesPatch; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.LocalDate; -import java.util.List; - -/** Metadata patch request body. */ -@Fluent -public final class MetadataPatch extends ResourceWithEtag { - /* - * Metadata patch request body - */ - @JsonProperty(value = "properties") - private MetadataPropertiesPatch innerProperties; - - /** - * Get the innerProperties property: Metadata patch request body. - * - * @return the innerProperties value. - */ - private MetadataPropertiesPatch innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MetadataPatch withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @return the contentId value. - */ - public String contentId() { - return this.innerProperties() == null ? null : this.innerProperties().contentId(); - } - - /** - * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @param contentId the contentId value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withContentId(String contentId) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withContentId(contentId); - return this; - } - - /** - * Get the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - public String parentId() { - return this.innerProperties() == null ? null : this.innerProperties().parentId(); - } - - /** - * Set the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @param parentId the parentId value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withParentId(String parentId) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withParentId(parentId); - return this; - } - - /** - * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @param version the version value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - public Kind kind() { - return this.innerProperties() == null ? null : this.innerProperties().kind(); - } - - /** - * Set the kind property: The kind of content the metadata is for. - * - * @param kind the kind value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withKind(Kind kind) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withKind(kind); - return this; - } - - /** - * Get the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - public MetadataSource source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: Source of the content. This is where/how it was created. - * - * @param source the source value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withSource(MetadataSource source) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the author property: The creator of the content item. - * - * @return the author value. - */ - public MetadataAuthor author() { - return this.innerProperties() == null ? null : this.innerProperties().author(); - } - - /** - * Set the author property: The creator of the content item. - * - * @param author the author value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withAuthor(MetadataAuthor author) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withAuthor(author); - return this; - } - - /** - * Get the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - public MetadataSupport support() { - return this.innerProperties() == null ? null : this.innerProperties().support(); - } - - /** - * Set the support property: Support information for the metadata - type, name, contact information. - * - * @param support the support value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withSupport(MetadataSupport support) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withSupport(support); - return this; - } - - /** - * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - public MetadataDependencies dependencies() { - return this.innerProperties() == null ? null : this.innerProperties().dependencies(); - } - - /** - * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @param dependencies the dependencies value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withDependencies(MetadataDependencies dependencies) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withDependencies(dependencies); - return this; - } - - /** - * Get the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - public MetadataCategories categories() { - return this.innerProperties() == null ? null : this.innerProperties().categories(); - } - - /** - * Set the categories property: Categories for the solution content item. - * - * @param categories the categories value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withCategories(MetadataCategories categories) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withCategories(categories); - return this; - } - - /** - * Get the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - public List providers() { - return this.innerProperties() == null ? null : this.innerProperties().providers(); - } - - /** - * Set the providers property: Providers for the solution content item. - * - * @param providers the providers value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withProviders(List providers) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withProviders(providers); - return this; - } - - /** - * Get the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - public LocalDate firstPublishDate() { - return this.innerProperties() == null ? null : this.innerProperties().firstPublishDate(); - } - - /** - * Set the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate the firstPublishDate value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withFirstPublishDate(LocalDate firstPublishDate) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withFirstPublishDate(firstPublishDate); - return this; - } - - /** - * Get the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - public LocalDate lastPublishDate() { - return this.innerProperties() == null ? null : this.innerProperties().lastPublishDate(); - } - - /** - * Set the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate the lastPublishDate value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withLastPublishDate(LocalDate lastPublishDate) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withLastPublishDate(lastPublishDate); - return this; - } - - /** - * Get the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - public String customVersion() { - return this.innerProperties() == null ? null : this.innerProperties().customVersion(); - } - - /** - * Set the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion the customVersion value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withCustomVersion(String customVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withCustomVersion(customVersion); - return this; - } - - /** - * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @return the contentSchemaVersion value. - */ - public String contentSchemaVersion() { - return this.innerProperties() == null ? null : this.innerProperties().contentSchemaVersion(); - } - - /** - * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @param contentSchemaVersion the contentSchemaVersion value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withContentSchemaVersion(String contentSchemaVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withContentSchemaVersion(contentSchemaVersion); - return this; - } - - /** - * Get the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @return the icon value. - */ - public String icon() { - return this.innerProperties() == null ? null : this.innerProperties().icon(); - } - - /** - * Set the icon property: the icon identifier. this id can later be fetched from the solution template. - * - * @param icon the icon value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withIcon(String icon) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withIcon(icon); - return this; - } - - /** - * Get the threatAnalysisTactics property: the tactics the resource covers. - * - * @return the threatAnalysisTactics value. - */ - public List threatAnalysisTactics() { - return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTactics(); - } - - /** - * Set the threatAnalysisTactics property: the tactics the resource covers. - * - * @param threatAnalysisTactics the threatAnalysisTactics value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withThreatAnalysisTactics(List threatAnalysisTactics) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withThreatAnalysisTactics(threatAnalysisTactics); - return this; - } - - /** - * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @return the threatAnalysisTechniques value. - */ - public List threatAnalysisTechniques() { - return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTechniques(); - } - - /** - * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the - * tactics being used. - * - * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withThreatAnalysisTechniques(List threatAnalysisTechniques) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withThreatAnalysisTechniques(threatAnalysisTechniques); - return this; - } - - /** - * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @return the previewImages value. - */ - public List previewImages() { - return this.innerProperties() == null ? null : this.innerProperties().previewImages(); - } - - /** - * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. - * - * @param previewImages the previewImages value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withPreviewImages(List previewImages) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withPreviewImages(previewImages); - return this; - } - - /** - * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @return the previewImagesDark value. - */ - public List previewImagesDark() { - return this.innerProperties() == null ? null : this.innerProperties().previewImagesDark(); - } - - /** - * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. - * used for dark theme support. - * - * @param previewImagesDark the previewImagesDark value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withPreviewImagesDark(List previewImagesDark) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withPreviewImagesDark(previewImagesDark); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java deleted file mode 100644 index 41a206a6dccf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java +++ /dev/null @@ -1,106 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The original source of the content item, where it comes from. */ -@Fluent -public final class MetadataSource { - /* - * Source type of the content - */ - @JsonProperty(value = "kind", required = true) - private SourceKind kind; - - /* - * Name of the content source. The repo name, solution name, LA workspace name etc. - */ - @JsonProperty(value = "name") - private String name; - - /* - * ID of the content source. The solution ID, workspace ID, etc - */ - @JsonProperty(value = "sourceId") - private String sourceId; - - /** - * Get the kind property: Source type of the content. - * - * @return the kind value. - */ - public SourceKind kind() { - return this.kind; - } - - /** - * Set the kind property: Source type of the content. - * - * @param kind the kind value to set. - * @return the MetadataSource object itself. - */ - public MetadataSource withKind(SourceKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the name property: Name of the content source. The repo name, solution name, LA workspace name etc. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the content source. The repo name, solution name, LA workspace name etc. - * - * @param name the name value to set. - * @return the MetadataSource object itself. - */ - public MetadataSource withName(String name) { - this.name = name; - return this; - } - - /** - * Get the sourceId property: ID of the content source. The solution ID, workspace ID, etc. - * - * @return the sourceId value. - */ - public String sourceId() { - return this.sourceId; - } - - /** - * Set the sourceId property: ID of the content source. The solution ID, workspace ID, etc. - * - * @param sourceId the sourceId value to set. - * @return the MetadataSource object itself. - */ - public MetadataSource withSourceId(String sourceId) { - this.sourceId = sourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model MetadataSource")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MetadataSource.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java deleted file mode 100644 index a25d51b568be..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java +++ /dev/null @@ -1,132 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Support information for the content item. */ -@Fluent -public final class MetadataSupport { - /* - * Type of support for content item - */ - @JsonProperty(value = "tier", required = true) - private SupportTier tier; - - /* - * Name of the support contact. Company or person. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Email of support contact - */ - @JsonProperty(value = "email") - private String email; - - /* - * Link for support help, like to support page to open a ticket etc. - */ - @JsonProperty(value = "link") - private String link; - - /** - * Get the tier property: Type of support for content item. - * - * @return the tier value. - */ - public SupportTier tier() { - return this.tier; - } - - /** - * Set the tier property: Type of support for content item. - * - * @param tier the tier value to set. - * @return the MetadataSupport object itself. - */ - public MetadataSupport withTier(SupportTier tier) { - this.tier = tier; - return this; - } - - /** - * Get the name property: Name of the support contact. Company or person. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the support contact. Company or person. - * - * @param name the name value to set. - * @return the MetadataSupport object itself. - */ - public MetadataSupport withName(String name) { - this.name = name; - return this; - } - - /** - * Get the email property: Email of support contact. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: Email of support contact. - * - * @param email the email value to set. - * @return the MetadataSupport object itself. - */ - public MetadataSupport withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the link property: Link for support help, like to support page to open a ticket etc. - * - * @return the link value. - */ - public String link() { - return this.link; - } - - /** - * Set the link property: Link for support help, like to support page to open a ticket etc. - * - * @param link the link value to set. - * @return the MetadataSupport object itself. - */ - public MetadataSupport withLink(String link) { - this.link = link; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tier() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tier in model MetadataSupport")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MetadataSupport.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java deleted file mode 100644 index b8be150a2a19..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java +++ /dev/null @@ -1,157 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Metadatas. */ -public interface Metadatas { - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 list of all the metadata as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @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 list of all the metadata as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context); - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @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 Metadata. - */ - MetadataModel get(String resourceGroupName, String workspaceName, String metadataName); - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @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 Metadata along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String metadataName); - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); - - /** - * Get a Metadata. - * - * @param id the resource ID. - * @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 Metadata along with {@link Response}. - */ - MetadataModel getById(String id); - - /** - * Get a Metadata. - * - * @param id the resource ID. - * @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 Metadata along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Metadata. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete a Metadata. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new MetadataModel resource. - * - * @param name resource name. - * @return the first stage of the new MetadataModel definition. - */ - MetadataModel.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java deleted file mode 100644 index 201a74e0f4e1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java +++ /dev/null @@ -1,249 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MicrosoftSecurityIncidentCreationAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents MicrosoftSecurityIncidentCreation rule. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftSecurityIncidentCreation") -@Fluent -public final class MicrosoftSecurityIncidentCreationAlertRule extends AlertRuleInner { - /* - * MicrosoftSecurityIncidentCreation rule properties - */ - @JsonProperty(value = "properties") - private MicrosoftSecurityIncidentCreationAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule properties. - * - * @return the innerProperties value. - */ - private MicrosoftSecurityIncidentCreationAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRule withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.innerProperties() == null ? null : this.innerProperties().alertRuleTemplateName(); - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRule object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleProperties(); - } - this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule. - * - * @param description the description value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRule object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRule withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alerts created by this alert rule. - * - * @param displayName the displayName value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRule object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRule withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRule object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRule withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); - } - - /** - * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. - * - * @return the displayNamesFilter value. - */ - public List displayNamesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().displayNamesFilter(); - } - - /** - * Set the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. - * - * @param displayNamesFilter the displayNamesFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRule object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRule withDisplayNamesFilter(List displayNamesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleProperties(); - } - this.innerProperties().withDisplayNamesFilter(displayNamesFilter); - return this; - } - - /** - * Get the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. - * - * @return the displayNamesExcludeFilter value. - */ - public List displayNamesExcludeFilter() { - return this.innerProperties() == null ? null : this.innerProperties().displayNamesExcludeFilter(); - } - - /** - * Set the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. - * - * @param displayNamesExcludeFilter the displayNamesExcludeFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRule object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRule withDisplayNamesExcludeFilter( - List displayNamesExcludeFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleProperties(); - } - this.innerProperties().withDisplayNamesExcludeFilter(displayNamesExcludeFilter); - return this; - } - - /** - * Get the productFilter property: The alerts' productName on which the cases will be generated. - * - * @return the productFilter value. - */ - public MicrosoftSecurityProductName productFilter() { - return this.innerProperties() == null ? null : this.innerProperties().productFilter(); - } - - /** - * Set the productFilter property: The alerts' productName on which the cases will be generated. - * - * @param productFilter the productFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRule object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRule withProductFilter(MicrosoftSecurityProductName productFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleProperties(); - } - this.innerProperties().withProductFilter(productFilter); - return this; - } - - /** - * Get the severitiesFilter property: the alerts' severities on which the cases will be generated. - * - * @return the severitiesFilter value. - */ - public List severitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().severitiesFilter(); - } - - /** - * Set the severitiesFilter property: the alerts' severities on which the cases will be generated. - * - * @param severitiesFilter the severitiesFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRule object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRule withSeveritiesFilter(List severitiesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleProperties(); - } - this.innerProperties().withSeveritiesFilter(severitiesFilter); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java deleted file mode 100644 index 5a6e176fc2a3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java +++ /dev/null @@ -1,140 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** MicrosoftSecurityIncidentCreation rule common property bag. */ -@Fluent -public class MicrosoftSecurityIncidentCreationAlertRuleCommonProperties { - /* - * the alerts' displayNames on which the cases will be generated - */ - @JsonProperty(value = "displayNamesFilter") - private List displayNamesFilter; - - /* - * the alerts' displayNames on which the cases will not be generated - */ - @JsonProperty(value = "displayNamesExcludeFilter") - private List displayNamesExcludeFilter; - - /* - * The alerts' productName on which the cases will be generated - */ - @JsonProperty(value = "productFilter", required = true) - private MicrosoftSecurityProductName productFilter; - - /* - * the alerts' severities on which the cases will be generated - */ - @JsonProperty(value = "severitiesFilter") - private List severitiesFilter; - - /** - * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. - * - * @return the displayNamesFilter value. - */ - public List displayNamesFilter() { - return this.displayNamesFilter; - } - - /** - * Set the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. - * - * @param displayNamesFilter the displayNamesFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleCommonProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties withDisplayNamesFilter( - List displayNamesFilter) { - this.displayNamesFilter = displayNamesFilter; - return this; - } - - /** - * Get the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. - * - * @return the displayNamesExcludeFilter value. - */ - public List displayNamesExcludeFilter() { - return this.displayNamesExcludeFilter; - } - - /** - * Set the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. - * - * @param displayNamesExcludeFilter the displayNamesExcludeFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleCommonProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties withDisplayNamesExcludeFilter( - List displayNamesExcludeFilter) { - this.displayNamesExcludeFilter = displayNamesExcludeFilter; - return this; - } - - /** - * Get the productFilter property: The alerts' productName on which the cases will be generated. - * - * @return the productFilter value. - */ - public MicrosoftSecurityProductName productFilter() { - return this.productFilter; - } - - /** - * Set the productFilter property: The alerts' productName on which the cases will be generated. - * - * @param productFilter the productFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleCommonProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties withProductFilter( - MicrosoftSecurityProductName productFilter) { - this.productFilter = productFilter; - return this; - } - - /** - * Get the severitiesFilter property: the alerts' severities on which the cases will be generated. - * - * @return the severitiesFilter value. - */ - public List severitiesFilter() { - return this.severitiesFilter; - } - - /** - * Set the severitiesFilter property: the alerts' severities on which the cases will be generated. - * - * @param severitiesFilter the severitiesFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleCommonProperties object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties withSeveritiesFilter( - List severitiesFilter) { - this.severitiesFilter = severitiesFilter; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (productFilter() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property productFilter in model" - + " MicrosoftSecurityIncidentCreationAlertRuleCommonProperties")); - } - } - - private static final ClientLogger LOGGER = - new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java deleted file mode 100644 index d908982016d7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java +++ /dev/null @@ -1,278 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents MicrosoftSecurityIncidentCreation rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftSecurityIncidentCreation") -@Fluent -public final class MicrosoftSecurityIncidentCreationAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * MicrosoftSecurityIncidentCreation rule template properties - */ - @JsonProperty(value = "properties") - private MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule template properties. - * - * @return the innerProperties value. - */ - private MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. - * - * @return the displayNamesFilter value. - */ - public List displayNamesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().displayNamesFilter(); - } - - /** - * Set the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. - * - * @param displayNamesFilter the displayNamesFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayNamesFilter(List displayNamesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayNamesFilter(displayNamesFilter); - return this; - } - - /** - * Get the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. - * - * @return the displayNamesExcludeFilter value. - */ - public List displayNamesExcludeFilter() { - return this.innerProperties() == null ? null : this.innerProperties().displayNamesExcludeFilter(); - } - - /** - * Set the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. - * - * @param displayNamesExcludeFilter the displayNamesExcludeFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayNamesExcludeFilter( - List displayNamesExcludeFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayNamesExcludeFilter(displayNamesExcludeFilter); - return this; - } - - /** - * Get the productFilter property: The alerts' productName on which the cases will be generated. - * - * @return the productFilter value. - */ - public MicrosoftSecurityProductName productFilter() { - return this.innerProperties() == null ? null : this.innerProperties().productFilter(); - } - - /** - * Set the productFilter property: The alerts' productName on which the cases will be generated. - * - * @param productFilter the productFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withProductFilter( - MicrosoftSecurityProductName productFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withProductFilter(productFilter); - return this; - } - - /** - * Get the severitiesFilter property: the alerts' severities on which the cases will be generated. - * - * @return the severitiesFilter value. - */ - public List severitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().severitiesFilter(); - } - - /** - * Set the severitiesFilter property: the alerts' severities on which the cases will be generated. - * - * @param severitiesFilter the severitiesFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withSeveritiesFilter( - List severitiesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withSeveritiesFilter(severitiesFilter); - return this; - } - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. - */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java deleted file mode 100644 index d6958d5cf48a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java +++ /dev/null @@ -1,59 +0,0 @@ -// 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; - -/** The alerts' productName on which the cases will be generated. */ -public final class MicrosoftSecurityProductName extends ExpandableStringEnum { - /** Static value Microsoft Cloud App Security for MicrosoftSecurityProductName. */ - public static final MicrosoftSecurityProductName MICROSOFT_CLOUD_APP_SECURITY = - fromString("Microsoft Cloud App Security"); - - /** Static value Azure Security Center for MicrosoftSecurityProductName. */ - public static final MicrosoftSecurityProductName AZURE_SECURITY_CENTER = fromString("Azure Security Center"); - - /** Static value Azure Advanced Threat Protection for MicrosoftSecurityProductName. */ - public static final MicrosoftSecurityProductName AZURE_ADVANCED_THREAT_PROTECTION = - fromString("Azure Advanced Threat Protection"); - - /** Static value Azure Active Directory Identity Protection for MicrosoftSecurityProductName. */ - public static final MicrosoftSecurityProductName AZURE_ACTIVE_DIRECTORY_IDENTITY_PROTECTION = - fromString("Azure Active Directory Identity Protection"); - - /** Static value Azure Security Center for IoT for MicrosoftSecurityProductName. */ - public static final MicrosoftSecurityProductName AZURE_SECURITY_CENTER_FOR_IOT = - fromString("Azure Security Center for IoT"); - - /** Static value Office 365 Advanced Threat Protection for MicrosoftSecurityProductName. */ - public static final MicrosoftSecurityProductName OFFICE_365_ADVANCED_THREAT_PROTECTION = - fromString("Office 365 Advanced Threat Protection"); - - /** Static value Microsoft Defender Advanced Threat Protection for MicrosoftSecurityProductName. */ - public static final MicrosoftSecurityProductName MICROSOFT_DEFENDER_ADVANCED_THREAT_PROTECTION = - fromString("Microsoft Defender Advanced Threat Protection"); - - /** - * Creates or finds a MicrosoftSecurityProductName from its string representation. - * - * @param name a name to look for. - * @return the corresponding MicrosoftSecurityProductName. - */ - @JsonCreator - public static MicrosoftSecurityProductName fromString(String name) { - return fromString(name, MicrosoftSecurityProductName.class); - } - - /** - * Gets known MicrosoftSecurityProductName values. - * - * @return known MicrosoftSecurityProductName values. - */ - public static Collection values() { - return values(MicrosoftSecurityProductName.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java deleted file mode 100644 index 95cb0a532898..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.MstiCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Microsoft Threat Intelligence requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftThreatIntelligence") -@Fluent -public final class MstiCheckRequirements extends DataConnectorsCheckRequirements { - /* - * Microsoft Threat Intelligence requirements check properties. - */ - @JsonProperty(value = "properties") - private MstiCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Microsoft Threat Intelligence requirements check properties. - * - * @return the innerProperties value. - */ - private MstiCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java deleted file mode 100644 index 55c79f1bebab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MstiDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Microsoft Threat Intelligence data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftThreatIntelligence") -@Fluent -public final class MstiDataConnector extends DataConnectorInner { - /* - * Microsoft Threat Intelligence data connector properties. - */ - @JsonProperty(value = "properties") - private MstiDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Microsoft Threat Intelligence data connector properties. - * - * @return the innerProperties value. - */ - private MstiDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MstiDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public MstiDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the MstiDataConnector object itself. - */ - public MstiDataConnector withDataTypes(MstiDataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new MstiDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the MstiDataConnector object itself. - */ - public MstiDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new MstiDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java deleted file mode 100644 index 2c1077694cfd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Microsoft Threat Intelligence Platforms data connector. */ -@Fluent -public final class MstiDataConnectorDataTypes { - /* - * Data type for Microsoft Threat Intelligence Platforms data connector. - */ - @JsonProperty(value = "bingSafetyPhishingURL", required = true) - private MstiDataConnectorDataTypesBingSafetyPhishingUrl bingSafetyPhishingUrl; - - /* - * Data type for Microsoft Threat Intelligence Platforms data connector. - */ - @JsonProperty(value = "microsoftEmergingThreatFeed", required = true) - private MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed microsoftEmergingThreatFeed; - - /** - * Get the bingSafetyPhishingUrl property: Data type for Microsoft Threat Intelligence Platforms data connector. - * - * @return the bingSafetyPhishingUrl value. - */ - public MstiDataConnectorDataTypesBingSafetyPhishingUrl bingSafetyPhishingUrl() { - return this.bingSafetyPhishingUrl; - } - - /** - * Set the bingSafetyPhishingUrl property: Data type for Microsoft Threat Intelligence Platforms data connector. - * - * @param bingSafetyPhishingUrl the bingSafetyPhishingUrl value to set. - * @return the MstiDataConnectorDataTypes object itself. - */ - public MstiDataConnectorDataTypes withBingSafetyPhishingUrl( - MstiDataConnectorDataTypesBingSafetyPhishingUrl bingSafetyPhishingUrl) { - this.bingSafetyPhishingUrl = bingSafetyPhishingUrl; - return this; - } - - /** - * Get the microsoftEmergingThreatFeed property: Data type for Microsoft Threat Intelligence Platforms data - * connector. - * - * @return the microsoftEmergingThreatFeed value. - */ - public MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed microsoftEmergingThreatFeed() { - return this.microsoftEmergingThreatFeed; - } - - /** - * Set the microsoftEmergingThreatFeed property: Data type for Microsoft Threat Intelligence Platforms data - * connector. - * - * @param microsoftEmergingThreatFeed the microsoftEmergingThreatFeed value to set. - * @return the MstiDataConnectorDataTypes object itself. - */ - public MstiDataConnectorDataTypes withMicrosoftEmergingThreatFeed( - MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed microsoftEmergingThreatFeed) { - this.microsoftEmergingThreatFeed = microsoftEmergingThreatFeed; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bingSafetyPhishingUrl() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property bingSafetyPhishingUrl in model MstiDataConnectorDataTypes")); - } else { - bingSafetyPhishingUrl().validate(); - } - if (microsoftEmergingThreatFeed() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property microsoftEmergingThreatFeed in model MstiDataConnectorDataTypes")); - } else { - microsoftEmergingThreatFeed().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MstiDataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java deleted file mode 100644 index 3eee77b51ac3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java +++ /dev/null @@ -1,65 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Data type for Microsoft Threat Intelligence Platforms data connector. */ -@Fluent -public final class MstiDataConnectorDataTypesBingSafetyPhishingUrl extends DataConnectorDataTypeCommon { - /* - * lookback period - */ - @JsonProperty(value = "lookbackPeriod", required = true) - private String lookbackPeriod; - - /** - * Get the lookbackPeriod property: lookback period. - * - * @return the lookbackPeriod value. - */ - public String lookbackPeriod() { - return this.lookbackPeriod; - } - - /** - * Set the lookbackPeriod property: lookback period. - * - * @param lookbackPeriod the lookbackPeriod value to set. - * @return the MstiDataConnectorDataTypesBingSafetyPhishingUrl object itself. - */ - public MstiDataConnectorDataTypesBingSafetyPhishingUrl withLookbackPeriod(String lookbackPeriod) { - this.lookbackPeriod = lookbackPeriod; - return this; - } - - /** {@inheritDoc} */ - @Override - public MstiDataConnectorDataTypesBingSafetyPhishingUrl withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (lookbackPeriod() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property lookbackPeriod in model" - + " MstiDataConnectorDataTypesBingSafetyPhishingUrl")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MstiDataConnectorDataTypesBingSafetyPhishingUrl.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java deleted file mode 100644 index 29ab116cee8f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java +++ /dev/null @@ -1,66 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Data type for Microsoft Threat Intelligence Platforms data connector. */ -@Fluent -public final class MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed extends DataConnectorDataTypeCommon { - /* - * lookback period - */ - @JsonProperty(value = "lookbackPeriod", required = true) - private String lookbackPeriod; - - /** - * Get the lookbackPeriod property: lookback period. - * - * @return the lookbackPeriod value. - */ - public String lookbackPeriod() { - return this.lookbackPeriod; - } - - /** - * Set the lookbackPeriod property: lookback period. - * - * @param lookbackPeriod the lookbackPeriod value to set. - * @return the MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed object itself. - */ - public MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed withLookbackPeriod(String lookbackPeriod) { - this.lookbackPeriod = lookbackPeriod; - return this; - } - - /** {@inheritDoc} */ - @Override - public MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (lookbackPeriod() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property lookbackPeriod in model" - + " MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed")); - } - } - - private static final ClientLogger LOGGER = - new ClientLogger(MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java deleted file mode 100644 index 074527921be7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.MtpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents MTP (Microsoft Threat Protection) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftThreatProtection") -@Fluent -public final class MtpCheckRequirements extends DataConnectorsCheckRequirements { - /* - * MTP (Microsoft Threat Protection) requirements check properties. - */ - @JsonProperty(value = "properties") - private MtpCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: MTP (Microsoft Threat Protection) requirements check properties. - * - * @return the innerProperties value. - */ - private MtpCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java deleted file mode 100644 index 8c6b30014f43..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MtpDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents MTP (Microsoft Threat Protection) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftThreatProtection") -@Fluent -public final class MtpDataConnector extends DataConnectorInner { - /* - * MTP (Microsoft Threat Protection) data connector properties. - */ - @JsonProperty(value = "properties") - private MtpDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: MTP (Microsoft Threat Protection) data connector properties. - * - * @return the innerProperties value. - */ - private MtpDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MtpDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public MtpDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the MtpDataConnector object itself. - */ - public MtpDataConnector withDataTypes(MtpDataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new MtpDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the MtpDataConnector object itself. - */ - public MtpDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new MtpDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java deleted file mode 100644 index 27fa2a5c2d9b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Microsoft Threat Protection Platforms data connector. */ -@Fluent -public final class MtpDataConnectorDataTypes { - /* - * Data type for Microsoft Threat Protection Platforms data connector. - */ - @JsonProperty(value = "incidents", required = true) - private MtpDataConnectorDataTypesIncidents incidents; - - /** - * Get the incidents property: Data type for Microsoft Threat Protection Platforms data connector. - * - * @return the incidents value. - */ - public MtpDataConnectorDataTypesIncidents incidents() { - return this.incidents; - } - - /** - * Set the incidents property: Data type for Microsoft Threat Protection Platforms data connector. - * - * @param incidents the incidents value to set. - * @return the MtpDataConnectorDataTypes object itself. - */ - public MtpDataConnectorDataTypes withIncidents(MtpDataConnectorDataTypesIncidents incidents) { - this.incidents = incidents; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (incidents() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property incidents in model MtpDataConnectorDataTypes")); - } else { - incidents().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java deleted file mode 100644 index 0b347d9db7b6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Data type for Microsoft Threat Protection Platforms data connector. */ -@Fluent -public final class MtpDataConnectorDataTypesIncidents extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public MtpDataConnectorDataTypesIncidents withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java deleted file mode 100644 index 26326e8ddb92..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.NicEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** Represents an network interface entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Nic") -@Fluent -public final class NicEntity extends EntityInner { - /* - * Network interface entity properties - */ - @JsonProperty(value = "properties") - private NicEntityProperties innerProperties; - - /** - * Get the innerProperties property: Network interface entity properties. - * - * @return the innerProperties value. - */ - private NicEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the macAddress property: The MAC address of this network interface. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.innerProperties() == null ? null : this.innerProperties().macAddress(); - } - - /** - * Get the ipAddressEntityId property: The IP entity id of this network interface. - * - * @return the ipAddressEntityId value. - */ - public String ipAddressEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().ipAddressEntityId(); - } - - /** - * Get the vlans property: A list of VLANs of the network interface entity. - * - * @return the vlans value. - */ - public List vlans() { - return this.innerProperties() == null ? null : this.innerProperties().vlans(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java deleted file mode 100644 index 7a23f7a2b182..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java +++ /dev/null @@ -1,442 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.NrtAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents NRT alert rule. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("NRT") -@Fluent -public final class NrtAlertRule extends AlertRuleInner { - /* - * NRT alert rule properties - */ - @JsonProperty(value = "properties") - private NrtAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: NRT alert rule properties. - * - * @return the innerProperties value. - */ - private NrtAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRule withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.innerProperties() == null ? null : this.innerProperties().alertRuleTemplateName(); - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); - return this; - } - - /** - * Get the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @return the templateVersion value. - */ - public String templateVersion() { - return this.innerProperties() == null ? null : this.innerProperties().templateVersion(); - } - - /** - * Set the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @param templateVersion the templateVersion value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withTemplateVersion(String templateVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withTemplateVersion(templateVersion); - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule. - * - * @param description the description value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withQuery(query); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alerts created by this alert rule. - * - * @param displayName the displayName value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert rule has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); - } - - /** - * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @return the suppressionDuration value. - */ - public Duration suppressionDuration() { - return this.innerProperties() == null ? null : this.innerProperties().suppressionDuration(); - } - - /** - * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @param suppressionDuration the suppressionDuration value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withSuppressionDuration(Duration suppressionDuration) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withSuppressionDuration(suppressionDuration); - return this; - } - - /** - * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @return the suppressionEnabled value. - */ - public Boolean suppressionEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().suppressionEnabled(); - } - - /** - * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @param suppressionEnabled the suppressionEnabled value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withSuppressionEnabled(Boolean suppressionEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withSuppressionEnabled(suppressionEnabled); - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @return the incidentConfiguration value. - */ - public IncidentConfiguration incidentConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().incidentConfiguration(); - } - - /** - * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @param incidentConfiguration the incidentConfiguration value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withIncidentConfiguration(incidentConfiguration); - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.innerProperties() == null ? null : this.innerProperties().customDetails(); - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withCustomDetails(Map customDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withCustomDetails(customDetails); - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withEntityMappings(List entityMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withEntityMappings(entityMappings); - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withEventGroupingSettings(eventGroupingSettings); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java deleted file mode 100644 index 551cb9589235..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java +++ /dev/null @@ -1,391 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.NrtAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents NRT alert rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("NRT") -@Fluent -public final class NrtAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * NRT alert rule template properties - */ - @JsonProperty(value = "properties") - private NrtAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: NRT alert rule template properties. - * - * @return the innerProperties value. - */ - private NrtAlertRuleTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withQuery(query); - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @param version the version value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.innerProperties() == null ? null : this.innerProperties().customDetails(); - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withCustomDetails(Map customDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withCustomDetails(customDetails); - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withEntityMappings(List entityMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withEntityMappings(entityMappings); - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withEventGroupingSettings(eventGroupingSettings); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withRequiredDataConnectors(List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OSFamily.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OSFamily.java deleted file mode 100644 index 5c890d9ee63d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OSFamily.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The operating system type. */ -public enum OSFamily { - /** Enum value Linux. */ - LINUX("Linux"), - - /** Enum value Windows. */ - WINDOWS("Windows"), - - /** Enum value Android. */ - ANDROID("Android"), - - /** Enum value IOS. */ - IOS("IOS"), - - /** Enum value Unknown. */ - UNKNOWN("Unknown"); - - /** The actual serialized value for a OSFamily instance. */ - private final String value; - - OSFamily(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a OSFamily instance. - * - * @param value the serialized value to parse. - * @return the parsed OSFamily object, or null if unable to parse. - */ - @JsonCreator - public static OSFamily fromString(String value) { - if (value == null) { - return null; - } - OSFamily[] items = OSFamily.values(); - for (OSFamily item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java deleted file mode 100644 index 8ed7cfef085e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.Office365ProjectCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Office365 Project requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Office365Project") -@Fluent -public final class Office365ProjectCheckRequirements extends DataConnectorsCheckRequirements { - /* - * Office365 Project requirements check properties. - */ - @JsonProperty(value = "properties") - private Office365ProjectCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Office365 Project requirements check properties. - * - * @return the innerProperties value. - */ - private Office365ProjectCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java deleted file mode 100644 index bafc9102b1dd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Office Microsoft Project data connector. */ -@Fluent -public final class Office365ProjectConnectorDataTypes { - /* - * Logs data type. - */ - @JsonProperty(value = "logs", required = true) - private Office365ProjectConnectorDataTypesLogs logs; - - /** - * Get the logs property: Logs data type. - * - * @return the logs value. - */ - public Office365ProjectConnectorDataTypesLogs logs() { - return this.logs; - } - - /** - * Set the logs property: Logs data type. - * - * @param logs the logs value to set. - * @return the Office365ProjectConnectorDataTypes object itself. - */ - public Office365ProjectConnectorDataTypes withLogs(Office365ProjectConnectorDataTypesLogs logs) { - this.logs = logs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logs() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property logs in model Office365ProjectConnectorDataTypes")); - } else { - logs().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Office365ProjectConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java deleted file mode 100644 index 80908337be80..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Logs data type. */ -@Fluent -public final class Office365ProjectConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public Office365ProjectConnectorDataTypesLogs withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java deleted file mode 100644 index 7665b6940195..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.Office365ProjectDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Office Microsoft Project data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Office365Project") -@Fluent -public final class Office365ProjectDataConnector extends DataConnectorInner { - /* - * Office Microsoft Project data connector properties. - */ - @JsonProperty(value = "properties") - private Office365ProjectDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Office Microsoft Project data connector properties. - * - * @return the innerProperties value. - */ - private Office365ProjectDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public Office365ProjectDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public Office365ProjectConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the Office365ProjectDataConnector object itself. - */ - public Office365ProjectDataConnector withDataTypes(Office365ProjectConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new Office365ProjectDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the Office365ProjectDataConnector object itself. - */ - public Office365ProjectDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new Office365ProjectDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java deleted file mode 100644 index 25d2ff4c15b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeAtpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents OfficeATP (Office 365 Advanced Threat Protection) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficeATP") -@Fluent -public final class OfficeAtpCheckRequirements extends DataConnectorsCheckRequirements { - /* - * OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. - */ - @JsonProperty(value = "properties") - private OfficeAtpCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: OfficeATP (Office 365 Advanced Threat Protection) requirements check - * properties. - * - * @return the innerProperties value. - */ - private OfficeAtpCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java deleted file mode 100644 index 2a339d8590fd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeAtpDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents OfficeATP (Office 365 Advanced Threat Protection) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficeATP") -@Fluent -public final class OfficeAtpDataConnector extends DataConnectorInner { - /* - * OfficeATP (Office 365 Advanced Threat Protection) data connector properties. - */ - @JsonProperty(value = "properties") - private OfficeAtpDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: OfficeATP (Office 365 Advanced Threat Protection) data connector properties. - * - * @return the innerProperties value. - */ - private OfficeAtpDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public OfficeAtpDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficeAtpDataConnector object itself. - */ - public OfficeAtpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeAtpDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the OfficeAtpDataConnector object itself. - */ - public OfficeAtpDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeAtpDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsent.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsent.java deleted file mode 100644 index 537732e3a122..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsent.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; - -/** An immutable client-side representation of OfficeConsent. */ -public interface OfficeConsent { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the tenantId property: The tenantId of the Office365 with the consent. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the consentId property: Help to easily cascade among the data layers. - * - * @return the consentId value. - */ - String consentId(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner object. - * - * @return the inner object. - */ - OfficeConsentInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java deleted file mode 100644 index c82170f9180d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the office365 consents. */ -@Fluent -public final class OfficeConsentList { - /* - * URL to fetch the next set of office consents. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of the consents. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of office consents. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of the consents. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of the consents. - * - * @param value the value value to set. - * @return the OfficeConsentList object itself. - */ - public OfficeConsentList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model OfficeConsentList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OfficeConsentList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java deleted file mode 100644 index ed83191305b5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java +++ /dev/null @@ -1,92 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of OfficeConsents. */ -public interface OfficeConsents { - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all office365 consents as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all office365 consents as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @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 an office365 consent. - */ - OfficeConsent get(String resourceGroupName, String workspaceName, String consentId); - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @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 an office365 consent along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String consentId); - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java deleted file mode 100644 index 2fb508346db8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents office data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Office365") -@Fluent -public final class OfficeDataConnector extends DataConnectorInner { - /* - * Office data connector properties. - */ - @JsonProperty(value = "properties") - private OfficeDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Office data connector properties. - * - * @return the innerProperties value. - */ - private OfficeDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public OfficeDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public OfficeDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficeDataConnector object itself. - */ - public OfficeDataConnector withDataTypes(OfficeDataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the OfficeDataConnector object itself. - */ - public OfficeDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java deleted file mode 100644 index f96e94afc749..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java +++ /dev/null @@ -1,125 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for office data connector. */ -@Fluent -public final class OfficeDataConnectorDataTypes { - /* - * Exchange data type connection. - */ - @JsonProperty(value = "exchange", required = true) - private OfficeDataConnectorDataTypesExchange exchange; - - /* - * SharePoint data type connection. - */ - @JsonProperty(value = "sharePoint", required = true) - private OfficeDataConnectorDataTypesSharePoint sharePoint; - - /* - * Teams data type connection. - */ - @JsonProperty(value = "teams", required = true) - private OfficeDataConnectorDataTypesTeams teams; - - /** - * Get the exchange property: Exchange data type connection. - * - * @return the exchange value. - */ - public OfficeDataConnectorDataTypesExchange exchange() { - return this.exchange; - } - - /** - * Set the exchange property: Exchange data type connection. - * - * @param exchange the exchange value to set. - * @return the OfficeDataConnectorDataTypes object itself. - */ - public OfficeDataConnectorDataTypes withExchange(OfficeDataConnectorDataTypesExchange exchange) { - this.exchange = exchange; - return this; - } - - /** - * Get the sharePoint property: SharePoint data type connection. - * - * @return the sharePoint value. - */ - public OfficeDataConnectorDataTypesSharePoint sharePoint() { - return this.sharePoint; - } - - /** - * Set the sharePoint property: SharePoint data type connection. - * - * @param sharePoint the sharePoint value to set. - * @return the OfficeDataConnectorDataTypes object itself. - */ - public OfficeDataConnectorDataTypes withSharePoint(OfficeDataConnectorDataTypesSharePoint sharePoint) { - this.sharePoint = sharePoint; - return this; - } - - /** - * Get the teams property: Teams data type connection. - * - * @return the teams value. - */ - public OfficeDataConnectorDataTypesTeams teams() { - return this.teams; - } - - /** - * Set the teams property: Teams data type connection. - * - * @param teams the teams value to set. - * @return the OfficeDataConnectorDataTypes object itself. - */ - public OfficeDataConnectorDataTypes withTeams(OfficeDataConnectorDataTypesTeams teams) { - this.teams = teams; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (exchange() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property exchange in model OfficeDataConnectorDataTypes")); - } else { - exchange().validate(); - } - if (sharePoint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sharePoint in model OfficeDataConnectorDataTypes")); - } else { - sharePoint().validate(); - } - if (teams() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property teams in model OfficeDataConnectorDataTypes")); - } else { - teams().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OfficeDataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java deleted file mode 100644 index f4bb9c178fe0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Exchange data type connection. */ -@Fluent -public final class OfficeDataConnectorDataTypesExchange extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public OfficeDataConnectorDataTypesExchange withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java deleted file mode 100644 index 85b62eaef4d0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** SharePoint data type connection. */ -@Fluent -public final class OfficeDataConnectorDataTypesSharePoint extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public OfficeDataConnectorDataTypesSharePoint withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java deleted file mode 100644 index a16d1b5ddc04..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Teams data type connection. */ -@Fluent -public final class OfficeDataConnectorDataTypesTeams extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public OfficeDataConnectorDataTypesTeams withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java deleted file mode 100644 index 0572876278d1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeIrmCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents OfficeIRM (Microsoft Insider Risk Management) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficeIRM") -@Fluent -public final class OfficeIrmCheckRequirements extends DataConnectorsCheckRequirements { - /* - * OfficeIRM (Microsoft Insider Risk Management) requirements check properties. - */ - @JsonProperty(value = "properties") - private OfficeIrmCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) requirements check properties. - * - * @return the innerProperties value. - */ - private OfficeIrmCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java deleted file mode 100644 index 0a26b9e45492..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeIrmDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents OfficeIRM (Microsoft Insider Risk Management) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficeIRM") -@Fluent -public final class OfficeIrmDataConnector extends DataConnectorInner { - /* - * OfficeIRM (Microsoft Insider Risk Management) data connector properties. - */ - @JsonProperty(value = "properties") - private OfficeIrmDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) data connector properties. - * - * @return the innerProperties value. - */ - private OfficeIrmDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public OfficeIrmDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficeIrmDataConnector object itself. - */ - public OfficeIrmDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeIrmDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the OfficeIrmDataConnector object itself. - */ - public OfficeIrmDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeIrmDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java deleted file mode 100644 index 8e52f4d91bb2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficePowerBICheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Office PowerBI requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficePowerBI") -@Fluent -public final class OfficePowerBICheckRequirements extends DataConnectorsCheckRequirements { - /* - * Office Power BI requirements check properties. - */ - @JsonProperty(value = "properties") - private OfficePowerBICheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Office Power BI requirements check properties. - * - * @return the innerProperties value. - */ - private OfficePowerBICheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java deleted file mode 100644 index 42b1400cfcf4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Office Microsoft PowerBI data connector. */ -@Fluent -public final class OfficePowerBIConnectorDataTypes { - /* - * Logs data type. - */ - @JsonProperty(value = "logs", required = true) - private OfficePowerBIConnectorDataTypesLogs logs; - - /** - * Get the logs property: Logs data type. - * - * @return the logs value. - */ - public OfficePowerBIConnectorDataTypesLogs logs() { - return this.logs; - } - - /** - * Set the logs property: Logs data type. - * - * @param logs the logs value to set. - * @return the OfficePowerBIConnectorDataTypes object itself. - */ - public OfficePowerBIConnectorDataTypes withLogs(OfficePowerBIConnectorDataTypesLogs logs) { - this.logs = logs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logs() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property logs in model OfficePowerBIConnectorDataTypes")); - } else { - logs().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OfficePowerBIConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java deleted file mode 100644 index 0e71c0fd1cad..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Logs data type. */ -@Fluent -public final class OfficePowerBIConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public OfficePowerBIConnectorDataTypesLogs withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java deleted file mode 100644 index 2c7496612394..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficePowerBIDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Office Microsoft PowerBI data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficePowerBI") -@Fluent -public final class OfficePowerBIDataConnector extends DataConnectorInner { - /* - * Office Microsoft PowerBI data connector properties. - */ - @JsonProperty(value = "properties") - private OfficePowerBIDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Office Microsoft PowerBI data connector properties. - * - * @return the innerProperties value. - */ - private OfficePowerBIDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public OfficePowerBIDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public OfficePowerBIConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficePowerBIDataConnector object itself. - */ - public OfficePowerBIDataConnector withDataTypes(OfficePowerBIConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficePowerBIDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the OfficePowerBIDataConnector object itself. - */ - public OfficePowerBIDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficePowerBIDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operation.java deleted file mode 100644 index add782a2afc1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operation.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.OperationInner; - -/** An immutable client-side representation of Operation. */ -public interface Operation { - /** - * Gets the display property: Properties of the operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the name property: Name of the operation. - * - * @return the name value. - */ - String name(); - - /** - * Gets the origin property: The origin of the operation. - * - * @return the origin value. - */ - String origin(); - - /** - * Gets the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java deleted file mode 100644 index 54967890e46e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java +++ /dev/null @@ -1,124 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of the operation. */ -@Fluent -public final class OperationDisplay { - /* - * Description of the operation - */ - @JsonProperty(value = "description") - private String description; - - /* - * Operation name - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * Provider name - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * Resource name - */ - @JsonProperty(value = "resource") - private String resource; - - /** - * Get the description property: Description of the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the operation. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the operation property: Operation name. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: Operation name. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the provider property: Provider name. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: Provider name. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Resource name. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: Resource name. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java deleted file mode 100644 index cb4d4d82cf5c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java +++ /dev/null @@ -1,33 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @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 lists the operations available in the SecurityInsights RP as paginated response with {@link - * PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all operations available Azure Security Insights Resource Provider. - * - * @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 lists the operations available in the SecurityInsights RP as paginated response with {@link - * PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java deleted file mode 100644 index 47df47f99519..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Lists the operations available in the SecurityInsights RP. */ -@Fluent -public final class OperationsList { - /* - * URL to fetch the next set of operations. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of operations - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of operations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of operations. - * - * @param value the value value to set. - * @return the OperationsList object itself. - */ - public OperationsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model OperationsList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OperationsList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java deleted file mode 100644 index 77aafbf0cf2b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** Operator used for list of dependencies in criteria array. */ -public final class Operator extends ExpandableStringEnum { - /** Static value AND for Operator. */ - public static final Operator AND = fromString("AND"); - - /** Static value OR for Operator. */ - public static final Operator OR = fromString("OR"); - - /** - * Creates or finds a Operator from its string representation. - * - * @param name a name to look for. - * @return the corresponding Operator. - */ - @JsonCreator - public static Operator fromString(String name) { - return fromString(name, Operator.class); - } - - /** - * Gets known Operator values. - * - * @return known Operator values. - */ - public static Collection values() { - return values(Operator.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java deleted file mode 100644 index 6fff09628529..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** Insights Column type. */ -public final class OutputType extends ExpandableStringEnum { - /** Static value Number for OutputType. */ - public static final OutputType NUMBER = fromString("Number"); - - /** Static value String for OutputType. */ - public static final OutputType STRING = fromString("String"); - - /** Static value Date for OutputType. */ - public static final OutputType DATE = fromString("Date"); - - /** Static value Entity for OutputType. */ - public static final OutputType ENTITY = fromString("Entity"); - - /** - * Creates or finds a OutputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutputType. - */ - @JsonCreator - public static OutputType fromString(String name) { - return fromString(name, OutputType.class); - } - - /** - * Gets known OutputType values. - * - * @return known OutputType values. - */ - public static Collection values() { - return values(OutputType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java deleted file mode 100644 index 8bb128054032..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The type of the owner the incident is assigned to. */ -public final class OwnerType extends ExpandableStringEnum { - /** Static value Unknown for OwnerType. */ - public static final OwnerType UNKNOWN = fromString("Unknown"); - - /** Static value User for OwnerType. */ - public static final OwnerType USER = fromString("User"); - - /** Static value Group for OwnerType. */ - public static final OwnerType GROUP = fromString("Group"); - - /** - * Creates or finds a OwnerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OwnerType. - */ - @JsonCreator - public static OwnerType fromString(String name) { - return fromString(name, OwnerType.class); - } - - /** - * Gets known OwnerType values. - * - * @return known OwnerType values. - */ - public static Collection values() { - return values(OwnerType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java deleted file mode 100644 index ba4232af432e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** Permission provider scope. */ -public final class PermissionProviderScope extends ExpandableStringEnum { - /** Static value ResourceGroup for PermissionProviderScope. */ - public static final PermissionProviderScope RESOURCE_GROUP = fromString("ResourceGroup"); - - /** Static value Subscription for PermissionProviderScope. */ - public static final PermissionProviderScope SUBSCRIPTION = fromString("Subscription"); - - /** Static value Workspace for PermissionProviderScope. */ - public static final PermissionProviderScope WORKSPACE = fromString("Workspace"); - - /** - * Creates or finds a PermissionProviderScope from its string representation. - * - * @param name a name to look for. - * @return the corresponding PermissionProviderScope. - */ - @JsonCreator - public static PermissionProviderScope fromString(String name) { - return fromString(name, PermissionProviderScope.class); - } - - /** - * Gets known PermissionProviderScope values. - * - * @return known PermissionProviderScope values. - */ - public static Collection values() { - return values(PermissionProviderScope.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java deleted file mode 100644 index cfeebee1b045..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java +++ /dev/null @@ -1,79 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Permissions required for the connector. */ -@Fluent -public final class Permissions { - /* - * Resource provider permissions required for the connector - */ - @JsonProperty(value = "resourceProvider") - private List resourceProvider; - - /* - * Customs permissions required for the connector - */ - @JsonProperty(value = "customs") - private List customs; - - /** - * Get the resourceProvider property: Resource provider permissions required for the connector. - * - * @return the resourceProvider value. - */ - public List resourceProvider() { - return this.resourceProvider; - } - - /** - * Set the resourceProvider property: Resource provider permissions required for the connector. - * - * @param resourceProvider the resourceProvider value to set. - * @return the Permissions object itself. - */ - public Permissions withResourceProvider(List resourceProvider) { - this.resourceProvider = resourceProvider; - return this; - } - - /** - * Get the customs property: Customs permissions required for the connector. - * - * @return the customs value. - */ - public List customs() { - return this.customs; - } - - /** - * Set the customs property: Customs permissions required for the connector. - * - * @param customs the customs value to set. - * @return the Permissions object itself. - */ - public Permissions withCustoms(List customs) { - this.customs = customs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceProvider() != null) { - resourceProvider().forEach(e -> e.validate()); - } - if (customs() != null) { - customs().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java deleted file mode 100644 index 943909826a2e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.annotation.Fluent; - -/** The PermissionsCustomsItem model. */ -@Fluent -public final class PermissionsCustomsItem extends Customs { - /** {@inheritDoc} */ - @Override - public PermissionsCustomsItem withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsCustomsItem withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java deleted file mode 100644 index d2db9072abc2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.annotation.Fluent; - -/** The PermissionsResourceProviderItem model. */ -@Fluent -public final class PermissionsResourceProviderItem extends ResourceProvider { - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withProvider(ProviderName provider) { - super.withProvider(provider); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withPermissionsDisplayText(String permissionsDisplayText) { - super.withPermissionsDisplayText(permissionsDisplayText); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withProviderDisplayName(String providerDisplayName) { - super.withProviderDisplayName(providerDisplayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withScope(PermissionProviderScope scope) { - super.withScope(scope); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withRequiredPermissions(RequiredPermissions requiredPermissions) { - super.withRequiredPermissions(requiredPermissions); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java deleted file mode 100644 index 9d85ffb7802b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** The PlaybookActionProperties model. */ -@Fluent -public final class PlaybookActionProperties { - /* - * The resource id of the playbook resource. - */ - @JsonProperty(value = "logicAppResourceId") - private String logicAppResourceId; - - /* - * The tenant id of the playbook resource. - */ - @JsonProperty(value = "tenantId") - private UUID tenantId; - - /** - * Get the logicAppResourceId property: The resource id of the playbook resource. - * - * @return the logicAppResourceId value. - */ - public String logicAppResourceId() { - return this.logicAppResourceId; - } - - /** - * Set the logicAppResourceId property: The resource id of the playbook resource. - * - * @param logicAppResourceId the logicAppResourceId value to set. - * @return the PlaybookActionProperties object itself. - */ - public PlaybookActionProperties withLogicAppResourceId(String logicAppResourceId) { - this.logicAppResourceId = logicAppResourceId; - return this; - } - - /** - * Get the tenantId property: The tenant id of the playbook resource. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenant id of the playbook resource. - * - * @param tenantId the tenantId value to set. - * @return the PlaybookActionProperties object itself. - */ - public PlaybookActionProperties withTenantId(UUID tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java deleted file mode 100644 index e62fa3c41717..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The polling frequency for the TAXII server. */ -public final class PollingFrequency extends ExpandableStringEnum { - /** Static value OnceAMinute for PollingFrequency. */ - public static final PollingFrequency ONCE_AMINUTE = fromString("OnceAMinute"); - - /** Static value OnceAnHour for PollingFrequency. */ - public static final PollingFrequency ONCE_AN_HOUR = fromString("OnceAnHour"); - - /** Static value OnceADay for PollingFrequency. */ - public static final PollingFrequency ONCE_ADAY = fromString("OnceADay"); - - /** - * Creates or finds a PollingFrequency from its string representation. - * - * @param name a name to look for. - * @return the corresponding PollingFrequency. - */ - @JsonCreator - public static PollingFrequency fromString(String name) { - return fromString(name, PollingFrequency.class); - } - - /** - * Gets known PollingFrequency values. - * - * @return known PollingFrequency values. - */ - public static Collection values() { - return values(PollingFrequency.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java deleted file mode 100644 index 1d192d71c851..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java +++ /dev/null @@ -1,163 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ProcessEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Represents a process entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Process") -@Fluent -public final class ProcessEntity extends EntityInner { - /* - * Process entity properties - */ - @JsonProperty(value = "properties") - private ProcessEntityProperties innerProperties; - - /** - * Get the innerProperties property: Process entity properties. - * - * @return the innerProperties value. - */ - private ProcessEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the accountEntityId property: The account entity id running the processes. - * - * @return the accountEntityId value. - */ - public String accountEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().accountEntityId(); - } - - /** - * Get the commandLine property: The command line used to create the process. - * - * @return the commandLine value. - */ - public String commandLine() { - return this.innerProperties() == null ? null : this.innerProperties().commandLine(); - } - - /** - * Get the creationTimeUtc property: The time when the process started to run. - * - * @return the creationTimeUtc value. - */ - public OffsetDateTime creationTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().creationTimeUtc(); - } - - /** - * Get the elevationToken property: The elevation token associated with the process. - * - * @return the elevationToken value. - */ - public ElevationToken elevationToken() { - return this.innerProperties() == null ? null : this.innerProperties().elevationToken(); - } - - /** - * Set the elevationToken property: The elevation token associated with the process. - * - * @param elevationToken the elevationToken value to set. - * @return the ProcessEntity object itself. - */ - public ProcessEntity withElevationToken(ElevationToken elevationToken) { - if (this.innerProperties() == null) { - this.innerProperties = new ProcessEntityProperties(); - } - this.innerProperties().withElevationToken(elevationToken); - return this; - } - - /** - * Get the hostEntityId property: The host entity id on which the process was running. - * - * @return the hostEntityId value. - */ - public String hostEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().hostEntityId(); - } - - /** - * Get the hostLogonSessionEntityId property: The session entity id in which the process was running. - * - * @return the hostLogonSessionEntityId value. - */ - public String hostLogonSessionEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().hostLogonSessionEntityId(); - } - - /** - * Get the imageFileEntityId property: Image file entity id. - * - * @return the imageFileEntityId value. - */ - public String imageFileEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().imageFileEntityId(); - } - - /** - * Get the parentProcessEntityId property: The parent process entity id. - * - * @return the parentProcessEntityId value. - */ - public String parentProcessEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().parentProcessEntityId(); - } - - /** - * Get the processId property: The process ID. - * - * @return the processId value. - */ - public String processId() { - return this.innerProperties() == null ? null : this.innerProperties().processId(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java deleted file mode 100644 index ead1ce681b97..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java +++ /dev/null @@ -1,122 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; - -/** Resource collection API of ProductSettings. */ -public interface ProductSettings { - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 list of all the settings. - */ - SettingList list(String resourceGroupName, String workspaceName); - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 list of all the settings along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @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 setting. - */ - Settings get(String resourceGroupName, String workspaceName, String settingsName); - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @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 setting along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String settingsName); - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @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 the Setting. - */ - Settings update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @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 the Setting along with {@link Response}. - */ - Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java deleted file mode 100644 index dc048782a94f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition that evaluates an array property's value change. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("PropertyArrayChanged") -@Fluent -public final class PropertyArrayChangedConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRulePropertyArrayChangedValuesCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRulePropertyArrayChangedValuesCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the PropertyArrayChangedConditionProperties object itself. - */ - public PropertyArrayChangedConditionProperties withConditionProperties( - AutomationRulePropertyArrayChangedValuesCondition conditionProperties) { - this.conditionProperties = conditionProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (conditionProperties() != null) { - conditionProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java deleted file mode 100644 index a508d41ec873..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition that evaluates an array property's value. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("PropertyArray") -@Fluent -public final class PropertyArrayConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRulePropertyArrayValuesCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRulePropertyArrayValuesCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the PropertyArrayConditionProperties object itself. - */ - public PropertyArrayConditionProperties withConditionProperties( - AutomationRulePropertyArrayValuesCondition conditionProperties) { - this.conditionProperties = conditionProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (conditionProperties() != null) { - conditionProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java deleted file mode 100644 index 22470af86a46..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition that evaluates a property's value change. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("PropertyChanged") -@Fluent -public final class PropertyChangedConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRulePropertyValuesChangedCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRulePropertyValuesChangedCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the PropertyChangedConditionProperties object itself. - */ - public PropertyChangedConditionProperties withConditionProperties( - AutomationRulePropertyValuesChangedCondition conditionProperties) { - this.conditionProperties = conditionProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (conditionProperties() != null) { - conditionProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java deleted file mode 100644 index 7c641a0bca1e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition that evaluates a property's value. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("Property") -@Fluent -public final class PropertyConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRulePropertyValuesCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRulePropertyValuesCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the PropertyConditionProperties object itself. - */ - public PropertyConditionProperties withConditionProperties( - AutomationRulePropertyValuesCondition conditionProperties) { - this.conditionProperties = conditionProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (conditionProperties() != null) { - conditionProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java deleted file mode 100644 index a365b42e5c16..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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; - -/** Provider name. */ -public final class ProviderName extends ExpandableStringEnum { - /** Static value Microsoft.OperationalInsights/solutions for ProviderName. */ - public static final ProviderName MICROSOFT_OPERATIONAL_INSIGHTS_SOLUTIONS = - fromString("Microsoft.OperationalInsights/solutions"); - - /** Static value Microsoft.OperationalInsights/workspaces for ProviderName. */ - public static final ProviderName MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES = - fromString("Microsoft.OperationalInsights/workspaces"); - - /** Static value Microsoft.OperationalInsights/workspaces/datasources for ProviderName. */ - public static final ProviderName MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES_DATASOURCES = - fromString("Microsoft.OperationalInsights/workspaces/datasources"); - - /** Static value microsoft.aadiam/diagnosticSettings for ProviderName. */ - public static final ProviderName MICROSOFT_AADIAM_DIAGNOSTIC_SETTINGS = - fromString("microsoft.aadiam/diagnosticSettings"); - - /** Static value Microsoft.OperationalInsights/workspaces/sharedKeys for ProviderName. */ - public static final ProviderName MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES_SHARED_KEYS = - fromString("Microsoft.OperationalInsights/workspaces/sharedKeys"); - - /** Static value Microsoft.Authorization/policyAssignments for ProviderName. */ - public static final ProviderName MICROSOFT_AUTHORIZATION_POLICY_ASSIGNMENTS = - fromString("Microsoft.Authorization/policyAssignments"); - - /** - * Creates or finds a ProviderName from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProviderName. - */ - @JsonCreator - public static ProviderName fromString(String name) { - return fromString(name, ProviderName.class); - } - - /** - * Gets known ProviderName values. - * - * @return known ProviderName values. - */ - public static Collection values() { - return values(ProviderName.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java deleted file mode 100644 index e20070c785ad..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java +++ /dev/null @@ -1,218 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Query based alert rule template base property bag. */ -@Fluent -public class QueryBasedAlertRuleTemplateProperties { - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The version of this template - in format , where all are numbers. For example <1.0.2>. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Dictionary of string key-value pairs of columns to be attached to the alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - - /* - * The event grouping settings. - */ - @JsonProperty(value = "eventGroupingSettings") - private EventGroupingSettings eventGroupingSettings; - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @param version the version value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.eventGroupingSettings; - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withEventGroupingSettings( - EventGroupingSettings eventGroupingSettings) { - this.eventGroupingSettings = eventGroupingSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } - if (eventGroupingSettings() != null) { - eventGroupingSettings().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java deleted file mode 100644 index 0b533e8cddbb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java +++ /dev/null @@ -1,62 +0,0 @@ -// 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; - -/** the hive that holds the registry key. */ -public final class RegistryHive extends ExpandableStringEnum { - /** Static value HKEY_LOCAL_MACHINE for RegistryHive. */ - public static final RegistryHive HKEY_LOCAL_MACHINE = fromString("HKEY_LOCAL_MACHINE"); - - /** Static value HKEY_CLASSES_ROOT for RegistryHive. */ - public static final RegistryHive HKEY_CLASSES_ROOT = fromString("HKEY_CLASSES_ROOT"); - - /** Static value HKEY_CURRENT_CONFIG for RegistryHive. */ - public static final RegistryHive HKEY_CURRENT_CONFIG = fromString("HKEY_CURRENT_CONFIG"); - - /** Static value HKEY_USERS for RegistryHive. */ - public static final RegistryHive HKEY_USERS = fromString("HKEY_USERS"); - - /** Static value HKEY_CURRENT_USER_LOCAL_SETTINGS for RegistryHive. */ - public static final RegistryHive HKEY_CURRENT_USER_LOCAL_SETTINGS = fromString("HKEY_CURRENT_USER_LOCAL_SETTINGS"); - - /** Static value HKEY_PERFORMANCE_DATA for RegistryHive. */ - public static final RegistryHive HKEY_PERFORMANCE_DATA = fromString("HKEY_PERFORMANCE_DATA"); - - /** Static value HKEY_PERFORMANCE_NLSTEXT for RegistryHive. */ - public static final RegistryHive HKEY_PERFORMANCE_NLSTEXT = fromString("HKEY_PERFORMANCE_NLSTEXT"); - - /** Static value HKEY_PERFORMANCE_TEXT for RegistryHive. */ - public static final RegistryHive HKEY_PERFORMANCE_TEXT = fromString("HKEY_PERFORMANCE_TEXT"); - - /** Static value HKEY_A for RegistryHive. */ - public static final RegistryHive HKEY_A = fromString("HKEY_A"); - - /** Static value HKEY_CURRENT_USER for RegistryHive. */ - public static final RegistryHive HKEY_CURRENT_USER = fromString("HKEY_CURRENT_USER"); - - /** - * Creates or finds a RegistryHive from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegistryHive. - */ - @JsonCreator - public static RegistryHive fromString(String name) { - return fromString(name, RegistryHive.class); - } - - /** - * Gets known RegistryHive values. - * - * @return known RegistryHive values. - */ - public static Collection values() { - return values(RegistryHive.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java deleted file mode 100644 index 116afd6feb60..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java +++ /dev/null @@ -1,85 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.RegistryKeyEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Represents a registry key entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("RegistryKey") -@Fluent -public final class RegistryKeyEntity extends EntityInner { - /* - * RegistryKey entity properties - */ - @JsonProperty(value = "properties") - private RegistryKeyEntityProperties innerProperties; - - /** - * Get the innerProperties property: RegistryKey entity properties. - * - * @return the innerProperties value. - */ - private RegistryKeyEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the hive property: the hive that holds the registry key. - * - * @return the hive value. - */ - public RegistryHive hive() { - return this.innerProperties() == null ? null : this.innerProperties().hive(); - } - - /** - * Get the key property: The registry key path. - * - * @return the key value. - */ - public String key() { - return this.innerProperties() == null ? null : this.innerProperties().key(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java deleted file mode 100644 index 8121d653cb19..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java +++ /dev/null @@ -1,104 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.RegistryValueEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Represents a registry value entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("RegistryValue") -@Fluent -public final class RegistryValueEntity extends EntityInner { - /* - * RegistryKey entity properties - */ - @JsonProperty(value = "properties") - private RegistryValueEntityProperties innerProperties; - - /** - * Get the innerProperties property: RegistryKey entity properties. - * - * @return the innerProperties value. - */ - private RegistryValueEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the keyEntityId property: The registry key entity id. - * - * @return the keyEntityId value. - */ - public String keyEntityId() { - return this.innerProperties() == null ? null : this.innerProperties().keyEntityId(); - } - - /** - * Get the valueData property: String formatted representation of the value data. - * - * @return the valueData value. - */ - public String valueData() { - return this.innerProperties() == null ? null : this.innerProperties().valueData(); - } - - /** - * Get the valueName property: The registry value name. - * - * @return the valueName value. - */ - public String valueName() { - return this.innerProperties() == null ? null : this.innerProperties().valueName(); - } - - /** - * Get the valueType property: Specifies the data types to use when storing values in the registry, or identifies - * the data type of a value in the registry. - * - * @return the valueType value. - */ - public RegistryValueKind valueType() { - return this.innerProperties() == null ? null : this.innerProperties().valueType(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java deleted file mode 100644 index 7f214d1bf04f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java +++ /dev/null @@ -1,59 +0,0 @@ -// 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; - -/** - * Specifies the data types to use when storing values in the registry, or identifies the data type of a value in the - * registry. - */ -public final class RegistryValueKind extends ExpandableStringEnum { - /** Static value None for RegistryValueKind. */ - public static final RegistryValueKind NONE = fromString("None"); - - /** Static value Unknown for RegistryValueKind. */ - public static final RegistryValueKind UNKNOWN = fromString("Unknown"); - - /** Static value String for RegistryValueKind. */ - public static final RegistryValueKind STRING = fromString("String"); - - /** Static value ExpandString for RegistryValueKind. */ - public static final RegistryValueKind EXPAND_STRING = fromString("ExpandString"); - - /** Static value Binary for RegistryValueKind. */ - public static final RegistryValueKind BINARY = fromString("Binary"); - - /** Static value DWord for RegistryValueKind. */ - public static final RegistryValueKind DWORD = fromString("DWord"); - - /** Static value MultiString for RegistryValueKind. */ - public static final RegistryValueKind MULTI_STRING = fromString("MultiString"); - - /** Static value QWord for RegistryValueKind. */ - public static final RegistryValueKind QWORD = fromString("QWord"); - - /** - * Creates or finds a RegistryValueKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegistryValueKind. - */ - @JsonCreator - public static RegistryValueKind fromString(String name) { - return fromString(name, RegistryValueKind.class); - } - - /** - * Gets known RegistryValueKind values. - * - * @return known RegistryValueKind values. - */ - public static Collection values() { - return values(RegistryValueKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Relation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Relation.java deleted file mode 100644 index 7e14109d67f6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Relation.java +++ /dev/null @@ -1,213 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** An immutable client-side representation of Relation. */ -public interface Relation { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the relatedResourceId property: The resource ID of the related resource. - * - * @return the relatedResourceId value. - */ - String relatedResourceId(); - - /** - * Gets the relatedResourceName property: The name of the related resource. - * - * @return the relatedResourceName value. - */ - String relatedResourceName(); - - /** - * Gets the relatedResourceType property: The resource type of the related resource. - * - * @return the relatedResourceType value. - */ - String relatedResourceType(); - - /** - * Gets the relatedResourceKind property: The resource kind of the related resource. - * - * @return the relatedResourceKind value. - */ - String relatedResourceKind(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.RelationInner object. - * - * @return the inner object. - */ - RelationInner innerModel(); - - /** The entirety of the Relation definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The Relation definition stages. */ - interface DefinitionStages { - /** The first stage of the Relation definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the Relation definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, bookmarkId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @return the next definition stage. - */ - WithCreate withExistingBookmark(String resourceGroupName, String workspaceName, String bookmarkId); - } - /** - * The stage of the Relation definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithEtag, DefinitionStages.WithRelatedResourceId { - /** - * Executes the create request. - * - * @return the created resource. - */ - Relation create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Relation create(Context context); - } - /** The stage of the Relation definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the Relation definition allowing to specify relatedResourceId. */ - interface WithRelatedResourceId { - /** - * Specifies the relatedResourceId property: The resource ID of the related resource. - * - * @param relatedResourceId The resource ID of the related resource. - * @return the next definition stage. - */ - WithCreate withRelatedResourceId(String relatedResourceId); - } - } - /** - * Begins update for the Relation resource. - * - * @return the stage of resource update. - */ - Relation.Update update(); - - /** The template for Relation update. */ - interface Update extends UpdateStages.WithEtag, UpdateStages.WithRelatedResourceId { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Relation apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Relation apply(Context context); - } - /** The Relation update stages. */ - interface UpdateStages { - /** The stage of the Relation update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the Relation update allowing to specify relatedResourceId. */ - interface WithRelatedResourceId { - /** - * Specifies the relatedResourceId property: The resource ID of the related resource. - * - * @param relatedResourceId The resource ID of the related resource. - * @return the next definition stage. - */ - Update withRelatedResourceId(String relatedResourceId); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Relation refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Relation refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java deleted file mode 100644 index 7c2e13d40225..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of relations. */ -@Fluent -public final class RelationList { - /* - * URL to fetch the next set of relations. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of relations. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of relations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of relations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of relations. - * - * @param value the value value to set. - * @return the RelationList object itself. - */ - public RelationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model RelationList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RelationList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repo.java deleted file mode 100644 index 8510709ca5b3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repo.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.RepoInner; -import java.util.List; - -/** An immutable client-side representation of Repo. */ -public interface Repo { - /** - * Gets the url property: The url to access the repository. - * - * @return the url value. - */ - String url(); - - /** - * Gets the fullName property: The name of the repository. - * - * @return the fullName value. - */ - String fullName(); - - /** - * Gets the branches property: Array of branches. - * - * @return the branches value. - */ - List branches(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.RepoInner object. - * - * @return the inner object. - */ - RepoInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java deleted file mode 100644 index 02aaa874b88d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the source controls. */ -@Fluent -public final class RepoList { - /* - * URL to fetch the next set of repositories. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of repositories. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of repositories. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of repositories. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of repositories. - * - * @param value the value value to set. - * @return the RepoList object itself. - */ - public RepoList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property value in model RepoList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RepoList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java deleted file mode 100644 index dcb33e87b257..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The type of repository. */ -public final class RepoType extends ExpandableStringEnum { - /** Static value Github for RepoType. */ - public static final RepoType GITHUB = fromString("Github"); - - /** Static value DevOps for RepoType. */ - public static final RepoType DEV_OPS = fromString("DevOps"); - - /** - * Creates or finds a RepoType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RepoType. - */ - @JsonCreator - public static RepoType fromString(String name) { - return fromString(name, RepoType.class); - } - - /** - * Gets known RepoType values. - * - * @return known RepoType values. - */ - public static Collection values() { - return values(RepoType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java deleted file mode 100644 index 3e26879725a5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java +++ /dev/null @@ -1,154 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** metadata of a repository. */ -@Fluent -public final class Repository { - /* - * Url of repository. - */ - @JsonProperty(value = "url") - private String url; - - /* - * Branch name of repository. - */ - @JsonProperty(value = "branch") - private String branch; - - /* - * Display url of repository. - */ - @JsonProperty(value = "displayUrl") - private String displayUrl; - - /* - * Url to access repository action logs. - */ - @JsonProperty(value = "deploymentLogsUrl") - private String deploymentLogsUrl; - - /* - * Dictionary of source control content type and path mapping. - */ - @JsonProperty(value = "pathMapping") - private List pathMapping; - - /** - * Get the url property: Url of repository. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: Url of repository. - * - * @param url the url value to set. - * @return the Repository object itself. - */ - public Repository withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the branch property: Branch name of repository. - * - * @return the branch value. - */ - public String branch() { - return this.branch; - } - - /** - * Set the branch property: Branch name of repository. - * - * @param branch the branch value to set. - * @return the Repository object itself. - */ - public Repository withBranch(String branch) { - this.branch = branch; - return this; - } - - /** - * Get the displayUrl property: Display url of repository. - * - * @return the displayUrl value. - */ - public String displayUrl() { - return this.displayUrl; - } - - /** - * Set the displayUrl property: Display url of repository. - * - * @param displayUrl the displayUrl value to set. - * @return the Repository object itself. - */ - public Repository withDisplayUrl(String displayUrl) { - this.displayUrl = displayUrl; - return this; - } - - /** - * Get the deploymentLogsUrl property: Url to access repository action logs. - * - * @return the deploymentLogsUrl value. - */ - public String deploymentLogsUrl() { - return this.deploymentLogsUrl; - } - - /** - * Set the deploymentLogsUrl property: Url to access repository action logs. - * - * @param deploymentLogsUrl the deploymentLogsUrl value to set. - * @return the Repository object itself. - */ - public Repository withDeploymentLogsUrl(String deploymentLogsUrl) { - this.deploymentLogsUrl = deploymentLogsUrl; - return this; - } - - /** - * Get the pathMapping property: Dictionary of source control content type and path mapping. - * - * @return the pathMapping value. - */ - public List pathMapping() { - return this.pathMapping; - } - - /** - * Set the pathMapping property: Dictionary of source control content type and path mapping. - * - * @param pathMapping the pathMapping value to set. - * @return the Repository object itself. - */ - public Repository withPathMapping(List pathMapping) { - this.pathMapping = pathMapping; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pathMapping() != null) { - pathMapping().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java deleted file mode 100644 index 5e10c94993ff..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java +++ /dev/null @@ -1,107 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Resources created in user's repository for the source-control. */ -@Fluent -public final class RepositoryResourceInfo { - /* - * The webhook object created for the source-control. - */ - @JsonProperty(value = "webhook") - private Webhook webhook; - - /* - * Resources created in GitHub for this source-control. - */ - @JsonProperty(value = "gitHubResourceInfo") - private GitHubResourceInfo gitHubResourceInfo; - - /* - * Resources created in Azure DevOps for this source-control. - */ - @JsonProperty(value = "azureDevOpsResourceInfo") - private AzureDevOpsResourceInfo azureDevOpsResourceInfo; - - /** - * Get the webhook property: The webhook object created for the source-control. - * - * @return the webhook value. - */ - public Webhook webhook() { - return this.webhook; - } - - /** - * Set the webhook property: The webhook object created for the source-control. - * - * @param webhook the webhook value to set. - * @return the RepositoryResourceInfo object itself. - */ - public RepositoryResourceInfo withWebhook(Webhook webhook) { - this.webhook = webhook; - return this; - } - - /** - * Get the gitHubResourceInfo property: Resources created in GitHub for this source-control. - * - * @return the gitHubResourceInfo value. - */ - public GitHubResourceInfo gitHubResourceInfo() { - return this.gitHubResourceInfo; - } - - /** - * Set the gitHubResourceInfo property: Resources created in GitHub for this source-control. - * - * @param gitHubResourceInfo the gitHubResourceInfo value to set. - * @return the RepositoryResourceInfo object itself. - */ - public RepositoryResourceInfo withGitHubResourceInfo(GitHubResourceInfo gitHubResourceInfo) { - this.gitHubResourceInfo = gitHubResourceInfo; - return this; - } - - /** - * Get the azureDevOpsResourceInfo property: Resources created in Azure DevOps for this source-control. - * - * @return the azureDevOpsResourceInfo value. - */ - public AzureDevOpsResourceInfo azureDevOpsResourceInfo() { - return this.azureDevOpsResourceInfo; - } - - /** - * Set the azureDevOpsResourceInfo property: Resources created in Azure DevOps for this source-control. - * - * @param azureDevOpsResourceInfo the azureDevOpsResourceInfo value to set. - * @return the RepositoryResourceInfo object itself. - */ - public RepositoryResourceInfo withAzureDevOpsResourceInfo(AzureDevOpsResourceInfo azureDevOpsResourceInfo) { - this.azureDevOpsResourceInfo = azureDevOpsResourceInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (webhook() != null) { - webhook().validate(); - } - if (gitHubResourceInfo() != null) { - gitHubResourceInfo().validate(); - } - if (azureDevOpsResourceInfo() != null) { - azureDevOpsResourceInfo().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java deleted file mode 100644 index 146d39665d20..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java +++ /dev/null @@ -1,124 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Required permissions for the connector. */ -@Fluent -public final class RequiredPermissions { - /* - * action permission - */ - @JsonProperty(value = "action") - private Boolean action; - - /* - * write permission - */ - @JsonProperty(value = "write") - private Boolean write; - - /* - * read permission - */ - @JsonProperty(value = "read") - private Boolean read; - - /* - * delete permission - */ - @JsonProperty(value = "delete") - private Boolean delete; - - /** - * Get the action property: action permission. - * - * @return the action value. - */ - public Boolean action() { - return this.action; - } - - /** - * Set the action property: action permission. - * - * @param action the action value to set. - * @return the RequiredPermissions object itself. - */ - public RequiredPermissions withAction(Boolean action) { - this.action = action; - return this; - } - - /** - * Get the write property: write permission. - * - * @return the write value. - */ - public Boolean write() { - return this.write; - } - - /** - * Set the write property: write permission. - * - * @param write the write value to set. - * @return the RequiredPermissions object itself. - */ - public RequiredPermissions withWrite(Boolean write) { - this.write = write; - return this; - } - - /** - * Get the read property: read permission. - * - * @return the read value. - */ - public Boolean read() { - return this.read; - } - - /** - * Set the read property: read permission. - * - * @param read the read value to set. - * @return the RequiredPermissions object itself. - */ - public RequiredPermissions withRead(Boolean read) { - this.read = read; - return this; - } - - /** - * Get the delete property: delete permission. - * - * @return the delete value. - */ - public Boolean delete() { - return this.delete; - } - - /** - * Set the delete property: delete permission. - * - * @param delete the delete value to set. - * @return the RequiredPermissions object itself. - */ - public RequiredPermissions withDelete(Boolean delete) { - this.delete = delete; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java deleted file mode 100644 index 7024f46e5562..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java +++ /dev/null @@ -1,153 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Resource provider permissions required for the connector. */ -@Fluent -public class ResourceProvider { - /* - * Provider name - */ - @JsonProperty(value = "provider") - private ProviderName provider; - - /* - * Permission description text - */ - @JsonProperty(value = "permissionsDisplayText") - private String permissionsDisplayText; - - /* - * Permission provider display name - */ - @JsonProperty(value = "providerDisplayName") - private String providerDisplayName; - - /* - * Permission provider scope - */ - @JsonProperty(value = "scope") - private PermissionProviderScope scope; - - /* - * Required permissions for the connector - */ - @JsonProperty(value = "requiredPermissions") - private RequiredPermissions requiredPermissions; - - /** - * Get the provider property: Provider name. - * - * @return the provider value. - */ - public ProviderName provider() { - return this.provider; - } - - /** - * Set the provider property: Provider name. - * - * @param provider the provider value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withProvider(ProviderName provider) { - this.provider = provider; - return this; - } - - /** - * Get the permissionsDisplayText property: Permission description text. - * - * @return the permissionsDisplayText value. - */ - public String permissionsDisplayText() { - return this.permissionsDisplayText; - } - - /** - * Set the permissionsDisplayText property: Permission description text. - * - * @param permissionsDisplayText the permissionsDisplayText value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withPermissionsDisplayText(String permissionsDisplayText) { - this.permissionsDisplayText = permissionsDisplayText; - return this; - } - - /** - * Get the providerDisplayName property: Permission provider display name. - * - * @return the providerDisplayName value. - */ - public String providerDisplayName() { - return this.providerDisplayName; - } - - /** - * Set the providerDisplayName property: Permission provider display name. - * - * @param providerDisplayName the providerDisplayName value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withProviderDisplayName(String providerDisplayName) { - this.providerDisplayName = providerDisplayName; - return this; - } - - /** - * Get the scope property: Permission provider scope. - * - * @return the scope value. - */ - public PermissionProviderScope scope() { - return this.scope; - } - - /** - * Set the scope property: Permission provider scope. - * - * @param scope the scope value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withScope(PermissionProviderScope scope) { - this.scope = scope; - return this; - } - - /** - * Get the requiredPermissions property: Required permissions for the connector. - * - * @return the requiredPermissions value. - */ - public RequiredPermissions requiredPermissions() { - return this.requiredPermissions; - } - - /** - * Set the requiredPermissions property: Required permissions for the connector. - * - * @param requiredPermissions the requiredPermissions value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withRequiredPermissions(RequiredPermissions requiredPermissions) { - this.requiredPermissions = requiredPermissions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (requiredPermissions() != null) { - requiredPermissions().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java deleted file mode 100644 index 6ed4515163c8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java +++ /dev/null @@ -1,63 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** An azure resource object with an Etag property. */ -@Fluent -public class ResourceWithEtag extends ProxyResource { - /* - * Etag of the azure resource - */ - @JsonProperty(value = "etag") - private String etag; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: Etag of the azure resource. - * - * @param etag the etag value to set. - * @return the ResourceWithEtag object itself. - */ - public ResourceWithEtag withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java deleted file mode 100644 index 21b538e67f10..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The sample queries for the connector. */ -@Fluent -public class SampleQueries { - /* - * The sample query description - */ - @JsonProperty(value = "description") - private String description; - - /* - * the sample query - */ - @JsonProperty(value = "query") - private String query; - - /** - * Get the description property: The sample query description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The sample query description. - * - * @param description the description value to set. - * @return the SampleQueries object itself. - */ - public SampleQueries withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the query property: the sample query. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: the sample query. - * - * @param query the query value to set. - * @return the SampleQueries object itself. - */ - public SampleQueries withQuery(String query) { - this.query = query; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java deleted file mode 100644 index 5d5575688e63..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java +++ /dev/null @@ -1,534 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ScheduledAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents scheduled alert rule. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Scheduled") -@Fluent -public final class ScheduledAlertRule extends AlertRuleInner { - /* - * Scheduled alert rule properties - */ - @JsonProperty(value = "properties") - private ScheduledAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: Scheduled alert rule properties. - * - * @return the innerProperties value. - */ - private ScheduledAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ScheduledAlertRule withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.innerProperties() == null ? null : this.innerProperties().alertRuleTemplateName(); - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); - return this; - } - - /** - * Get the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @return the templateVersion value. - */ - public String templateVersion() { - return this.innerProperties() == null ? null : this.innerProperties().templateVersion(); - } - - /** - * Set the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @param templateVersion the templateVersion value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withTemplateVersion(String templateVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withTemplateVersion(templateVersion); - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule. - * - * @param description the description value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alerts created by this alert rule. - * - * @param displayName the displayName value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert rule has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); - } - - /** - * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @return the suppressionDuration value. - */ - public Duration suppressionDuration() { - return this.innerProperties() == null ? null : this.innerProperties().suppressionDuration(); - } - - /** - * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @param suppressionDuration the suppressionDuration value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withSuppressionDuration(Duration suppressionDuration) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withSuppressionDuration(suppressionDuration); - return this; - } - - /** - * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @return the suppressionEnabled value. - */ - public Boolean suppressionEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().suppressionEnabled(); - } - - /** - * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @param suppressionEnabled the suppressionEnabled value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withSuppressionEnabled(Boolean suppressionEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withSuppressionEnabled(suppressionEnabled); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @return the incidentConfiguration value. - */ - public IncidentConfiguration incidentConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().incidentConfiguration(); - } - - /** - * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @param incidentConfiguration the incidentConfiguration value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withIncidentConfiguration(incidentConfiguration); - return this; - } - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withQuery(query); - return this; - } - - /** - * Get the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. - * - * @return the queryFrequency value. - */ - public Duration queryFrequency() { - return this.innerProperties() == null ? null : this.innerProperties().queryFrequency(); - } - - /** - * Set the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. - * - * @param queryFrequency the queryFrequency value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withQueryFrequency(Duration queryFrequency) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withQueryFrequency(queryFrequency); - return this; - } - - /** - * Get the queryPeriod property: The period (in ISO 8601 duration format) that this alert rule looks at. - * - * @return the queryPeriod value. - */ - public Duration queryPeriod() { - return this.innerProperties() == null ? null : this.innerProperties().queryPeriod(); - } - - /** - * Set the queryPeriod property: The period (in ISO 8601 duration format) that this alert rule looks at. - * - * @param queryPeriod the queryPeriod value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withQueryPeriod(Duration queryPeriod) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withQueryPeriod(queryPeriod); - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the triggerOperator property: The operation against the threshold that triggers alert rule. - * - * @return the triggerOperator value. - */ - public TriggerOperator triggerOperator() { - return this.innerProperties() == null ? null : this.innerProperties().triggerOperator(); - } - - /** - * Set the triggerOperator property: The operation against the threshold that triggers alert rule. - * - * @param triggerOperator the triggerOperator value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withTriggerOperator(TriggerOperator triggerOperator) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withTriggerOperator(triggerOperator); - return this; - } - - /** - * Get the triggerThreshold property: The threshold triggers this alert rule. - * - * @return the triggerThreshold value. - */ - public Integer triggerThreshold() { - return this.innerProperties() == null ? null : this.innerProperties().triggerThreshold(); - } - - /** - * Set the triggerThreshold property: The threshold triggers this alert rule. - * - * @param triggerThreshold the triggerThreshold value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withTriggerThreshold(Integer triggerThreshold) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withTriggerThreshold(triggerThreshold); - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withEventGroupingSettings(eventGroupingSettings); - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.innerProperties() == null ? null : this.innerProperties().customDetails(); - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withCustomDetails(Map customDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withCustomDetails(customDetails); - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withEntityMappings(List entityMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withEntityMappings(entityMappings); - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java deleted file mode 100644 index 181410c28e15..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java +++ /dev/null @@ -1,294 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.util.List; -import java.util.Map; - -/** Scheduled alert rule template property bag. */ -@Fluent -public class ScheduledAlertRuleCommonProperties { - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The frequency (in ISO 8601 duration format) for this alert rule to run. - */ - @JsonProperty(value = "queryFrequency") - private Duration queryFrequency; - - /* - * The period (in ISO 8601 duration format) that this alert rule looks at. - */ - @JsonProperty(value = "queryPeriod") - private Duration queryPeriod; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The operation against the threshold that triggers alert rule. - */ - @JsonProperty(value = "triggerOperator") - private TriggerOperator triggerOperator; - - /* - * The threshold triggers this alert rule. - */ - @JsonProperty(value = "triggerThreshold") - private Integer triggerThreshold; - - /* - * The event grouping settings. - */ - @JsonProperty(value = "eventGroupingSettings") - private EventGroupingSettings eventGroupingSettings; - - /* - * Dictionary of string key-value pairs of columns to be attached to the alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. - * - * @return the queryFrequency value. - */ - public Duration queryFrequency() { - return this.queryFrequency; - } - - /** - * Set the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. - * - * @param queryFrequency the queryFrequency value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withQueryFrequency(Duration queryFrequency) { - this.queryFrequency = queryFrequency; - return this; - } - - /** - * Get the queryPeriod property: The period (in ISO 8601 duration format) that this alert rule looks at. - * - * @return the queryPeriod value. - */ - public Duration queryPeriod() { - return this.queryPeriod; - } - - /** - * Set the queryPeriod property: The period (in ISO 8601 duration format) that this alert rule looks at. - * - * @param queryPeriod the queryPeriod value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withQueryPeriod(Duration queryPeriod) { - this.queryPeriod = queryPeriod; - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the triggerOperator property: The operation against the threshold that triggers alert rule. - * - * @return the triggerOperator value. - */ - public TriggerOperator triggerOperator() { - return this.triggerOperator; - } - - /** - * Set the triggerOperator property: The operation against the threshold that triggers alert rule. - * - * @param triggerOperator the triggerOperator value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withTriggerOperator(TriggerOperator triggerOperator) { - this.triggerOperator = triggerOperator; - return this; - } - - /** - * Get the triggerThreshold property: The threshold triggers this alert rule. - * - * @return the triggerThreshold value. - */ - public Integer triggerThreshold() { - return this.triggerThreshold; - } - - /** - * Set the triggerThreshold property: The threshold triggers this alert rule. - * - * @param triggerThreshold the triggerThreshold value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withTriggerThreshold(Integer triggerThreshold) { - this.triggerThreshold = triggerThreshold; - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.eventGroupingSettings; - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - this.eventGroupingSettings = eventGroupingSettings; - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the ScheduledAlertRuleCommonProperties object itself. - */ - public ScheduledAlertRuleCommonProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (eventGroupingSettings() != null) { - eventGroupingSettings().validate(); - } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java deleted file mode 100644 index 143d98192d0d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java +++ /dev/null @@ -1,485 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ScheduledAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents scheduled alert rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Scheduled") -@Fluent -public final class ScheduledAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * Scheduled alert rule template properties - */ - @JsonProperty(value = "properties") - private ScheduledAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: Scheduled alert rule template properties. - * - * @return the innerProperties value. - */ - private ScheduledAlertRuleTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data connectors for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data connectors for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withQuery(query); - return this; - } - - /** - * Get the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. - * - * @return the queryFrequency value. - */ - public Duration queryFrequency() { - return this.innerProperties() == null ? null : this.innerProperties().queryFrequency(); - } - - /** - * Set the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. - * - * @param queryFrequency the queryFrequency value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withQueryFrequency(Duration queryFrequency) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withQueryFrequency(queryFrequency); - return this; - } - - /** - * Get the queryPeriod property: The period (in ISO 8601 duration format) that this alert rule looks at. - * - * @return the queryPeriod value. - */ - public Duration queryPeriod() { - return this.innerProperties() == null ? null : this.innerProperties().queryPeriod(); - } - - /** - * Set the queryPeriod property: The period (in ISO 8601 duration format) that this alert rule looks at. - * - * @param queryPeriod the queryPeriod value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withQueryPeriod(Duration queryPeriod) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withQueryPeriod(queryPeriod); - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the triggerOperator property: The operation against the threshold that triggers alert rule. - * - * @return the triggerOperator value. - */ - public TriggerOperator triggerOperator() { - return this.innerProperties() == null ? null : this.innerProperties().triggerOperator(); - } - - /** - * Set the triggerOperator property: The operation against the threshold that triggers alert rule. - * - * @param triggerOperator the triggerOperator value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withTriggerOperator(TriggerOperator triggerOperator) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withTriggerOperator(triggerOperator); - return this; - } - - /** - * Get the triggerThreshold property: The threshold triggers this alert rule. - * - * @return the triggerThreshold value. - */ - public Integer triggerThreshold() { - return this.innerProperties() == null ? null : this.innerProperties().triggerThreshold(); - } - - /** - * Set the triggerThreshold property: The threshold triggers this alert rule. - * - * @param triggerThreshold the triggerThreshold value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withTriggerThreshold(Integer triggerThreshold) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withTriggerThreshold(triggerThreshold); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. - * - * @param version the version value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withEventGroupingSettings(eventGroupingSettings); - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.innerProperties() == null ? null : this.innerProperties().customDetails(); - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withCustomDetails(Map customDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withCustomDetails(customDetails); - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withEntityMappings(List entityMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withEntityMappings(entityMappings); - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the ScheduledAlertRuleTemplate object itself. - */ - public ScheduledAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java deleted file mode 100644 index 3052a35d0c5c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java +++ /dev/null @@ -1,311 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityAlertProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents a security alert entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("SecurityAlert") -@Fluent -public final class SecurityAlert extends EntityInner { - /* - * SecurityAlert entity properties - */ - @JsonProperty(value = "properties") - private SecurityAlertProperties innerProperties; - - /** - * Get the innerProperties property: SecurityAlert entity properties. - * - * @return the innerProperties value. - */ - private SecurityAlertProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the alertDisplayName property: The display name of the alert. - * - * @return the alertDisplayName value. - */ - public String alertDisplayName() { - return this.innerProperties() == null ? null : this.innerProperties().alertDisplayName(); - } - - /** - * Get the alertType property: The type name of the alert. - * - * @return the alertType value. - */ - public String alertType() { - return this.innerProperties() == null ? null : this.innerProperties().alertType(); - } - - /** - * Get the compromisedEntity property: Display name of the main entity being reported on. - * - * @return the compromisedEntity value. - */ - public String compromisedEntity() { - return this.innerProperties() == null ? null : this.innerProperties().compromisedEntity(); - } - - /** - * Get the confidenceLevel property: The confidence level of this alert. - * - * @return the confidenceLevel value. - */ - public ConfidenceLevel confidenceLevel() { - return this.innerProperties() == null ? null : this.innerProperties().confidenceLevel(); - } - - /** - * Get the confidenceReasons property: The confidence reasons. - * - * @return the confidenceReasons value. - */ - public List confidenceReasons() { - return this.innerProperties() == null ? null : this.innerProperties().confidenceReasons(); - } - - /** - * Get the confidenceScore property: The confidence score of the alert. - * - * @return the confidenceScore value. - */ - public Double confidenceScore() { - return this.innerProperties() == null ? null : this.innerProperties().confidenceScore(); - } - - /** - * Get the confidenceScoreStatus property: The confidence score calculation status, i.e. indicating if score - * calculation is pending for this alert, not applicable or final. - * - * @return the confidenceScoreStatus value. - */ - public ConfidenceScoreStatus confidenceScoreStatus() { - return this.innerProperties() == null ? null : this.innerProperties().confidenceScoreStatus(); - } - - /** - * Get the description property: Alert description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Get the endTimeUtc property: The impact end time of the alert (the time of the last event contributing to the - * alert). - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().endTimeUtc(); - } - - /** - * Get the intent property: Holds the alert intent stage(s) mapping for this alert. - * - * @return the intent value. - */ - public KillChainIntent intent() { - return this.innerProperties() == null ? null : this.innerProperties().intent(); - } - - /** - * Get the providerAlertId property: The identifier of the alert inside the product which generated the alert. - * - * @return the providerAlertId value. - */ - public String providerAlertId() { - return this.innerProperties() == null ? null : this.innerProperties().providerAlertId(); - } - - /** - * Get the processingEndTime property: The time the alert was made available for consumption. - * - * @return the processingEndTime value. - */ - public OffsetDateTime processingEndTime() { - return this.innerProperties() == null ? null : this.innerProperties().processingEndTime(); - } - - /** - * Get the productComponentName property: The name of a component inside the product which generated the alert. - * - * @return the productComponentName value. - */ - public String productComponentName() { - return this.innerProperties() == null ? null : this.innerProperties().productComponentName(); - } - - /** - * Get the productName property: The name of the product which published this alert. - * - * @return the productName value. - */ - public String productName() { - return this.innerProperties() == null ? null : this.innerProperties().productName(); - } - - /** - * Get the productVersion property: The version of the product generating the alert. - * - * @return the productVersion value. - */ - public String productVersion() { - return this.innerProperties() == null ? null : this.innerProperties().productVersion(); - } - - /** - * Get the remediationSteps property: Manual action items to take to remediate the alert. - * - * @return the remediationSteps value. - */ - public List remediationSteps() { - return this.innerProperties() == null ? null : this.innerProperties().remediationSteps(); - } - - /** - * Get the severity property: The severity of the alert. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity of the alert. - * - * @param severity the severity value to set. - * @return the SecurityAlert object itself. - */ - public SecurityAlert withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the startTimeUtc property: The impact start time of the alert (the time of the first event contributing to - * the alert). - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().startTimeUtc(); - } - - /** - * Get the status property: The lifecycle status of the alert. - * - * @return the status value. - */ - public AlertStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Get the systemAlertId property: Holds the product identifier of the alert for the product. - * - * @return the systemAlertId value. - */ - public String systemAlertId() { - return this.innerProperties() == null ? null : this.innerProperties().systemAlertId(); - } - - /** - * Get the tactics property: The tactics of the alert. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Get the timeGenerated property: The time the alert was generated. - * - * @return the timeGenerated value. - */ - public OffsetDateTime timeGenerated() { - return this.innerProperties() == null ? null : this.innerProperties().timeGenerated(); - } - - /** - * Get the vendorName property: The name of the vendor that raise the alert. - * - * @return the vendorName value. - */ - public String vendorName() { - return this.innerProperties() == null ? null : this.innerProperties().vendorName(); - } - - /** - * Get the alertLink property: The uri link of the alert. - * - * @return the alertLink value. - */ - public String alertLink() { - return this.innerProperties() == null ? null : this.innerProperties().alertLink(); - } - - /** - * Get the resourceIdentifiers property: The list of resource identifiers of the alert. - * - * @return the resourceIdentifiers value. - */ - public List resourceIdentifiers() { - return this.innerProperties() == null ? null : this.innerProperties().resourceIdentifiers(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java deleted file mode 100644 index 3613253e952a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** confidence reason item. */ -@Immutable -public final class SecurityAlertPropertiesConfidenceReasonsItem { - /* - * The reason's description - */ - @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) - private String reason; - - /* - * The type (category) of the reason - */ - @JsonProperty(value = "reasonType", access = JsonProperty.Access.WRITE_ONLY) - private String reasonType; - - /** - * Get the reason property: The reason's description. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Get the reasonType property: The type (category) of the reason. - * - * @return the reasonType value. - */ - public String reasonType() { - return this.reasonType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java deleted file mode 100644 index a34da5bbcc1a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java +++ /dev/null @@ -1,306 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Represents security alert timeline item. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("SecurityAlert") -@Fluent -public final class SecurityAlertTimelineItem extends EntityTimelineItem { - /* - * The alert azure resource id. - */ - @JsonProperty(value = "azureResourceId", required = true) - private String azureResourceId; - - /* - * The alert product name. - */ - @JsonProperty(value = "productName") - private String productName; - - /* - * The alert description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The alert name. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * The alert severity. - */ - @JsonProperty(value = "severity", required = true) - private AlertSeverity severity; - - /* - * The alert end time. - */ - @JsonProperty(value = "endTimeUtc", required = true) - private OffsetDateTime endTimeUtc; - - /* - * The alert start time. - */ - @JsonProperty(value = "startTimeUtc", required = true) - private OffsetDateTime startTimeUtc; - - /* - * The alert generated time. - */ - @JsonProperty(value = "timeGenerated", required = true) - private OffsetDateTime timeGenerated; - - /* - * The name of the alert type. - */ - @JsonProperty(value = "alertType", required = true) - private String alertType; - - /** - * Get the azureResourceId property: The alert azure resource id. - * - * @return the azureResourceId value. - */ - public String azureResourceId() { - return this.azureResourceId; - } - - /** - * Set the azureResourceId property: The alert azure resource id. - * - * @param azureResourceId the azureResourceId value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withAzureResourceId(String azureResourceId) { - this.azureResourceId = azureResourceId; - return this; - } - - /** - * Get the productName property: The alert product name. - * - * @return the productName value. - */ - public String productName() { - return this.productName; - } - - /** - * Set the productName property: The alert product name. - * - * @param productName the productName value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withProductName(String productName) { - this.productName = productName; - return this; - } - - /** - * Get the description property: The alert description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The alert description. - * - * @param description the description value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The alert name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The alert name. - * - * @param displayName the displayName value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the severity property: The alert severity. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The alert severity. - * - * @param severity the severity value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the endTimeUtc property: The alert end time. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The alert end time. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the startTimeUtc property: The alert start time. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The alert start time. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the timeGenerated property: The alert generated time. - * - * @return the timeGenerated value. - */ - public OffsetDateTime timeGenerated() { - return this.timeGenerated; - } - - /** - * Set the timeGenerated property: The alert generated time. - * - * @param timeGenerated the timeGenerated value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withTimeGenerated(OffsetDateTime timeGenerated) { - this.timeGenerated = timeGenerated; - return this; - } - - /** - * Get the alertType property: The name of the alert type. - * - * @return the alertType value. - */ - public String alertType() { - return this.alertType; - } - - /** - * Set the alertType property: The name of the alert type. - * - * @param alertType the alertType value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withAlertType(String alertType) { - this.alertType = alertType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (azureResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property azureResourceId in model SecurityAlertTimelineItem")); - } - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model SecurityAlertTimelineItem")); - } - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model SecurityAlertTimelineItem")); - } - if (endTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endTimeUtc in model SecurityAlertTimelineItem")); - } - if (startTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTimeUtc in model SecurityAlertTimelineItem")); - } - if (timeGenerated() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property timeGenerated in model SecurityAlertTimelineItem")); - } - if (alertType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alertType in model SecurityAlertTimelineItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertTimelineItem.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java deleted file mode 100644 index 119f867b58eb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java +++ /dev/null @@ -1,97 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityGroupEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; -import java.util.UUID; - -/** Represents a security group entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("SecurityGroup") -@Fluent -public final class SecurityGroupEntity extends EntityInner { - /* - * SecurityGroup entity properties - */ - @JsonProperty(value = "properties") - private SecurityGroupEntityProperties innerProperties; - - /** - * Get the innerProperties property: SecurityGroup entity properties. - * - * @return the innerProperties value. - */ - private SecurityGroupEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the distinguishedName property: The group distinguished name. - * - * @return the distinguishedName value. - */ - public String distinguishedName() { - return this.innerProperties() == null ? null : this.innerProperties().distinguishedName(); - } - - /** - * Get the objectGuid property: A single-value attribute that is the unique identifier for the object, assigned by - * active directory. - * - * @return the objectGuid value. - */ - public UUID objectGuid() { - return this.innerProperties() == null ? null : this.innerProperties().objectGuid(); - } - - /** - * Get the sid property: The SID attribute is a single-value attribute that specifies the security identifier (SID) - * of the group. - * - * @return the sid value. - */ - public String sid() { - return this.innerProperties() == null ? null : this.innerProperties().sid(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSetting.java deleted file mode 100644 index e1b83148eb66..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSetting.java +++ /dev/null @@ -1,53 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner; - -/** An immutable client-side representation of SecurityMLAnalyticsSetting. */ -public interface SecurityMLAnalyticsSetting { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner object. - * - * @return the inner object. - */ - SecurityMLAnalyticsSettingInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java deleted file mode 100644 index eb9b7a727ef6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java +++ /dev/null @@ -1,131 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner; - -/** Resource collection API of SecurityMLAnalyticsSettings. */ -public interface SecurityMLAnalyticsSettings { - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all Security ML Analytics Settings as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all Security ML Analytics Settings as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @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 the Security ML Analytics Settings. - */ - SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); - - /** - * Gets the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @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 the Security ML Analytics Settings along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @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 security ML Analytics Setting. - */ - SecurityMLAnalyticsSetting createOrUpdate( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); - - /** - * Creates or updates the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @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 security ML Analytics Setting along with {@link Response}. - */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); - - /** - * Delete the Security ML Analytics Settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsResourceName Security ML Analytics Settings resource name. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java deleted file mode 100644 index 25eeab69e8b9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** security ml analytics settings data sources. */ -@Fluent -public final class SecurityMLAnalyticsSettingsDataSource { - /* - * The connector id that provides the following data types - */ - @JsonProperty(value = "connectorId") - private String connectorId; - - /* - * The data types used by the security ml analytics settings - */ - @JsonProperty(value = "dataTypes") - private List dataTypes; - - /** - * Get the connectorId property: The connector id that provides the following data types. - * - * @return the connectorId value. - */ - public String connectorId() { - return this.connectorId; - } - - /** - * Set the connectorId property: The connector id that provides the following data types. - * - * @param connectorId the connectorId value to set. - * @return the SecurityMLAnalyticsSettingsDataSource object itself. - */ - public SecurityMLAnalyticsSettingsDataSource withConnectorId(String connectorId) { - this.connectorId = connectorId; - return this; - } - - /** - * Get the dataTypes property: The data types used by the security ml analytics settings. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The data types used by the security ml analytics settings. - * - * @param dataTypes the dataTypes value to set. - * @return the SecurityMLAnalyticsSettingsDataSource object itself. - */ - public SecurityMLAnalyticsSettingsDataSource withDataTypes(List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java deleted file mode 100644 index 81074368d114..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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; - -/** The kind of security ML analytics settings. */ -public final class SecurityMLAnalyticsSettingsKind extends ExpandableStringEnum { - /** Static value Anomaly for SecurityMLAnalyticsSettingsKind. */ - public static final SecurityMLAnalyticsSettingsKind ANOMALY = fromString("Anomaly"); - - /** - * Creates or finds a SecurityMLAnalyticsSettingsKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecurityMLAnalyticsSettingsKind. - */ - @JsonCreator - public static SecurityMLAnalyticsSettingsKind fromString(String name) { - return fromString(name, SecurityMLAnalyticsSettingsKind.class); - } - - /** - * Gets known SecurityMLAnalyticsSettingsKind values. - * - * @return known SecurityMLAnalyticsSettingsKind values. - */ - public static Collection values() { - return values(SecurityMLAnalyticsSettingsKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java deleted file mode 100644 index 8b72b6ba1ce9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the SecurityMLAnalyticsSettings. */ -@Fluent -public final class SecurityMLAnalyticsSettingsList { - /* - * URL to fetch the next set of SecurityMLAnalyticsSettings. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of SecurityMLAnalyticsSettings - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of SecurityMLAnalyticsSettings. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of SecurityMLAnalyticsSettings. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of SecurityMLAnalyticsSettings. - * - * @param value the value value to set. - * @return the SecurityMLAnalyticsSettingsList object itself. - */ - public SecurityMLAnalyticsSettingsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model SecurityMLAnalyticsSettingsList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecurityMLAnalyticsSettingsList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingState.java deleted file mode 100644 index 6d3db4d16b97..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingState.java +++ /dev/null @@ -1,137 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStateInner; - -/** An immutable client-side representation of SentinelOnboardingState. */ -public interface SentinelOnboardingState { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the customerManagedKey property: Flag that indicates the status of the CMK setting. - * - * @return the customerManagedKey value. - */ - Boolean customerManagedKey(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStateInner object. - * - * @return the inner object. - */ - SentinelOnboardingStateInner innerModel(); - - /** The entirety of the SentinelOnboardingState definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The SentinelOnboardingState definition stages. */ - interface DefinitionStages { - /** The first stage of the SentinelOnboardingState definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the SentinelOnboardingState definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the SentinelOnboardingState definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithEtag, DefinitionStages.WithCustomerManagedKey { - /** - * Executes the create request. - * - * @return the created resource. - */ - SentinelOnboardingState create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - SentinelOnboardingState create(Context context); - } - /** The stage of the SentinelOnboardingState definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the SentinelOnboardingState definition allowing to specify customerManagedKey. */ - interface WithCustomerManagedKey { - /** - * Specifies the customerManagedKey property: Flag that indicates the status of the CMK setting. - * - * @param customerManagedKey Flag that indicates the status of the CMK setting. - * @return the next definition stage. - */ - WithCreate withCustomerManagedKey(Boolean customerManagedKey); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - SentinelOnboardingState refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - SentinelOnboardingState refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java deleted file mode 100644 index abcc5d92aa34..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java +++ /dev/null @@ -1,145 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of SentinelOnboardingStates. */ -public interface SentinelOnboardingStates { - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 sentinel onboarding state. - */ - SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 sentinel onboarding state along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - - /** - * Delete Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all Sentinel onboarding states. - */ - SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); - - /** - * Gets all Sentinel onboarding states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all Sentinel onboarding states along with {@link Response}. - */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Get Sentinel onboarding state. - * - * @param id the resource ID. - * @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 sentinel onboarding state along with {@link Response}. - */ - SentinelOnboardingState getById(String id); - - /** - * Get Sentinel onboarding state. - * - * @param id the resource ID. - * @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 sentinel onboarding state along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Sentinel onboarding state. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete Sentinel onboarding state. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new SentinelOnboardingState resource. - * - * @param name resource name. - * @return the first stage of the new SentinelOnboardingState definition. - */ - SentinelOnboardingState.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStatesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStatesList.java deleted file mode 100644 index 0699c91c46b2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStatesList.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStatesListInner; -import java.util.List; - -/** An immutable client-side representation of SentinelOnboardingStatesList. */ -public interface SentinelOnboardingStatesList { - /** - * Gets the value property: Array of Sentinel onboarding states. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStatesListInner object. - * - * @return the inner object. - */ - SentinelOnboardingStatesListInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java deleted file mode 100644 index 6ec2ac268c71..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The kind of the setting. */ -public final class SettingKind extends ExpandableStringEnum { - /** Static value Anomalies for SettingKind. */ - public static final SettingKind ANOMALIES = fromString("Anomalies"); - - /** Static value EyesOn for SettingKind. */ - public static final SettingKind EYES_ON = fromString("EyesOn"); - - /** Static value EntityAnalytics for SettingKind. */ - public static final SettingKind ENTITY_ANALYTICS = fromString("EntityAnalytics"); - - /** Static value Ueba for SettingKind. */ - public static final SettingKind UEBA = fromString("Ueba"); - - /** - * Creates or finds a SettingKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding SettingKind. - */ - @JsonCreator - public static SettingKind fromString(String name) { - return fromString(name, SettingKind.class); - } - - /** - * Gets known SettingKind values. - * - * @return known SettingKind values. - */ - public static Collection values() { - return values(SettingKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingList.java deleted file mode 100644 index 84b5c972e9eb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingList.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.SettingListInner; -import java.util.List; - -/** An immutable client-side representation of SettingList. */ -public interface SettingList { - /** - * Gets the value property: Array of settings. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner object. - * - * @return the inner object. - */ - SettingListInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java deleted file mode 100644 index 94296a654ffb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The kind of the setting. */ -public final class SettingType extends ExpandableStringEnum { - /** Static value CopyableLabel for SettingType. */ - public static final SettingType COPYABLE_LABEL = fromString("CopyableLabel"); - - /** Static value InstructionStepsGroup for SettingType. */ - public static final SettingType INSTRUCTION_STEPS_GROUP = fromString("InstructionStepsGroup"); - - /** Static value InfoMessage for SettingType. */ - public static final SettingType INFO_MESSAGE = fromString("InfoMessage"); - - /** - * Creates or finds a SettingType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SettingType. - */ - @JsonCreator - public static SettingType fromString(String name) { - return fromString(name, SettingType.class); - } - - /** - * Gets known SettingType values. - * - * @return known SettingType values. - */ - public static Collection values() { - return values(SettingType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Settings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Settings.java deleted file mode 100644 index 9533bec7514d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Settings.java +++ /dev/null @@ -1,53 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; - -/** An immutable client-side representation of Settings. */ -public interface Settings { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner object. - * - * @return the inner object. - */ - SettingsInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java deleted file mode 100644 index f9cb8e47afa6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The anomaly SecurityMLAnalyticsSettings status. */ -public final class SettingsStatus extends ExpandableStringEnum { - /** Static value Production for SettingsStatus. */ - public static final SettingsStatus PRODUCTION = fromString("Production"); - - /** Static value Flighting for SettingsStatus. */ - public static final SettingsStatus FLIGHTING = fromString("Flighting"); - - /** - * Creates or finds a SettingsStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SettingsStatus. - */ - @JsonCreator - public static SettingsStatus fromString(String name) { - return fromString(name, SettingsStatus.class); - } - - /** - * Gets known SettingsStatus values. - * - * @return known SettingsStatus values. - */ - public static Collection values() { - return values(SettingsStatus.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java deleted file mode 100644 index 6c5a64405d59..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java +++ /dev/null @@ -1,286 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import java.util.List; - -/** An immutable client-side representation of SourceControl. */ -public interface SourceControl { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the idPropertiesId property: The id (a Guid) of the source control. - * - * @return the idPropertiesId value. - */ - String idPropertiesId(); - - /** - * Gets the version property: The version number associated with the source control. - * - * @return the version value. - */ - Version version(); - - /** - * Gets the displayName property: The display name of the source control. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the description property: A description of the source control. - * - * @return the description value. - */ - String description(); - - /** - * Gets the repoType property: The repository type of the source control. - * - * @return the repoType value. - */ - RepoType repoType(); - - /** - * Gets the contentTypes property: Array of source control content types. - * - * @return the contentTypes value. - */ - List contentTypes(); - - /** - * Gets the repository property: Repository metadata. - * - * @return the repository value. - */ - Repository repository(); - - /** - * Gets the repositoryResourceInfo property: Information regarding the resources created in user's repository. - * - * @return the repositoryResourceInfo value. - */ - RepositoryResourceInfo repositoryResourceInfo(); - - /** - * Gets the lastDeploymentInfo property: Information regarding the latest deployment for the source control. - * - * @return the lastDeploymentInfo value. - */ - DeploymentInfo lastDeploymentInfo(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner object. - * - * @return the inner object. - */ - SourceControlInner innerModel(); - - /** The entirety of the SourceControl definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The SourceControl definition stages. */ - interface DefinitionStages { - /** The first stage of the SourceControl definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the SourceControl definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the SourceControl definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithEtag, - DefinitionStages.WithIdPropertiesId, - DefinitionStages.WithVersion, - DefinitionStages.WithDisplayName, - DefinitionStages.WithDescription, - DefinitionStages.WithRepoType, - DefinitionStages.WithContentTypes, - DefinitionStages.WithRepository, - DefinitionStages.WithRepositoryResourceInfo, - DefinitionStages.WithLastDeploymentInfo { - /** - * Executes the create request. - * - * @return the created resource. - */ - SourceControl create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - SourceControl create(Context context); - } - /** The stage of the SourceControl definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the SourceControl definition allowing to specify idPropertiesId. */ - interface WithIdPropertiesId { - /** - * Specifies the idPropertiesId property: The id (a Guid) of the source control. - * - * @param idPropertiesId The id (a Guid) of the source control. - * @return the next definition stage. - */ - WithCreate withIdPropertiesId(String idPropertiesId); - } - /** The stage of the SourceControl definition allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: The version number associated with the source control. - * - * @param version The version number associated with the source control. - * @return the next definition stage. - */ - WithCreate withVersion(Version version); - } - /** The stage of the SourceControl definition allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The display name of the source control. - * - * @param displayName The display name of the source control. - * @return the next definition stage. - */ - WithCreate withDisplayName(String displayName); - } - /** The stage of the SourceControl definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: A description of the source control. - * - * @param description A description of the source control. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the SourceControl definition allowing to specify repoType. */ - interface WithRepoType { - /** - * Specifies the repoType property: The repository type of the source control. - * - * @param repoType The repository type of the source control. - * @return the next definition stage. - */ - WithCreate withRepoType(RepoType repoType); - } - /** The stage of the SourceControl definition allowing to specify contentTypes. */ - interface WithContentTypes { - /** - * Specifies the contentTypes property: Array of source control content types.. - * - * @param contentTypes Array of source control content types. - * @return the next definition stage. - */ - WithCreate withContentTypes(List contentTypes); - } - /** The stage of the SourceControl definition allowing to specify repository. */ - interface WithRepository { - /** - * Specifies the repository property: Repository metadata.. - * - * @param repository Repository metadata. - * @return the next definition stage. - */ - WithCreate withRepository(Repository repository); - } - /** The stage of the SourceControl definition allowing to specify repositoryResourceInfo. */ - interface WithRepositoryResourceInfo { - /** - * Specifies the repositoryResourceInfo property: Information regarding the resources created in user's - * repository.. - * - * @param repositoryResourceInfo Information regarding the resources created in user's repository. - * @return the next definition stage. - */ - WithCreate withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo); - } - /** The stage of the SourceControl definition allowing to specify lastDeploymentInfo. */ - interface WithLastDeploymentInfo { - /** - * Specifies the lastDeploymentInfo property: Information regarding the latest deployment for the source - * control.. - * - * @param lastDeploymentInfo Information regarding the latest deployment for the source control. - * @return the next definition stage. - */ - WithCreate withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - SourceControl refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - SourceControl refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java deleted file mode 100644 index 8fa041261e9a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the source controls. */ -@Fluent -public final class SourceControlList { - /* - * URL to fetch the next set of source controls. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of source controls. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of source controls. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of source controls. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of source controls. - * - * @param value the value value to set. - * @return the SourceControlList object itself. - */ - public SourceControlList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SourceControlList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SourceControlList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java deleted file mode 100644 index 291568ce3448..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of SourceControls. */ -public interface SourceControls { - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @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 of repositories metadata as paginated response with {@link PagedIterable}. - */ - PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType); - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @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 of repositories metadata as paginated response with {@link PagedIterable}. - */ - PagedIterable listRepositories( - String resourceGroupName, String workspaceName, RepoType repoType, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java deleted file mode 100644 index d7301e3d70cc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java +++ /dev/null @@ -1,145 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of SourceControlsOperations. */ -public interface SourceControlsOperations { - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all source controls, without source control items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all source controls, without source control items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @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 source control byt its identifier. - */ - SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId); - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @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 source control byt its identifier along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String sourceControlId); - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); - - /** - * Gets a source control byt its identifier. - * - * @param id the resource ID. - * @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 source control byt its identifier along with {@link Response}. - */ - SourceControl getById(String id); - - /** - * Gets a source control byt its identifier. - * - * @param id the resource ID. - * @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 source control byt its identifier along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a source control. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete a source control. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new SourceControl resource. - * - * @param name resource name. - * @return the first stage of the new SourceControl definition. - */ - SourceControl.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java deleted file mode 100644 index 81b1a237ddf0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** Source type of the content. */ -public final class SourceKind extends ExpandableStringEnum { - /** Static value LocalWorkspace for SourceKind. */ - public static final SourceKind LOCAL_WORKSPACE = fromString("LocalWorkspace"); - - /** Static value Community for SourceKind. */ - public static final SourceKind COMMUNITY = fromString("Community"); - - /** Static value Solution for SourceKind. */ - public static final SourceKind SOLUTION = fromString("Solution"); - - /** Static value SourceRepository for SourceKind. */ - public static final SourceKind SOURCE_REPOSITORY = fromString("SourceRepository"); - - /** - * Creates or finds a SourceKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceKind. - */ - @JsonCreator - public static SourceKind fromString(String name) { - return fromString(name, SourceKind.class); - } - - /** - * Gets known SourceKind values. - * - * @return known SourceKind values. - */ - public static Collection values() { - return values(SourceKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java deleted file mode 100644 index b1e052ce2251..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The sourceType of the watchlist. */ -public final class SourceType extends ExpandableStringEnum { - /** Static value Local file for SourceType. */ - public static final SourceType LOCAL_FILE = fromString("Local file"); - - /** Static value Remote storage for SourceType. */ - public static final SourceType REMOTE_STORAGE = fromString("Remote storage"); - - /** - * Creates or finds a SourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceType. - */ - @JsonCreator - public static SourceType fromString(String name) { - return fromString(name, SourceType.class); - } - - /** - * Gets known SourceType values. - * - * @return known SourceType values. - */ - public static Collection values() { - return values(SourceType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java deleted file mode 100644 index e1aa218951ef..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java +++ /dev/null @@ -1,160 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SubmissionMailEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.Map; -import java.util.UUID; - -/** Represents a submission mail entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("SubmissionMail") -@Fluent -public final class SubmissionMailEntity extends EntityInner { - /* - * Submission mail entity properties - */ - @JsonProperty(value = "properties") - private SubmissionMailEntityProperties innerProperties; - - /** - * Get the innerProperties property: Submission mail entity properties. - * - * @return the innerProperties value. - */ - private SubmissionMailEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the networkMessageId property: The network message id of email to which submission belongs. - * - * @return the networkMessageId value. - */ - public UUID networkMessageId() { - return this.innerProperties() == null ? null : this.innerProperties().networkMessageId(); - } - - /** - * Get the submissionId property: The submission id. - * - * @return the submissionId value. - */ - public UUID submissionId() { - return this.innerProperties() == null ? null : this.innerProperties().submissionId(); - } - - /** - * Get the submitter property: The submitter. - * - * @return the submitter value. - */ - public String submitter() { - return this.innerProperties() == null ? null : this.innerProperties().submitter(); - } - - /** - * Get the submissionDate property: The submission date. - * - * @return the submissionDate value. - */ - public OffsetDateTime submissionDate() { - return this.innerProperties() == null ? null : this.innerProperties().submissionDate(); - } - - /** - * Get the timestamp property: The Time stamp when the message is received (Mail). - * - * @return the timestamp value. - */ - public OffsetDateTime timestamp() { - return this.innerProperties() == null ? null : this.innerProperties().timestamp(); - } - - /** - * Get the recipient property: The recipient of the mail. - * - * @return the recipient value. - */ - public String recipient() { - return this.innerProperties() == null ? null : this.innerProperties().recipient(); - } - - /** - * Get the sender property: The sender of the mail. - * - * @return the sender value. - */ - public String sender() { - return this.innerProperties() == null ? null : this.innerProperties().sender(); - } - - /** - * Get the senderIp property: The sender's IP. - * - * @return the senderIp value. - */ - public String senderIp() { - return this.innerProperties() == null ? null : this.innerProperties().senderIp(); - } - - /** - * Get the subject property: The subject of submission mail. - * - * @return the subject value. - */ - public String subject() { - return this.innerProperties() == null ? null : this.innerProperties().subject(); - } - - /** - * Get the reportType property: The submission type for the given instance. This maps to Junk, Phish, Malware or - * NotJunk. - * - * @return the reportType value. - */ - public String reportType() { - return this.innerProperties() == null ? null : this.innerProperties().reportType(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java deleted file mode 100644 index e911816eb754..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** Type of support for content item. */ -public final class SupportTier extends ExpandableStringEnum { - /** Static value Microsoft for SupportTier. */ - public static final SupportTier MICROSOFT = fromString("Microsoft"); - - /** Static value Partner for SupportTier. */ - public static final SupportTier PARTNER = fromString("Partner"); - - /** Static value Community for SupportTier. */ - public static final SupportTier COMMUNITY = fromString("Community"); - - /** - * Creates or finds a SupportTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding SupportTier. - */ - @JsonCreator - public static SupportTier fromString(String name) { - return fromString(name, SupportTier.class); - } - - /** - * Gets known SupportTier values. - * - * @return known SupportTier values. - */ - public static Collection values() { - return values(SupportTier.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java deleted file mode 100644 index 897fc3f44ce7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.TICheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Threat Intelligence Platforms data connector check requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligence") -@Fluent -public final class TICheckRequirements extends DataConnectorsCheckRequirements { - /* - * Threat Intelligence Platforms data connector check required properties - */ - @JsonProperty(value = "properties") - private TICheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence Platforms data connector check required properties. - * - * @return the innerProperties value. - */ - private TICheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java deleted file mode 100644 index 4d49f30e45e9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java +++ /dev/null @@ -1,123 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TIDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Represents threat intelligence data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligence") -@Fluent -public final class TIDataConnector extends DataConnectorInner { - /* - * TI (Threat Intelligence) data connector properties. - */ - @JsonProperty(value = "properties") - private TIDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: TI (Threat Intelligence) data connector properties. - * - * @return the innerProperties value. - */ - private TIDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public TIDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the tipLookbackPeriod property: The lookback period for the feed to be imported. - * - * @return the tipLookbackPeriod value. - */ - public OffsetDateTime tipLookbackPeriod() { - return this.innerProperties() == null ? null : this.innerProperties().tipLookbackPeriod(); - } - - /** - * Set the tipLookbackPeriod property: The lookback period for the feed to be imported. - * - * @param tipLookbackPeriod the tipLookbackPeriod value to set. - * @return the TIDataConnector object itself. - */ - public TIDataConnector withTipLookbackPeriod(OffsetDateTime tipLookbackPeriod) { - if (this.innerProperties() == null) { - this.innerProperties = new TIDataConnectorProperties(); - } - this.innerProperties().withTipLookbackPeriod(tipLookbackPeriod); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public TIDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the TIDataConnector object itself. - */ - public TIDataConnector withDataTypes(TIDataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new TIDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the TIDataConnector object itself. - */ - public TIDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new TIDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java deleted file mode 100644 index 6615ba9b2f74..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for TI (Threat Intelligence) data connector. */ -@Fluent -public final class TIDataConnectorDataTypes { - /* - * Data type for indicators connection. - */ - @JsonProperty(value = "indicators", required = true) - private TIDataConnectorDataTypesIndicators indicators; - - /** - * Get the indicators property: Data type for indicators connection. - * - * @return the indicators value. - */ - public TIDataConnectorDataTypesIndicators indicators() { - return this.indicators; - } - - /** - * Set the indicators property: Data type for indicators connection. - * - * @param indicators the indicators value to set. - * @return the TIDataConnectorDataTypes object itself. - */ - public TIDataConnectorDataTypes withIndicators(TIDataConnectorDataTypesIndicators indicators) { - this.indicators = indicators; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (indicators() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property indicators in model TIDataConnectorDataTypes")); - } else { - indicators().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TIDataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java deleted file mode 100644 index a51ae50a528a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Data type for indicators connection. */ -@Fluent -public final class TIDataConnectorDataTypesIndicators extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public TIDataConnectorDataTypesIndicators withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamInformation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamInformation.java deleted file mode 100644 index ea1eb3549b75..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamInformation.java +++ /dev/null @@ -1,53 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of TeamInformation. */ -public interface TeamInformation { - /** - * Gets the teamId property: Team ID. - * - * @return the teamId value. - */ - String teamId(); - - /** - * Gets the primaryChannelUrl property: The primary channel URL of the team. - * - * @return the primaryChannelUrl value. - */ - String primaryChannelUrl(); - - /** - * Gets the teamCreationTimeUtc property: The time the team was created. - * - * @return the teamCreationTimeUtc value. - */ - OffsetDateTime teamCreationTimeUtc(); - - /** - * Gets the name property: The name of the team. - * - * @return the name value. - */ - String name(); - - /** - * Gets the description property: The description of the team. - * - * @return the description value. - */ - String description(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner object. - * - * @return the inner object. - */ - TeamInformationInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java deleted file mode 100644 index 40d641ab8453..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Describes team properties. */ -@Fluent -public final class TeamProperties { - /* - * The name of the team - */ - @JsonProperty(value = "teamName", required = true) - private String teamName; - - /* - * The description of the team - */ - @JsonProperty(value = "teamDescription") - private String teamDescription; - - /* - * List of member IDs to add to the team - */ - @JsonProperty(value = "memberIds") - private List memberIds; - - /* - * List of group IDs to add their members to the team - */ - @JsonProperty(value = "groupIds") - private List groupIds; - - /** - * Get the teamName property: The name of the team. - * - * @return the teamName value. - */ - public String teamName() { - return this.teamName; - } - - /** - * Set the teamName property: The name of the team. - * - * @param teamName the teamName value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - /** - * Get the teamDescription property: The description of the team. - * - * @return the teamDescription value. - */ - public String teamDescription() { - return this.teamDescription; - } - - /** - * Set the teamDescription property: The description of the team. - * - * @param teamDescription the teamDescription value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamDescription(String teamDescription) { - this.teamDescription = teamDescription; - return this; - } - - /** - * Get the memberIds property: List of member IDs to add to the team. - * - * @return the memberIds value. - */ - public List memberIds() { - return this.memberIds; - } - - /** - * Set the memberIds property: List of member IDs to add to the team. - * - * @param memberIds the memberIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withMemberIds(List memberIds) { - this.memberIds = memberIds; - return this; - } - - /** - * Get the groupIds property: List of group IDs to add their members to the team. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Set the groupIds property: List of group IDs to add their members to the team. - * - * @param groupIds the groupIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withGroupIds(List groupIds) { - this.groupIds = groupIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (teamName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property teamName in model TeamProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TeamProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java deleted file mode 100644 index f04cc179e840..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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; - -/** The alert rule template status. */ -public final class TemplateStatus extends ExpandableStringEnum { - /** Static value Installed for TemplateStatus. */ - public static final TemplateStatus INSTALLED = fromString("Installed"); - - /** Static value Available for TemplateStatus. */ - public static final TemplateStatus AVAILABLE = fromString("Available"); - - /** Static value NotAvailable for TemplateStatus. */ - public static final TemplateStatus NOT_AVAILABLE = fromString("NotAvailable"); - - /** - * Creates or finds a TemplateStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding TemplateStatus. - */ - @JsonCreator - public static TemplateStatus fromString(String name) { - return fromString(name, TemplateStatus.class); - } - - /** - * Gets known TemplateStatus values. - * - * @return known TemplateStatus values. - */ - public static Collection values() { - return values(TemplateStatus.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java deleted file mode 100644 index 9acbec19c77f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java +++ /dev/null @@ -1,110 +0,0 @@ -// 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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** ThreatIntelligence property bag. */ -@Immutable -public final class ThreatIntelligence { - /* - * Confidence (must be between 0 and 1) - */ - @JsonProperty(value = "confidence", access = JsonProperty.Access.WRITE_ONLY) - private Double confidence; - - /* - * Name of the provider from whom this Threat Intelligence information was received - */ - @JsonProperty(value = "providerName", access = JsonProperty.Access.WRITE_ONLY) - private String providerName; - - /* - * Report link - */ - @JsonProperty(value = "reportLink", access = JsonProperty.Access.WRITE_ONLY) - private String reportLink; - - /* - * Threat description (free text) - */ - @JsonProperty(value = "threatDescription", access = JsonProperty.Access.WRITE_ONLY) - private String threatDescription; - - /* - * Threat name (e.g. "Jedobot malware") - */ - @JsonProperty(value = "threatName", access = JsonProperty.Access.WRITE_ONLY) - private String threatName; - - /* - * Threat type (e.g. "Botnet") - */ - @JsonProperty(value = "threatType", access = JsonProperty.Access.WRITE_ONLY) - private String threatType; - - /** - * Get the confidence property: Confidence (must be between 0 and 1). - * - * @return the confidence value. - */ - public Double confidence() { - return this.confidence; - } - - /** - * Get the providerName property: Name of the provider from whom this Threat Intelligence information was received. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Get the reportLink property: Report link. - * - * @return the reportLink value. - */ - public String reportLink() { - return this.reportLink; - } - - /** - * Get the threatDescription property: Threat description (free text). - * - * @return the threatDescription value. - */ - public String threatDescription() { - return this.threatDescription; - } - - /** - * Get the threatName property: Threat name (e.g. "Jedobot malware"). - * - * @return the threatName value. - */ - public String threatName() { - return this.threatName; - } - - /** - * Get the threatType property: Threat type (e.g. "Botnet"). - * - * @return the threatType value. - */ - public String threatType() { - return this.threatType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java deleted file mode 100644 index 924536281280..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java +++ /dev/null @@ -1,155 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents Threat Intelligence alert rule. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligence") -@Fluent -public final class ThreatIntelligenceAlertRule extends AlertRuleInner { - /* - * Threat Intelligence alert rule properties - */ - @JsonProperty(value = "properties") - private ThreatIntelligenceAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence alert rule properties. - * - * @return the innerProperties value. - */ - private ThreatIntelligenceAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRule withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.innerProperties() == null ? null : this.innerProperties().alertRuleTemplateName(); - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the ThreatIntelligenceAlertRule object itself. - */ - public ThreatIntelligenceAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleProperties(); - } - this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ThreatIntelligenceAlertRule object itself. - */ - public ThreatIntelligenceAlertRule withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java deleted file mode 100644 index 734f6a42748a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java +++ /dev/null @@ -1,252 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents Threat Intelligence alert rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligence") -@Fluent -public final class ThreatIntelligenceAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * Threat Intelligence alert rule template properties - */ - @JsonProperty(value = "properties") - private ThreatIntelligenceAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence alert rule template properties. - * - * @return the innerProperties value. - */ - private ThreatIntelligenceAlertRuleTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - - /** - * Get the techniques property: The techniques of the alert rule. - * - * @return the techniques value. - */ - public List techniques() { - return this.innerProperties() == null ? null : this.innerProperties().techniques(); - } - - /** - * Set the techniques property: The techniques of the alert rule. - * - * @param techniques the techniques value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withTechniques(List techniques) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withTechniques(techniques); - return this; - } - - /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); - } - - /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. - * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the alert rule template. - * - * @param description the description value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java deleted file mode 100644 index 847257381b59..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java +++ /dev/null @@ -1,47 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Array of tags to be appended to the threat intelligence indicator. */ -@Fluent -public final class ThreatIntelligenceAppendTags { - /* - * List of tags to be appended. - */ - @JsonProperty(value = "threatIntelligenceTags") - private List threatIntelligenceTags; - - /** - * Get the threatIntelligenceTags property: List of tags to be appended. - * - * @return the threatIntelligenceTags value. - */ - public List threatIntelligenceTags() { - return this.threatIntelligenceTags; - } - - /** - * Set the threatIntelligenceTags property: List of tags to be appended. - * - * @param threatIntelligenceTags the threatIntelligenceTags value to set. - * @return the ThreatIntelligenceAppendTags object itself. - */ - public ThreatIntelligenceAppendTags withThreatIntelligenceTags(List threatIntelligenceTags) { - this.threatIntelligenceTags = threatIntelligenceTags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java deleted file mode 100644 index 689e8a88e564..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java +++ /dev/null @@ -1,153 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Describes external reference. */ -@Fluent -public final class ThreatIntelligenceExternalReference { - /* - * External reference description - */ - @JsonProperty(value = "description") - private String description; - - /* - * External reference ID - */ - @JsonProperty(value = "externalId") - private String externalId; - - /* - * External reference source name - */ - @JsonProperty(value = "sourceName") - private String sourceName; - - /* - * External reference URL - */ - @JsonProperty(value = "url") - private String url; - - /* - * External reference hashes - */ - @JsonProperty(value = "hashes") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map hashes; - - /** - * Get the description property: External reference description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: External reference description. - * - * @param description the description value to set. - * @return the ThreatIntelligenceExternalReference object itself. - */ - public ThreatIntelligenceExternalReference withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the externalId property: External reference ID. - * - * @return the externalId value. - */ - public String externalId() { - return this.externalId; - } - - /** - * Set the externalId property: External reference ID. - * - * @param externalId the externalId value to set. - * @return the ThreatIntelligenceExternalReference object itself. - */ - public ThreatIntelligenceExternalReference withExternalId(String externalId) { - this.externalId = externalId; - return this; - } - - /** - * Get the sourceName property: External reference source name. - * - * @return the sourceName value. - */ - public String sourceName() { - return this.sourceName; - } - - /** - * Set the sourceName property: External reference source name. - * - * @param sourceName the sourceName value to set. - * @return the ThreatIntelligenceExternalReference object itself. - */ - public ThreatIntelligenceExternalReference withSourceName(String sourceName) { - this.sourceName = sourceName; - return this; - } - - /** - * Get the url property: External reference URL. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: External reference URL. - * - * @param url the url value to set. - * @return the ThreatIntelligenceExternalReference object itself. - */ - public ThreatIntelligenceExternalReference withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the hashes property: External reference hashes. - * - * @return the hashes value. - */ - public Map hashes() { - return this.hashes; - } - - /** - * Set the hashes property: External reference hashes. - * - * @param hashes the hashes value to set. - * @return the ThreatIntelligenceExternalReference object itself. - */ - public ThreatIntelligenceExternalReference withHashes(Map hashes) { - this.hashes = hashes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java deleted file mode 100644 index 86be0cc60915..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java +++ /dev/null @@ -1,362 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Filtering criteria for querying threat intelligence indicators. */ -@Fluent -public final class ThreatIntelligenceFilteringCriteria { - /* - * Page size - */ - @JsonProperty(value = "pageSize") - private Integer pageSize; - - /* - * Minimum confidence. - */ - @JsonProperty(value = "minConfidence") - private Integer minConfidence; - - /* - * Maximum confidence. - */ - @JsonProperty(value = "maxConfidence") - private Integer maxConfidence; - - /* - * Start time for ValidUntil filter. - */ - @JsonProperty(value = "minValidUntil") - private String minValidUntil; - - /* - * End time for ValidUntil filter. - */ - @JsonProperty(value = "maxValidUntil") - private String maxValidUntil; - - /* - * Parameter to include/exclude disabled indicators. - */ - @JsonProperty(value = "includeDisabled") - private Boolean includeDisabled; - - /* - * Columns to sort by and sorting order - */ - @JsonProperty(value = "sortBy") - private List sortBy; - - /* - * Sources of threat intelligence indicators - */ - @JsonProperty(value = "sources") - private List sources; - - /* - * Pattern types - */ - @JsonProperty(value = "patternTypes") - private List patternTypes; - - /* - * Threat types of threat intelligence indicators - */ - @JsonProperty(value = "threatTypes") - private List threatTypes; - - /* - * Ids of threat intelligence indicators - */ - @JsonProperty(value = "ids") - private List ids; - - /* - * Keywords for searching threat intelligence indicators - */ - @JsonProperty(value = "keywords") - private List keywords; - - /* - * Skip token. - */ - @JsonProperty(value = "skipToken") - private String skipToken; - - /** - * Get the pageSize property: Page size. - * - * @return the pageSize value. - */ - public Integer pageSize() { - return this.pageSize; - } - - /** - * Set the pageSize property: Page size. - * - * @param pageSize the pageSize value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withPageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Get the minConfidence property: Minimum confidence. - * - * @return the minConfidence value. - */ - public Integer minConfidence() { - return this.minConfidence; - } - - /** - * Set the minConfidence property: Minimum confidence. - * - * @param minConfidence the minConfidence value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withMinConfidence(Integer minConfidence) { - this.minConfidence = minConfidence; - return this; - } - - /** - * Get the maxConfidence property: Maximum confidence. - * - * @return the maxConfidence value. - */ - public Integer maxConfidence() { - return this.maxConfidence; - } - - /** - * Set the maxConfidence property: Maximum confidence. - * - * @param maxConfidence the maxConfidence value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withMaxConfidence(Integer maxConfidence) { - this.maxConfidence = maxConfidence; - return this; - } - - /** - * Get the minValidUntil property: Start time for ValidUntil filter. - * - * @return the minValidUntil value. - */ - public String minValidUntil() { - return this.minValidUntil; - } - - /** - * Set the minValidUntil property: Start time for ValidUntil filter. - * - * @param minValidUntil the minValidUntil value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withMinValidUntil(String minValidUntil) { - this.minValidUntil = minValidUntil; - return this; - } - - /** - * Get the maxValidUntil property: End time for ValidUntil filter. - * - * @return the maxValidUntil value. - */ - public String maxValidUntil() { - return this.maxValidUntil; - } - - /** - * Set the maxValidUntil property: End time for ValidUntil filter. - * - * @param maxValidUntil the maxValidUntil value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withMaxValidUntil(String maxValidUntil) { - this.maxValidUntil = maxValidUntil; - return this; - } - - /** - * Get the includeDisabled property: Parameter to include/exclude disabled indicators. - * - * @return the includeDisabled value. - */ - public Boolean includeDisabled() { - return this.includeDisabled; - } - - /** - * Set the includeDisabled property: Parameter to include/exclude disabled indicators. - * - * @param includeDisabled the includeDisabled value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withIncludeDisabled(Boolean includeDisabled) { - this.includeDisabled = includeDisabled; - return this; - } - - /** - * Get the sortBy property: Columns to sort by and sorting order. - * - * @return the sortBy value. - */ - public List sortBy() { - return this.sortBy; - } - - /** - * Set the sortBy property: Columns to sort by and sorting order. - * - * @param sortBy the sortBy value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withSortBy(List sortBy) { - this.sortBy = sortBy; - return this; - } - - /** - * Get the sources property: Sources of threat intelligence indicators. - * - * @return the sources value. - */ - public List sources() { - return this.sources; - } - - /** - * Set the sources property: Sources of threat intelligence indicators. - * - * @param sources the sources value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withSources(List sources) { - this.sources = sources; - return this; - } - - /** - * Get the patternTypes property: Pattern types. - * - * @return the patternTypes value. - */ - public List patternTypes() { - return this.patternTypes; - } - - /** - * Set the patternTypes property: Pattern types. - * - * @param patternTypes the patternTypes value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withPatternTypes(List patternTypes) { - this.patternTypes = patternTypes; - return this; - } - - /** - * Get the threatTypes property: Threat types of threat intelligence indicators. - * - * @return the threatTypes value. - */ - public List threatTypes() { - return this.threatTypes; - } - - /** - * Set the threatTypes property: Threat types of threat intelligence indicators. - * - * @param threatTypes the threatTypes value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withThreatTypes(List threatTypes) { - this.threatTypes = threatTypes; - return this; - } - - /** - * Get the ids property: Ids of threat intelligence indicators. - * - * @return the ids value. - */ - public List ids() { - return this.ids; - } - - /** - * Set the ids property: Ids of threat intelligence indicators. - * - * @param ids the ids value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withIds(List ids) { - this.ids = ids; - return this; - } - - /** - * Get the keywords property: Keywords for searching threat intelligence indicators. - * - * @return the keywords value. - */ - public List keywords() { - return this.keywords; - } - - /** - * Set the keywords property: Keywords for searching threat intelligence indicators. - * - * @param keywords the keywords value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withKeywords(List keywords) { - this.keywords = keywords; - return this; - } - - /** - * Get the skipToken property: Skip token. - * - * @return the skipToken value. - */ - public String skipToken() { - return this.skipToken; - } - - /** - * Set the skipToken property: Skip token. - * - * @param skipToken the skipToken value to set. - * @return the ThreatIntelligenceFilteringCriteria object itself. - */ - public ThreatIntelligenceFilteringCriteria withSkipToken(String skipToken) { - this.skipToken = skipToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sortBy() != null) { - sortBy().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java deleted file mode 100644 index bb55e6966794..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java +++ /dev/null @@ -1,99 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes threat granular marking model entity. */ -@Fluent -public final class ThreatIntelligenceGranularMarkingModel { - /* - * Language granular marking model - */ - @JsonProperty(value = "language") - private String language; - - /* - * marking reference granular marking model - */ - @JsonProperty(value = "markingRef") - private Integer markingRef; - - /* - * granular marking model selectors - */ - @JsonProperty(value = "selectors") - private List selectors; - - /** - * Get the language property: Language granular marking model. - * - * @return the language value. - */ - public String language() { - return this.language; - } - - /** - * Set the language property: Language granular marking model. - * - * @param language the language value to set. - * @return the ThreatIntelligenceGranularMarkingModel object itself. - */ - public ThreatIntelligenceGranularMarkingModel withLanguage(String language) { - this.language = language; - return this; - } - - /** - * Get the markingRef property: marking reference granular marking model. - * - * @return the markingRef value. - */ - public Integer markingRef() { - return this.markingRef; - } - - /** - * Set the markingRef property: marking reference granular marking model. - * - * @param markingRef the markingRef value to set. - * @return the ThreatIntelligenceGranularMarkingModel object itself. - */ - public ThreatIntelligenceGranularMarkingModel withMarkingRef(Integer markingRef) { - this.markingRef = markingRef; - return this; - } - - /** - * Get the selectors property: granular marking model selectors. - * - * @return the selectors value. - */ - public List selectors() { - return this.selectors; - } - - /** - * Set the selectors property: granular marking model selectors. - * - * @param selectors the selectors value to set. - * @return the ThreatIntelligenceGranularMarkingModel object itself. - */ - public ThreatIntelligenceGranularMarkingModel withSelectors(List selectors) { - this.selectors = selectors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java deleted file mode 100644 index a9e60f800660..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ThreatIntelligenceIndicatorMetrics. */ -public interface ThreatIntelligenceIndicatorMetrics { - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - */ - ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); - - /** - * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. - */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java deleted file mode 100644 index 5ce9f114369e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java +++ /dev/null @@ -1,722 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceIndicatorProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** Threat intelligence indicator entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("indicator") -@Fluent -public final class ThreatIntelligenceIndicatorModel extends ThreatIntelligenceInformationInner { - /* - * Threat Intelligence Entity properties - */ - @JsonProperty(value = "properties") - private ThreatIntelligenceIndicatorProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence Entity properties. - * - * @return the innerProperties value. - */ - private ThreatIntelligenceIndicatorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceIndicatorModel withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the threatIntelligenceTags property: List of tags. - * - * @return the threatIntelligenceTags value. - */ - public List threatIntelligenceTags() { - return this.innerProperties() == null ? null : this.innerProperties().threatIntelligenceTags(); - } - - /** - * Set the threatIntelligenceTags property: List of tags. - * - * @param threatIntelligenceTags the threatIntelligenceTags value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withThreatIntelligenceTags(List threatIntelligenceTags) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withThreatIntelligenceTags(threatIntelligenceTags); - return this; - } - - /** - * Get the lastUpdatedTimeUtc property: Last updated time in UTC. - * - * @return the lastUpdatedTimeUtc value. - */ - public String lastUpdatedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedTimeUtc(); - } - - /** - * Set the lastUpdatedTimeUtc property: Last updated time in UTC. - * - * @param lastUpdatedTimeUtc the lastUpdatedTimeUtc value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withLastUpdatedTimeUtc(String lastUpdatedTimeUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withLastUpdatedTimeUtc(lastUpdatedTimeUtc); - return this; - } - - /** - * Get the source property: Source of a threat intelligence entity. - * - * @return the source value. - */ - public String source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: Source of a threat intelligence entity. - * - * @param source the source value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withSource(String source) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the displayName property: Display name of a threat intelligence entity. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: Display name of a threat intelligence entity. - * - * @param displayName the displayName value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the description property: Description of a threat intelligence entity. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: Description of a threat intelligence entity. - * - * @param description the description value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the indicatorTypes property: Indicator types of threat intelligence entities. - * - * @return the indicatorTypes value. - */ - public List indicatorTypes() { - return this.innerProperties() == null ? null : this.innerProperties().indicatorTypes(); - } - - /** - * Set the indicatorTypes property: Indicator types of threat intelligence entities. - * - * @param indicatorTypes the indicatorTypes value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withIndicatorTypes(List indicatorTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withIndicatorTypes(indicatorTypes); - return this; - } - - /** - * Get the pattern property: Pattern of a threat intelligence entity. - * - * @return the pattern value. - */ - public String pattern() { - return this.innerProperties() == null ? null : this.innerProperties().pattern(); - } - - /** - * Set the pattern property: Pattern of a threat intelligence entity. - * - * @param pattern the pattern value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withPattern(String pattern) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withPattern(pattern); - return this; - } - - /** - * Get the patternType property: Pattern type of a threat intelligence entity. - * - * @return the patternType value. - */ - public String patternType() { - return this.innerProperties() == null ? null : this.innerProperties().patternType(); - } - - /** - * Set the patternType property: Pattern type of a threat intelligence entity. - * - * @param patternType the patternType value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withPatternType(String patternType) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withPatternType(patternType); - return this; - } - - /** - * Get the patternVersion property: Pattern version of a threat intelligence entity. - * - * @return the patternVersion value. - */ - public String patternVersion() { - return this.innerProperties() == null ? null : this.innerProperties().patternVersion(); - } - - /** - * Set the patternVersion property: Pattern version of a threat intelligence entity. - * - * @param patternVersion the patternVersion value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withPatternVersion(String patternVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withPatternVersion(patternVersion); - return this; - } - - /** - * Get the killChainPhases property: Kill chain phases. - * - * @return the killChainPhases value. - */ - public List killChainPhases() { - return this.innerProperties() == null ? null : this.innerProperties().killChainPhases(); - } - - /** - * Set the killChainPhases property: Kill chain phases. - * - * @param killChainPhases the killChainPhases value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withKillChainPhases( - List killChainPhases) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withKillChainPhases(killChainPhases); - return this; - } - - /** - * Get the parsedPattern property: Parsed patterns. - * - * @return the parsedPattern value. - */ - public List parsedPattern() { - return this.innerProperties() == null ? null : this.innerProperties().parsedPattern(); - } - - /** - * Set the parsedPattern property: Parsed patterns. - * - * @param parsedPattern the parsedPattern value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withParsedPattern(List parsedPattern) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withParsedPattern(parsedPattern); - return this; - } - - /** - * Get the externalId property: External ID of threat intelligence entity. - * - * @return the externalId value. - */ - public String externalId() { - return this.innerProperties() == null ? null : this.innerProperties().externalId(); - } - - /** - * Set the externalId property: External ID of threat intelligence entity. - * - * @param externalId the externalId value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withExternalId(String externalId) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withExternalId(externalId); - return this; - } - - /** - * Get the createdByRef property: Created by reference of threat intelligence entity. - * - * @return the createdByRef value. - */ - public String createdByRef() { - return this.innerProperties() == null ? null : this.innerProperties().createdByRef(); - } - - /** - * Set the createdByRef property: Created by reference of threat intelligence entity. - * - * @param createdByRef the createdByRef value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withCreatedByRef(String createdByRef) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withCreatedByRef(createdByRef); - return this; - } - - /** - * Get the defanged property: Is threat intelligence entity defanged. - * - * @return the defanged value. - */ - public Boolean defanged() { - return this.innerProperties() == null ? null : this.innerProperties().defanged(); - } - - /** - * Set the defanged property: Is threat intelligence entity defanged. - * - * @param defanged the defanged value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withDefanged(Boolean defanged) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withDefanged(defanged); - return this; - } - - /** - * Get the externalLastUpdatedTimeUtc property: External last updated time in UTC. - * - * @return the externalLastUpdatedTimeUtc value. - */ - public String externalLastUpdatedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().externalLastUpdatedTimeUtc(); - } - - /** - * Set the externalLastUpdatedTimeUtc property: External last updated time in UTC. - * - * @param externalLastUpdatedTimeUtc the externalLastUpdatedTimeUtc value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withExternalLastUpdatedTimeUtc(String externalLastUpdatedTimeUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withExternalLastUpdatedTimeUtc(externalLastUpdatedTimeUtc); - return this; - } - - /** - * Get the externalReferences property: External References. - * - * @return the externalReferences value. - */ - public List externalReferences() { - return this.innerProperties() == null ? null : this.innerProperties().externalReferences(); - } - - /** - * Set the externalReferences property: External References. - * - * @param externalReferences the externalReferences value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withExternalReferences( - List externalReferences) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withExternalReferences(externalReferences); - return this; - } - - /** - * Get the granularMarkings property: Granular Markings. - * - * @return the granularMarkings value. - */ - public List granularMarkings() { - return this.innerProperties() == null ? null : this.innerProperties().granularMarkings(); - } - - /** - * Set the granularMarkings property: Granular Markings. - * - * @param granularMarkings the granularMarkings value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withGranularMarkings( - List granularMarkings) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withGranularMarkings(granularMarkings); - return this; - } - - /** - * Get the labels property: Labels of threat intelligence entity. - * - * @return the labels value. - */ - public List labels() { - return this.innerProperties() == null ? null : this.innerProperties().labels(); - } - - /** - * Set the labels property: Labels of threat intelligence entity. - * - * @param labels the labels value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withLabels(List labels) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withLabels(labels); - return this; - } - - /** - * Get the revoked property: Is threat intelligence entity revoked. - * - * @return the revoked value. - */ - public Boolean revoked() { - return this.innerProperties() == null ? null : this.innerProperties().revoked(); - } - - /** - * Set the revoked property: Is threat intelligence entity revoked. - * - * @param revoked the revoked value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withRevoked(Boolean revoked) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withRevoked(revoked); - return this; - } - - /** - * Get the confidence property: Confidence of threat intelligence entity. - * - * @return the confidence value. - */ - public Integer confidence() { - return this.innerProperties() == null ? null : this.innerProperties().confidence(); - } - - /** - * Set the confidence property: Confidence of threat intelligence entity. - * - * @param confidence the confidence value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withConfidence(Integer confidence) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withConfidence(confidence); - return this; - } - - /** - * Get the objectMarkingRefs property: Threat intelligence entity object marking references. - * - * @return the objectMarkingRefs value. - */ - public List objectMarkingRefs() { - return this.innerProperties() == null ? null : this.innerProperties().objectMarkingRefs(); - } - - /** - * Set the objectMarkingRefs property: Threat intelligence entity object marking references. - * - * @param objectMarkingRefs the objectMarkingRefs value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withObjectMarkingRefs(List objectMarkingRefs) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withObjectMarkingRefs(objectMarkingRefs); - return this; - } - - /** - * Get the language property: Language of threat intelligence entity. - * - * @return the language value. - */ - public String language() { - return this.innerProperties() == null ? null : this.innerProperties().language(); - } - - /** - * Set the language property: Language of threat intelligence entity. - * - * @param language the language value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withLanguage(String language) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withLanguage(language); - return this; - } - - /** - * Get the threatTypes property: Threat types. - * - * @return the threatTypes value. - */ - public List threatTypes() { - return this.innerProperties() == null ? null : this.innerProperties().threatTypes(); - } - - /** - * Set the threatTypes property: Threat types. - * - * @param threatTypes the threatTypes value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withThreatTypes(List threatTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withThreatTypes(threatTypes); - return this; - } - - /** - * Get the validFrom property: Valid from. - * - * @return the validFrom value. - */ - public String validFrom() { - return this.innerProperties() == null ? null : this.innerProperties().validFrom(); - } - - /** - * Set the validFrom property: Valid from. - * - * @param validFrom the validFrom value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withValidFrom(String validFrom) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withValidFrom(validFrom); - return this; - } - - /** - * Get the validUntil property: Valid until. - * - * @return the validUntil value. - */ - public String validUntil() { - return this.innerProperties() == null ? null : this.innerProperties().validUntil(); - } - - /** - * Set the validUntil property: Valid until. - * - * @param validUntil the validUntil value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withValidUntil(String validUntil) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withValidUntil(validUntil); - return this; - } - - /** - * Get the created property: Created by. - * - * @return the created value. - */ - public String created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); - } - - /** - * Set the created property: Created by. - * - * @param created the created value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withCreated(String created) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withCreated(created); - return this; - } - - /** - * Get the modified property: Modified by. - * - * @return the modified value. - */ - public String modified() { - return this.innerProperties() == null ? null : this.innerProperties().modified(); - } - - /** - * Set the modified property: Modified by. - * - * @param modified the modified value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withModified(String modified) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withModified(modified); - return this; - } - - /** - * Get the extensions property: Extensions map. - * - * @return the extensions value. - */ - public Map extensions() { - return this.innerProperties() == null ? null : this.innerProperties().extensions(); - } - - /** - * Set the extensions property: Extensions map. - * - * @param extensions the extensions value to set. - * @return the ThreatIntelligenceIndicatorModel object itself. - */ - public ThreatIntelligenceIndicatorModel withExtensions(Map extensions) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withExtensions(extensions); - return this; - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java deleted file mode 100644 index 464cb4b65fbe..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java +++ /dev/null @@ -1,245 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ThreatIntelligenceIndicators. */ -public interface ThreatIntelligenceIndicators { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and 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 threat intelligence information object. - */ - ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and 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 threat intelligence information object along with {@link Response}. - */ - Response createIndicatorWithResponse( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context); - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @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 threat intelligence information object. - */ - ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); - - /** - * View a threat intelligence indicator by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @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 threat intelligence information object along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and 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 threat intelligence information object. - */ - ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - - /** - * Update a threat Intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and 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 threat intelligence information object along with {@link Response}. - */ - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context); - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @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 the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @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 list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. - */ - PagedIterable queryIndicators( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria); - - /** - * Query threat intelligence indicators as per filtering criteria. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators. - * @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 list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. - */ - PagedIterable queryIndicators( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria, - Context context); - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @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. - */ - void appendTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); - - /** - * Append tags to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @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 the {@link Response}. - */ - Response appendTagsWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @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 threat intelligence information object. - */ - ThreatIntelligenceInformation replaceTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); - - /** - * Replace tags added to a threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. - * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @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 threat intelligence information object along with {@link Response}. - */ - Response replaceTagsWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java deleted file mode 100644 index 444a66aa1384..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java +++ /dev/null @@ -1,49 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of ThreatIntelligenceIndicatorsOperations. */ -public interface ThreatIntelligenceIndicatorsOperations { - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all threat intelligence indicators as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Get all threat intelligence indicators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all threat intelligence indicators as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformation.java deleted file mode 100644 index 542cf50924ff..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformation.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; - -/** An immutable client-side representation of ThreatIntelligenceInformation. */ -public interface ThreatIntelligenceInformation { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner - * object. - * - * @return the inner object. - */ - ThreatIntelligenceInformationInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java deleted file mode 100644 index 63195abe89bb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the threat intelligence information objects. */ -@Fluent -public final class ThreatIntelligenceInformationList { - /* - * URL to fetch the next set of information objects. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of threat intelligence information objects. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of information objects. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of threat intelligence information objects. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of threat intelligence information objects. - * - * @param value the value value to set. - * @return the ThreatIntelligenceInformationList object itself. - */ - public ThreatIntelligenceInformationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ThreatIntelligenceInformationList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceInformationList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java deleted file mode 100644 index 8a1ba6f2bd1d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes threat kill chain phase entity. */ -@Fluent -public final class ThreatIntelligenceKillChainPhase { - /* - * Kill chainName name - */ - @JsonProperty(value = "killChainName") - private String killChainName; - - /* - * Phase name - */ - @JsonProperty(value = "phaseName") - private String phaseName; - - /** - * Get the killChainName property: Kill chainName name. - * - * @return the killChainName value. - */ - public String killChainName() { - return this.killChainName; - } - - /** - * Set the killChainName property: Kill chainName name. - * - * @param killChainName the killChainName value to set. - * @return the ThreatIntelligenceKillChainPhase object itself. - */ - public ThreatIntelligenceKillChainPhase withKillChainName(String killChainName) { - this.killChainName = killChainName; - return this; - } - - /** - * Get the phaseName property: Phase name. - * - * @return the phaseName value. - */ - public String phaseName() { - return this.phaseName; - } - - /** - * Set the phaseName property: Phase name. - * - * @param phaseName the phaseName value to set. - * @return the ThreatIntelligenceKillChainPhase object itself. - */ - public ThreatIntelligenceKillChainPhase withPhaseName(String phaseName) { - this.phaseName = phaseName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java deleted file mode 100644 index 2cb0c00e17c5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java +++ /dev/null @@ -1,134 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes threat intelligence metric. */ -@Fluent -public final class ThreatIntelligenceMetric { - /* - * Last updated indicator metric - */ - @JsonProperty(value = "lastUpdatedTimeUtc") - private String lastUpdatedTimeUtc; - - /* - * Threat type metrics - */ - @JsonProperty(value = "threatTypeMetrics") - private List threatTypeMetrics; - - /* - * Pattern type metrics - */ - @JsonProperty(value = "patternTypeMetrics") - private List patternTypeMetrics; - - /* - * Source metrics - */ - @JsonProperty(value = "sourceMetrics") - private List sourceMetrics; - - /** - * Get the lastUpdatedTimeUtc property: Last updated indicator metric. - * - * @return the lastUpdatedTimeUtc value. - */ - public String lastUpdatedTimeUtc() { - return this.lastUpdatedTimeUtc; - } - - /** - * Set the lastUpdatedTimeUtc property: Last updated indicator metric. - * - * @param lastUpdatedTimeUtc the lastUpdatedTimeUtc value to set. - * @return the ThreatIntelligenceMetric object itself. - */ - public ThreatIntelligenceMetric withLastUpdatedTimeUtc(String lastUpdatedTimeUtc) { - this.lastUpdatedTimeUtc = lastUpdatedTimeUtc; - return this; - } - - /** - * Get the threatTypeMetrics property: Threat type metrics. - * - * @return the threatTypeMetrics value. - */ - public List threatTypeMetrics() { - return this.threatTypeMetrics; - } - - /** - * Set the threatTypeMetrics property: Threat type metrics. - * - * @param threatTypeMetrics the threatTypeMetrics value to set. - * @return the ThreatIntelligenceMetric object itself. - */ - public ThreatIntelligenceMetric withThreatTypeMetrics(List threatTypeMetrics) { - this.threatTypeMetrics = threatTypeMetrics; - return this; - } - - /** - * Get the patternTypeMetrics property: Pattern type metrics. - * - * @return the patternTypeMetrics value. - */ - public List patternTypeMetrics() { - return this.patternTypeMetrics; - } - - /** - * Set the patternTypeMetrics property: Pattern type metrics. - * - * @param patternTypeMetrics the patternTypeMetrics value to set. - * @return the ThreatIntelligenceMetric object itself. - */ - public ThreatIntelligenceMetric withPatternTypeMetrics(List patternTypeMetrics) { - this.patternTypeMetrics = patternTypeMetrics; - return this; - } - - /** - * Get the sourceMetrics property: Source metrics. - * - * @return the sourceMetrics value. - */ - public List sourceMetrics() { - return this.sourceMetrics; - } - - /** - * Set the sourceMetrics property: Source metrics. - * - * @param sourceMetrics the sourceMetrics value to set. - * @return the ThreatIntelligenceMetric object itself. - */ - public ThreatIntelligenceMetric withSourceMetrics(List sourceMetrics) { - this.sourceMetrics = sourceMetrics; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threatTypeMetrics() != null) { - threatTypeMetrics().forEach(e -> e.validate()); - } - if (patternTypeMetrics() != null) { - patternTypeMetrics().forEach(e -> e.validate()); - } - if (sourceMetrics() != null) { - sourceMetrics().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java deleted file mode 100644 index 62bd0e31c2fc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes threat intelligence metric entity. */ -@Fluent -public final class ThreatIntelligenceMetricEntity { - /* - * Metric name - */ - @JsonProperty(value = "metricName") - private String metricName; - - /* - * Metric value - */ - @JsonProperty(value = "metricValue") - private Integer metricValue; - - /** - * Get the metricName property: Metric name. - * - * @return the metricName value. - */ - public String metricName() { - return this.metricName; - } - - /** - * Set the metricName property: Metric name. - * - * @param metricName the metricName value to set. - * @return the ThreatIntelligenceMetricEntity object itself. - */ - public ThreatIntelligenceMetricEntity withMetricName(String metricName) { - this.metricName = metricName; - return this; - } - - /** - * Get the metricValue property: Metric value. - * - * @return the metricValue value. - */ - public Integer metricValue() { - return this.metricValue; - } - - /** - * Set the metricValue property: Metric value. - * - * @param metricValue the metricValue value to set. - * @return the ThreatIntelligenceMetricEntity object itself. - */ - public ThreatIntelligenceMetricEntity withMetricValue(Integer metricValue) { - this.metricValue = metricValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java deleted file mode 100644 index 2d20ceae39ac..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java +++ /dev/null @@ -1,49 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Threat intelligence metrics. */ -@Fluent -public final class ThreatIntelligenceMetrics { - /* - * Threat intelligence metrics. - */ - @JsonProperty(value = "properties") - private ThreatIntelligenceMetric properties; - - /** - * Get the properties property: Threat intelligence metrics. - * - * @return the properties value. - */ - public ThreatIntelligenceMetric properties() { - return this.properties; - } - - /** - * Set the properties property: Threat intelligence metrics. - * - * @param properties the properties value to set. - * @return the ThreatIntelligenceMetrics object itself. - */ - public ThreatIntelligenceMetrics withProperties(ThreatIntelligenceMetric properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricsList.java deleted file mode 100644 index 53a026fb4cb7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricsList.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceMetricsListInner; -import java.util.List; - -/** An immutable client-side representation of ThreatIntelligenceMetricsList. */ -public interface ThreatIntelligenceMetricsList { - /** - * Gets the value property: Array of threat intelligence metric fields (type/threat type/source). - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceMetricsListInner - * object. - * - * @return the inner object. - */ - ThreatIntelligenceMetricsListInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java deleted file mode 100644 index 1a80738051c9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes parsed pattern entity. */ -@Fluent -public final class ThreatIntelligenceParsedPattern { - /* - * Pattern type key - */ - @JsonProperty(value = "patternTypeKey") - private String patternTypeKey; - - /* - * Pattern type keys - */ - @JsonProperty(value = "patternTypeValues") - private List patternTypeValues; - - /** - * Get the patternTypeKey property: Pattern type key. - * - * @return the patternTypeKey value. - */ - public String patternTypeKey() { - return this.patternTypeKey; - } - - /** - * Set the patternTypeKey property: Pattern type key. - * - * @param patternTypeKey the patternTypeKey value to set. - * @return the ThreatIntelligenceParsedPattern object itself. - */ - public ThreatIntelligenceParsedPattern withPatternTypeKey(String patternTypeKey) { - this.patternTypeKey = patternTypeKey; - return this; - } - - /** - * Get the patternTypeValues property: Pattern type keys. - * - * @return the patternTypeValues value. - */ - public List patternTypeValues() { - return this.patternTypeValues; - } - - /** - * Set the patternTypeValues property: Pattern type keys. - * - * @param patternTypeValues the patternTypeValues value to set. - * @return the ThreatIntelligenceParsedPattern object itself. - */ - public ThreatIntelligenceParsedPattern withPatternTypeValues( - List patternTypeValues) { - this.patternTypeValues = patternTypeValues; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (patternTypeValues() != null) { - patternTypeValues().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java deleted file mode 100644 index ead9ca6b8833..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes threat kill chain phase entity. */ -@Fluent -public final class ThreatIntelligenceParsedPatternTypeValue { - /* - * Type of the value - */ - @JsonProperty(value = "valueType") - private String valueType; - - /* - * Value of parsed pattern - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the valueType property: Type of the value. - * - * @return the valueType value. - */ - public String valueType() { - return this.valueType; - } - - /** - * Set the valueType property: Type of the value. - * - * @param valueType the valueType value to set. - * @return the ThreatIntelligenceParsedPatternTypeValue object itself. - */ - public ThreatIntelligenceParsedPatternTypeValue withValueType(String valueType) { - this.valueType = valueType; - return this; - } - - /** - * Get the value property: Value of parsed pattern. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value of parsed pattern. - * - * @param value the value value to set. - * @return the ThreatIntelligenceParsedPatternTypeValue object itself. - */ - public ThreatIntelligenceParsedPatternTypeValue withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java deleted file mode 100644 index 6595128b74d9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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; - -/** The kind of the threat intelligence entity. */ -public final class ThreatIntelligenceResourceKindEnum extends ExpandableStringEnum { - /** Static value indicator for ThreatIntelligenceResourceKindEnum. */ - public static final ThreatIntelligenceResourceKindEnum INDICATOR = fromString("indicator"); - - /** - * Creates or finds a ThreatIntelligenceResourceKindEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ThreatIntelligenceResourceKindEnum. - */ - @JsonCreator - public static ThreatIntelligenceResourceKindEnum fromString(String name) { - return fromString(name, ThreatIntelligenceResourceKindEnum.class); - } - - /** - * Gets known ThreatIntelligenceResourceKindEnum values. - * - * @return known ThreatIntelligenceResourceKindEnum values. - */ - public static Collection values() { - return values(ThreatIntelligenceResourceKindEnum.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java deleted file mode 100644 index 7c51d95d08ad..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** List of available columns for sorting. */ -@Fluent -public final class ThreatIntelligenceSortingCriteria { - /* - * Column name - */ - @JsonProperty(value = "itemKey") - private String itemKey; - - /* - * Sorting order (ascending/descending/unsorted). - */ - @JsonProperty(value = "sortOrder") - private ThreatIntelligenceSortingCriteriaEnum sortOrder; - - /** - * Get the itemKey property: Column name. - * - * @return the itemKey value. - */ - public String itemKey() { - return this.itemKey; - } - - /** - * Set the itemKey property: Column name. - * - * @param itemKey the itemKey value to set. - * @return the ThreatIntelligenceSortingCriteria object itself. - */ - public ThreatIntelligenceSortingCriteria withItemKey(String itemKey) { - this.itemKey = itemKey; - return this; - } - - /** - * Get the sortOrder property: Sorting order (ascending/descending/unsorted). - * - * @return the sortOrder value. - */ - public ThreatIntelligenceSortingCriteriaEnum sortOrder() { - return this.sortOrder; - } - - /** - * Set the sortOrder property: Sorting order (ascending/descending/unsorted). - * - * @param sortOrder the sortOrder value to set. - * @return the ThreatIntelligenceSortingCriteria object itself. - */ - public ThreatIntelligenceSortingCriteria withSortOrder(ThreatIntelligenceSortingCriteriaEnum sortOrder) { - this.sortOrder = sortOrder; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java deleted file mode 100644 index c5933ebe8342..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java +++ /dev/null @@ -1,42 +0,0 @@ -// 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; - -/** Sorting order (ascending/descending/unsorted). */ -public final class ThreatIntelligenceSortingCriteriaEnum - extends ExpandableStringEnum { - /** Static value unsorted for ThreatIntelligenceSortingCriteriaEnum. */ - public static final ThreatIntelligenceSortingCriteriaEnum UNSORTED = fromString("unsorted"); - - /** Static value ascending for ThreatIntelligenceSortingCriteriaEnum. */ - public static final ThreatIntelligenceSortingCriteriaEnum ASCENDING = fromString("ascending"); - - /** Static value descending for ThreatIntelligenceSortingCriteriaEnum. */ - public static final ThreatIntelligenceSortingCriteriaEnum DESCENDING = fromString("descending"); - - /** - * Creates or finds a ThreatIntelligenceSortingCriteriaEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ThreatIntelligenceSortingCriteriaEnum. - */ - @JsonCreator - public static ThreatIntelligenceSortingCriteriaEnum fromString(String name) { - return fromString(name, ThreatIntelligenceSortingCriteriaEnum.class); - } - - /** - * Gets known ThreatIntelligenceSortingCriteriaEnum values. - * - * @return known ThreatIntelligenceSortingCriteriaEnum values. - */ - public static Collection values() { - return values(ThreatIntelligenceSortingCriteriaEnum.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java deleted file mode 100644 index a6e561d9e99e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.TiTaxiiCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Threat Intelligence TAXII data connector check requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligenceTaxii") -@Fluent -public final class TiTaxiiCheckRequirements extends DataConnectorsCheckRequirements { - /* - * Threat Intelligence TAXII check required properties. - */ - @JsonProperty(value = "properties") - private TiTaxiiCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence TAXII check required properties. - * - * @return the innerProperties value. - */ - private TiTaxiiCheckRequirementsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java deleted file mode 100644 index 125e1dd55a28..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java +++ /dev/null @@ -1,284 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TiTaxiiDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Data connector to pull Threat intelligence data from TAXII 2.0/2.1 server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligenceTaxii") -@Fluent -public final class TiTaxiiDataConnector extends DataConnectorInner { - /* - * Threat intelligence TAXII data connector properties. - */ - @JsonProperty(value = "properties") - private TiTaxiiDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Threat intelligence TAXII data connector properties. - * - * @return the innerProperties value. - */ - private TiTaxiiDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public TiTaxiiDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the workspaceId property: The workspace id. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceId(); - } - - /** - * Set the workspaceId property: The workspace id. - * - * @param workspaceId the workspaceId value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withWorkspaceId(String workspaceId) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withWorkspaceId(workspaceId); - return this; - } - - /** - * Get the friendlyName property: The friendly name for the TAXII server. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Set the friendlyName property: The friendly name for the TAXII server. - * - * @param friendlyName the friendlyName value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withFriendlyName(String friendlyName) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withFriendlyName(friendlyName); - return this; - } - - /** - * Get the taxiiServer property: The API root for the TAXII server. - * - * @return the taxiiServer value. - */ - public String taxiiServer() { - return this.innerProperties() == null ? null : this.innerProperties().taxiiServer(); - } - - /** - * Set the taxiiServer property: The API root for the TAXII server. - * - * @param taxiiServer the taxiiServer value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withTaxiiServer(String taxiiServer) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withTaxiiServer(taxiiServer); - return this; - } - - /** - * Get the collectionId property: The collection id of the TAXII server. - * - * @return the collectionId value. - */ - public String collectionId() { - return this.innerProperties() == null ? null : this.innerProperties().collectionId(); - } - - /** - * Set the collectionId property: The collection id of the TAXII server. - * - * @param collectionId the collectionId value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withCollectionId(String collectionId) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withCollectionId(collectionId); - return this; - } - - /** - * Get the username property: The userName for the TAXII server. - * - * @return the username value. - */ - public String username() { - return this.innerProperties() == null ? null : this.innerProperties().username(); - } - - /** - * Set the username property: The userName for the TAXII server. - * - * @param username the username value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withUsername(String username) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withUsername(username); - return this; - } - - /** - * Get the password property: The password for the TAXII server. - * - * @return the password value. - */ - public String password() { - return this.innerProperties() == null ? null : this.innerProperties().password(); - } - - /** - * Set the password property: The password for the TAXII server. - * - * @param password the password value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withPassword(String password) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withPassword(password); - return this; - } - - /** - * Get the taxiiLookbackPeriod property: The lookback period for the TAXII server. - * - * @return the taxiiLookbackPeriod value. - */ - public OffsetDateTime taxiiLookbackPeriod() { - return this.innerProperties() == null ? null : this.innerProperties().taxiiLookbackPeriod(); - } - - /** - * Set the taxiiLookbackPeriod property: The lookback period for the TAXII server. - * - * @param taxiiLookbackPeriod the taxiiLookbackPeriod value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withTaxiiLookbackPeriod(OffsetDateTime taxiiLookbackPeriod) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withTaxiiLookbackPeriod(taxiiLookbackPeriod); - return this; - } - - /** - * Get the pollingFrequency property: The polling frequency for the TAXII server. - * - * @return the pollingFrequency value. - */ - public PollingFrequency pollingFrequency() { - return this.innerProperties() == null ? null : this.innerProperties().pollingFrequency(); - } - - /** - * Set the pollingFrequency property: The polling frequency for the TAXII server. - * - * @param pollingFrequency the pollingFrequency value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withPollingFrequency(PollingFrequency pollingFrequency) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withPollingFrequency(pollingFrequency); - return this; - } - - /** - * Get the dataTypes property: The available data types for Threat Intelligence TAXII data connector. - * - * @return the dataTypes value. - */ - public TiTaxiiDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for Threat Intelligence TAXII data connector. - * - * @param dataTypes the dataTypes value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withDataTypes(TiTaxiiDataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenant id to connect to, and get the data from. - * - * @param tenantId the tenantId value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java deleted file mode 100644 index 22f12b8a6ab9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Threat Intelligence TAXII data connector. */ -@Fluent -public final class TiTaxiiDataConnectorDataTypes { - /* - * Data type for TAXII connector. - */ - @JsonProperty(value = "taxiiClient", required = true) - private TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient; - - /** - * Get the taxiiClient property: Data type for TAXII connector. - * - * @return the taxiiClient value. - */ - public TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient() { - return this.taxiiClient; - } - - /** - * Set the taxiiClient property: Data type for TAXII connector. - * - * @param taxiiClient the taxiiClient value to set. - * @return the TiTaxiiDataConnectorDataTypes object itself. - */ - public TiTaxiiDataConnectorDataTypes withTaxiiClient(TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient) { - this.taxiiClient = taxiiClient; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (taxiiClient() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property taxiiClient in model TiTaxiiDataConnectorDataTypes")); - } else { - taxiiClient().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TiTaxiiDataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java deleted file mode 100644 index 7b2b40b0a648..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.annotation.Fluent; - -/** Data type for TAXII connector. */ -@Fluent -public final class TiTaxiiDataConnectorDataTypesTaxiiClient extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public TiTaxiiDataConnectorDataTypesTaxiiClient withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java deleted file mode 100644 index d34ece2d531a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** timeline aggregation information per kind. */ -@Fluent -public final class TimelineAggregation { - /* - * the total items found for a kind - */ - @JsonProperty(value = "count", required = true) - private int count; - - /* - * the query kind - */ - @JsonProperty(value = "kind", required = true) - private EntityTimelineKind kind; - - /** - * Get the count property: the total items found for a kind. - * - * @return the count value. - */ - public int count() { - return this.count; - } - - /** - * Set the count property: the total items found for a kind. - * - * @param count the count value to set. - * @return the TimelineAggregation object itself. - */ - public TimelineAggregation withCount(int count) { - this.count = count; - return this; - } - - /** - * Get the kind property: the query kind. - * - * @return the kind value. - */ - public EntityTimelineKind kind() { - return this.kind; - } - - /** - * Set the kind property: the query kind. - * - * @param kind the kind value to set. - * @return the TimelineAggregation object itself. - */ - public TimelineAggregation withKind(EntityTimelineKind kind) { - this.kind = kind; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model TimelineAggregation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TimelineAggregation.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java deleted file mode 100644 index e6c563cb369f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java +++ /dev/null @@ -1,111 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Timeline Query Errors. */ -@Fluent -public final class TimelineError { - /* - * the query kind - */ - @JsonProperty(value = "kind", required = true) - private EntityTimelineKind kind; - - /* - * the query id - */ - @JsonProperty(value = "queryId") - private String queryId; - - /* - * the error message - */ - @JsonProperty(value = "errorMessage", required = true) - private String errorMessage; - - /** - * Get the kind property: the query kind. - * - * @return the kind value. - */ - public EntityTimelineKind kind() { - return this.kind; - } - - /** - * Set the kind property: the query kind. - * - * @param kind the kind value to set. - * @return the TimelineError object itself. - */ - public TimelineError withKind(EntityTimelineKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the queryId property: the query id. - * - * @return the queryId value. - */ - public String queryId() { - return this.queryId; - } - - /** - * Set the queryId property: the query id. - * - * @param queryId the queryId value to set. - * @return the TimelineError object itself. - */ - public TimelineError withQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Get the errorMessage property: the error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: the error message. - * - * @param errorMessage the errorMessage value to set. - * @return the TimelineError object itself. - */ - public TimelineError withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model TimelineError")); - } - if (errorMessage() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property errorMessage in model TimelineError")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TimelineError.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java deleted file mode 100644 index 7d42bccca470..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java +++ /dev/null @@ -1,113 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Expansion result metadata. */ -@Fluent -public final class TimelineResultsMetadata { - /* - * the total items found for the timeline request - */ - @JsonProperty(value = "totalCount", required = true) - private int totalCount; - - /* - * timeline aggregation per kind - */ - @JsonProperty(value = "aggregations", required = true) - private List aggregations; - - /* - * information about the failure queries - */ - @JsonProperty(value = "errors") - private List errors; - - /** - * Get the totalCount property: the total items found for the timeline request. - * - * @return the totalCount value. - */ - public int totalCount() { - return this.totalCount; - } - - /** - * Set the totalCount property: the total items found for the timeline request. - * - * @param totalCount the totalCount value to set. - * @return the TimelineResultsMetadata object itself. - */ - public TimelineResultsMetadata withTotalCount(int totalCount) { - this.totalCount = totalCount; - return this; - } - - /** - * Get the aggregations property: timeline aggregation per kind. - * - * @return the aggregations value. - */ - public List aggregations() { - return this.aggregations; - } - - /** - * Set the aggregations property: timeline aggregation per kind. - * - * @param aggregations the aggregations value to set. - * @return the TimelineResultsMetadata object itself. - */ - public TimelineResultsMetadata withAggregations(List aggregations) { - this.aggregations = aggregations; - return this; - } - - /** - * Get the errors property: information about the failure queries. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: information about the failure queries. - * - * @param errors the errors value to set. - * @return the TimelineResultsMetadata object itself. - */ - public TimelineResultsMetadata withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (aggregations() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property aggregations in model TimelineResultsMetadata")); - } else { - aggregations().forEach(e -> e.validate()); - } - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TimelineResultsMetadata.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggerOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggerOperator.java deleted file mode 100644 index 1c824f4332d6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggerOperator.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The operation against the threshold that triggers alert rule. */ -public enum TriggerOperator { - /** Enum value GreaterThan. */ - GREATER_THAN("GreaterThan"), - - /** Enum value LessThan. */ - LESS_THAN("LessThan"), - - /** Enum value Equal. */ - EQUAL("Equal"), - - /** Enum value NotEqual. */ - NOT_EQUAL("NotEqual"); - - /** The actual serialized value for a TriggerOperator instance. */ - private final String value; - - TriggerOperator(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a TriggerOperator instance. - * - * @param value the serialized value to parse. - * @return the parsed TriggerOperator object, or null if unable to parse. - */ - @JsonCreator - public static TriggerOperator fromString(String value) { - if (value == null) { - return null; - } - TriggerOperator[] items = TriggerOperator.values(); - for (TriggerOperator item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java deleted file mode 100644 index 9bb932300877..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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 TriggersOn. */ -public final class TriggersOn extends ExpandableStringEnum { - /** Static value Incidents for TriggersOn. */ - public static final TriggersOn INCIDENTS = fromString("Incidents"); - - /** Static value Alerts for TriggersOn. */ - public static final TriggersOn ALERTS = fromString("Alerts"); - - /** - * Creates or finds a TriggersOn from its string representation. - * - * @param name a name to look for. - * @return the corresponding TriggersOn. - */ - @JsonCreator - public static TriggersOn fromString(String name) { - return fromString(name, TriggersOn.class); - } - - /** - * Gets known TriggersOn values. - * - * @return known TriggersOn values. - */ - public static Collection values() { - return values(TriggersOn.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java deleted file mode 100644 index 84c11fc4fc6b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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 TriggersWhen. */ -public final class TriggersWhen extends ExpandableStringEnum { - /** Static value Created for TriggersWhen. */ - public static final TriggersWhen CREATED = fromString("Created"); - - /** Static value Updated for TriggersWhen. */ - public static final TriggersWhen UPDATED = fromString("Updated"); - - /** - * Creates or finds a TriggersWhen from its string representation. - * - * @param name a name to look for. - * @return the corresponding TriggersWhen. - */ - @JsonCreator - public static TriggersWhen fromString(String name) { - return fromString(name, TriggersWhen.class); - } - - /** - * Gets known TriggersWhen values. - * - * @return known TriggersWhen values. - */ - public static Collection values() { - return values(TriggersWhen.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java deleted file mode 100644 index 5a79fd502544..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.azure.resourcemanager.securityinsights.fluent.models.UebaProperties; -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") -@JsonTypeName("Ueba") -@Fluent -public final class Ueba extends SettingsInner { - /* - * Ueba properties - */ - @JsonProperty(value = "properties") - private UebaProperties innerProperties; - - /** - * Get the innerProperties property: Ueba properties. - * - * @return the innerProperties value. - */ - private UebaProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public Ueba withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataSources property: The relevant data sources that enriched by ueba. - * - * @return the dataSources value. - */ - public List dataSources() { - return this.innerProperties() == null ? null : this.innerProperties().dataSources(); - } - - /** - * Set the dataSources property: The relevant data sources that enriched by ueba. - * - * @param dataSources the dataSources value to set. - * @return the Ueba object itself. - */ - public Ueba withDataSources(List dataSources) { - if (this.innerProperties() == null) { - this.innerProperties = new UebaProperties(); - } - this.innerProperties().withDataSources(dataSources); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java deleted file mode 100644 index 8548886d5a2d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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; - -/** The data source that enriched by ueba. */ -public final class UebaDataSources extends ExpandableStringEnum { - /** Static value AuditLogs for UebaDataSources. */ - public static final UebaDataSources AUDIT_LOGS = fromString("AuditLogs"); - - /** Static value AzureActivity for UebaDataSources. */ - public static final UebaDataSources AZURE_ACTIVITY = fromString("AzureActivity"); - - /** Static value SecurityEvent for UebaDataSources. */ - public static final UebaDataSources SECURITY_EVENT = fromString("SecurityEvent"); - - /** Static value SigninLogs for UebaDataSources. */ - public static final UebaDataSources SIGNIN_LOGS = fromString("SigninLogs"); - - /** - * Creates or finds a UebaDataSources from its string representation. - * - * @param name a name to look for. - * @return the corresponding UebaDataSources. - */ - @JsonCreator - public static UebaDataSources fromString(String name) { - return fromString(name, UebaDataSources.class); - } - - /** - * Gets known UebaDataSources values. - * - * @return known UebaDataSources values. - */ - public static Collection values() { - return values(UebaDataSources.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java deleted file mode 100644 index 0af80094b7e0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.UrlEntityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Represents a url entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Url") -@Fluent -public final class UrlEntity extends EntityInner { - /* - * Url entity properties - */ - @JsonProperty(value = "properties") - private UrlEntityProperties innerProperties; - - /** - * Get the innerProperties property: Url entity properties. - * - * @return the innerProperties value. - */ - private UrlEntityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the url property: A full URL the entity points to. - * - * @return the url value. - */ - public String url() { - return this.innerProperties() == null ? null : this.innerProperties().url(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java deleted file mode 100644 index 8d8dc55f0309..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java +++ /dev/null @@ -1,77 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** User information that made some action. */ -@Fluent -public final class UserInfo { - /* - * The email of the user. - */ - @JsonProperty(value = "email", access = JsonProperty.Access.WRITE_ONLY) - private String email; - - /* - * The name of the user. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The object id of the user. - */ - @JsonProperty(value = "objectId") - private UUID objectId; - - /** - * Get the email property: The email of the user. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Get the name property: The name of the user. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the objectId property: The object id of the user. - * - * @return the objectId value. - */ - public UUID objectId() { - return this.objectId; - } - - /** - * Set the objectId property: The object id of the user. - * - * @param objectId the objectId value to set. - * @return the UserInfo object itself. - */ - public UserInfo withObjectId(UUID objectId) { - this.objectId = objectId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java deleted file mode 100644 index 7b74ced2e068..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java +++ /dev/null @@ -1,62 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes an error encountered in the file during validation. */ -@Fluent -public final class ValidationError { - /* - * The number of the record that has the error. - */ - @JsonProperty(value = "recordIndex") - private Integer recordIndex; - - /* - * A list of descriptions of the error. - */ - @JsonProperty(value = "errorMessages", access = JsonProperty.Access.WRITE_ONLY) - private List errorMessages; - - /** - * Get the recordIndex property: The number of the record that has the error. - * - * @return the recordIndex value. - */ - public Integer recordIndex() { - return this.recordIndex; - } - - /** - * Set the recordIndex property: The number of the record that has the error. - * - * @param recordIndex the recordIndex value to set. - * @return the ValidationError object itself. - */ - public ValidationError withRecordIndex(Integer recordIndex) { - this.recordIndex = recordIndex; - return this; - } - - /** - * Get the errorMessages property: A list of descriptions of the error. - * - * @return the errorMessages value. - */ - public List errorMessages() { - return this.errorMessages; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java deleted file mode 100644 index 285474b81325..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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; - -/** The version of the source control. */ -public final class Version extends ExpandableStringEnum { - /** Static value V1 for Version. */ - public static final Version V1 = fromString("V1"); - - /** Static value V2 for Version. */ - public static final Version V2 = fromString("V2"); - - /** - * Creates or finds a Version from its string representation. - * - * @param name a name to look for. - * @return the corresponding Version. - */ - @JsonCreator - public static Version fromString(String name) { - return fromString(name, Version.class); - } - - /** - * Gets known Version values. - * - * @return known Version values. - */ - public static Collection values() { - return values(Version.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java deleted file mode 100644 index f00eabf5856b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java +++ /dev/null @@ -1,802 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Watchlist. */ -public interface Watchlist { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the watchlistId property: The id (a Guid) of the watchlist. - * - * @return the watchlistId value. - */ - String watchlistId(); - - /** - * Gets the displayName property: The display name of the watchlist. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the provider property: The provider of the watchlist. - * - * @return the provider value. - */ - String provider(); - - /** - * Gets the source property: The filename of the watchlist, called 'source'. - * - * @return the source value. - */ - String source(); - - /** - * Gets the sourceType property: The sourceType of the watchlist. - * - * @return the sourceType value. - */ - SourceType sourceType(); - - /** - * Gets the created property: The time the watchlist was created. - * - * @return the created value. - */ - OffsetDateTime created(); - - /** - * Gets the updated property: The last time the watchlist was updated. - * - * @return the updated value. - */ - OffsetDateTime updated(); - - /** - * Gets the createdBy property: Describes a user that created the watchlist. - * - * @return the createdBy value. - */ - UserInfo createdBy(); - - /** - * Gets the updatedBy property: Describes a user that updated the watchlist. - * - * @return the updatedBy value. - */ - UserInfo updatedBy(); - - /** - * Gets the description property: A description of the watchlist. - * - * @return the description value. - */ - String description(); - - /** - * Gets the watchlistType property: The type of the watchlist. - * - * @return the watchlistType value. - */ - String watchlistType(); - - /** - * Gets the watchlistAlias property: The alias of the watchlist. - * - * @return the watchlistAlias value. - */ - String watchlistAlias(); - - /** - * Gets the isDeleted property: A flag that indicates if the watchlist is deleted or not. - * - * @return the isDeleted value. - */ - Boolean isDeleted(); - - /** - * Gets the labels property: List of labels relevant to this watchlist. - * - * @return the labels value. - */ - List labels(); - - /** - * Gets the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration format). - * - * @return the defaultDuration value. - */ - Duration defaultDuration(); - - /** - * Gets the tenantId property: The tenantId where the watchlist belongs to. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. - * - * @return the numberOfLinesToSkip value. - */ - Integer numberOfLinesToSkip(); - - /** - * Gets the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. - * - * @return the rawContent value. - */ - String rawContent(); - - /** - * Gets 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 - * use this field as the key field when joining to other event data by IP address. - * - * @return the itemsSearchKey value. - */ - String itemsSearchKey(); - - /** - * Gets the contentType property: The content type of the raw content. Example : text/csv or text/tsv. - * - * @return the contentType value. - */ - String contentType(); - - /** - * Gets the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * - * @return the uploadStatus value. - */ - String uploadStatus(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner object. - * - * @return the inner object. - */ - WatchlistInner innerModel(); - - /** The entirety of the Watchlist definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The Watchlist definition stages. */ - interface DefinitionStages { - /** The first stage of the Watchlist definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the Watchlist definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the Watchlist definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithEtag, - DefinitionStages.WithWatchlistId, - DefinitionStages.WithDisplayName, - DefinitionStages.WithProvider, - DefinitionStages.WithSource, - DefinitionStages.WithSourceType, - DefinitionStages.WithCreated, - DefinitionStages.WithUpdated, - DefinitionStages.WithCreatedBy, - DefinitionStages.WithUpdatedBy, - DefinitionStages.WithDescription, - DefinitionStages.WithWatchlistType, - DefinitionStages.WithWatchlistAlias, - DefinitionStages.WithIsDeleted, - DefinitionStages.WithLabels, - DefinitionStages.WithDefaultDuration, - DefinitionStages.WithTenantId, - DefinitionStages.WithNumberOfLinesToSkip, - DefinitionStages.WithRawContent, - DefinitionStages.WithItemsSearchKey, - DefinitionStages.WithContentType, - DefinitionStages.WithUploadStatus { - /** - * Executes the create request. - * - * @return the created resource. - */ - Watchlist create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Watchlist create(Context context); - } - /** The stage of the Watchlist definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the Watchlist definition allowing to specify watchlistId. */ - interface WithWatchlistId { - /** - * Specifies the watchlistId property: The id (a Guid) of the watchlist. - * - * @param watchlistId The id (a Guid) of the watchlist. - * @return the next definition stage. - */ - WithCreate withWatchlistId(String watchlistId); - } - /** The stage of the Watchlist definition allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The display name of the watchlist. - * - * @param displayName The display name of the watchlist. - * @return the next definition stage. - */ - WithCreate withDisplayName(String displayName); - } - /** The stage of the Watchlist definition allowing to specify provider. */ - interface WithProvider { - /** - * Specifies the provider property: The provider of the watchlist. - * - * @param provider The provider of the watchlist. - * @return the next definition stage. - */ - WithCreate withProvider(String provider); - } - /** The stage of the Watchlist definition allowing to specify source. */ - interface WithSource { - /** - * Specifies the source property: The filename of the watchlist, called 'source'. - * - * @param source The filename of the watchlist, called 'source'. - * @return the next definition stage. - */ - WithCreate withSource(String source); - } - /** The stage of the Watchlist definition allowing to specify sourceType. */ - interface WithSourceType { - /** - * Specifies the sourceType property: The sourceType of the watchlist. - * - * @param sourceType The sourceType of the watchlist. - * @return the next definition stage. - */ - WithCreate withSourceType(SourceType sourceType); - } - /** The stage of the Watchlist definition allowing to specify created. */ - interface WithCreated { - /** - * Specifies the created property: The time the watchlist was created. - * - * @param created The time the watchlist was created. - * @return the next definition stage. - */ - WithCreate withCreated(OffsetDateTime created); - } - /** The stage of the Watchlist definition allowing to specify updated. */ - interface WithUpdated { - /** - * Specifies the updated property: The last time the watchlist was updated. - * - * @param updated The last time the watchlist was updated. - * @return the next definition stage. - */ - WithCreate withUpdated(OffsetDateTime updated); - } - /** The stage of the Watchlist definition allowing to specify createdBy. */ - interface WithCreatedBy { - /** - * Specifies the createdBy property: Describes a user that created the watchlist. - * - * @param createdBy Describes a user that created the watchlist. - * @return the next definition stage. - */ - WithCreate withCreatedBy(UserInfo createdBy); - } - /** The stage of the Watchlist definition allowing to specify updatedBy. */ - interface WithUpdatedBy { - /** - * Specifies the updatedBy property: Describes a user that updated the watchlist. - * - * @param updatedBy Describes a user that updated the watchlist. - * @return the next definition stage. - */ - WithCreate withUpdatedBy(UserInfo updatedBy); - } - /** The stage of the Watchlist definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: A description of the watchlist. - * - * @param description A description of the watchlist. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the Watchlist definition allowing to specify watchlistType. */ - interface WithWatchlistType { - /** - * Specifies the watchlistType property: The type of the watchlist. - * - * @param watchlistType The type of the watchlist. - * @return the next definition stage. - */ - WithCreate withWatchlistType(String watchlistType); - } - /** The stage of the Watchlist definition allowing to specify watchlistAlias. */ - interface WithWatchlistAlias { - /** - * Specifies the watchlistAlias property: The alias of the watchlist. - * - * @param watchlistAlias The alias of the watchlist. - * @return the next definition stage. - */ - WithCreate withWatchlistAlias(String watchlistAlias); - } - /** The stage of the Watchlist definition allowing to specify isDeleted. */ - interface WithIsDeleted { - /** - * Specifies the isDeleted property: A flag that indicates if the watchlist is deleted or not. - * - * @param isDeleted A flag that indicates if the watchlist is deleted or not. - * @return the next definition stage. - */ - WithCreate withIsDeleted(Boolean isDeleted); - } - /** The stage of the Watchlist definition allowing to specify labels. */ - interface WithLabels { - /** - * Specifies the labels property: List of labels relevant to this watchlist. - * - * @param labels List of labels relevant to this watchlist. - * @return the next definition stage. - */ - WithCreate withLabels(List labels); - } - /** The stage of the Watchlist definition allowing to specify defaultDuration. */ - interface WithDefaultDuration { - /** - * Specifies the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration - * format). - * - * @param defaultDuration The default duration of a watchlist (in ISO 8601 duration format). - * @return the next definition stage. - */ - WithCreate withDefaultDuration(Duration defaultDuration); - } - /** The stage of the Watchlist definition allowing to specify tenantId. */ - interface WithTenantId { - /** - * Specifies the tenantId property: The tenantId where the watchlist belongs to. - * - * @param tenantId The tenantId where the watchlist belongs to. - * @return the next definition stage. - */ - WithCreate withTenantId(String tenantId); - } - /** The stage of the Watchlist definition allowing to specify numberOfLinesToSkip. */ - interface WithNumberOfLinesToSkip { - /** - * Specifies the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the - * header. - * - * @param numberOfLinesToSkip The number of lines in a csv/tsv content to skip before the header. - * @return the next definition stage. - */ - WithCreate withNumberOfLinesToSkip(Integer numberOfLinesToSkip); - } - /** The stage of the Watchlist definition allowing to specify rawContent. */ - interface WithRawContent { - /** - * Specifies the rawContent property: The raw content that represents to watchlist items to create. In case - * of csv/tsv content type, it's the content of the file that will parsed by the endpoint. - * - * @param rawContent The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. - * @return the next definition stage. - */ - WithCreate withRawContent(String rawContent); - } - /** The stage of the Watchlist definition allowing to specify itemsSearchKey. */ - interface WithItemsSearchKey { - /** - * Specifies 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 use this field as the key field when joining to other event data by IP address.. - * - * @param itemsSearchKey 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 use this field as the key field when joining to other event data by IP address. - * @return the next definition stage. - */ - WithCreate withItemsSearchKey(String itemsSearchKey); - } - /** The stage of the Watchlist definition allowing to specify contentType. */ - interface WithContentType { - /** - * Specifies the contentType property: The content type of the raw content. Example : text/csv or text/tsv . - * - * @param contentType The content type of the raw content. Example : text/csv or text/tsv. - * @return the next definition stage. - */ - WithCreate withContentType(String contentType); - } - /** The stage of the Watchlist definition allowing to specify uploadStatus. */ - interface WithUploadStatus { - /** - * Specifies the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. - * Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * - * @param uploadStatus The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a - * Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * @return the next definition stage. - */ - WithCreate withUploadStatus(String uploadStatus); - } - } - /** - * Begins update for the Watchlist resource. - * - * @return the stage of resource update. - */ - Watchlist.Update update(); - - /** The template for Watchlist update. */ - interface Update - extends UpdateStages.WithEtag, - UpdateStages.WithWatchlistId, - UpdateStages.WithDisplayName, - UpdateStages.WithProvider, - UpdateStages.WithSource, - UpdateStages.WithSourceType, - UpdateStages.WithCreated, - UpdateStages.WithUpdated, - UpdateStages.WithCreatedBy, - UpdateStages.WithUpdatedBy, - UpdateStages.WithDescription, - UpdateStages.WithWatchlistType, - UpdateStages.WithWatchlistAlias, - UpdateStages.WithIsDeleted, - UpdateStages.WithLabels, - UpdateStages.WithDefaultDuration, - UpdateStages.WithTenantId, - UpdateStages.WithNumberOfLinesToSkip, - UpdateStages.WithRawContent, - UpdateStages.WithItemsSearchKey, - UpdateStages.WithContentType, - UpdateStages.WithUploadStatus { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Watchlist apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Watchlist apply(Context context); - } - /** The Watchlist update stages. */ - interface UpdateStages { - /** The stage of the Watchlist update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the Watchlist update allowing to specify watchlistId. */ - interface WithWatchlistId { - /** - * Specifies the watchlistId property: The id (a Guid) of the watchlist. - * - * @param watchlistId The id (a Guid) of the watchlist. - * @return the next definition stage. - */ - Update withWatchlistId(String watchlistId); - } - /** The stage of the Watchlist update allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The display name of the watchlist. - * - * @param displayName The display name of the watchlist. - * @return the next definition stage. - */ - Update withDisplayName(String displayName); - } - /** The stage of the Watchlist update allowing to specify provider. */ - interface WithProvider { - /** - * Specifies the provider property: The provider of the watchlist. - * - * @param provider The provider of the watchlist. - * @return the next definition stage. - */ - Update withProvider(String provider); - } - /** The stage of the Watchlist update allowing to specify source. */ - interface WithSource { - /** - * Specifies the source property: The filename of the watchlist, called 'source'. - * - * @param source The filename of the watchlist, called 'source'. - * @return the next definition stage. - */ - Update withSource(String source); - } - /** The stage of the Watchlist update allowing to specify sourceType. */ - interface WithSourceType { - /** - * Specifies the sourceType property: The sourceType of the watchlist. - * - * @param sourceType The sourceType of the watchlist. - * @return the next definition stage. - */ - Update withSourceType(SourceType sourceType); - } - /** The stage of the Watchlist update allowing to specify created. */ - interface WithCreated { - /** - * Specifies the created property: The time the watchlist was created. - * - * @param created The time the watchlist was created. - * @return the next definition stage. - */ - Update withCreated(OffsetDateTime created); - } - /** The stage of the Watchlist update allowing to specify updated. */ - interface WithUpdated { - /** - * Specifies the updated property: The last time the watchlist was updated. - * - * @param updated The last time the watchlist was updated. - * @return the next definition stage. - */ - Update withUpdated(OffsetDateTime updated); - } - /** The stage of the Watchlist update allowing to specify createdBy. */ - interface WithCreatedBy { - /** - * Specifies the createdBy property: Describes a user that created the watchlist. - * - * @param createdBy Describes a user that created the watchlist. - * @return the next definition stage. - */ - Update withCreatedBy(UserInfo createdBy); - } - /** The stage of the Watchlist update allowing to specify updatedBy. */ - interface WithUpdatedBy { - /** - * Specifies the updatedBy property: Describes a user that updated the watchlist. - * - * @param updatedBy Describes a user that updated the watchlist. - * @return the next definition stage. - */ - Update withUpdatedBy(UserInfo updatedBy); - } - /** The stage of the Watchlist update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: A description of the watchlist. - * - * @param description A description of the watchlist. - * @return the next definition stage. - */ - Update withDescription(String description); - } - /** The stage of the Watchlist update allowing to specify watchlistType. */ - interface WithWatchlistType { - /** - * Specifies the watchlistType property: The type of the watchlist. - * - * @param watchlistType The type of the watchlist. - * @return the next definition stage. - */ - Update withWatchlistType(String watchlistType); - } - /** The stage of the Watchlist update allowing to specify watchlistAlias. */ - interface WithWatchlistAlias { - /** - * Specifies the watchlistAlias property: The alias of the watchlist. - * - * @param watchlistAlias The alias of the watchlist. - * @return the next definition stage. - */ - Update withWatchlistAlias(String watchlistAlias); - } - /** The stage of the Watchlist update allowing to specify isDeleted. */ - interface WithIsDeleted { - /** - * Specifies the isDeleted property: A flag that indicates if the watchlist is deleted or not. - * - * @param isDeleted A flag that indicates if the watchlist is deleted or not. - * @return the next definition stage. - */ - Update withIsDeleted(Boolean isDeleted); - } - /** The stage of the Watchlist update allowing to specify labels. */ - interface WithLabels { - /** - * Specifies the labels property: List of labels relevant to this watchlist. - * - * @param labels List of labels relevant to this watchlist. - * @return the next definition stage. - */ - Update withLabels(List labels); - } - /** The stage of the Watchlist update allowing to specify defaultDuration. */ - interface WithDefaultDuration { - /** - * Specifies the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration - * format). - * - * @param defaultDuration The default duration of a watchlist (in ISO 8601 duration format). - * @return the next definition stage. - */ - Update withDefaultDuration(Duration defaultDuration); - } - /** The stage of the Watchlist update allowing to specify tenantId. */ - interface WithTenantId { - /** - * Specifies the tenantId property: The tenantId where the watchlist belongs to. - * - * @param tenantId The tenantId where the watchlist belongs to. - * @return the next definition stage. - */ - Update withTenantId(String tenantId); - } - /** The stage of the Watchlist update allowing to specify numberOfLinesToSkip. */ - interface WithNumberOfLinesToSkip { - /** - * Specifies the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the - * header. - * - * @param numberOfLinesToSkip The number of lines in a csv/tsv content to skip before the header. - * @return the next definition stage. - */ - Update withNumberOfLinesToSkip(Integer numberOfLinesToSkip); - } - /** The stage of the Watchlist update allowing to specify rawContent. */ - interface WithRawContent { - /** - * Specifies the rawContent property: The raw content that represents to watchlist items to create. In case - * of csv/tsv content type, it's the content of the file that will parsed by the endpoint. - * - * @param rawContent The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. - * @return the next definition stage. - */ - Update withRawContent(String rawContent); - } - /** The stage of the Watchlist update allowing to specify itemsSearchKey. */ - interface WithItemsSearchKey { - /** - * Specifies 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 use this field as the key field when joining to other event data by IP address.. - * - * @param itemsSearchKey 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 use this field as the key field when joining to other event data by IP address. - * @return the next definition stage. - */ - Update withItemsSearchKey(String itemsSearchKey); - } - /** The stage of the Watchlist update allowing to specify contentType. */ - interface WithContentType { - /** - * Specifies the contentType property: The content type of the raw content. Example : text/csv or text/tsv . - * - * @param contentType The content type of the raw content. Example : text/csv or text/tsv. - * @return the next definition stage. - */ - Update withContentType(String contentType); - } - /** The stage of the Watchlist update allowing to specify uploadStatus. */ - interface WithUploadStatus { - /** - * Specifies the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. - * Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * - * @param uploadStatus The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a - * Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. - * @return the next definition stage. - */ - Update withUploadStatus(String uploadStatus); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Watchlist refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Watchlist refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItem.java deleted file mode 100644 index b077295fb50b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItem.java +++ /dev/null @@ -1,459 +0,0 @@ -// 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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** An immutable client-side representation of WatchlistItem. */ -public interface WatchlistItem { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the watchlistItemType property: The type of the watchlist item. - * - * @return the watchlistItemType value. - */ - String watchlistItemType(); - - /** - * Gets the watchlistItemId property: The id (a Guid) of the watchlist item. - * - * @return the watchlistItemId value. - */ - String watchlistItemId(); - - /** - * Gets the tenantId property: The tenantId to which the watchlist item belongs to. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the isDeleted property: A flag that indicates if the watchlist item is deleted or not. - * - * @return the isDeleted value. - */ - Boolean isDeleted(); - - /** - * Gets the created property: The time the watchlist item was created. - * - * @return the created value. - */ - OffsetDateTime created(); - - /** - * Gets the updated property: The last time the watchlist item was updated. - * - * @return the updated value. - */ - OffsetDateTime updated(); - - /** - * Gets the createdBy property: Describes a user that created the watchlist item. - * - * @return the createdBy value. - */ - UserInfo createdBy(); - - /** - * Gets the updatedBy property: Describes a user that updated the watchlist item. - * - * @return the updatedBy value. - */ - UserInfo updatedBy(); - - /** - * Gets the itemsKeyValue property: key-value pairs for a watchlist item. - * - * @return the itemsKeyValue value. - */ - Map itemsKeyValue(); - - /** - * Gets the entityMapping property: key-value pairs for a watchlist item entity mapping. - * - * @return the entityMapping value. - */ - Map entityMapping(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner object. - * - * @return the inner object. - */ - WatchlistItemInner innerModel(); - - /** The entirety of the WatchlistItem definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The WatchlistItem definition stages. */ - interface DefinitionStages { - /** The first stage of the WatchlistItem definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the WatchlistItem definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, watchlistAlias. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @return the next definition stage. - */ - WithCreate withExistingWatchlist(String resourceGroupName, String workspaceName, String watchlistAlias); - } - /** - * The stage of the WatchlistItem definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithEtag, - DefinitionStages.WithWatchlistItemType, - DefinitionStages.WithWatchlistItemId, - DefinitionStages.WithTenantId, - DefinitionStages.WithIsDeleted, - DefinitionStages.WithCreated, - DefinitionStages.WithUpdated, - DefinitionStages.WithCreatedBy, - DefinitionStages.WithUpdatedBy, - DefinitionStages.WithItemsKeyValue, - DefinitionStages.WithEntityMapping { - /** - * Executes the create request. - * - * @return the created resource. - */ - WatchlistItem create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - WatchlistItem create(Context context); - } - /** The stage of the WatchlistItem definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the WatchlistItem definition allowing to specify watchlistItemType. */ - interface WithWatchlistItemType { - /** - * Specifies the watchlistItemType property: The type of the watchlist item. - * - * @param watchlistItemType The type of the watchlist item. - * @return the next definition stage. - */ - WithCreate withWatchlistItemType(String watchlistItemType); - } - /** The stage of the WatchlistItem definition allowing to specify watchlistItemId. */ - interface WithWatchlistItemId { - /** - * Specifies the watchlistItemId property: The id (a Guid) of the watchlist item. - * - * @param watchlistItemId The id (a Guid) of the watchlist item. - * @return the next definition stage. - */ - WithCreate withWatchlistItemId(String watchlistItemId); - } - /** The stage of the WatchlistItem definition allowing to specify tenantId. */ - interface WithTenantId { - /** - * Specifies the tenantId property: The tenantId to which the watchlist item belongs to. - * - * @param tenantId The tenantId to which the watchlist item belongs to. - * @return the next definition stage. - */ - WithCreate withTenantId(String tenantId); - } - /** The stage of the WatchlistItem definition allowing to specify isDeleted. */ - interface WithIsDeleted { - /** - * Specifies the isDeleted property: A flag that indicates if the watchlist item is deleted or not. - * - * @param isDeleted A flag that indicates if the watchlist item is deleted or not. - * @return the next definition stage. - */ - WithCreate withIsDeleted(Boolean isDeleted); - } - /** The stage of the WatchlistItem definition allowing to specify created. */ - interface WithCreated { - /** - * Specifies the created property: The time the watchlist item was created. - * - * @param created The time the watchlist item was created. - * @return the next definition stage. - */ - WithCreate withCreated(OffsetDateTime created); - } - /** The stage of the WatchlistItem definition allowing to specify updated. */ - interface WithUpdated { - /** - * Specifies the updated property: The last time the watchlist item was updated. - * - * @param updated The last time the watchlist item was updated. - * @return the next definition stage. - */ - WithCreate withUpdated(OffsetDateTime updated); - } - /** The stage of the WatchlistItem definition allowing to specify createdBy. */ - interface WithCreatedBy { - /** - * Specifies the createdBy property: Describes a user that created the watchlist item. - * - * @param createdBy Describes a user that created the watchlist item. - * @return the next definition stage. - */ - WithCreate withCreatedBy(UserInfo createdBy); - } - /** The stage of the WatchlistItem definition allowing to specify updatedBy. */ - interface WithUpdatedBy { - /** - * Specifies the updatedBy property: Describes a user that updated the watchlist item. - * - * @param updatedBy Describes a user that updated the watchlist item. - * @return the next definition stage. - */ - WithCreate withUpdatedBy(UserInfo updatedBy); - } - /** The stage of the WatchlistItem definition allowing to specify itemsKeyValue. */ - interface WithItemsKeyValue { - /** - * Specifies the itemsKeyValue property: key-value pairs for a watchlist item. - * - * @param itemsKeyValue key-value pairs for a watchlist item. - * @return the next definition stage. - */ - WithCreate withItemsKeyValue(Map itemsKeyValue); - } - /** The stage of the WatchlistItem definition allowing to specify entityMapping. */ - interface WithEntityMapping { - /** - * Specifies the entityMapping property: key-value pairs for a watchlist item entity mapping. - * - * @param entityMapping key-value pairs for a watchlist item entity mapping. - * @return the next definition stage. - */ - WithCreate withEntityMapping(Map entityMapping); - } - } - /** - * Begins update for the WatchlistItem resource. - * - * @return the stage of resource update. - */ - WatchlistItem.Update update(); - - /** The template for WatchlistItem update. */ - interface Update - extends UpdateStages.WithEtag, - UpdateStages.WithWatchlistItemType, - UpdateStages.WithWatchlistItemId, - UpdateStages.WithTenantId, - UpdateStages.WithIsDeleted, - UpdateStages.WithCreated, - UpdateStages.WithUpdated, - UpdateStages.WithCreatedBy, - UpdateStages.WithUpdatedBy, - UpdateStages.WithItemsKeyValue, - UpdateStages.WithEntityMapping { - /** - * Executes the update request. - * - * @return the updated resource. - */ - WatchlistItem apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - WatchlistItem apply(Context context); - } - /** The WatchlistItem update stages. */ - interface UpdateStages { - /** The stage of the WatchlistItem update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the WatchlistItem update allowing to specify watchlistItemType. */ - interface WithWatchlistItemType { - /** - * Specifies the watchlistItemType property: The type of the watchlist item. - * - * @param watchlistItemType The type of the watchlist item. - * @return the next definition stage. - */ - Update withWatchlistItemType(String watchlistItemType); - } - /** The stage of the WatchlistItem update allowing to specify watchlistItemId. */ - interface WithWatchlistItemId { - /** - * Specifies the watchlistItemId property: The id (a Guid) of the watchlist item. - * - * @param watchlistItemId The id (a Guid) of the watchlist item. - * @return the next definition stage. - */ - Update withWatchlistItemId(String watchlistItemId); - } - /** The stage of the WatchlistItem update allowing to specify tenantId. */ - interface WithTenantId { - /** - * Specifies the tenantId property: The tenantId to which the watchlist item belongs to. - * - * @param tenantId The tenantId to which the watchlist item belongs to. - * @return the next definition stage. - */ - Update withTenantId(String tenantId); - } - /** The stage of the WatchlistItem update allowing to specify isDeleted. */ - interface WithIsDeleted { - /** - * Specifies the isDeleted property: A flag that indicates if the watchlist item is deleted or not. - * - * @param isDeleted A flag that indicates if the watchlist item is deleted or not. - * @return the next definition stage. - */ - Update withIsDeleted(Boolean isDeleted); - } - /** The stage of the WatchlistItem update allowing to specify created. */ - interface WithCreated { - /** - * Specifies the created property: The time the watchlist item was created. - * - * @param created The time the watchlist item was created. - * @return the next definition stage. - */ - Update withCreated(OffsetDateTime created); - } - /** The stage of the WatchlistItem update allowing to specify updated. */ - interface WithUpdated { - /** - * Specifies the updated property: The last time the watchlist item was updated. - * - * @param updated The last time the watchlist item was updated. - * @return the next definition stage. - */ - Update withUpdated(OffsetDateTime updated); - } - /** The stage of the WatchlistItem update allowing to specify createdBy. */ - interface WithCreatedBy { - /** - * Specifies the createdBy property: Describes a user that created the watchlist item. - * - * @param createdBy Describes a user that created the watchlist item. - * @return the next definition stage. - */ - Update withCreatedBy(UserInfo createdBy); - } - /** The stage of the WatchlistItem update allowing to specify updatedBy. */ - interface WithUpdatedBy { - /** - * Specifies the updatedBy property: Describes a user that updated the watchlist item. - * - * @param updatedBy Describes a user that updated the watchlist item. - * @return the next definition stage. - */ - Update withUpdatedBy(UserInfo updatedBy); - } - /** The stage of the WatchlistItem update allowing to specify itemsKeyValue. */ - interface WithItemsKeyValue { - /** - * Specifies the itemsKeyValue property: key-value pairs for a watchlist item. - * - * @param itemsKeyValue key-value pairs for a watchlist item. - * @return the next definition stage. - */ - Update withItemsKeyValue(Map itemsKeyValue); - } - /** The stage of the WatchlistItem update allowing to specify entityMapping. */ - interface WithEntityMapping { - /** - * Specifies the entityMapping property: key-value pairs for a watchlist item entity mapping. - * - * @param entityMapping key-value pairs for a watchlist item entity mapping. - * @return the next definition stage. - */ - Update withEntityMapping(Map entityMapping); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WatchlistItem refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WatchlistItem refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java deleted file mode 100644 index 97bc46f5f4bd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the watchlist items. */ -@Fluent -public final class WatchlistItemList { - /* - * URL to fetch the next set of watchlist item. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of watchlist items. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of watchlist item. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of watchlist items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of watchlist items. - * - * @param value the value value to set. - * @return the WatchlistItemList object itself. - */ - public WatchlistItemList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model WatchlistItemList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WatchlistItemList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java deleted file mode 100644 index 9b56cdba2403..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java +++ /dev/null @@ -1,155 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of WatchlistItems. */ -public interface WatchlistItems { - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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 all watchlist Items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias); - - /** - * Gets all watchlist Items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all watchlist Items as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @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 watchlist, without its watchlist items. - */ - WatchlistItem get(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @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 watchlist, without its watchlist items along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); - - /** - * Delete a watchlist item. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @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 the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param id the resource ID. - * @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 watchlist, without its watchlist items along with {@link Response}. - */ - WatchlistItem getById(String id); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param id the resource ID. - * @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 watchlist, without its watchlist items along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a watchlist item. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete a watchlist item. - * - * @param id the resource ID. - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WatchlistItem resource. - * - * @param name resource name. - * @return the first stage of the new WatchlistItem definition. - */ - WatchlistItem.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java deleted file mode 100644 index 4e03f77f637e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java +++ /dev/null @@ -1,73 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the watchlists. */ -@Fluent -public final class WatchlistList { - /* - * URL to fetch the next set of watchlists. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of watchlist. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of watchlists. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of watchlist. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of watchlist. - * - * @param value the value value to set. - * @return the WatchlistList object itself. - */ - public WatchlistList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model WatchlistList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WatchlistList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java deleted file mode 100644 index 4e53d746f064..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java +++ /dev/null @@ -1,148 +0,0 @@ -// 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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Watchlists. */ -public interface Watchlists { - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @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 all watchlists, without watchlist items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all watchlists, without watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @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 all watchlists, without watchlist items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skipToken, Context context); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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 watchlist, without its watchlist items. - */ - Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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 watchlist, without its watchlist items along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String watchlistAlias); - - /** - * Delete a watchlist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @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 the response. - */ - WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param id the resource ID. - * @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 watchlist, without its watchlist items along with {@link Response}. - */ - Watchlist getById(String id); - - /** - * Gets a watchlist, without its watchlist items. - * - * @param id the resource ID. - * @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 watchlist, without its watchlist items along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a watchlist. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete a watchlist. - * - * @param id the resource ID. - * @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 the response. - */ - WatchlistsDeleteResponse deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Watchlist resource. - * - * @param name resource name. - * @return the first stage of the new Watchlist definition. - */ - Watchlist.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java deleted file mode 100644 index 5356e46d32f6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The WatchlistsCreateOrUpdateHeaders model. */ -@Fluent -public final class WatchlistsCreateOrUpdateHeaders { - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of WatchlistsCreateOrUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public WatchlistsCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.azureAsyncOperation = rawHeaders.getValue("Azure-AsyncOperation"); - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the WatchlistsCreateOrUpdateHeaders object itself. - */ - public WatchlistsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java deleted file mode 100644 index afdeedcf85a7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -// 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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; - -/** Contains all response data for the createOrUpdate operation. */ -public final class WatchlistsCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of WatchlistsCreateOrUpdateResponse. - * - * @param request the request which resulted in this WatchlistsCreateOrUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public WatchlistsCreateOrUpdateResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - WatchlistInner value, - WatchlistsCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public WatchlistInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java deleted file mode 100644 index 8105fba3b9de..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java +++ /dev/null @@ -1,57 +0,0 @@ -// 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.annotation.Fluent; -import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The WatchlistsDeleteHeaders model. */ -@Fluent -public final class WatchlistsDeleteHeaders { - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of WatchlistsDeleteHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public WatchlistsDeleteHeaders(HttpHeaders rawHeaders) { - this.azureAsyncOperation = rawHeaders.getValue("Azure-AsyncOperation"); - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the WatchlistsDeleteHeaders object itself. - */ - public WatchlistsDeleteHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java deleted file mode 100644 index 5315f66e3e28..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the delete operation. */ -public final class WatchlistsDeleteResponse extends ResponseBase { - /** - * Creates an instance of WatchlistsDeleteResponse. - * - * @param request the request which resulted in this WatchlistsDeleteResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public WatchlistsDeleteResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, WatchlistsDeleteHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java deleted file mode 100644 index 8495bcf9e510..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java +++ /dev/null @@ -1,124 +0,0 @@ -// 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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Detail about the webhook object. */ -@Fluent -public final class Webhook { - /* - * Unique identifier for the webhook. - */ - @JsonProperty(value = "webhookId") - private String webhookId; - - /* - * URL that gets invoked by the webhook. - */ - @JsonProperty(value = "webhookUrl") - private String webhookUrl; - - /* - * Time when the webhook secret was updated. - */ - @JsonProperty(value = "webhookSecretUpdateTime") - private String webhookSecretUpdateTime; - - /* - * A flag to instruct the backend service to rotate webhook secret. - */ - @JsonProperty(value = "rotateWebhookSecret") - private Boolean rotateWebhookSecret; - - /** - * Get the webhookId property: Unique identifier for the webhook. - * - * @return the webhookId value. - */ - public String webhookId() { - return this.webhookId; - } - - /** - * Set the webhookId property: Unique identifier for the webhook. - * - * @param webhookId the webhookId value to set. - * @return the Webhook object itself. - */ - public Webhook withWebhookId(String webhookId) { - this.webhookId = webhookId; - return this; - } - - /** - * Get the webhookUrl property: URL that gets invoked by the webhook. - * - * @return the webhookUrl value. - */ - public String webhookUrl() { - return this.webhookUrl; - } - - /** - * Set the webhookUrl property: URL that gets invoked by the webhook. - * - * @param webhookUrl the webhookUrl value to set. - * @return the Webhook object itself. - */ - public Webhook withWebhookUrl(String webhookUrl) { - this.webhookUrl = webhookUrl; - return this; - } - - /** - * Get the webhookSecretUpdateTime property: Time when the webhook secret was updated. - * - * @return the webhookSecretUpdateTime value. - */ - public String webhookSecretUpdateTime() { - return this.webhookSecretUpdateTime; - } - - /** - * Set the webhookSecretUpdateTime property: Time when the webhook secret was updated. - * - * @param webhookSecretUpdateTime the webhookSecretUpdateTime value to set. - * @return the Webhook object itself. - */ - public Webhook withWebhookSecretUpdateTime(String webhookSecretUpdateTime) { - this.webhookSecretUpdateTime = webhookSecretUpdateTime; - return this; - } - - /** - * Get the rotateWebhookSecret property: A flag to instruct the backend service to rotate webhook secret. - * - * @return the rotateWebhookSecret value. - */ - public Boolean rotateWebhookSecret() { - return this.rotateWebhookSecret; - } - - /** - * Set the rotateWebhookSecret property: A flag to instruct the backend service to rotate webhook secret. - * - * @param rotateWebhookSecret the rotateWebhookSecret value to set. - * @return the Webhook object itself. - */ - public Webhook withRotateWebhookSecret(Boolean rotateWebhookSecret) { - this.rotateWebhookSecret = rotateWebhookSecret; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/package-info.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/package-info.java deleted file mode 100644 index 7d0c87c62078..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for SecurityInsights. API spec for Microsoft.SecurityInsights (Azure Security - * Insights) resource provider. - */ -package com.azure.resourcemanager.securityinsights.models; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/package-info.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/package-info.java deleted file mode 100644 index 702e4085ae09..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for SecurityInsights. API spec for Microsoft.SecurityInsights (Azure Security - * Insights) resource provider. - */ -package com.azure.resourcemanager.securityinsights; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/module-info.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/module-info.java deleted file mode 100644 index 0d8b5f7fc371..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/module-info.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.securityinsights { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.securityinsights; - exports com.azure.resourcemanager.securityinsights.fluent; - exports com.azure.resourcemanager.securityinsights.fluent.models; - exports com.azure.resourcemanager.securityinsights.models; - - opens com.azure.resourcemanager.securityinsights.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.securityinsights.models to - com.azure.core, - com.fasterxml.jackson.databind; -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java deleted file mode 100644 index 68e39f44ac62..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -/** Samples for Actions CreateOrUpdate. */ -public final class ActionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/CreateActionOfAlertRule.json - */ - /** - * Sample code: Creates or updates an action of alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnActionOfAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .actions() - .define("912bec42-cb66-4c03-ac63-1761b6898c3e") - .withExistingAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withTriggerUri( - "https://prod-31.northcentralus.logic.azure.com:443/workflows/cd3765391efd48549fd7681ded1d48d7/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=signature") - .withLogicAppResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.Logic/workflows/MyAlerts") - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java deleted file mode 100644 index 4eade4f80487..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Actions Delete. */ -public final class ActionsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json - */ - /** - * Sample code: Delete an action of alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnActionOfAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .actions() - .deleteWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java deleted file mode 100644 index 3d2f9a3fcd1a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Actions Get. */ -public final class ActionsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json - */ - /** - * Sample code: Get an action of alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnActionOfAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .actions() - .getWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java deleted file mode 100644 index 61efbd321ea9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Actions ListByAlertRule. */ -public final class ActionsListByAlertRuleSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json - */ - /** - * Sample code: Get all actions of alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllActionsOfAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.actions().listByAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java deleted file mode 100644 index 5e2ef04f866c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for AlertRuleTemplates Get. */ -public final class AlertRuleTemplatesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json - */ - /** - * Sample code: Get alert rule template by Id. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAlertRuleTemplateById( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRuleTemplates() - .getWithResponse("myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java deleted file mode 100644 index 30931adbd1bb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for AlertRuleTemplates List. */ -public final class AlertRuleTemplatesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json - */ - /** - * Sample code: Get all alert rule templates. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllAlertRuleTemplates( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRuleTemplates().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java deleted file mode 100644 index df3209f52c0c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,635 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.AlertDetail; -import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.EntityMapping; -import com.azure.resourcemanager.securityinsights.models.EntityMappingType; -import com.azure.resourcemanager.securityinsights.models.EventGroupingAggregationKind; -import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; -import com.azure.resourcemanager.securityinsights.models.FieldMapping; -import com.azure.resourcemanager.securityinsights.models.FusionAlertRule; -import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings; -import com.azure.resourcemanager.securityinsights.models.FusionSourceSubTypeSetting; -import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFilter; -import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFiltersItem; -import com.azure.resourcemanager.securityinsights.models.GroupingConfiguration; -import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; -import com.azure.resourcemanager.securityinsights.models.MatchingMethod; -import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRule; -import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; -import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; -import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; -import com.azure.resourcemanager.securityinsights.models.TriggerOperator; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for AlertRules CreateOrUpdate. */ -public final class AlertRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRule.json - */ - /** - * Sample code: Creates or updates a Fusion alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAFusionAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "myFirstFusionRule", - new FusionAlertRule() - .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") - .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") - .withEnabled(true) - .withSourceSettings( - Arrays - .asList( - new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), - new FusionSourceSettings() - .withEnabled(true) - .withSourceName("Alert providers") - .withSourceSubTypes( - Arrays - .asList( - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Azure Active Directory Identity Protection") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Azure Defender") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Azure Defender for IoT") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft 365 Defender") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft Cloud App Security") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft Defender for Endpoint") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft Defender for Identity") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft Defender for Office 365") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))))), - new FusionSourceSettings() - .withEnabled(true) - .withSourceName("Raw logs from other sources") - .withSourceSubTypes( - Arrays - .asList( - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Palo Alto Networks") - .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json - */ - /** - * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAMicrosoftSecurityIncidentCreationRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "microsoftSecurityIncidentCreationRuleExample", - new MicrosoftSecurityIncidentCreationAlertRule() - .withEtag("\"260097e0-0000-0d00-0000-5d6fa88f0000\"") - .withDisplayName("testing displayname") - .withEnabled(true) - .withProductFilter(MicrosoftSecurityProductName.MICROSOFT_CLOUD_APP_SECURITY), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json - */ - /** - * Sample code: Creates or updates a Scheduled alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAScheduledAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new ScheduledAlertRule() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDescription("An example for a scheduled rule") - .withDisplayName("My scheduled rule") - .withEnabled(true) - .withSuppressionDuration(Duration.parse("PT1H")) - .withSuppressionEnabled(false) - .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) - .withTechniques(Arrays.asList("T1037", "T1021")) - .withIncidentConfiguration( - new IncidentConfiguration() - .withCreateIncident(true) - .withGroupingConfiguration( - new GroupingConfiguration() - .withEnabled(true) - .withReopenClosedIncident(false) - .withLookbackDuration(Duration.parse("PT5H")) - .withMatchingMethod(MatchingMethod.SELECTED) - .withGroupByEntities(Arrays.asList(EntityMappingType.HOST)) - .withGroupByAlertDetails(Arrays.asList(AlertDetail.DISPLAY_NAME)) - .withGroupByCustomDetails( - Arrays.asList("OperatingSystemType", "OperatingSystemName")))) - .withQuery("Heartbeat") - .withQueryFrequency(Duration.parse("PT1H")) - .withQueryPeriod(Duration.parse("P2DT1H30M")) - .withSeverity(AlertSeverity.HIGH) - .withTriggerOperator(TriggerOperator.GREATER_THAN) - .withTriggerThreshold(0) - .withEventGroupingSettings( - new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)) - .withCustomDetails(mapOf("OperatingSystemName", "OSName", "OperatingSystemType", "OSType")) - .withEntityMappings( - Arrays - .asList( - new EntityMapping() - .withEntityType(EntityMappingType.HOST) - .withFieldMappings( - Arrays - .asList( - new FieldMapping() - .withIdentifier("FullName") - .withColumnName("Computer"))), - new EntityMapping() - .withEntityType(EntityMappingType.IP) - .withFieldMappings( - Arrays - .asList( - new FieldMapping() - .withIdentifier("Address") - .withColumnName("ComputerIP"))))) - .withAlertDetailsOverride( - new AlertDetailsOverride() - .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json - */ - /** - * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAFusionAlertRuleWithScenarioExclusionPattern( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "myFirstFusionRule", - new FusionAlertRule() - .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") - .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") - .withEnabled(true) - .withSourceSettings( - Arrays - .asList( - new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), - new FusionSourceSettings() - .withEnabled(true) - .withSourceName("Alert providers") - .withSourceSubTypes( - Arrays - .asList( - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Azure Active Directory Identity Protection") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Azure Defender") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Azure Defender for IoT") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft 365 Defender") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft Cloud App Security") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft Defender for Endpoint") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft Defender for Identity") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Microsoft Defender for Office 365") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))), - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") - .withSeverityFilters( - new FusionSubTypeSeverityFilter() - .withFilters( - Arrays - .asList( - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.HIGH) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.MEDIUM) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.LOW) - .withEnabled(true), - new FusionSubTypeSeverityFiltersItem() - .withSeverity(AlertSeverity.INFORMATIONAL) - .withEnabled(true)))))), - new FusionSourceSettings() - .withEnabled(true) - .withSourceName("Raw logs from other sources") - .withSourceSubTypes( - Arrays - .asList( - new FusionSourceSubTypeSetting() - .withEnabled(true) - .withSourceSubTypeName("Palo Alto Networks") - .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateNrtAlertRule.json - */ - /** - * Sample code: Creates or updates a Nrt alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesANrtAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new NrtAlertRule() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDescription("") - .withQuery( - "ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity =" - + " ComputerIP_Hidden") - .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) - .withTechniques(Arrays.asList("T1037", "T1021")) - .withDisplayName("Rule2") - .withEnabled(true) - .withSuppressionDuration(Duration.parse("PT1H")) - .withSuppressionEnabled(false) - .withSeverity(AlertSeverity.HIGH) - .withIncidentConfiguration( - new IncidentConfiguration() - .withCreateIncident(true) - .withGroupingConfiguration( - new GroupingConfiguration() - .withEnabled(true) - .withReopenClosedIncident(false) - .withLookbackDuration(Duration.parse("PT5H")) - .withMatchingMethod(MatchingMethod.SELECTED) - .withGroupByEntities( - Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))) - .withEventGroupingSettings( - new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), - Context.NONE); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java deleted file mode 100644 index ae8c5d352789..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for AlertRules Delete. */ -public final class AlertRulesDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json - */ - /** - * Sample code: Delete an alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java deleted file mode 100644 index 5f59cda357eb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java +++ /dev/null @@ -1,66 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for AlertRules Get. */ -public final class AlertRulesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json - */ - /** - * Sample code: Get a Scheduled alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAScheduledAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json - */ - /** - * Sample code: Get an Nrt alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json - */ - /** - * Sample code: Get a Fusion alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json - */ - /** - * Sample code: Get a MicrosoftSecurityIncidentCreation rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMicrosoftSecurityIncidentCreationRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .getWithResponse("myRg", "myWorkspace", "microsoftSecurityIncidentCreationRuleExample", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java deleted file mode 100644 index a76a803ecb34..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for AlertRules List. */ -public final class AlertRulesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json - */ - /** - * Sample code: Get all alert rules. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllAlertRules(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java deleted file mode 100644 index 0ddbba866ce2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// 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.generated; - -import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; -import java.util.List; - -/** Samples for AutomationRules CreateOrUpdate. */ -public final class AutomationRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json - */ - /** - * Sample code: AutomationRules_CreateOrUpdate. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void automationRulesCreateOrUpdate( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .automationRules() - .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withExistingWorkspace("myRg", "myWorkspace") - .withDisplayName((String) null) - .withOrder(0) - .withTriggeringLogic((AutomationRuleTriggeringLogic) null) - .withActions((List) null) - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java deleted file mode 100644 index 9931b428f993..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for AutomationRules Delete. */ -public final class AutomationRulesDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json - */ - /** - * Sample code: AutomationRules_Delete. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void automationRulesDelete( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .automationRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java deleted file mode 100644 index 79bd1f2bf1dd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for AutomationRules Get. */ -public final class AutomationRulesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json - */ - /** - * Sample code: AutomationRules_Get. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .automationRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java deleted file mode 100644 index cb067a4161d2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for AutomationRules List. */ -public final class AutomationRulesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json - */ - /** - * Sample code: AutomationRules_List. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.automationRules().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java deleted file mode 100644 index 02135e4b1f24..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Samples for BookmarkOperation Expand. */ -public final class BookmarkOperationExpandSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json - */ - /** - * Sample code: Expand an bookmark. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void expandAnBookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkOperations() - .expandWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new BookmarkExpandParameters() - .withEndTime(OffsetDateTime.parse("2020-01-24T17:21:00.000Z")) - .withExpansionId(UUID.fromString("27f76e63-c41b-480f-bb18-12ad2e011d49")) - .withStartTime(OffsetDateTime.parse("2019-12-25T17:21:00.000Z")), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java deleted file mode 100644 index 4ee602ef802a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// 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.generated; - -/** Samples for BookmarkRelations CreateOrUpdate. */ -public final class BookmarkRelationsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json - */ - /** - * Sample code: Creates or updates a bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesABookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") - .withExistingBookmark("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096") - .withRelatedResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/incidents/afbd324f-6c48-459c-8710-8d1e1cd03812") - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java deleted file mode 100644 index 90fe86d803f0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations Delete. */ -public final class BookmarkRelationsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json - */ - /** - * Sample code: Delete the bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteTheBookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .deleteWithResponse( - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java deleted file mode 100644 index 6ae73ac9318f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations Get. */ -public final class BookmarkRelationsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json - */ - /** - * Sample code: Get a bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getABookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .getWithResponse( - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java deleted file mode 100644 index c04cb45847c2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations List. */ -public final class BookmarkRelationsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json - */ - /** - * Sample code: Get all bookmark relations. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllBookmarkRelations( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .list("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", null, null, null, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java deleted file mode 100644 index f54f13ae59da..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.generated; - -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; -import com.azure.resourcemanager.securityinsights.models.EntityFieldMapping; -import com.azure.resourcemanager.securityinsights.models.UserInfo; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for Bookmarks CreateOrUpdate. */ -public final class BookmarksCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/CreateBookmark.json - */ - /** - * Sample code: Creates or updates a bookmark. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesABookmark( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarks() - .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withCreated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) - .withCreatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) - .withDisplayName("My bookmark") - .withLabels(Arrays.asList("Tag1", "Tag2")) - .withNotes("Found a suspicious activity") - .withQuery("SecurityEvent | where TimeGenerated > ago(1d) and TimeGenerated < ago(2d)") - .withQueryResult("Security Event query result") - .withUpdated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) - .withUpdatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) - .withEntityMappings( - Arrays - .asList( - new BookmarkEntityMappings() - .withEntityType("Account") - .withFieldMappings( - Arrays - .asList( - new EntityFieldMapping() - .withIdentifier("Fullname") - .withValue("johndoe@microsoft.com"))))) - .withTactics(Arrays.asList(AttackTactic.EXECUTION)) - .withTechniques(Arrays.asList("T1609")) - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java deleted file mode 100644 index adaf45b1a342..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Bookmarks Delete. */ -public final class BookmarksDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json - */ - /** - * Sample code: Delete a bookmark. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarks() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java deleted file mode 100644 index cca078fc516b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Bookmarks Get. */ -public final class BookmarksGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json - */ - /** - * Sample code: Get a bookmark. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarks() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java deleted file mode 100644 index 7ff9e9471b73..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Bookmarks List. */ -public final class BookmarksListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarks.json - */ - /** - * Sample code: Get all bookmarks. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllBookmarks(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.bookmarks().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java deleted file mode 100644 index 236b908d0955..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java +++ /dev/null @@ -1,271 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; -import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.MstiCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.OfficeAtpCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.OfficeIrmCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.OfficePowerBICheckRequirements; -import com.azure.resourcemanager.securityinsights.models.TICheckRequirements; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiCheckRequirements; - -/** Samples for DataConnectorsCheckRequirementsOperation Post. */ -public final class DataConnectorsCheckRequirementsOperationPostSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json - */ - /** - * Sample code: Check requirements for OfficeATP. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForOfficeATP( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeAtpCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json - */ - /** - * Sample code: Check requirements for Office365Project. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForOffice365Project( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json - */ - /** - * Sample code: Check requirements for AAD. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAAD( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json - */ - /** - * Sample code: Check requirements for Mcas. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMcas( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsIoT.json - */ - /** - * Sample code: Check requirements for IoT. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForIoT( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse( - "myRg", - "myWorkspace", - new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json - */ - /** - * Sample code: Check requirements for Mdatp. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMdatp( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json - */ - /** - * Sample code: Check requirements for AAD - no authorization. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAADNoAuthorization( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json - */ - /** - * Sample code: Check requirements for ASC. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForASC( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse( - "myRg", - "myWorkspace", - new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json - */ - /** - * Sample code: Check requirements for MicrosoftThreatProtection. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMicrosoftThreatProtection( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MtpCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json - */ - /** - * Sample code: Check requirements for TI Taxii. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForTITaxii( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TiTaxiiCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json - */ - /** - * Sample code: Check requirements for OfficeIRM. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForOfficeIRM( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeIrmCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json - */ - /** - * Sample code: Check requirements for MicrosoftThreatIntelligence. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMicrosoftThreatIntelligence( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MstiCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json - */ - /** - * Sample code: Check requirements for OfficePowerBI. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForOfficePowerBI( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json - */ - /** - * Sample code: Check requirements for Dynamics365. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForDynamics365( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Dynamics365CheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json - */ - /** - * Sample code: Check requirements for AAD - no license. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAADNoLicense( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json - */ - /** - * Sample code: Check requirements for TI. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForTI( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TICheckRequirements(), Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java deleted file mode 100644 index d00218190776..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java +++ /dev/null @@ -1,83 +0,0 @@ -// 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.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.securityinsights.models.ConnectAuthKind; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; -import java.io.IOException; -import java.util.Arrays; - -/** Samples for DataConnectors Connect. */ -public final class DataConnectorsConnectSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json - */ - /** - * Sample code: Connect an APIPolling V2 logs data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void connectAnAPIPollingV2LogsDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .connectWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new DataConnectorConnectBody() - .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") - .withDataCollectionEndpoint("https://test.eastus.ingest.monitor.azure.com") - .withDataCollectionRuleImmutableId("dcr-34adsj9o7d6f9de204478b9cgb43b631") - .withOutputStream("Custom-MyTableRawData") - .withRequestConfigUserInputValues( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", - Object.class, - SerializerEncoding.JSON))), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json - */ - /** - * Sample code: Connect an APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void connectAnAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .connectWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new DataConnectorConnectBody() - .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") - .withRequestConfigUserInputValues( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", - Object.class, - SerializerEncoding.JSON))), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java deleted file mode 100644 index 8a4b352fb274..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java +++ /dev/null @@ -1,689 +0,0 @@ -// 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.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.securityinsights.models.Availability; -import com.azure.resourcemanager.securityinsights.models.AvailabilityStatus; -import com.azure.resourcemanager.securityinsights.models.CodelessApiPollingDataConnector; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingAuthProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingConfigProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingPagingProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingRequestProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingResponseProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesDataTypesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesGraphQueriesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesInstructionStepsItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesSampleQueriesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiDataConnector; -import com.azure.resourcemanager.securityinsights.models.ConnectivityType; -import com.azure.resourcemanager.securityinsights.models.DataTypeState; -import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnector; -import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypesDynamics365CdsActivities; -import com.azure.resourcemanager.securityinsights.models.InstructionStepsInstructionsItem; -import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; -import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; -import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector; -import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesExchange; -import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesSharePoint; -import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesTeams; -import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypesLogs; -import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector; -import com.azure.resourcemanager.securityinsights.models.PermissionProviderScope; -import com.azure.resourcemanager.securityinsights.models.Permissions; -import com.azure.resourcemanager.securityinsights.models.PermissionsCustomsItem; -import com.azure.resourcemanager.securityinsights.models.PermissionsResourceProviderItem; -import com.azure.resourcemanager.securityinsights.models.PollingFrequency; -import com.azure.resourcemanager.securityinsights.models.ProviderName; -import com.azure.resourcemanager.securityinsights.models.RequiredPermissions; -import com.azure.resourcemanager.securityinsights.models.SettingType; -import com.azure.resourcemanager.securityinsights.models.TIDataConnector; -import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypesIndicators; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnector; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypesTaxiiClient; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; - -/** Samples for DataConnectors CreateOrUpdate. */ -public final class DataConnectorsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json - */ - /** - * Sample code: Creates or updates an Office365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnOffice365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new OfficeDataConnector() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDataTypes( - new OfficeDataConnectorDataTypes() - .withExchange(new OfficeDataConnectorDataTypesExchange().withState(DataTypeState.ENABLED)) - .withSharePoint( - new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) - .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))) - .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json - */ - /** - * Sample code: Creates or updates an Office PowerBI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnOfficePowerBIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new OfficePowerBIDataConnector() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDataTypes( - new OfficePowerBIConnectorDataTypes() - .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) - .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json - */ - /** - * Sample code: Creates or updates a Threat Intelligence Taxii data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new TiTaxiiDataConnector() - .withEtag("d12423f6-a60b-4ca5-88c0-feb1a182d0f0") - .withWorkspaceId("dd124572-4962-4495-9bd2-9dade12314b4") - .withFriendlyName("testTaxii") - .withTaxiiServer("https://limo.anomali.com/api/v1/taxii2/feeds") - .withCollectionId("135") - .withUsername("--") - .withPassword("--") - .withTaxiiLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) - .withPollingFrequency(PollingFrequency.ONCE_ADAY) - .withDataTypes( - new TiTaxiiDataConnectorDataTypes() - .withTaxiiClient( - new TiTaxiiDataConnectorDataTypesTaxiiClient().withState(DataTypeState.ENABLED))) - .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json - */ - /** - * Sample code: Creates or updates an Threat Intelligence Platform data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new TIDataConnector() - .withTipLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) - .withDataTypes( - new TIDataConnectorDataTypes() - .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))) - .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json - */ - /** - * Sample code: Creates or updates a Dynamics365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesADynamics365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "c2541efb-c9a6-47fe-9501-87d1017d1512", - new Dynamics365DataConnector() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDataTypes( - new Dynamics365DataConnectorDataTypes() - .withDynamics365CdsActivities( - new Dynamics365DataConnectorDataTypesDynamics365CdsActivities() - .withState(DataTypeState.ENABLED))) - .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateGenericUI.json - */ - /** - * Sample code: Creates or updates a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new CodelessUiDataConnector() - .withConnectorUiConfig( - new CodelessUiConnectorConfigProperties() - .withTitle("Qualys Vulnerability Management (CCP DEMO)") - .withPublisher("Qualys") - .withDescriptionMarkdown( - "The [Qualys Vulnerability Management" - + " (VM)](https://www.qualys.com/apps/vulnerability-management/) data connector" - + " provides the capability to ingest vulnerability host detection data into Azure" - + " Sentinel through the Qualys API. The connector provides visibility into host" - + " detection data from vulerability scans. This connector provides Azure Sentinel" - + " the capability to view dashboards, create custom alerts, and improve" - + " investigation ") - .withGraphQueriesTableName("QualysHostDetection_CL") - .withGraphQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesGraphQueriesItem() - .withMetricName("Total data received") - .withLegend("{{graphQueriesTableName}}") - .withBaseQuery("{{graphQueriesTableName}}"))) - .withSampleQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesSampleQueriesItem() - .withDescription("Top 10 Vulerabilities detected") - .withQuery( - "{{graphQueriesTableName}}\n" - + " | mv-expand todynamic(Detections_s)\n" - + " | extend Vulnerability = tostring(Detections_s.Results)\n" - + " | summarize count() by Vulnerability\n" - + " | top 10 by count_"))) - .withDataTypes( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesDataTypesItem() - .withName("{{graphQueriesTableName}}") - .withLastDataReceivedQuery( - "{{graphQueriesTableName}}\n" - + " | summarize Time = max(TimeGenerated)\n" - + " | where isnotempty(Time)"))) - .withConnectivityCriteria( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() - .withType(ConnectivityType.IS_CONNECTED_QUERY) - .withValue( - Arrays - .asList( - "{{graphQueriesTableName}}\n" - + " | summarize LastLogReceived =" - + " max(TimeGenerated)\n" - + " | project IsConnected = LastLogReceived >" - + " ago(30d)")))) - .withAvailability(new Availability().withStatus(AvailabilityStatus.ONE).withIsPreview(true)) - .withPermissions( - new Permissions() - .withResourceProvider( - Arrays - .asList( - new PermissionsResourceProviderItem() - .withProvider( - ProviderName.MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES) - .withPermissionsDisplayText( - "read and write permissions on the workspace are required.") - .withProviderDisplayName("Workspace") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions() - .withWrite(true) - .withRead(true) - .withDelete(true)), - new PermissionsResourceProviderItem() - .withProvider( - ProviderName - .MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES_SHARED_KEYS) - .withPermissionsDisplayText( - "read permissions to shared keys for the workspace are" - + " required. [See the documentation to learn more about" - + " workspace" - + " keys](https://docs.microsoft.com/azure/azure-monitor/platform/agent-windows#obtain-workspace-id-and-key).") - .withProviderDisplayName("Keys") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions().withAction(true)))) - .withCustoms( - Arrays - .asList( - new PermissionsCustomsItem() - .withName("Microsoft.Web/sites permissions") - .withDescription( - "Read and write permissions to Azure Functions to create a" - + " Function App is required. [See the documentation to" - + " learn more about Azure" - + " Functions](https://docs.microsoft.com/azure/azure-functions/)."), - new PermissionsCustomsItem() - .withName("Qualys API Key") - .withDescription( - "A Qualys VM API username and password is required. [See the" - + " documentation to learn more about Qualys VM" - + " API](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf).")))) - .withInstructionSteps( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - ">**NOTE:** This connector uses Azure Functions to connect to Qualys VM" - + " to pull its logs into Azure Sentinel. This might result in" - + " additional data ingestion costs. Check the [Azure Functions" - + " pricing" - + " page](https://azure.microsoft.com/pricing/details/functions/)" - + " for details."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - ">**(Optional Step)** Securely store workspace and API authorization" - + " key(s) or token(s) in Azure Key Vault. Azure Key Vault provides" - + " a secure mechanism to store and retrieve key values. [Follow" - + " these" - + " instructions](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " to use Azure Key Vault with an Azure Function App."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**STEP 1 - Configuration steps for the Qualys VM API**\n\n" - + "1. Log into the Qualys Vulnerability Management console with an" - + " administrator account, select the **Users** tab and the" - + " **Users** subtab. \n" - + "2. Click on the **New** drop-down menu and select **Users..**\n" - + "3. Create a username and password for the API account. \n" - + "4. In the **User Roles** tab, ensure the account role is set to" - + " **Manager** and access is allowed to **GUI** and **API**\n" - + "4. Log out of the administrator account and log into the console" - + " with the new API credentials for validation, then log out of" - + " the API account. \n" - + "5. Log back into the console using an administrator account and" - + " modify the API accounts User Roles, removing access to **GUI**." - + " \n" - + "6. Save all changes."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**STEP 2 - Choose ONE from the following two deployment options to" - + " deploy the connector and the associated Azure Function**\n\n" - + ">**IMPORTANT:** Before deploying the Qualys VM connector, have" - + " the Workspace ID and Workspace Primary Key (can be copied from" - + " the following), as well as the Qualys VM API Authorization" - + " Key(s), readily available.") - .withInstructions( - Arrays - .asList( - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"fillWith\":[\"WorkspaceId\"],\"label\":\"Workspace" - + " ID\"}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.COPYABLE_LABEL), - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"fillWith\":[\"PrimaryKey\"],\"label\":\"Primary" - + " Key\"}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.COPYABLE_LABEL))), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Option 1 - Azure Resource Manager (ARM) Template") - .withDescription( - "Use this method for automated deployment of the Qualys VM connector" - + " using an ARM Tempate.\n\n" - + "1. Click the **Deploy to Azure** button below. \n\n" - + "\t[![Deploy To" - + " Azure](https://aka.ms/deploytoazurebutton)](https://aka.ms/sentinelqualysvmazuredeploy)\n" - + "2. Select the preferred **Subscription**, **Resource Group** and" - + " **Location**. \n" - + "3. Enter the **Workspace ID**, **Workspace Key**, **API" - + " Username**, **API Password** , update the **URI**, and any" - + " additional URI **Filter Parameters** (each filter should be" - + " separated by an \"&\" symbol, no spaces.) \n" - + "> - Enter the URI that corresponds to your region. The complete" - + " list of API Server URLs can be [found" - + " here](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf#G4.735348)" - + " -- There is no need to add a time suffix to the URI, the" - + " Function App will dynamically append the Time Value to the URI" - + " in the proper format. \n" - + " - The default **Time Interval** is set to pull the last five" - + " (5) minutes of data. If the time interval needs to be modified," - + " it is recommended to change the Function App Timer Trigger" - + " accordingly (in the function.json file, post deployment) to" - + " prevent overlapping data ingestion. \n" - + "> - Note: If using Azure Key Vault secrets for any of the values" - + " above, use the`@Microsoft.KeyVault(SecretUri={Security" - + " Identifier})`schema in place of the string values. Refer to" - + " [Key Vault references" - + " documentation](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " for further details. \n" - + "4. Mark the checkbox labeled **I agree to the terms and" - + " conditions stated above**. \n" - + "5. Click **Purchase** to deploy."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Option 2 - Manual Deployment of Azure Functions") - .withDescription( - "Use the following step-by-step instructions to deploy the Quayls VM" - + " connector manually with Azure Functions."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**1. Create a Function App**\n\n" - + "1. From the Azure Portal, navigate to [Function" - + " App](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Web%2Fsites/kind/functionapp)," - + " and select **+ Add**.\n" - + "2. In the **Basics** tab, ensure Runtime stack is set to" - + " **Powershell Core**. \n" - + "3. In the **Hosting** tab, ensure the **Consumption" - + " (Serverless)** plan type is selected.\n" - + "4. Make other preferrable configuration changes, if needed, then" - + " click **Create**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**2. Import Function App Code**\n\n" - + "1. In the newly created Function App, select **Functions** on" - + " the left pane and click **+ New Function**.\n" - + "2. Select **Timer Trigger**.\n" - + "3. Enter a unique Function **Name** and leave the default cron" - + " schedule of every 5 minutes, then click **Create**.\n" - + "5. Click on **Code + Test** on the left pane. \n" - + "6. Copy the [Function App" - + " Code](https://aka.ms/sentinelqualysvmazurefunctioncode) and" - + " paste into the Function App `run.ps1` editor.\n" - + "7. Click **Save**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**3. Configure the Function App**\n\n" - + "1. In the Function App, select the Function App Name and select" - + " **Configuration**.\n" - + "2. In the **Application settings** tab, select **+ New" - + " application setting**.\n" - + "3. Add each of the following seven (7) application settings" - + " individually, with their respective string values" - + " (case-sensitive): \n" - + "\t\tapiUsername\n" - + "\t\tapiPassword\n" - + "\t\tworkspaceID\n" - + "\t\tworkspaceKey\n" - + "\t\turi\n" - + "\t\tfilterParameters\n" - + "\t\ttimeInterval\n" - + "> - Enter the URI that corresponds to your region. The complete" - + " list of API Server URLs can be [found" - + " here](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf#G4.735348)." - + " The `uri` value must follow the following schema: `https:///api/2.0/fo/asset/host/vm/detection/?action=list&vm_processed_after=`" - + " -- There is no need to add a time suffix to the URI, the" - + " Function App will dynamically append the Time Value to the URI" - + " in the proper format.\n" - + "> - Add any additional filter parameters, for the" - + " `filterParameters` variable, that need to be appended to the" - + " URI. Each parameter should be seperated by an \"&\" symbol and" - + " should not include any spaces.\n" - + "> - Set the `timeInterval` (in minutes) to the value of `5` to" - + " correspond to the Timer Trigger of every `5` minutes. If the" - + " time interval needs to be modified, it is recommended to change" - + " the Function App Timer Trigger accordingly to prevent" - + " overlapping data ingestion.\n" - + "> - Note: If using Azure Key Vault, use" - + " the`@Microsoft.KeyVault(SecretUri={Security Identifier})`schema" - + " in place of the string values. Refer to [Key Vault references" - + " documentation](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " for further details.\n" - + "4. Once all application settings have been entered, click" - + " **Save**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**4. Configure the host.json**.\n\n" - + "Due to the potentially large amount of Qualys host detection" - + " data being ingested, it can cause the execution time to surpass" - + " the default Function App timeout of five (5) minutes. Increase" - + " the default timeout duration to the maximum of ten (10)" - + " minutes, under the Consumption Plan, to allow more time for the" - + " Function App to execute.\n\n" - + "1. In the Function App, select the Function App Name and select" - + " the **App Service Editor** blade.\n" - + "2. Click **Go** to open the editor, then select the" - + " **host.json** file under the **wwwroot** directory.\n" - + "3. Add the line `\"functionTimeout\": \"00:10:00\",` above the" - + " `managedDependancy` line \n" - + "4. Ensure **SAVED** appears on the top right corner of the" - + " editor, then exit the editor.\n\n" - + "> NOTE: If a longer timeout duration is required, consider" - + " upgrading to an [App Service" - + " Plan](https://docs.microsoft.com/azure/azure-functions/functions-scale#timeout)")))), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json - */ - /** - * Sample code: Creates or updates an Office365 Project data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnOffice365ProjectDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new Office365ProjectDataConnector() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDataTypes( - new Office365ProjectConnectorDataTypes() - .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) - .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateAPIPolling.json - */ - /** - * Sample code: Creates or updates a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new CodelessApiPollingDataConnector() - .withConnectorUiConfig( - new CodelessUiConnectorConfigProperties() - .withTitle("GitHub Enterprise Audit Log") - .withPublisher("GitHub") - .withDescriptionMarkdown( - "The GitHub audit log connector provides the capability to ingest GitHub logs into" - + " Azure Sentinel. By connecting GitHub audit logs into Azure Sentinel, you can" - + " view this data in workbooks, use it to create custom alerts, and improve your" - + " investigation process.") - .withGraphQueriesTableName("GitHubAuditLogPolling_CL") - .withGraphQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesGraphQueriesItem() - .withMetricName("Total events received") - .withLegend("GitHub audit log events") - .withBaseQuery("{{graphQueriesTableName}}"))) - .withSampleQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesSampleQueriesItem() - .withDescription("All logs") - .withQuery("{{graphQueriesTableName}}\n | take 10 "))) - .withDataTypes( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesDataTypesItem() - .withName("{{graphQueriesTableName}}") - .withLastDataReceivedQuery( - "{{graphQueriesTableName}}\n" - + " | summarize Time = max(TimeGenerated)\n" - + " | where isnotempty(Time)"))) - .withConnectivityCriteria( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() - .withType(ConnectivityType.fromString("SentinelKindsV2")) - .withValue(Arrays.asList()))) - .withAvailability(new Availability().withStatus(AvailabilityStatus.ONE).withIsPreview(true)) - .withPermissions( - new Permissions() - .withResourceProvider( - Arrays - .asList( - new PermissionsResourceProviderItem() - .withProvider( - ProviderName.MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES) - .withPermissionsDisplayText( - "read and write permissions are required.") - .withProviderDisplayName("Workspace") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions() - .withWrite(true) - .withRead(true) - .withDelete(true)))) - .withCustoms( - Arrays - .asList( - new PermissionsCustomsItem() - .withName("GitHub API personal token Key") - .withDescription( - "You need access to GitHub personal token, the key should have" - + " 'admin:org' scope")))) - .withInstructionSteps( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Connect GitHub Enterprise Audit Log to Azure Sentinel") - .withDescription( - "Enable GitHub audit Logs. \n" - + " Follow" - + " [this](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)" - + " to create or find your personal key") - .withInstructions( - Arrays - .asList( - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"enable\":\"true\",\"userRequestPlaceHoldersInput\":[{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"\",\"requestObjectKey\":\"apiEndpoint\"}]}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.fromString("APIKey"))))))) - .withPollingConfig( - new CodelessConnectorPollingConfigProperties() - .withAuth( - new CodelessConnectorPollingAuthProperties() - .withAuthType("APIKey") - .withApiKeyName("Authorization") - .withApiKeyIdentifier("token")) - .withRequest( - new CodelessConnectorPollingRequestProperties() - .withApiEndpoint("https://api.github.com/organizations/{{placeHolder1}}/audit-log") - .withRateLimitQps(50) - .withQueryWindowInMin(15) - .withHttpMethod("Get") - .withQueryTimeFormat("yyyy-MM-ddTHH:mm:ssZ") - .withRetryCount(2) - .withTimeoutInSeconds(60) - .withHeaders( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"Accept\":\"application/json\",\"User-Agent\":\"Scuba\"}", - Object.class, - SerializerEncoding.JSON)) - .withQueryParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"phrase\":\"created:{_QueryWindowStartTime}..{_QueryWindowEndTime}\"}", - Object.class, - SerializerEncoding.JSON))) - .withPaging( - new CodelessConnectorPollingPagingProperties() - .withPagingType("LinkHeader") - .withPageSizeParaName("per_page")) - .withResponse( - new CodelessConnectorPollingResponseProperties() - .withEventsJsonPaths(Arrays.asList("$")))), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java deleted file mode 100644 index 54ce6d4bb0bc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java +++ /dev/null @@ -1,85 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for DataConnectors Delete. */ -public final class DataConnectorsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json - */ - /** - * Sample code: Delete an Office365 Project data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnOffice365ProjectDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteGenericUI.json - */ - /** - * Sample code: Delete a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json - */ - /** - * Sample code: Delete an Office365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnOffice365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json - */ - /** - * Sample code: Delete an Office PowerBI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnOfficePowerBIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json - */ - /** - * Sample code: Delete a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java deleted file mode 100644 index b9727cf73d26..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for DataConnectors Disconnect. */ -public final class DataConnectorsDisconnectSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json - */ - /** - * Sample code: Disconnect an APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void disconnectAnAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .disconnectWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java deleted file mode 100644 index 4e229927f6b9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java +++ /dev/null @@ -1,309 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for DataConnectors Get. */ -public final class DataConnectorsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json - */ - /** - * Sample code: Get an Office365 Project data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOffice365ProjectDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetGenericUI.json - */ - /** - * Sample code: Get a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json - */ - /** - * Sample code: Get an Office ATP data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOfficeATPDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetIoTById.json - */ - /** - * Sample code: Get a IoT data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAIoTDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json - */ - /** - * Sample code: Get a MCAS data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMCASDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json - */ - /** - * Sample code: Get a TI Taxii data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getATITaxiiDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json - */ - /** - * Sample code: Get a MicrosoftThreatIntelligence data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMicrosoftThreatIntelligenceDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json - */ - /** - * Sample code: Get a ASC data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAASCDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json - */ - /** - * Sample code: Get a TI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json - */ - /** - * Sample code: Get an AwsCloudTrail data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAwsCloudTrailDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json - */ - /** - * Sample code: Get a MDATP data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMDATPDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json - */ - /** - * Sample code: Get a MicrosoftThreatProtection data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMicrosoftThreatProtectionDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json - */ - /** - * Sample code: Get an AAD data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAADDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json - */ - /** - * Sample code: Get an AATP data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAATPDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAPIPolling.json - */ - /** - * Sample code: Get a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json - */ - /** - * Sample code: Get an Office IRM data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOfficeIRMDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json - */ - /** - * Sample code: Get a Dynamics365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getADynamics365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json - */ - /** - * Sample code: Get an Office365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOffice365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json - */ - /** - * Sample code: Get an Aws S3 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAwsS3DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json - */ - /** - * Sample code: Get an Office365 PowerBI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOffice365PowerBIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java deleted file mode 100644 index 962a0a285d9e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for DataConnectors List. */ -public final class DataConnectorsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json - */ - /** - * Sample code: Get all data connectors. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllDataConnectors( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java deleted file mode 100644 index 0bb699a3decd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for DomainWhois Get. */ -public final class DomainWhoisGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetWhoisByDomainName.json - */ - /** - * Sample code: Get whois information for a single domain name. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getWhoisInformationForASingleDomainName( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.domainWhois().getWithResponse("myRg", "microsoft.com", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java deleted file mode 100644 index c18a6971c401..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Samples for Entities Expand. */ -public final class EntitiesExpandSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/expand/PostExpandEntity.json - */ - /** - * Sample code: Expand an entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void expandAnEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .expandWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityExpandParameters() - .withEndTime(OffsetDateTime.parse("2019-05-26T00:00:00.000Z")) - .withExpansionId(UUID.fromString("a77992f3-25e9-4d01-99a4-5ff606cc410a")) - .withStartTime(OffsetDateTime.parse("2019-04-25T00:00:00.000Z")), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java deleted file mode 100644 index 87a4794ab75b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for Entities GetInsights. */ -public final class EntitiesGetInsightsSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/insights/PostGetInsights.json - */ - /** - * Sample code: Entity Insight. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void entityInsight(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .getInsightsWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityGetInsightsParameters() - .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) - .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) - .withAddDefaultExtendedTimeRange(false) - .withInsightQueryIds(Arrays.asList(UUID.fromString("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4"))), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java deleted file mode 100644 index 03835df0aca6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java +++ /dev/null @@ -1,260 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Entities Get. */ -public final class EntitiesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSubmissionMailEntityById.json - */ - /** - * Sample code: Get a submissionMail entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASubmissionMailEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetDnsEntityById.json - */ - /** - * Sample code: Get a dns entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getADnsEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileHashEntityById.json - */ - /** - * Sample code: Get a file hash entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIoTDeviceEntityById.json - */ - /** - * Sample code: Get an IoT device entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIoTDeviceEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryKeyEntityById.json - */ - /** - * Sample code: Get a registry key entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getARegistryKeyEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailboxEntityById.json - */ - /** - * Sample code: Get a mailbox entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMalwareEntityById.json - */ - /** - * Sample code: Get a malware entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityAlertEntityById.json - */ - /** - * Sample code: Get a security alert entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASecurityAlertEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIpEntityById.json - */ - /** - * Sample code: Get an ip entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAccountEntityById.json - */ - /** - * Sample code: Get an account entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetCloudApplicationEntityById.json - */ - /** - * Sample code: Get a cloud application entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getACloudApplicationEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileEntityById.json - */ - /** - * Sample code: Get a file entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryValueEntityById.json - */ - /** - * Sample code: Get a registry value entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getARegistryValueEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetUrlEntityById.json - */ - /** - * Sample code: Get a url entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailClusterEntityById.json - */ - /** - * Sample code: Get a mailCluster entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailClusterEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityGroupEntityById.json - */ - /** - * Sample code: Get a security group entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASecurityGroupEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailMessageEntityById.json - */ - /** - * Sample code: Get a mailMessage entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailMessageEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAzureResourceEntityById.json - */ - /** - * Sample code: Get an azure resource entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAzureResourceEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetHostEntityById.json - */ - /** - * Sample code: Get a host entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAHostEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetProcessEntityById.json - */ - /** - * Sample code: Get a process entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAProcessEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java deleted file mode 100644 index 660a3055de2e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; -import java.time.OffsetDateTime; - -/** Samples for EntitiesGetTimeline List. */ -public final class EntitiesGetTimelineListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/timeline/PostTimelineEntity.json - */ - /** - * Sample code: Entity timeline. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void entityTimeline(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entitiesGetTimelines() - .listWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityTimelineParameters() - .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) - .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) - .withNumberOfBucket(4), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java deleted file mode 100644 index 76d03c406094..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Entities List. */ -public final class EntitiesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetEntities.json - */ - /** - * Sample code: Get all entities. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntities(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java deleted file mode 100644 index a07e0a7b42bd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; - -/** Samples for Entities Queries. */ -public final class EntitiesQueriesSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetQueries.json - */ - /** - * Sample code: Get Entity Query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .queriesWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - EntityItemQueryKind.INSIGHT, - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java deleted file mode 100644 index 49db6e77c5cc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntitiesRelations List. */ -public final class EntitiesRelationsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json - */ - /** - * Sample code: Get all relations of an entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllRelationsOfAnEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entitiesRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java deleted file mode 100644 index 719027f63353..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java +++ /dev/null @@ -1,101 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ActivityCustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for EntityQueries CreateOrUpdate. */ -public final class EntityQueriesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json - */ - /** - * Sample code: Creates or updates an Activity entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnActivityEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "07da3cc8-c8ad-4710-a44e-334cdcb7882b", - new ActivityCustomEntityQuery() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withTitle("An account was deleted on this host") - .withContent("On '{{Computer}}' the account '{{TargetAccount}}' was deleted by '{{AddedBy}}'") - .withDescription("Account deleted on host") - .withQueryDefinitions( - new ActivityEntityQueriesPropertiesQueryDefinitions() - .withQuery( - "let GetAccountActions = (v_Host_Name:string, v_Host_NTDomain:string," - + " v_Host_DnsDomain:string, v_Host_AzureID:string, v_Host_OMSAgentID:string){\n" - + "SecurityEvent\n" - + "| where EventID in (4725, 4726, 4767, 4720, 4722, 4723, 4724)\n" - + "// parsing for Host to handle variety of conventions coming from data\n" - + "| extend Host_HostName = case(\n" - + "Computer has '@', tostring(split(Computer, '@')[0]),\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[1]),\n" - + "Computer has '.', tostring(split(Computer, '.')[0]),\n" - + "Computer\n" - + ")\n" - + "| extend Host_NTDomain = case(\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[0]), \n" - + "Computer has '.', tostring(split(Computer, '.')[-2]), \n" - + "Computer\n" - + ")\n" - + "| extend Host_DnsDomain = case(\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[0]), \n" - + "Computer has '.', strcat_array(array_slice(split(Computer,'.'),-2,-1),'.'), \n" - + "Computer\n" - + ")\n" - + "| where (Host_HostName =~ v_Host_Name and Host_NTDomain =~ v_Host_NTDomain) \n" - + "or (Host_HostName =~ v_Host_Name and Host_DnsDomain =~ v_Host_DnsDomain) \n" - + "or v_Host_AzureID =~ _ResourceId \n" - + "or v_Host_OMSAgentID == SourceComputerId\n" - + "| project TimeGenerated, EventID, Activity, Computer, TargetAccount," - + " TargetUserName, TargetDomainName, TargetSid, SubjectUserName, SubjectUserSid," - + " _ResourceId, SourceComputerId\n" - + "| extend AddedBy = SubjectUserName\n" - + "// Future support for Activities\n" - + "| extend timestamp = TimeGenerated, HostCustomEntity = Computer," - + " AccountCustomEntity = TargetAccount\n" - + "};\n" - + "GetAccountActions('{{Host_HostName}}', '{{Host_NTDomain}}'," - + " '{{Host_DnsDomain}}', '{{Host_AzureID}}', '{{Host_OMSAgentID}}')\n" - + " \n" - + "| where EventID == 4726 ")) - .withInputEntityType(EntityType.HOST) - .withRequiredInputFieldsSets( - Arrays - .asList( - Arrays.asList("Host_HostName", "Host_NTDomain"), - Arrays.asList("Host_HostName", "Host_DnsDomain"), - Arrays.asList("Host_AzureID"), - Arrays.asList("Host_OMSAgentID"))) - .withEntitiesFilter(mapOf("Host_OsFamily", Arrays.asList("Windows"))) - .withEnabled(true), - Context.NONE); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java deleted file mode 100644 index 9ca8ca1c3964..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntityQueries Delete. */ -public final class EntityQueriesDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json - */ - /** - * Sample code: Delete an entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java deleted file mode 100644 index c5ddd58221cf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntityQueries Get. */ -public final class EntityQueriesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json - */ - /** - * Sample code: Get an Activity entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnActivityEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json - */ - /** - * Sample code: Get an Expansion entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnExpansionEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java deleted file mode 100644 index 3f319789b367..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; - -/** Samples for EntityQueries List. */ -public final class EntityQueriesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetEntityQueries.json - */ - /** - * Sample code: Get all entity queries. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntityQueries(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueries().list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java deleted file mode 100644 index 8e1290833c7a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntityQueryTemplates Get. */ -public final class EntityQueryTemplatesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json - */ - /** - * Sample code: Get an Activity entity query template. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnActivityEntityQueryTemplate( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueryTemplates() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java deleted file mode 100644 index 4648fd151d8b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant88; - -/** Samples for EntityQueryTemplates List. */ -public final class EntityQueryTemplatesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json - */ - /** - * Sample code: Get all entity query templates. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntityQueryTemplates( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant88.ACTIVITY, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java deleted file mode 100644 index de44787f195e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntityRelations GetRelation. */ -public final class EntityRelationsGetRelationSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetEntityRelationByName.json - */ - /** - * Sample code: Get an entity relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnEntityRelation(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityRelations() - .getRelationWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java deleted file mode 100644 index a839ca483bbc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// 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.generated; - -import com.azure.resourcemanager.securityinsights.models.FileFormat; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; - -/** Samples for FileImports Create. */ -public final class FileImportsCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/CreateFileImport.json - */ - /** - * Sample code: Create a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withExistingWorkspace("myRg", "myWorkspace") - .withIngestionMode(IngestionMode.INGEST_ANY_VALID_RECORDS) - .withContentType(FileImportContentType.STIX_INDICATOR) - .withImportFile( - new FileMetadata().withFileFormat(FileFormat.JSON).withFileName("myFile.json").withFileSize(4653)) - .withSource("mySource") - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java deleted file mode 100644 index 6e961ca4a8bd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for FileImports Delete. */ -public final class FileImportsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/DeleteFileImport.json - */ - /** - * Sample code: Delete a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.fileImports().delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java deleted file mode 100644 index cf0ff15ffb5b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for FileImports Get. */ -public final class FileImportsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImportById.json - */ - /** - * Sample code: Get a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java deleted file mode 100644 index 4f080eb0b16c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for FileImports List. */ -public final class FileImportsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json - */ - /** - * Sample code: Get all file imports. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllFileImports(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java deleted file mode 100644 index 8a16e508a98f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.generated; - -/** Samples for IncidentComments CreateOrUpdate. */ -public final class IncidentCommentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json - */ - /** - * Sample code: Creates or updates an incident comment. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentComments() - .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") - .withExistingIncident("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withMessage("Some message") - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java deleted file mode 100644 index ab58f3db35c5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for IncidentComments Delete. */ -public final class IncidentCommentsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json - */ - /** - * Sample code: Delete the incident comment. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteTheIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentComments() - .deleteWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java deleted file mode 100644 index b0cc0dbe7c41..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for IncidentComments Get. */ -public final class IncidentCommentsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json - */ - /** - * Sample code: Get an incident comment. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentComments() - .getWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java deleted file mode 100644 index 3bdb6e55cdb5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for IncidentComments List. */ -public final class IncidentCommentsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json - */ - /** - * Sample code: Get all incident comments. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllIncidentComments( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentComments() - .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java deleted file mode 100644 index 4b99d62695e0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** Samples for IncidentRelations CreateOrUpdate. */ -public final class IncidentRelationsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json - */ - /** - * Sample code: Creates or updates an incident relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnIncidentRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentRelations() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - new RelationInner() - .withRelatedResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java deleted file mode 100644 index e9f0630456b0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for IncidentRelations Delete. */ -public final class IncidentRelationsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json - */ - /** - * Sample code: Delete the incident relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteTheIncidentRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentRelations() - .deleteWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java deleted file mode 100644 index 9ca14fce1f49..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for IncidentRelations Get. */ -public final class IncidentRelationsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json - */ - /** - * Sample code: Get an incident relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIncidentRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentRelations() - .getWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java deleted file mode 100644 index 223b77dfe78f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for IncidentRelations List. */ -public final class IncidentRelationsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json - */ - /** - * Sample code: Get all incident relations. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllIncidentRelations( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java deleted file mode 100644 index fac645158493..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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.generated; - -import com.azure.resourcemanager.securityinsights.models.IncidentClassification; -import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; -import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Samples for Incidents CreateOrUpdate. */ -public final class IncidentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateIncident.json - */ - /** - * Sample code: Creates or updates an incident. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnIncident( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withClassification(IncidentClassification.FALSE_POSITIVE) - .withClassificationComment("Not a malicious activity") - .withClassificationReason(IncidentClassificationReason.INCORRECT_ALERT_LOGIC) - .withDescription("This is a demo incident") - .withFirstActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:00:30Z")) - .withLastActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:05:30Z")) - .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) - .withSeverity(IncidentSeverity.HIGH) - .withStatus(IncidentStatus.CLOSED) - .withTitle("My incident") - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java deleted file mode 100644 index 1d10ad728869..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; - -/** Samples for Incidents CreateTeam. */ -public final class IncidentsCreateTeamSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateTeam.json - */ - /** - * Sample code: Creates incident teams group. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsIncidentTeamsGroup( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .createTeamWithResponse( - "ambawolvese5resourcegroup", - "AmbaE5WestCentralUS", - "69a30280-6a4c-4aa7-9af0-5d63f335d600", - new TeamProperties().withTeamName("Team name").withTeamDescription("Team description"), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java deleted file mode 100644 index 7213c317f62f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Incidents Delete. */ -public final class IncidentsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/DeleteIncident.json - */ - /** - * Sample code: Delete an incident. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java deleted file mode 100644 index aaebebca140b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Incidents Get. */ -public final class IncidentsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json - */ - /** - * Sample code: Get an incident. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java deleted file mode 100644 index 521cc7b9a7ea..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Incidents ListAlerts. */ -public final class IncidentsListAlertsSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json - */ - /** - * Sample code: Get all incident alerts. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllIncidentAlerts( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java deleted file mode 100644 index 396a34e22e02..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Incidents ListBookmarks. */ -public final class IncidentsListBookmarksSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json - */ - /** - * Sample code: Get all incident bookmarks. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllIncidentBookmarks( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java deleted file mode 100644 index 05dac3dfd232..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Incidents ListEntities. */ -public final class IncidentsListEntitiesSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json - */ - /** - * Sample code: Gets all incident related entities. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getsAllIncidentRelatedEntities( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java deleted file mode 100644 index 12ee00a614f6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Incidents List. */ -public final class IncidentsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json - */ - /** - * Sample code: Get all incidents. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllIncidents(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.incidents().list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java deleted file mode 100644 index 8aff9771734b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Incidents RunPlaybook. */ -public final class IncidentsRunPlaybookSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json - */ - /** - * Sample code: Incidents_RunPlaybook. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void incidentsRunPlaybook( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java deleted file mode 100644 index 4c5af0fbd9f2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for IpGeodata Get. */ -public final class IpGeodataGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetGeodataByIp.json - */ - /** - * Sample code: Get geodata for a single IP address. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getGeodataForASingleIPAddress( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java deleted file mode 100644 index 2e1c2cff2c93..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java +++ /dev/null @@ -1,117 +0,0 @@ -// 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.generated; - -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.azure.resourcemanager.securityinsights.models.Operator; -import com.azure.resourcemanager.securityinsights.models.SourceKind; -import com.azure.resourcemanager.securityinsights.models.SupportTier; -import java.time.LocalDate; -import java.util.Arrays; - -/** Samples for Metadata Create. */ -public final class MetadataCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json - */ - /** - * Sample code: Create/update full metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createUpdateFullMetadata( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .metadatas() - .define("metadataName") - .withExistingWorkspace("myRg", "myWorkspace") - .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") - .withParentId( - "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withVersion("1.0.0.0") - .withKind(Kind.ANALYTICS_RULE) - .withSource( - new MetadataSource() - .withKind(SourceKind.SOLUTION) - .withName("Contoso Solution 1.0") - .withSourceId("b688a130-76f4-4a07-bf57-762222a3cadf")) - .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) - .withSupport( - new MetadataSupport() - .withTier(SupportTier.PARTNER) - .withName("Microsoft") - .withEmail("support@microsoft.com") - .withLink("https://support.microsoft.com/")) - .withDependencies( - new MetadataDependencies() - .withOperator(Operator.AND) - .withCriteria( - Arrays - .asList( - new MetadataDependencies() - .withOperator(Operator.OR) - .withCriteria( - Arrays - .asList( - new MetadataDependencies() - .withContentId("045d06d0-ee72-4794-aba4-cf5646e4c756") - .withKind(Kind.DATA_CONNECTOR) - .withName("Microsoft Defender for Endpoint"), - new MetadataDependencies() - .withContentId("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d") - .withKind(Kind.DATA_CONNECTOR), - new MetadataDependencies() - .withContentId("de4dca9b-eb37-47d6-a56f-b8b06b261593") - .withKind(Kind.DATA_CONNECTOR) - .withVersion("2.0"))), - new MetadataDependencies() - .withContentId("31ee11cc-9989-4de8-b176-5e0ef5c4dbab") - .withKind(Kind.PLAYBOOK) - .withVersion("1.0"), - new MetadataDependencies() - .withContentId("21ba424a-9438-4444-953a-7059539a7a1b") - .withKind(Kind.PARSER)))) - .withCategories( - new MetadataCategories() - .withDomains(Arrays.asList("Application", "Security – Insider Threat")) - .withVerticals(Arrays.asList("Healthcare"))) - .withProviders(Arrays.asList("Amazon", "Microsoft")) - .withFirstPublishDate(LocalDate.parse("2021-05-18")) - .withLastPublishDate(LocalDate.parse("2021-05-18")) - .withCustomVersion("1.0") - .withContentSchemaVersion("2.0") - .withThreatAnalysisTactics(Arrays.asList("reconnaissance", "commandandcontrol")) - .withThreatAnalysisTechniques(Arrays.asList("T1548", "T1548.001")) - .withPreviewImages(Arrays.asList("firstImage.png", "secondImage.jpeg")) - .withPreviewImagesDark(Arrays.asList("firstImageDark.png", "secondImageDark.jpeg")) - .create(); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json - */ - /** - * Sample code: Create/update minimal metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createUpdateMinimalMetadata( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .metadatas() - .define("metadataName") - .withExistingWorkspace("myRg", "myWorkspace") - .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") - .withParentId( - "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withKind(Kind.ANALYTICS_RULE) - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java deleted file mode 100644 index 83b191e5ca95..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Metadata Delete. */ -public final class MetadataDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json - */ - /** - * Sample code: Delete metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java deleted file mode 100644 index 9d738dafd085..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Metadata Get. */ -public final class MetadataGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json - */ - /** - * Sample code: Get single metadata by name. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getSingleMetadataByName( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java deleted file mode 100644 index 05d6eb76725f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Metadata List. */ -public final class MetadataListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json - */ - /** - * Sample code: Get all metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json - */ - /** - * Sample code: Get all metadata with OData filter/orderby/skip/top. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllMetadataWithODataFilterOrderbySkipTop( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java deleted file mode 100644 index 91f5be55253b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataModel; - -/** Samples for Metadata Update. */ -public final class MetadataUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json - */ - /** - * Sample code: Update metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); - resource - .update() - .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) - .apply(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java deleted file mode 100644 index 83381c6ff091..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for OfficeConsents Delete. */ -public final class OfficeConsentsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json - */ - /** - * Sample code: Delete an office consent. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnOfficeConsent( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .officeConsents() - .deleteWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java deleted file mode 100644 index 82ebecfad742..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for OfficeConsents Get. */ -public final class OfficeConsentsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json - */ - /** - * Sample code: Get an office consent. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOfficeConsent(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .officeConsents() - .getWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java deleted file mode 100644 index bff20163b14d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for OfficeConsents List. */ -public final class OfficeConsentsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json - */ - /** - * Sample code: Get all office consents. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllOfficeConsents( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.officeConsents().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java deleted file mode 100644 index bd9e0689a55d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json - */ - /** - * Sample code: Get all operations. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.operations().list(Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java deleted file mode 100644 index 9b87891b4ad7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for ProductSettings Delete. */ -public final class ProductSettingsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/DeleteEyesOnSetting.json - */ - /** - * Sample code: Delete EyesOn settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteEyesOnSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java deleted file mode 100644 index c48e37a90773..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for ProductSettings Get. */ -public final class ProductSettingsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json - */ - /** - * Sample code: Get EyesOn settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getEyesOnSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java deleted file mode 100644 index e54fd9e369a6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for ProductSettings List. */ -public final class ProductSettingsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json - */ - /** - * Sample code: Get all settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().listWithResponse("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java deleted file mode 100644 index d84adcba1067..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EyesOn; - -/** Samples for ProductSettings Update. */ -public final class ProductSettingsUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json - */ - /** - * Sample code: Update EyesOn settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void updateEyesOnSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .productSettings() - .updateWithResponse( - "myRg", - "myWorkspace", - "EyesOn", - new EyesOn().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 4f4f433d1c48..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,78 +0,0 @@ -// 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.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.securityinsights.models.AnomalySecurityMLAnalyticsSettings; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettingsDataSource; -import com.azure.resourcemanager.securityinsights.models.SettingsStatus; -import java.io.IOException; -import java.time.Duration; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */ -public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json - */ - /** - * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAAnomalySecurityMLAnalyticsSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .securityMLAnalyticsSettings() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "f209187f-1d17-4431-94af-c141bf5f23db", - new AnomalySecurityMLAnalyticsSettings() - .withEtag("\"260090e2-0000-0d00-0000-5d6fb8670000\"") - .withDescription( - "When account logs from a source region that has rarely been logged in from during the last 14" - + " days, an anomaly is triggered.") - .withDisplayName("Login from unusual region") - .withEnabled(true) - .withRequiredDataConnectors( - Arrays - .asList( - new SecurityMLAnalyticsSettingsDataSource() - .withConnectorId("AWS") - .withDataTypes(Arrays.asList("AWSCloudTrail")))) - .withTactics(Arrays.asList(AttackTactic.EXFILTRATION, AttackTactic.COMMAND_AND_CONTROL)) - .withTechniques(Arrays.asList("T1037", "T1021")) - .withAnomalyVersion("1.0.5") - .withCustomizableObservations( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"multiSelectObservations\":null,\"prioritizeExcludeObservations\":null,\"singleSelectObservations\":[{\"name\":\"Device" - + " vendor\",\"description\":\"Select device vendor of network connection logs from" - + " CommonSecurityLog\",\"rerun\":\"RerunAlways\",\"sequenceNumber\":1,\"supportedValues\":[\"Palo" - + " Alto Networks\",\"Fortinet\",\"Check" - + " Point\"],\"supportedValuesKql\":null,\"value\":[\"Palo Alto" - + " Networks\"],\"valuesKql\":null}],\"singleValueObservations\":null,\"thresholdObservations\":[{\"name\":\"Daily" - + " data transfer threshold in MB\",\"description\":\"Suppress anomalies when daily" - + " data transfered (in MB) per hour is less than the chosen" - + " value\",\"maximum\":\"100\",\"minimum\":\"1\",\"rerun\":\"RerunAlways\",\"sequenceNumber\":1,\"value\":\"25\"},{\"name\":\"Number" - + " of standard deviations\",\"description\":\"Triggers anomalies when number of" - + " standard deviations is greater than the chosen" - + " value\",\"maximum\":\"10\",\"minimum\":\"2\",\"rerun\":\"RerunAlways\",\"sequenceNumber\":2,\"value\":\"3\"}]}", - Object.class, - SerializerEncoding.JSON)) - .withFrequency(Duration.parse("PT1H")) - .withSettingsStatus(SettingsStatus.PRODUCTION) - .withIsDefaultSettings(true) - .withAnomalySettingsVersion(0) - .withSettingsDefinitionId(UUID.fromString("f209187f-1d17-4431-94af-c141bf5f23db")), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java deleted file mode 100644 index 5a7fbfb4f91a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SecurityMLAnalyticsSettings Delete. */ -public final class SecurityMLAnalyticsSettingsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json - */ - /** - * Sample code: Delete a Security ML Analytics Settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteASecurityMLAnalyticsSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .securityMLAnalyticsSettings() - .deleteWithResponse("myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java deleted file mode 100644 index fa8f8cd73f74..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SecurityMLAnalyticsSettings Get. */ -public final class SecurityMLAnalyticsSettingsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json - */ - /** - * Sample code: Get a Anomaly Security ML Analytics Settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAAnomalySecurityMLAnalyticsSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .securityMLAnalyticsSettings() - .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java deleted file mode 100644 index a8eb1f6d6008..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SecurityMLAnalyticsSettings List. */ -public final class SecurityMLAnalyticsSettingsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json - */ - /** - * Sample code: Get all Security ML Analytics Settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllSecurityMLAnalyticsSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java deleted file mode 100644 index 177a2c21f7ab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.generated; - -/** Samples for SentinelOnboardingStates Create. */ -public final class SentinelOnboardingStatesCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json - */ - /** - * Sample code: Create Sentinel onboarding state. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createSentinelOnboardingState( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sentinelOnboardingStates() - .define("default") - .withExistingWorkspace("myRg", "myWorkspace") - .withCustomerManagedKey(false) - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java deleted file mode 100644 index 73d131daaf98..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SentinelOnboardingStates Delete. */ -public final class SentinelOnboardingStatesDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json - */ - /** - * Sample code: Delete Sentinel onboarding state. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteSentinelOnboardingState( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().deleteWithResponse("myRg", "myWorkspace", "default", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java deleted file mode 100644 index 1e61ad09b71b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SentinelOnboardingStates Get. */ -public final class SentinelOnboardingStatesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json - */ - /** - * Sample code: Get Sentinel onboarding state. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getSentinelOnboardingState( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().getWithResponse("myRg", "myWorkspace", "default", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java deleted file mode 100644 index 089fa7920c92..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SentinelOnboardingStates List. */ -public final class SentinelOnboardingStatesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json - */ - /** - * Sample code: Get all Sentinel onboarding states. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllSentinelOnboardingStates( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java deleted file mode 100644 index eedc402653a9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.RepoType; - -/** Samples for SourceControl ListRepositories. */ -public final class SourceControlListRepositoriesSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/repositories/GetRepositories.json - */ - /** - * Sample code: Get repository list. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getRepositoryList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControls().listRepositories("myRg", "myWorkspace", RepoType.GITHUB, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java deleted file mode 100644 index 3981370a4a6f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.generated; - -import com.azure.resourcemanager.securityinsights.models.ContentPathMap; -import com.azure.resourcemanager.securityinsights.models.ContentType; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import com.azure.resourcemanager.securityinsights.models.Repository; -import java.util.Arrays; - -/** Samples for SourceControlsOperation Create. */ -public final class SourceControlsOperationCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/CreateSourceControl.json - */ - /** - * Sample code: Creates a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsASourceControl( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .define("789e0c1f-4a3d-43ad-809c-e713b677b04a") - .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("My Source Control") - .withDescription("This is a source control") - .withRepoType(RepoType.GITHUB) - .withContentTypes(Arrays.asList(ContentType.fromString("AnalyticRules"), ContentType.WORKBOOK)) - .withRepository( - new Repository() - .withUrl("https://github.com/user/repo") - .withBranch("master") - .withDisplayUrl("https://github.com/user/repo") - .withPathMapping( - Arrays - .asList( - new ContentPathMap() - .withContentType(ContentType.fromString("AnalyticRules")) - .withPath("path/to/rules"), - new ContentPathMap() - .withContentType(ContentType.WORKBOOK) - .withPath("path/to/workbooks")))) - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java deleted file mode 100644 index 3479bbc73c0d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation Delete. */ -public final class SourceControlsOperationDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json - */ - /** - * Sample code: Delete a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteASourceControl( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .deleteWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java deleted file mode 100644 index e311a8036dba..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation Get. */ -public final class SourceControlsOperationGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControlById.json - */ - /** - * Sample code: Get a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASourceControl(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .getWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java deleted file mode 100644 index 348b8fabfa69..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation List. */ -public final class SourceControlsOperationListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControls.json - */ - /** - * Sample code: Get all source controls. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllSourceControls( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControlsOperations().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java deleted file mode 100644 index 19453e0a796a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; -import java.util.Arrays; - -/** Samples for ThreatIntelligenceIndicator AppendTags. */ -public final class ThreatIntelligenceIndicatorAppendTagsSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json - */ - /** - * Sample code: Append tags to a threat intelligence indicator. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void appendTagsToAThreatIntelligenceIndicator( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .threatIntelligenceIndicators() - .appendTagsWithResponse( - "myRg", - "myWorkspace", - "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - new ThreatIntelligenceAppendTags().withThreatIntelligenceTags(Arrays.asList("tag1", "tag2")), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java deleted file mode 100644 index 1934f75a9e79..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; -import java.util.Arrays; - -/** Samples for ThreatIntelligenceIndicator CreateIndicator. */ -public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json - */ - /** - * Sample code: Create a new Threat Intelligence. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createANewThreatIntelligence( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .threatIntelligenceIndicators() - .createIndicatorWithResponse( - "myRg", - "myWorkspace", - new ThreatIntelligenceIndicatorModel() - .withThreatIntelligenceTags(Arrays.asList("new schema")) - .withSource("Azure Sentinel") - .withDisplayName("new schema") - .withDescription("debugging indicators") - .withPattern("[url:value = 'https://www.contoso.com']") - .withPatternType("url") - .withKillChainPhases(Arrays.asList()) - .withCreatedByRef("contoso@contoso.com") - .withExternalReferences(Arrays.asList()) - .withGranularMarkings(Arrays.asList()) - .withLabels(Arrays.asList()) - .withRevoked(false) - .withConfidence(78) - .withThreatTypes(Arrays.asList("compromised")) - .withValidFrom("2021-09-15T17:44:00.114052Z") - .withValidUntil("") - .withModified(""), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java deleted file mode 100644 index 6185703dc8aa..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; -import java.util.Arrays; - -/** Samples for ThreatIntelligenceIndicator Create. */ -public final class ThreatIntelligenceIndicatorCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json - */ - /** - * Sample code: Update a threat Intelligence indicator. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void updateAThreatIntelligenceIndicator( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .threatIntelligenceIndicators() - .createWithResponse( - "myRg", - "myWorkspace", - "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - new ThreatIntelligenceIndicatorModel() - .withThreatIntelligenceTags(Arrays.asList("new schema")) - .withSource("Azure Sentinel") - .withDisplayName("new schema") - .withDescription("debugging indicators") - .withPattern("[url:value = 'https://www.contoso.com']") - .withPatternType("url") - .withKillChainPhases(Arrays.asList()) - .withCreatedByRef("contoso@contoso.com") - .withExternalReferences(Arrays.asList()) - .withGranularMarkings(Arrays.asList()) - .withLabels(Arrays.asList()) - .withRevoked(false) - .withConfidence(78) - .withThreatTypes(Arrays.asList("compromised")) - .withValidFrom("2020-04-15T17:44:00.114052Z") - .withValidUntil("") - .withModified(""), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java deleted file mode 100644 index fe4c1fb359c4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for ThreatIntelligenceIndicator Delete. */ -public final class ThreatIntelligenceIndicatorDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json - */ - /** - * Sample code: Delete a threat intelligence indicator. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAThreatIntelligenceIndicator( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .threatIntelligenceIndicators() - .deleteWithResponse("myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java deleted file mode 100644 index 73c9f32e2419..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for ThreatIntelligenceIndicator Get. */ -public final class ThreatIntelligenceIndicatorGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json - */ - /** - * Sample code: View a threat intelligence indicator by name. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void viewAThreatIntelligenceIndicatorByName( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .threatIntelligenceIndicators() - .getWithResponse("myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java deleted file mode 100644 index d04ce8551107..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for ThreatIntelligenceIndicatorMetrics List. */ -public final class ThreatIntelligenceIndicatorMetricsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json - */ - /** - * Sample code: Get threat intelligence indicators metrics. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getThreatIntelligenceIndicatorsMetrics( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.threatIntelligenceIndicatorMetrics().listWithResponse("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java deleted file mode 100644 index 487339a28251..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; -import java.util.Arrays; - -/** Samples for ThreatIntelligenceIndicator QueryIndicators. */ -public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json - */ - /** - * Sample code: Query threat intelligence indicators as per filtering criteria. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void queryThreatIntelligenceIndicatorsAsPerFilteringCriteria( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .threatIntelligenceIndicators() - .queryIndicators( - "myRg", - "myWorkspace", - new ThreatIntelligenceFilteringCriteria() - .withPageSize(100) - .withMinConfidence(25) - .withMaxConfidence(80) - .withMinValidUntil("2021-04-05T17:44:00.114052Z") - .withMaxValidUntil("2021-04-25T17:44:00.114052Z") - .withSortBy( - Arrays - .asList( - new ThreatIntelligenceSortingCriteria() - .withItemKey("lastUpdatedTimeUtc") - .withSortOrder(ThreatIntelligenceSortingCriteriaEnum.DESCENDING))) - .withSources(Arrays.asList("Azure Sentinel")), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java deleted file mode 100644 index 96e9c364d8e4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; -import java.util.Arrays; - -/** Samples for ThreatIntelligenceIndicator ReplaceTags. */ -public final class ThreatIntelligenceIndicatorReplaceTagsSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json - */ - /** - * Sample code: Replace tags to a Threat Intelligence. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void replaceTagsToAThreatIntelligence( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .threatIntelligenceIndicators() - .replaceTagsWithResponse( - "myRg", - "myWorkspace", - "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - new ThreatIntelligenceIndicatorModel() - .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") - .withThreatIntelligenceTags(Arrays.asList("patching tags")), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java deleted file mode 100644 index 3ab41f9ce6d6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for ThreatIntelligenceIndicatorsOperation List. */ -public final class ThreatIntelligenceIndicatorsOperationListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json - */ - /** - * Sample code: Get all threat intelligence indicators. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllThreatIntelligenceIndicators( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .threatIntelligenceIndicatorsOperations() - .list("myRg", "myWorkspace", null, null, null, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java deleted file mode 100644 index f6508ac2af4a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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.generated; - -import java.util.HashMap; -import java.util.Map; - -/** Samples for WatchlistItems CreateOrUpdate. */ -public final class WatchlistItemsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistItem.json - */ - /** - * Sample code: Creates or updates a watchlist item. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAWatchlistItem( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .watchlistItems() - .define("82ba292c-dc97-4dfc-969d-d4dd9e666842") - .withExistingWatchlist("myRg", "myWorkspace", "highValueAsset") - .withEtag("0300bf09-0000-0000-0000-5c37296e0000") - .withItemsKeyValue( - mapOf( - "Business tier", - "10.0.2.0/24", - "Data tier", - "10.0.2.0/24", - "Gateway subnet", - "10.0.255.224/27", - "Private DMZ in", - "10.0.0.0/27", - "Public DMZ out", - "10.0.0.96/27", - "Web Tier", - "10.0.1.0/24")) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java deleted file mode 100644 index 95b63e3a64e9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for WatchlistItems Delete. */ -public final class WatchlistItemsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json - */ - /** - * Sample code: Delete a watchlist Item. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAWatchlistItem( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .watchlistItems() - .deleteWithResponse( - "myRg", "myWorkspace", "highValueAsset", "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java deleted file mode 100644 index e86b44a1108a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for WatchlistItems Get. */ -public final class WatchlistItemsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json - */ - /** - * Sample code: Get a watchlist item. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAWatchlistItem(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .watchlistItems() - .getWithResponse( - "myRg", "myWorkspace", "highValueAsset", "3f8901fe-63d9-4875-9ad5-9fb3b8105797", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java deleted file mode 100644 index 7fe192510721..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for WatchlistItems List. */ -public final class WatchlistItemsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json - */ - /** - * Sample code: Get all watchlist Items. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllWatchlistItems( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java deleted file mode 100644 index d668e090cc94..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java +++ /dev/null @@ -1,61 +0,0 @@ -// 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.generated; - -import com.azure.resourcemanager.securityinsights.models.SourceType; - -/** Samples for Watchlists CreateOrUpdate. */ -public final class WatchlistsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json - */ - /** - * Sample code: Creates or updates a watchlist and bulk creates watchlist items. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .watchlists() - .define("highValueAsset") - .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("High Value Assets Watchlist") - .withProvider("Microsoft") - .withSource("watchlist.csv") - .withSourceType(SourceType.LOCAL_FILE) - .withDescription("Watchlist from CSV content") - .withNumberOfLinesToSkip(1) - .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") - .withItemsSearchKey("header1") - .withContentType("text/csv") - .create(); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlist.json - */ - /** - * Sample code: Creates or updates a watchlist. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAWatchlist( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .watchlists() - .define("highValueAsset") - .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("High Value Assets Watchlist") - .withProvider("Microsoft") - .withSource("watchlist.csv") - .withSourceType(SourceType.LOCAL_FILE) - .withDescription("Watchlist from CSV content") - .withItemsSearchKey("header1") - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java deleted file mode 100644 index 173a9fdce43f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Watchlists Delete. */ -public final class WatchlistsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json - */ - /** - * Sample code: Delete a watchlist. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().deleteWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java deleted file mode 100644 index 5de292dd4f01..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Watchlists Get. */ -public final class WatchlistsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json - */ - /** - * Sample code: Get a watchlist. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java deleted file mode 100644 index 1ff890f70c81..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.generated; - -import com.azure.core.util.Context; - -/** Samples for Watchlists List. */ -public final class WatchlistsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlists.json - */ - /** - * Sample code: Get all watchlists. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); - } -}