AbortDocumentVersionUpload

valid {
    input.ReqMap.DocumentId == STRING
    input.ReqMap.VersionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ActivateUser

valid {
    input.ReqMap.UserId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

AddResourcePermissions

enum_PrincipalType := [ "USER", "GROUP", "INVITE", "ANONYMOUS", "ORGANIZATION" ]
enum_RoleType := [ "VIEWER", "CONTRIBUTOR", "OWNER", "COOWNER" ]

valid {
    input.Body.Principals[_].Id == STRING
    input.Body.Principals[_].Type == enum_PrincipalType[_]
    input.Body.Principals[_].Role == enum_RoleType[_]
    input.Body.NotificationOptions.SendEmail == BOOLEAN
    input.Body.NotificationOptions.EmailMessage == STRING
    input.ReqMap.ResourceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateComment

enum_CommentVisibilityType := [ "PUBLIC", "PRIVATE" ]

valid {
    input.Body.ParentId == STRING
    input.Body.ThreadId == STRING
    input.Body.Text == STRING
    input.Body.Visibility == enum_CommentVisibilityType[_]
    input.Body.NotifyCollaborators == BOOLEAN
    input.ReqMap.DocumentId == STRING
    input.ReqMap.VersionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateCustomMetadata

valid {
    input.Body.CustomMetadata.STRING == STRING
    input.ReqMap.ResourceId == STRING
    input.Qs.versionid == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateFolder

valid {
    input.Body.Name == STRING
    input.Body.ParentFolderId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateLabels

valid {
    input.Body.Labels[_] == STRING
    input.ReqMap.ResourceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateNotificationSubscription

enum_SubscriptionProtocolType := [ "HTTPS", "SQS" ]
enum_SubscriptionType := [ "ALL" ]

valid {
    input.Body.Endpoint == STRING
    input.Body.Protocol == enum_SubscriptionProtocolType[_]
    input.Body.SubscriptionType == enum_SubscriptionType[_]
    input.ReqMap.OrganizationId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateUser

enum_StorageType := [ "UNLIMITED", "QUOTA" ]

valid {
    input.Body.OrganizationId == STRING
    input.Body.Username == STRING
    input.Body.EmailAddress == STRING
    input.Body.GivenName == STRING
    input.Body.Surname == STRING
    input.Body.Password == STRING
    input.Body.TimeZoneId == STRING
    input.Body.StorageRule.StorageAllocatedInBytes == LONG
    input.Body.StorageRule.StorageType == enum_StorageType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeactivateUser

valid {
    input.ReqMap.UserId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteComment

valid {
    input.ReqMap.DocumentId == STRING
    input.ReqMap.VersionId == STRING
    input.ReqMap.CommentId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteCustomMetadata

valid {
    input.ReqMap.ResourceId == STRING
    input.Qs.versionId == STRING
    input.Qs.keys[_] == STRING
    input.Qs.deleteAll == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteDocument

valid {
    input.ReqMap.DocumentId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteDocumentVersion

valid {
    input.ReqMap.DocumentId == STRING
    input.ReqMap.VersionId == STRING
    input.Qs.deletePriorVersions == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteFolder

valid {
    input.ReqMap.FolderId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteFolderContents

valid {
    input.ReqMap.FolderId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteLabels

valid {
    input.ReqMap.ResourceId == STRING
    input.Qs.labels[_] == STRING
    input.Qs.deleteAll == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteNotificationSubscription

valid {
    input.ReqMap.SubscriptionId == STRING
    input.ReqMap.OrganizationId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteUser

valid {
    input.ReqMap.UserId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeActivities

valid {
    input.Qs.startTime == TIMESTAMP
    input.Qs.endTime == TIMESTAMP
    input.Qs.organizationId == STRING
    input.Qs.activityTypes == STRING
    input.Qs.resourceId == STRING
    input.Qs.userId == STRING
    input.Qs.includeIndirectActivities == BOOLEAN
    input.Qs.limit == INTEGER
    input.Qs.marker == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeComments

valid {
    input.ReqMap.DocumentId == STRING
    input.ReqMap.VersionId == STRING
    input.Qs.limit == INTEGER
    input.Qs.marker == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeDocumentVersions

valid {
    input.ReqMap.DocumentId == STRING
    input.Qs.marker == STRING
    input.Qs.limit == INTEGER
    input.Qs.include == STRING
    input.Qs.fields == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeFolderContents

enum_FolderContentType := [ "ALL", "DOCUMENT", "FOLDER" ]
enum_OrderType := [ "ASCENDING", "DESCENDING" ]
enum_ResourceSortType := [ "DATE", "NAME" ]

valid {
    input.ReqMap.FolderId == STRING
    input.Qs.sort == enum_ResourceSortType[_]
    input.Qs.order == enum_OrderType[_]
    input.Qs.limit == INTEGER
    input.Qs.marker == STRING
    input.Qs.type == enum_FolderContentType[_]
    input.Qs.include == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeGroups

valid {
    input.Qs.searchQuery == STRING
    input.Qs.organizationId == STRING
    input.Qs.marker == STRING
    input.Qs.limit == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeNotificationSubscriptions

valid {
    input.ReqMap.OrganizationId == STRING
    input.Qs.marker == STRING
    input.Qs.limit == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeResourcePermissions

valid {
    input.ReqMap.ResourceId == STRING
    input.Qs.principalId == STRING
    input.Qs.limit == INTEGER
    input.Qs.marker == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeRootFolders

valid {
    input.Qs.limit == INTEGER
    input.Qs.marker == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeUsers

enum_OrderType := [ "ASCENDING", "DESCENDING" ]
enum_UserFilterType := [ "ALL", "ACTIVE_PENDING" ]
enum_UserSortType := [ "USER_NAME", "FULL_NAME", "STORAGE_LIMIT", "USER_STATUS", "STORAGE_USED" ]

valid {
    input.Qs.organizationId == STRING
    input.Qs.userIds == STRING
    input.Qs.query == STRING
    input.Qs.include == enum_UserFilterType[_]
    input.Qs.order == enum_OrderType[_]
    input.Qs.sort == enum_UserSortType[_]
    input.Qs.marker == STRING
    input.Qs.limit == INTEGER
    input.Qs.fields == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetCurrentUser

valid {
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDocument

valid {
    input.ReqMap.DocumentId == STRING
    input.Qs.includeCustomMetadata == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDocumentPath

valid {
    input.ReqMap.DocumentId == STRING
    input.Qs.limit == INTEGER
    input.Qs.fields == STRING
    input.Qs.marker == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDocumentVersion

valid {
    input.ReqMap.DocumentId == STRING
    input.ReqMap.VersionId == STRING
    input.Qs.fields == STRING
    input.Qs.includeCustomMetadata == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetFolder

valid {
    input.ReqMap.FolderId == STRING
    input.Qs.includeCustomMetadata == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetFolderPath

valid {
    input.ReqMap.FolderId == STRING
    input.Qs.limit == INTEGER
    input.Qs.fields == STRING
    input.Qs.marker == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetResources

enum_ResourceCollectionType := [ "SHARED_WITH_ME" ]

valid {
    input.Qs.userId == STRING
    input.Qs.collectionType == enum_ResourceCollectionType[_]
    input.Qs.limit == INTEGER
    input.Qs.marker == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

InitiateDocumentVersionUpload

valid {
    input.Body.Id == STRING
    input.Body.Name == STRING
    input.Body.ContentCreatedTimestamp == TIMESTAMP
    input.Body.ContentModifiedTimestamp == TIMESTAMP
    input.Body.ContentType == STRING
    input.Body.DocumentSizeInBytes == LONG
    input.Body.ParentFolderId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RemoveAllResourcePermissions

valid {
    input.ReqMap.ResourceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RemoveResourcePermission

enum_PrincipalType := [ "USER", "GROUP", "INVITE", "ANONYMOUS", "ORGANIZATION" ]

valid {
    input.ReqMap.ResourceId == STRING
    input.ReqMap.PrincipalId == STRING
    input.Qs.type == enum_PrincipalType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RestoreDocumentVersions

valid {
    input.ReqMap.DocumentId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SearchResources

enum_AdditionalResponseFieldType := [ "WEBURL" ]
enum_ContentCategoryType := [ "IMAGE", "DOCUMENT", "PDF", "SPREADSHEET", "PRESENTATION", "AUDIO", "VIDEO", "SOURCE_CODE", "OTHER" ]
enum_LanguageCodeType := [ "AR", "BG", "BN", "DA", "DE", "CS", "EL", "EN", "ES", "FA", "FI", "FR", "HI", "HU", "ID", "IT", "JA", "KO", "LT", "LV", "NL", "NO", "PT", "RO", "RU", "SV", "SW", "TH", "TR", "ZH", "DEFAULT" ]
enum_OrderByFieldType := [ "RELEVANCE", "NAME", "SIZE", "CREATED_TIMESTAMP", "MODIFIED_TIMESTAMP" ]
enum_PrincipalRoleType := [ "VIEWER", "CONTRIBUTOR", "OWNER", "COOWNER" ]
enum_SearchCollectionType := [ "OWNED", "SHARED_WITH_ME" ]
enum_SearchQueryScopeType := [ "NAME", "CONTENT" ]
enum_SearchResourceType := [ "FOLDER", "DOCUMENT", "COMMENT", "DOCUMENT_VERSION" ]
enum_SortOrder := [ "ASC", "DESC" ]

valid {
    input.Body.QueryText == STRING
    input.Body.QueryScopes[_] == enum_SearchQueryScopeType[_]
    input.Body.OrganizationId == STRING
    input.Body.AdditionalResponseFields[_] == enum_AdditionalResponseFieldType[_]
    input.Body.Filters.TextLocales[_] == enum_LanguageCodeType[_]
    input.Body.Filters.ContentCategories[_] == enum_ContentCategoryType[_]
    input.Body.Filters.ResourceTypes[_] == enum_SearchResourceType[_]
    input.Body.Filters.Labels[_] == STRING
    input.Body.Filters.Principals[_].Id == STRING
    input.Body.Filters.Principals[_].Roles[_] == enum_PrincipalRoleType[_]
    input.Body.Filters.AncestorIds[_] == STRING
    input.Body.Filters.SearchCollectionTypes[_] == enum_SearchCollectionType[_]
    input.Body.Filters.SizeRange.StartValue == LONG
    input.Body.Filters.SizeRange.EndValue == LONG
    input.Body.Filters.CreatedRange.StartValue == TIMESTAMP
    input.Body.Filters.CreatedRange.EndValue == TIMESTAMP
    input.Body.Filters.ModifiedRange.StartValue == TIMESTAMP
    input.Body.Filters.ModifiedRange.EndValue == TIMESTAMP
    input.Body.OrderBy[_].Field == enum_OrderByFieldType[_]
    input.Body.OrderBy[_].Order == enum_SortOrder[_]
    input.Body.Limit == INTEGER
    input.Body.Marker == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDocument

enum_ResourceStateType := [ "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED" ]

valid {
    input.Body.Name == STRING
    input.Body.ParentFolderId == STRING
    input.Body.ResourceState == enum_ResourceStateType[_]
    input.ReqMap.DocumentId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDocumentVersion

enum_DocumentVersionStatus := [ "ACTIVE" ]

valid {
    input.Body.VersionStatus == enum_DocumentVersionStatus[_]
    input.ReqMap.DocumentId == STRING
    input.ReqMap.VersionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateFolder

enum_ResourceStateType := [ "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED" ]

valid {
    input.Body.Name == STRING
    input.Body.ParentFolderId == STRING
    input.Body.ResourceState == enum_ResourceStateType[_]
    input.ReqMap.FolderId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateUser

enum_BooleanEnumType := [ "TRUE", "FALSE" ]
enum_LocaleType := [ "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default" ]
enum_StorageType := [ "UNLIMITED", "QUOTA" ]
enum_UserType := [ "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER" ]

valid {
    input.Body.GivenName == STRING
    input.Body.Surname == STRING
    input.Body.Type == enum_UserType[_]
    input.Body.StorageRule.StorageAllocatedInBytes == LONG
    input.Body.StorageRule.StorageType == enum_StorageType[_]
    input.Body.TimeZoneId == STRING
    input.Body.Locale == enum_LocaleType[_]
    input.Body.GrantPoweruserPrivileges == enum_BooleanEnumType[_]
    input.ReqMap.UserId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}