Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public class DatabaseSecurityAlertPolicyInner extends ProxyResource {
/**
* Specifies the semicolon-separated list of alerts that are disabled, or
* empty string to disable no alerts. Possible values: Sql_Injection;
* Sql_Injection_Vulnerability; Access_Anomaly; Usage_Anomaly.
* Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration;
* Unsafe_Action.
*/
@JsonProperty(value = "properties.disabledAlerts")
private String disabledAlerts;
Expand Down Expand Up @@ -141,7 +142,7 @@ public DatabaseSecurityAlertPolicyInner withState(SecurityAlertPolicyState state
}

/**
* Get specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Usage_Anomaly.
* Get specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
*
* @return the disabledAlerts value
*/
Expand All @@ -150,7 +151,7 @@ public String disabledAlerts() {
}

/**
* Set specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Usage_Anomaly.
* Set specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
*
* @param disabledAlerts the disabledAlerts value to set
* @return the DatabaseSecurityAlertPolicyInner object itself.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_10_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.InterfaceEndpointProfileInner;
import com.microsoft.azure.arm.model.Indexable;
import com.microsoft.azure.arm.model.Refreshable;
import com.microsoft.azure.arm.model.Updatable;
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.SqlManager;

/**
* Type representing InterfaceEndpointProfile.
*/
public interface InterfaceEndpointProfile extends HasInner<InterfaceEndpointProfileInner>, Indexable, Refreshable<InterfaceEndpointProfile>, Updatable<InterfaceEndpointProfile.Update>, HasManager<SqlManager> {
/**
* @return the id value.
*/
String id();

/**
* @return the name value.
*/
String name();

/**
* @return the privateIp value.
*/
String privateIp();

/**
* @return the state value.
*/
InterfaceEndpointProfileStateType state();

/**
* @return the type value.
*/
String type();

/**
* @return the virtualNetworkSubnetId value.
*/
String virtualNetworkSubnetId();

/**
* The entirety of the InterfaceEndpointProfile definition.
*/
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithServer, DefinitionStages.WithVirtualNetworkSubnetId, DefinitionStages.WithCreate {
}

/**
* Grouping of InterfaceEndpointProfile definition stages.
*/
interface DefinitionStages {
/**
* The first stage of a InterfaceEndpointProfile definition.
*/
interface Blank extends WithServer {
}

/**
* The stage of the interfaceendpointprofile definition allowing to specify Server.
*/
interface WithServer {
/**
* Specifies resourceGroupName, serverName.
*/
WithVirtualNetworkSubnetId withExistingServer(String resourceGroupName, String serverName);
}

/**
* The stage of the interfaceendpointprofile definition allowing to specify VirtualNetworkSubnetId.
*/
interface WithVirtualNetworkSubnetId {
/**
* Specifies virtualNetworkSubnetId.
*/
WithCreate withVirtualNetworkSubnetId(String virtualNetworkSubnetId);
}

/**
* The stage of the definition which contains all the minimum required inputs for
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<InterfaceEndpointProfile> {
}
}
/**
* The template for a InterfaceEndpointProfile update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<InterfaceEndpointProfile>, UpdateStages.WithVirtualNetworkSubnetId {
}

/**
* Grouping of InterfaceEndpointProfile update stages.
*/
interface UpdateStages {
/**
* The stage of the interfaceendpointprofile update allowing to specify VirtualNetworkSubnetId.
*/
interface WithVirtualNetworkSubnetId {
/**
* Specifies virtualNetworkSubnetId.
*/
Update withVirtualNetworkSubnetId(String virtualNetworkSubnetId);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_10_01_preview;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for InterfaceEndpointProfileStateType.
*/
public final class InterfaceEndpointProfileStateType extends ExpandableStringEnum<InterfaceEndpointProfileStateType> {
/** Static value Initializing for InterfaceEndpointProfileStateType. */
public static final InterfaceEndpointProfileStateType INITIALIZING = fromString("Initializing");

/** Static value InProgress for InterfaceEndpointProfileStateType. */
public static final InterfaceEndpointProfileStateType IN_PROGRESS = fromString("InProgress");

/** Static value Ready for InterfaceEndpointProfileStateType. */
public static final InterfaceEndpointProfileStateType READY = fromString("Ready");

/** Static value Failed for InterfaceEndpointProfileStateType. */
public static final InterfaceEndpointProfileStateType FAILED = fromString("Failed");

/** Static value Deleting for InterfaceEndpointProfileStateType. */
public static final InterfaceEndpointProfileStateType DELETING = fromString("Deleting");

/** Static value Unknown for InterfaceEndpointProfileStateType. */
public static final InterfaceEndpointProfileStateType UNKNOWN = fromString("Unknown");

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

/**
* @return known InterfaceEndpointProfileStateType values
*/
public static Collection<InterfaceEndpointProfileStateType> values() {
return values(InterfaceEndpointProfileStateType.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_10_01_preview;

import com.microsoft.azure.arm.collection.SupportsCreating;
import rx.Completable;
import rx.Observable;
import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.InterfaceEndpointProfilesInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing InterfaceEndpointProfiles.
*/
public interface InterfaceEndpointProfiles extends SupportsCreating<InterfaceEndpointProfile.DefinitionStages.Blank>, HasInner<InterfaceEndpointProfilesInner> {
/**
* Gets a interface endpoint profile.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param interfaceEndpointProfileName The name of the interface endpoint profile.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<InterfaceEndpointProfile> getAsync(String resourceGroupName, String serverName, String interfaceEndpointProfileName);

/**
* Gets a list of interface endpoint profiles attached to a server.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<InterfaceEndpointProfile> listByServerAsync(final String resourceGroupName, final String serverName);

/**
* Deletes the interface endpoint profile with the given name.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param interfaceEndpointProfileName the String value
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Completable deleteAsync(String resourceGroupName, String serverName, String interfaceEndpointProfileName);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_10_01_preview.implementation;

import com.microsoft.azure.management.sql.v2017_10_01_preview.InterfaceEndpointProfile;
import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
import rx.Observable;
import com.microsoft.azure.management.sql.v2017_10_01_preview.InterfaceEndpointProfileStateType;

class InterfaceEndpointProfileImpl extends CreatableUpdatableImpl<InterfaceEndpointProfile, InterfaceEndpointProfileInner, InterfaceEndpointProfileImpl> implements InterfaceEndpointProfile, InterfaceEndpointProfile.Definition, InterfaceEndpointProfile.Update {
private final SqlManager manager;
private String resourceGroupName;
private String serverName;
private String interfaceEndpointProfileName;
private String cvirtualNetworkSubnetId;
private String uvirtualNetworkSubnetId;

InterfaceEndpointProfileImpl(String name, SqlManager manager) {
super(name, new InterfaceEndpointProfileInner());
this.manager = manager;
// Set resource name
this.interfaceEndpointProfileName = name;
//
}

InterfaceEndpointProfileImpl(InterfaceEndpointProfileInner inner, SqlManager manager) {
super(inner.name(), inner);
this.manager = manager;
// Set resource name
this.interfaceEndpointProfileName = inner.name();
// resource ancestor names
this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
this.serverName = IdParsingUtils.getValueFromIdByName(inner.id(), "servers");
this.interfaceEndpointProfileName = IdParsingUtils.getValueFromIdByName(inner.id(), "interfaceEndpointProfiles");
//
}

@Override
public SqlManager manager() {
return this.manager;
}

@Override
public Observable<InterfaceEndpointProfile> createResourceAsync() {
InterfaceEndpointProfilesInner client = this.manager().inner().interfaceEndpointProfiles();
return client.createOrUpdateAsync(this.resourceGroupName, this.serverName, this.interfaceEndpointProfileName, this.cvirtualNetworkSubnetId)
.map(innerToFluentMap(this));
}

@Override
public Observable<InterfaceEndpointProfile> updateResourceAsync() {
InterfaceEndpointProfilesInner client = this.manager().inner().interfaceEndpointProfiles();
return client.createOrUpdateAsync(this.resourceGroupName, this.serverName, this.interfaceEndpointProfileName, this.uvirtualNetworkSubnetId)
.map(innerToFluentMap(this));
}

@Override
protected Observable<InterfaceEndpointProfileInner> getInnerAsync() {
InterfaceEndpointProfilesInner client = this.manager().inner().interfaceEndpointProfiles();
return client.getAsync(this.resourceGroupName, this.serverName, this.interfaceEndpointProfileName);
}

@Override
public boolean isInCreateMode() {
return this.inner().id() == null;
}


@Override
public String id() {
return this.inner().id();
}

@Override
public String name() {
return this.inner().name();
}

@Override
public String privateIp() {
return this.inner().privateIp();
}

@Override
public InterfaceEndpointProfileStateType state() {
return this.inner().state();
}

@Override
public String type() {
return this.inner().type();
}

@Override
public String virtualNetworkSubnetId() {
return this.inner().virtualNetworkSubnetId();
}

@Override
public InterfaceEndpointProfileImpl withExistingServer(String resourceGroupName, String serverName) {
this.resourceGroupName = resourceGroupName;
this.serverName = serverName;
return this;
}

@Override
public InterfaceEndpointProfileImpl withVirtualNetworkSubnetId(String virtualNetworkSubnetId) {
if (isInCreateMode()) {
this.cvirtualNetworkSubnetId = virtualNetworkSubnetId;
} else {
this.uvirtualNetworkSubnetId = virtualNetworkSubnetId;
}
return this;
}

}
Loading