// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.security.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 DeviceSecurityGroups. */
public interface DeviceSecurityGroups {
    /**
     * Use this method get the list of device security groups for the specified IoT Hub resource.
     *
     * @param resourceId The identifier of the 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 list of device security groups as paginated response with {@link PagedIterable}.
     */
    PagedIterable<DeviceSecurityGroup> list(String resourceId);

    /**
     * Use this method get the list of device security groups for the specified IoT Hub resource.
     *
     * @param resourceId The identifier of the 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 list of device security groups as paginated response with {@link PagedIterable}.
     */
    PagedIterable<DeviceSecurityGroup> list(String resourceId, Context context);

    /**
     * Use this method to get the device security group for the specified IoT Hub resource.
     *
     * @param resourceId The identifier of the resource.
     * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security
     *     group is case insensitive.
     * @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 device security group resource along with {@link Response}.
     */
    Response<DeviceSecurityGroup> getWithResponse(String resourceId, String deviceSecurityGroupName, Context context);

    /**
     * Use this method to get the device security group for the specified IoT Hub resource.
     *
     * @param resourceId The identifier of the resource.
     * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security
     *     group is case insensitive.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.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 device security group resource.
     */
    DeviceSecurityGroup get(String resourceId, String deviceSecurityGroupName);

    /**
     * User this method to deletes the device security group.
     *
     * @param resourceId The identifier of the resource.
     * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security
     *     group is case insensitive.
     * @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<Void> deleteByResourceGroupWithResponse(
        String resourceId, String deviceSecurityGroupName, Context context);

    /**
     * User this method to deletes the device security group.
     *
     * @param resourceId The identifier of the resource.
     * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security
     *     group is case insensitive.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.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 deleteByResourceGroup(String resourceId, String deviceSecurityGroupName);

    /**
     * Use this method to get the device security group for the specified IoT Hub resource.
     *
     * @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 device security group resource along with {@link Response}.
     */
    DeviceSecurityGroup getById(String id);

    /**
     * Use this method to get the device security group for the specified IoT Hub resource.
     *
     * @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 device security group resource along with {@link Response}.
     */
    Response<DeviceSecurityGroup> getByIdWithResponse(String id, Context context);

    /**
     * User this method to deletes the device security group.
     *
     * @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);

    /**
     * User this method to deletes the device security group.
     *
     * @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<Void> deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new DeviceSecurityGroup resource.
     *
     * @param name resource name.
     * @return the first stage of the new DeviceSecurityGroup definition.
     */
    DeviceSecurityGroup.DefinitionStages.Blank define(String name);
}
