Class SqlRoleDefinitionGetResultsInner

java.lang.Object
com.azure.core.management.ProxyResource
com.azure.resourcemanager.cosmos.models.ArmProxyResource
com.azure.resourcemanager.cosmos.fluent.models.SqlRoleDefinitionGetResultsInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>

public final class SqlRoleDefinitionGetResultsInner extends ArmProxyResource
An Azure Cosmos DB SQL Role Definition.
  • Constructor Details

    • SqlRoleDefinitionGetResultsInner

      public SqlRoleDefinitionGetResultsInner()
      Creates an instance of SqlRoleDefinitionGetResultsInner class.
  • Method Details

    • type

      public String type()
      Get the type property: The type of the resource.
      Overrides:
      type in class ArmProxyResource
      Returns:
      the type value.
    • name

      public String name()
      Get the name property: The name of the resource.
      Overrides:
      name in class ArmProxyResource
      Returns:
      the name value.
    • id

      public String id()
      Get the id property: Fully qualified resource Id for the resource.
      Overrides:
      id in class ArmProxyResource
      Returns:
      the id value.
    • roleName

      public String roleName()
      Get the roleName property: A user-friendly name for the Role Definition. Must be unique for the database account.
      Returns:
      the roleName value.
    • withRoleName

      public SqlRoleDefinitionGetResultsInner withRoleName(String roleName)
      Set the roleName property: A user-friendly name for the Role Definition. Must be unique for the database account.
      Parameters:
      roleName - the roleName value to set.
      Returns:
      the SqlRoleDefinitionGetResultsInner object itself.
    • typePropertiesType

      public RoleDefinitionType typePropertiesType()
      Get the type property: Indicates whether the Role Definition was built-in or user created.
      Returns:
      the type value.
    • withTypePropertiesType

      public SqlRoleDefinitionGetResultsInner withTypePropertiesType(RoleDefinitionType type)
      Set the type property: Indicates whether the Role Definition was built-in or user created.
      Parameters:
      type - the type value to set.
      Returns:
      the SqlRoleDefinitionGetResultsInner object itself.
    • assignableScopes

      public List<String> assignableScopes()
      Get the assignableScopes property: A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
      Returns:
      the assignableScopes value.
    • withAssignableScopes

      public SqlRoleDefinitionGetResultsInner withAssignableScopes(List<String> assignableScopes)
      Set the assignableScopes property: A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
      Parameters:
      assignableScopes - the assignableScopes value to set.
      Returns:
      the SqlRoleDefinitionGetResultsInner object itself.
    • permissions

      public List<Permission> permissions()
      Get the permissions property: The set of operations allowed through this Role Definition.
      Returns:
      the permissions value.
    • withPermissions

      public SqlRoleDefinitionGetResultsInner withPermissions(List<Permission> permissions)
      Set the permissions property: The set of operations allowed through this Role Definition.
      Parameters:
      permissions - the permissions value to set.
      Returns:
      the SqlRoleDefinitionGetResultsInner object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class ArmProxyResource
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
      Overrides:
      toJson in class ArmProxyResource
      Throws:
      IOException
    • fromJson

      public static SqlRoleDefinitionGetResultsInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SqlRoleDefinitionGetResultsInner from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SqlRoleDefinitionGetResultsInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the SqlRoleDefinitionGetResultsInner.