Share via


FileShare Class

  • java.lang.Object
    • com.azure.resourcemanager.datamigration.models.FileShare

Implements

public final class FileShare
implements JsonSerializable<FileShare>

File share information with Path, Username, and Password.

Constructor Summary

Constructor Description
FileShare()

Creates an instance of FileShare class.

Method Summary

Modifier and Type Method and Description
static FileShare fromJson(JsonReader jsonReader)

Reads an instance of FileShare from the JsonReader.

String password()

Get the password property: Password credential used to connect to the share location.

String path()

Get the path property: The folder path for this share.

JsonWriter toJson(JsonWriter jsonWriter)
String username()

Get the username property: User name credential to connect to the share location.

void validate()

Validates the instance.

FileShare withPassword(String password)

Set the password property: Password credential used to connect to the share location.

FileShare withPath(String path)

Set the path property: The folder path for this share.

FileShare withUsername(String username)

Set the username property: User name credential to connect to the share location.

Methods inherited from java.lang.Object

Constructor Details

FileShare

public FileShare()

Creates an instance of FileShare class.

Method Details

fromJson

public static FileShare fromJson(JsonReader jsonReader)

Reads an instance of FileShare from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

password

public String password()

Get the password property: Password credential used to connect to the share location.

Returns:

the password value.

path

public String path()

Get the path property: The folder path for this share.

Returns:

the path value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

username

public String username()

Get the username property: User name credential to connect to the share location.

Returns:

the username value.

validate

public void validate()

Validates the instance.

withPassword

public FileShare withPassword(String password)

Set the password property: Password credential used to connect to the share location.

Parameters:

password - the password value to set.

Returns:

the FileShare object itself.

withPath

public FileShare withPath(String path)

Set the path property: The folder path for this share.

Parameters:

path - the path value to set.

Returns:

the FileShare object itself.

withUsername

public FileShare withUsername(String username)

Set the username property: User name credential to connect to the share location.

Parameters:

username - the username value to set.

Returns:

the FileShare object itself.

Applies to