Class GoogleCloudPlatformAttachmentProperties
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
fileNamestringName of the attachment (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation). uploadedFileNamestringThe file name used in the uploaded storage bucket.
Properties
SupportsHttpSerialization
Whether the attachment supports HTTP serialization.
public override bool SupportsHttpSerialization { get; }
Property Value
UploadedFileName
The file name used in the uploaded storage bucket.
public string UploadedFileName { get; set; }
Property Value
Methods
Serialize()
Serializes the object or its part into HttpContent.
public override HttpContent Serialize()
Returns
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
descriptionstring
Returns
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
fileNamestring
Returns
WithTitle(string?)
The title of the attachment.
public GoogleCloudPlatformAttachmentProperties WithTitle(string? title)
Parameters
titlestring
Returns
WithUploadedFileName(string)
The file name used in the uploaded storage bucket.
public GoogleCloudPlatformAttachmentProperties WithUploadedFileName(string uploadedFileName)
Parameters
uploadedFileNamestring
Returns
WriteTo(Utf8JsonWriter, int)
protected override void WriteTo(Utf8JsonWriter writer, int attachmentId)
Parameters
writerUtf8JsonWriterattachmentIdint