Package org.drinkless.tdlib

# Class TdApi.RestrictionInfo

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.RestrictionInfo

Enclosing class:
  `TdApi`

public static class TdApi.RestrictionInfo extends TdApi.Object
Contains information about restrictions that must be applied to a chat or a message.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `boolean`
  `hasSensitiveContent`
  True, if media content of the messages must be hidden with 18+ spoiler.
  `String`
  `restrictionReason`
  A human-readable description of the reason why access to the content must be restricted.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RestrictionInfo()`
  Contains information about restrictions that must be applied to a chat or a message.
  `RestrictionInfo(String restrictionReason, boolean hasSensitiveContent)`
  Contains information about restrictions that must be applied to a chat or a message.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### restrictionReason

    public String restrictionReason
    A human-readable description of the reason why access to the content must be restricted. If empty, then the content can be accessed, but may be covered by hidden with 18+ spoiler anyway.

  - ### hasSensitiveContent

    public boolean hasSensitiveContent
    True, if media content of the messages must be hidden with 18+ spoiler. Use value of the option "can_ignore_sensitive_content_restrictions" to check whether the current user can ignore the restriction. If age verification parameters were received in updateAgeVerificationParameters, then the user must complete age verification to ignore the restriction. Set the option "ignore_sensitive_content_restrictions" to true if the user passes age verification.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### RestrictionInfo

    public RestrictionInfo()
    Contains information about restrictions that must be applied to a chat or a message.

  - ### RestrictionInfo

    public RestrictionInfo(String restrictionReason, boolean hasSensitiveContent)
    Contains information about restrictions that must be applied to a chat or a message.
    Parameters:
      `restrictionReason` - A human-readable description of the reason why access to the content must be restricted. If empty, then the content can be accessed, but may be covered by hidden with 18+ spoiler anyway.
      `hasSensitiveContent` - True, if media content of the messages must be hidden with 18+ spoiler. Use value of the option "can_ignore_sensitive_content_restrictions" to check whether the current user can ignore the restriction. If age verification parameters were received in updateAgeVerificationParameters, then the user must complete age verification to ignore the restriction. Set the option "ignore_sensitive_content_restrictions" to true if the user passes age verification.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Object`
    Returns:
      this.CONSTRUCTOR