Table of Contents

Class GoogleCloudPlatformAttachmentProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll

Represents an attachment hosted on Google Cloud.

public class GoogleCloudPlatformAttachmentProperties : AttachmentProperties, IHttpSerializable
Inheritance
GoogleCloudPlatformAttachmentProperties
Implements
Inherited Members

Constructors

GoogleCloudPlatformAttachmentProperties(string, string)

Represents an attachment hosted on Google Cloud.

public GoogleCloudPlatformAttachmentProperties(string fileName, string uploadedFileName)

Parameters

fileName string
Name of the attachment (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).
uploadedFileName string
The file name used in the uploaded storage bucket.

Properties

SupportsHttpSerialization

Whether the attachment supports HTTP serialization.

public override bool SupportsHttpSerialization { get; }

Property Value

bool

UploadedFileName

The file name used in the uploaded storage bucket.

public string UploadedFileName { get; set; }

Property Value

string

Methods

Serialize()

Serializes the object or its part into HttpContent.

public override HttpContent Serialize()

Returns

HttpContent

WithDescription(string?)

Description for the attachment (max 1024 characters for attachments sent by message, max 200 characters for attachments used for sticker creation).

public GoogleCloudPlatformAttachmentProperties WithDescription(string? description)

Parameters

description string

Returns

GoogleCloudPlatformAttachmentProperties

WithFileName(string)

Name of the attachment (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).

public GoogleCloudPlatformAttachmentProperties WithFileName(string fileName)

Parameters

fileName string

Returns

GoogleCloudPlatformAttachmentProperties

WithTitle(string?)

The title of the attachment.

public GoogleCloudPlatformAttachmentProperties WithTitle(string? title)

Parameters

title string

Returns

GoogleCloudPlatformAttachmentProperties

WithUploadedFileName(string)

The file name used in the uploaded storage bucket.

public GoogleCloudPlatformAttachmentProperties WithUploadedFileName(string uploadedFileName)

Parameters

uploadedFileName string

Returns

GoogleCloudPlatformAttachmentProperties

WriteTo(Utf8JsonWriter, int)

protected override void WriteTo(Utf8JsonWriter writer, int attachmentId)

Parameters

writer Utf8JsonWriter
attachmentId int