SignalRCorsSettings Class

  • java.lang.Object
    • com.azure.resourcemanager.signalr.models.SignalRCorsSettings

Implements

public final class SignalRCorsSettings
implements JsonSerializable<SignalRCorsSettings>

Cross-Origin Resource Sharing (CORS) settings.

Constructor Summary

Constructor Description
SignalRCorsSettings()

Creates an instance of SignalRCorsSettings class.

Method Summary

Modifier and Type Method and Description
List<String> allowedOrigins()

Get the allowedOrigins property: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345).

static SignalRCorsSettings fromJson(JsonReader jsonReader)

Reads an instance of SignalRCorsSettings from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SignalRCorsSettings withAllowedOrigins(List<String> allowedOrigins)

Set the allowedOrigins property: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345).

Methods inherited from java.lang.Object

Constructor Details

SignalRCorsSettings

public SignalRCorsSettings()

Creates an instance of SignalRCorsSettings class.

Method Details

allowedOrigins

public List<String> allowedOrigins()

Get the allowedOrigins property: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. If omitted, allow all by default.

Returns:

the allowedOrigins value.

fromJson

public static SignalRCorsSettings fromJson(JsonReader jsonReader)

Reads an instance of SignalRCorsSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SignalRCorsSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the SignalRCorsSettings.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAllowedOrigins

public SignalRCorsSettings withAllowedOrigins(List<String> allowedOrigins)

Set the allowedOrigins property: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. If omitted, allow all by default.

Parameters:

allowedOrigins - the allowedOrigins value to set.

Returns:

the SignalRCorsSettings object itself.

Applies to