次の方法で共有


ProjectFileProperties Class

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

Implements

public final class ProjectFileProperties
implements JsonSerializable<ProjectFileProperties>

Base class for file properties.

Constructor Summary

Constructor Description
ProjectFileProperties()

Creates an instance of ProjectFileProperties class.

Method Summary

Modifier and Type Method and Description
String extension()

Get the extension property: Optional File extension.

String filePath()

Get the filePath property: Relative path of this file resource.

static ProjectFileProperties fromJson(JsonReader jsonReader)

Reads an instance of ProjectFileProperties from the JsonReader.

OffsetDateTime lastModified()

Get the lastModified property: Modification DateTime.

String mediaType()

Get the mediaType property: File content type.

Long size()

Get the size property: File size.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ProjectFileProperties withExtension(String extension)

Set the extension property: Optional File extension.

ProjectFileProperties withFilePath(String filePath)

Set the filePath property: Relative path of this file resource.

ProjectFileProperties withMediaType(String mediaType)

Set the mediaType property: File content type.

Methods inherited from java.lang.Object

Constructor Details

ProjectFileProperties

public ProjectFileProperties()

Creates an instance of ProjectFileProperties class.

Method Details

extension

public String extension()

Get the extension property: Optional File extension. If submitted it should not have a leading period and must match the extension from filePath.

Returns:

the extension value.

filePath

public String filePath()

Get the filePath property: Relative path of this file resource. This property can be set when creating or updating the file resource.

Returns:

the filePath value.

fromJson

public static ProjectFileProperties fromJson(JsonReader jsonReader)

Reads an instance of ProjectFileProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ProjectFileProperties 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 ProjectFileProperties.

lastModified

public OffsetDateTime lastModified()

Get the lastModified property: Modification DateTime.

Returns:

the lastModified value.

mediaType

public String mediaType()

Get the mediaType property: File content type. This property can be modified to reflect the file content type.

Returns:

the mediaType value.

size

public Long size()

Get the size property: File size.

Returns:

the size value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withExtension

public ProjectFileProperties withExtension(String extension)

Set the extension property: Optional File extension. If submitted it should not have a leading period and must match the extension from filePath.

Parameters:

extension - the extension value to set.

Returns:

the ProjectFileProperties object itself.

withFilePath

public ProjectFileProperties withFilePath(String filePath)

Set the filePath property: Relative path of this file resource. This property can be set when creating or updating the file resource.

Parameters:

filePath - the filePath value to set.

Returns:

the ProjectFileProperties object itself.

withMediaType

public ProjectFileProperties withMediaType(String mediaType)

Set the mediaType property: File content type. This property can be modified to reflect the file content type.

Parameters:

mediaType - the mediaType value to set.

Returns:

the ProjectFileProperties object itself.

Applies to