{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.CloudDirectory.Types.Product where
import Network.AWS.CloudDirectory.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data AttributeKey = AttributeKey'
{ _akSchemaARN :: !Text
, _akFacetName :: !Text
, _akName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
attributeKey
:: Text
-> Text
-> Text
-> AttributeKey
attributeKey pSchemaARN_ pFacetName_ pName_ =
AttributeKey'
{_akSchemaARN = pSchemaARN_, _akFacetName = pFacetName_, _akName = pName_}
akSchemaARN :: Lens' AttributeKey Text
akSchemaARN = lens _akSchemaARN (\ s a -> s{_akSchemaARN = a})
akFacetName :: Lens' AttributeKey Text
akFacetName = lens _akFacetName (\ s a -> s{_akFacetName = a})
akName :: Lens' AttributeKey Text
akName = lens _akName (\ s a -> s{_akName = a})
instance FromJSON AttributeKey where
parseJSON
= withObject "AttributeKey"
(\ x ->
AttributeKey' <$>
(x .: "SchemaArn") <*> (x .: "FacetName") <*>
(x .: "Name"))
instance Hashable AttributeKey where
instance NFData AttributeKey where
instance ToJSON AttributeKey where
toJSON AttributeKey'{..}
= object
(catMaybes
[Just ("SchemaArn" .= _akSchemaARN),
Just ("FacetName" .= _akFacetName),
Just ("Name" .= _akName)])
data AttributeKeyAndValue = AttributeKeyAndValue'
{ _akavKey :: !AttributeKey
, _akavValue :: !TypedAttributeValue
} deriving (Eq, Read, Show, Data, Typeable, Generic)
attributeKeyAndValue
:: AttributeKey
-> TypedAttributeValue
-> AttributeKeyAndValue
attributeKeyAndValue pKey_ pValue_ =
AttributeKeyAndValue' {_akavKey = pKey_, _akavValue = pValue_}
akavKey :: Lens' AttributeKeyAndValue AttributeKey
akavKey = lens _akavKey (\ s a -> s{_akavKey = a})
akavValue :: Lens' AttributeKeyAndValue TypedAttributeValue
akavValue = lens _akavValue (\ s a -> s{_akavValue = a})
instance FromJSON AttributeKeyAndValue where
parseJSON
= withObject "AttributeKeyAndValue"
(\ x ->
AttributeKeyAndValue' <$>
(x .: "Key") <*> (x .: "Value"))
instance Hashable AttributeKeyAndValue where
instance NFData AttributeKeyAndValue where
instance ToJSON AttributeKeyAndValue where
toJSON AttributeKeyAndValue'{..}
= object
(catMaybes
[Just ("Key" .= _akavKey),
Just ("Value" .= _akavValue)])
data AttributeNameAndValue = AttributeNameAndValue'
{ _anavAttributeName :: !Text
, _anavValue :: !TypedAttributeValue
} deriving (Eq, Read, Show, Data, Typeable, Generic)
attributeNameAndValue
:: Text
-> TypedAttributeValue
-> AttributeNameAndValue
attributeNameAndValue pAttributeName_ pValue_ =
AttributeNameAndValue'
{_anavAttributeName = pAttributeName_, _anavValue = pValue_}
anavAttributeName :: Lens' AttributeNameAndValue Text
anavAttributeName = lens _anavAttributeName (\ s a -> s{_anavAttributeName = a})
anavValue :: Lens' AttributeNameAndValue TypedAttributeValue
anavValue = lens _anavValue (\ s a -> s{_anavValue = a})
instance FromJSON AttributeNameAndValue where
parseJSON
= withObject "AttributeNameAndValue"
(\ x ->
AttributeNameAndValue' <$>
(x .: "AttributeName") <*> (x .: "Value"))
instance Hashable AttributeNameAndValue where
instance NFData AttributeNameAndValue where
instance ToJSON AttributeNameAndValue where
toJSON AttributeNameAndValue'{..}
= object
(catMaybes
[Just ("AttributeName" .= _anavAttributeName),
Just ("Value" .= _anavValue)])
data BatchAddFacetToObject = BatchAddFacetToObject'
{ _baftoSchemaFacet :: !SchemaFacet
, _baftoObjectAttributeList :: ![AttributeKeyAndValue]
, _baftoObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAddFacetToObject
:: SchemaFacet
-> ObjectReference
-> BatchAddFacetToObject
batchAddFacetToObject pSchemaFacet_ pObjectReference_ =
BatchAddFacetToObject'
{ _baftoSchemaFacet = pSchemaFacet_
, _baftoObjectAttributeList = mempty
, _baftoObjectReference = pObjectReference_
}
baftoSchemaFacet :: Lens' BatchAddFacetToObject SchemaFacet
baftoSchemaFacet = lens _baftoSchemaFacet (\ s a -> s{_baftoSchemaFacet = a})
baftoObjectAttributeList :: Lens' BatchAddFacetToObject [AttributeKeyAndValue]
baftoObjectAttributeList = lens _baftoObjectAttributeList (\ s a -> s{_baftoObjectAttributeList = a}) . _Coerce
baftoObjectReference :: Lens' BatchAddFacetToObject ObjectReference
baftoObjectReference = lens _baftoObjectReference (\ s a -> s{_baftoObjectReference = a})
instance Hashable BatchAddFacetToObject where
instance NFData BatchAddFacetToObject where
instance ToJSON BatchAddFacetToObject where
toJSON BatchAddFacetToObject'{..}
= object
(catMaybes
[Just ("SchemaFacet" .= _baftoSchemaFacet),
Just
("ObjectAttributeList" .= _baftoObjectAttributeList),
Just ("ObjectReference" .= _baftoObjectReference)])
data BatchAddFacetToObjectResponse =
BatchAddFacetToObjectResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAddFacetToObjectResponse
:: BatchAddFacetToObjectResponse
batchAddFacetToObjectResponse = BatchAddFacetToObjectResponse'
instance FromJSON BatchAddFacetToObjectResponse where
parseJSON
= withObject "BatchAddFacetToObjectResponse"
(\ x -> pure BatchAddFacetToObjectResponse')
instance Hashable BatchAddFacetToObjectResponse where
instance NFData BatchAddFacetToObjectResponse where
data BatchAttachObject = BatchAttachObject'
{ _baoParentReference :: !ObjectReference
, _baoChildReference :: !ObjectReference
, _baoLinkName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAttachObject
:: ObjectReference
-> ObjectReference
-> Text
-> BatchAttachObject
batchAttachObject pParentReference_ pChildReference_ pLinkName_ =
BatchAttachObject'
{ _baoParentReference = pParentReference_
, _baoChildReference = pChildReference_
, _baoLinkName = pLinkName_
}
baoParentReference :: Lens' BatchAttachObject ObjectReference
baoParentReference = lens _baoParentReference (\ s a -> s{_baoParentReference = a})
baoChildReference :: Lens' BatchAttachObject ObjectReference
baoChildReference = lens _baoChildReference (\ s a -> s{_baoChildReference = a})
baoLinkName :: Lens' BatchAttachObject Text
baoLinkName = lens _baoLinkName (\ s a -> s{_baoLinkName = a})
instance Hashable BatchAttachObject where
instance NFData BatchAttachObject where
instance ToJSON BatchAttachObject where
toJSON BatchAttachObject'{..}
= object
(catMaybes
[Just ("ParentReference" .= _baoParentReference),
Just ("ChildReference" .= _baoChildReference),
Just ("LinkName" .= _baoLinkName)])
newtype BatchAttachObjectResponse = BatchAttachObjectResponse'
{ _baoAttachedObjectIdentifier :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAttachObjectResponse
:: BatchAttachObjectResponse
batchAttachObjectResponse =
BatchAttachObjectResponse' {_baoAttachedObjectIdentifier = Nothing}
baoAttachedObjectIdentifier :: Lens' BatchAttachObjectResponse (Maybe Text)
baoAttachedObjectIdentifier = lens _baoAttachedObjectIdentifier (\ s a -> s{_baoAttachedObjectIdentifier = a})
instance FromJSON BatchAttachObjectResponse where
parseJSON
= withObject "BatchAttachObjectResponse"
(\ x ->
BatchAttachObjectResponse' <$>
(x .:? "attachedObjectIdentifier"))
instance Hashable BatchAttachObjectResponse where
instance NFData BatchAttachObjectResponse where
data BatchAttachPolicy = BatchAttachPolicy'
{ _bapPolicyReference :: !ObjectReference
, _bapObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAttachPolicy
:: ObjectReference
-> ObjectReference
-> BatchAttachPolicy
batchAttachPolicy pPolicyReference_ pObjectReference_ =
BatchAttachPolicy'
{ _bapPolicyReference = pPolicyReference_
, _bapObjectReference = pObjectReference_
}
bapPolicyReference :: Lens' BatchAttachPolicy ObjectReference
bapPolicyReference = lens _bapPolicyReference (\ s a -> s{_bapPolicyReference = a})
bapObjectReference :: Lens' BatchAttachPolicy ObjectReference
bapObjectReference = lens _bapObjectReference (\ s a -> s{_bapObjectReference = a})
instance Hashable BatchAttachPolicy where
instance NFData BatchAttachPolicy where
instance ToJSON BatchAttachPolicy where
toJSON BatchAttachPolicy'{..}
= object
(catMaybes
[Just ("PolicyReference" .= _bapPolicyReference),
Just ("ObjectReference" .= _bapObjectReference)])
data BatchAttachPolicyResponse =
BatchAttachPolicyResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAttachPolicyResponse
:: BatchAttachPolicyResponse
batchAttachPolicyResponse = BatchAttachPolicyResponse'
instance FromJSON BatchAttachPolicyResponse where
parseJSON
= withObject "BatchAttachPolicyResponse"
(\ x -> pure BatchAttachPolicyResponse')
instance Hashable BatchAttachPolicyResponse where
instance NFData BatchAttachPolicyResponse where
data BatchAttachToIndex = BatchAttachToIndex'
{ _batiIndexReference :: !ObjectReference
, _batiTargetReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAttachToIndex
:: ObjectReference
-> ObjectReference
-> BatchAttachToIndex
batchAttachToIndex pIndexReference_ pTargetReference_ =
BatchAttachToIndex'
{ _batiIndexReference = pIndexReference_
, _batiTargetReference = pTargetReference_
}
batiIndexReference :: Lens' BatchAttachToIndex ObjectReference
batiIndexReference = lens _batiIndexReference (\ s a -> s{_batiIndexReference = a})
batiTargetReference :: Lens' BatchAttachToIndex ObjectReference
batiTargetReference = lens _batiTargetReference (\ s a -> s{_batiTargetReference = a})
instance Hashable BatchAttachToIndex where
instance NFData BatchAttachToIndex where
instance ToJSON BatchAttachToIndex where
toJSON BatchAttachToIndex'{..}
= object
(catMaybes
[Just ("IndexReference" .= _batiIndexReference),
Just ("TargetReference" .= _batiTargetReference)])
newtype BatchAttachToIndexResponse = BatchAttachToIndexResponse'
{ _batiAttachedObjectIdentifier :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAttachToIndexResponse
:: BatchAttachToIndexResponse
batchAttachToIndexResponse =
BatchAttachToIndexResponse' {_batiAttachedObjectIdentifier = Nothing}
batiAttachedObjectIdentifier :: Lens' BatchAttachToIndexResponse (Maybe Text)
batiAttachedObjectIdentifier = lens _batiAttachedObjectIdentifier (\ s a -> s{_batiAttachedObjectIdentifier = a})
instance FromJSON BatchAttachToIndexResponse where
parseJSON
= withObject "BatchAttachToIndexResponse"
(\ x ->
BatchAttachToIndexResponse' <$>
(x .:? "AttachedObjectIdentifier"))
instance Hashable BatchAttachToIndexResponse where
instance NFData BatchAttachToIndexResponse where
data BatchAttachTypedLink = BatchAttachTypedLink'
{ _batlSourceObjectReference :: !ObjectReference
, _batlTargetObjectReference :: !ObjectReference
, _batlTypedLinkFacet :: !TypedLinkSchemaAndFacetName
, _batlAttributes :: ![AttributeNameAndValue]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAttachTypedLink
:: ObjectReference
-> ObjectReference
-> TypedLinkSchemaAndFacetName
-> BatchAttachTypedLink
batchAttachTypedLink pSourceObjectReference_ pTargetObjectReference_ pTypedLinkFacet_ =
BatchAttachTypedLink'
{ _batlSourceObjectReference = pSourceObjectReference_
, _batlTargetObjectReference = pTargetObjectReference_
, _batlTypedLinkFacet = pTypedLinkFacet_
, _batlAttributes = mempty
}
batlSourceObjectReference :: Lens' BatchAttachTypedLink ObjectReference
batlSourceObjectReference = lens _batlSourceObjectReference (\ s a -> s{_batlSourceObjectReference = a})
batlTargetObjectReference :: Lens' BatchAttachTypedLink ObjectReference
batlTargetObjectReference = lens _batlTargetObjectReference (\ s a -> s{_batlTargetObjectReference = a})
batlTypedLinkFacet :: Lens' BatchAttachTypedLink TypedLinkSchemaAndFacetName
batlTypedLinkFacet = lens _batlTypedLinkFacet (\ s a -> s{_batlTypedLinkFacet = a})
batlAttributes :: Lens' BatchAttachTypedLink [AttributeNameAndValue]
batlAttributes = lens _batlAttributes (\ s a -> s{_batlAttributes = a}) . _Coerce
instance Hashable BatchAttachTypedLink where
instance NFData BatchAttachTypedLink where
instance ToJSON BatchAttachTypedLink where
toJSON BatchAttachTypedLink'{..}
= object
(catMaybes
[Just
("SourceObjectReference" .=
_batlSourceObjectReference),
Just
("TargetObjectReference" .=
_batlTargetObjectReference),
Just ("TypedLinkFacet" .= _batlTypedLinkFacet),
Just ("Attributes" .= _batlAttributes)])
newtype BatchAttachTypedLinkResponse = BatchAttachTypedLinkResponse'
{ _batlTypedLinkSpecifier :: Maybe TypedLinkSpecifier
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchAttachTypedLinkResponse
:: BatchAttachTypedLinkResponse
batchAttachTypedLinkResponse =
BatchAttachTypedLinkResponse' {_batlTypedLinkSpecifier = Nothing}
batlTypedLinkSpecifier :: Lens' BatchAttachTypedLinkResponse (Maybe TypedLinkSpecifier)
batlTypedLinkSpecifier = lens _batlTypedLinkSpecifier (\ s a -> s{_batlTypedLinkSpecifier = a})
instance FromJSON BatchAttachTypedLinkResponse where
parseJSON
= withObject "BatchAttachTypedLinkResponse"
(\ x ->
BatchAttachTypedLinkResponse' <$>
(x .:? "TypedLinkSpecifier"))
instance Hashable BatchAttachTypedLinkResponse where
instance NFData BatchAttachTypedLinkResponse where
data BatchCreateIndex = BatchCreateIndex'
{ _bciParentReference :: !(Maybe ObjectReference)
, _bciLinkName :: !(Maybe Text)
, _bciBatchReferenceName :: !(Maybe Text)
, _bciOrderedIndexedAttributeList :: ![AttributeKey]
, _bciIsUnique :: !Bool
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchCreateIndex
:: Bool
-> BatchCreateIndex
batchCreateIndex pIsUnique_ =
BatchCreateIndex'
{ _bciParentReference = Nothing
, _bciLinkName = Nothing
, _bciBatchReferenceName = Nothing
, _bciOrderedIndexedAttributeList = mempty
, _bciIsUnique = pIsUnique_
}
bciParentReference :: Lens' BatchCreateIndex (Maybe ObjectReference)
bciParentReference = lens _bciParentReference (\ s a -> s{_bciParentReference = a})
bciLinkName :: Lens' BatchCreateIndex (Maybe Text)
bciLinkName = lens _bciLinkName (\ s a -> s{_bciLinkName = a})
bciBatchReferenceName :: Lens' BatchCreateIndex (Maybe Text)
bciBatchReferenceName = lens _bciBatchReferenceName (\ s a -> s{_bciBatchReferenceName = a})
bciOrderedIndexedAttributeList :: Lens' BatchCreateIndex [AttributeKey]
bciOrderedIndexedAttributeList = lens _bciOrderedIndexedAttributeList (\ s a -> s{_bciOrderedIndexedAttributeList = a}) . _Coerce
bciIsUnique :: Lens' BatchCreateIndex Bool
bciIsUnique = lens _bciIsUnique (\ s a -> s{_bciIsUnique = a})
instance Hashable BatchCreateIndex where
instance NFData BatchCreateIndex where
instance ToJSON BatchCreateIndex where
toJSON BatchCreateIndex'{..}
= object
(catMaybes
[("ParentReference" .=) <$> _bciParentReference,
("LinkName" .=) <$> _bciLinkName,
("BatchReferenceName" .=) <$> _bciBatchReferenceName,
Just
("OrderedIndexedAttributeList" .=
_bciOrderedIndexedAttributeList),
Just ("IsUnique" .= _bciIsUnique)])
newtype BatchCreateIndexResponse = BatchCreateIndexResponse'
{ _bciObjectIdentifier :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchCreateIndexResponse
:: BatchCreateIndexResponse
batchCreateIndexResponse =
BatchCreateIndexResponse' {_bciObjectIdentifier = Nothing}
bciObjectIdentifier :: Lens' BatchCreateIndexResponse (Maybe Text)
bciObjectIdentifier = lens _bciObjectIdentifier (\ s a -> s{_bciObjectIdentifier = a})
instance FromJSON BatchCreateIndexResponse where
parseJSON
= withObject "BatchCreateIndexResponse"
(\ x ->
BatchCreateIndexResponse' <$>
(x .:? "ObjectIdentifier"))
instance Hashable BatchCreateIndexResponse where
instance NFData BatchCreateIndexResponse where
data BatchCreateObject = BatchCreateObject'
{ _bcoParentReference :: !(Maybe ObjectReference)
, _bcoLinkName :: !(Maybe Text)
, _bcoBatchReferenceName :: !(Maybe Text)
, _bcoSchemaFacet :: ![SchemaFacet]
, _bcoObjectAttributeList :: ![AttributeKeyAndValue]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchCreateObject
:: BatchCreateObject
batchCreateObject =
BatchCreateObject'
{ _bcoParentReference = Nothing
, _bcoLinkName = Nothing
, _bcoBatchReferenceName = Nothing
, _bcoSchemaFacet = mempty
, _bcoObjectAttributeList = mempty
}
bcoParentReference :: Lens' BatchCreateObject (Maybe ObjectReference)
bcoParentReference = lens _bcoParentReference (\ s a -> s{_bcoParentReference = a})
bcoLinkName :: Lens' BatchCreateObject (Maybe Text)
bcoLinkName = lens _bcoLinkName (\ s a -> s{_bcoLinkName = a})
bcoBatchReferenceName :: Lens' BatchCreateObject (Maybe Text)
bcoBatchReferenceName = lens _bcoBatchReferenceName (\ s a -> s{_bcoBatchReferenceName = a})
bcoSchemaFacet :: Lens' BatchCreateObject [SchemaFacet]
bcoSchemaFacet = lens _bcoSchemaFacet (\ s a -> s{_bcoSchemaFacet = a}) . _Coerce
bcoObjectAttributeList :: Lens' BatchCreateObject [AttributeKeyAndValue]
bcoObjectAttributeList = lens _bcoObjectAttributeList (\ s a -> s{_bcoObjectAttributeList = a}) . _Coerce
instance Hashable BatchCreateObject where
instance NFData BatchCreateObject where
instance ToJSON BatchCreateObject where
toJSON BatchCreateObject'{..}
= object
(catMaybes
[("ParentReference" .=) <$> _bcoParentReference,
("LinkName" .=) <$> _bcoLinkName,
("BatchReferenceName" .=) <$> _bcoBatchReferenceName,
Just ("SchemaFacet" .= _bcoSchemaFacet),
Just
("ObjectAttributeList" .= _bcoObjectAttributeList)])
newtype BatchCreateObjectResponse = BatchCreateObjectResponse'
{ _bcoObjectIdentifier :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchCreateObjectResponse
:: BatchCreateObjectResponse
batchCreateObjectResponse =
BatchCreateObjectResponse' {_bcoObjectIdentifier = Nothing}
bcoObjectIdentifier :: Lens' BatchCreateObjectResponse (Maybe Text)
bcoObjectIdentifier = lens _bcoObjectIdentifier (\ s a -> s{_bcoObjectIdentifier = a})
instance FromJSON BatchCreateObjectResponse where
parseJSON
= withObject "BatchCreateObjectResponse"
(\ x ->
BatchCreateObjectResponse' <$>
(x .:? "ObjectIdentifier"))
instance Hashable BatchCreateObjectResponse where
instance NFData BatchCreateObjectResponse where
newtype BatchDeleteObject = BatchDeleteObject'
{ _bdoObjectReference :: ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDeleteObject
:: ObjectReference
-> BatchDeleteObject
batchDeleteObject pObjectReference_ =
BatchDeleteObject' {_bdoObjectReference = pObjectReference_}
bdoObjectReference :: Lens' BatchDeleteObject ObjectReference
bdoObjectReference = lens _bdoObjectReference (\ s a -> s{_bdoObjectReference = a})
instance Hashable BatchDeleteObject where
instance NFData BatchDeleteObject where
instance ToJSON BatchDeleteObject where
toJSON BatchDeleteObject'{..}
= object
(catMaybes
[Just ("ObjectReference" .= _bdoObjectReference)])
data BatchDeleteObjectResponse =
BatchDeleteObjectResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDeleteObjectResponse
:: BatchDeleteObjectResponse
batchDeleteObjectResponse = BatchDeleteObjectResponse'
instance FromJSON BatchDeleteObjectResponse where
parseJSON
= withObject "BatchDeleteObjectResponse"
(\ x -> pure BatchDeleteObjectResponse')
instance Hashable BatchDeleteObjectResponse where
instance NFData BatchDeleteObjectResponse where
data BatchDetachFromIndex = BatchDetachFromIndex'
{ _bdfiIndexReference :: !ObjectReference
, _bdfiTargetReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDetachFromIndex
:: ObjectReference
-> ObjectReference
-> BatchDetachFromIndex
batchDetachFromIndex pIndexReference_ pTargetReference_ =
BatchDetachFromIndex'
{ _bdfiIndexReference = pIndexReference_
, _bdfiTargetReference = pTargetReference_
}
bdfiIndexReference :: Lens' BatchDetachFromIndex ObjectReference
bdfiIndexReference = lens _bdfiIndexReference (\ s a -> s{_bdfiIndexReference = a})
bdfiTargetReference :: Lens' BatchDetachFromIndex ObjectReference
bdfiTargetReference = lens _bdfiTargetReference (\ s a -> s{_bdfiTargetReference = a})
instance Hashable BatchDetachFromIndex where
instance NFData BatchDetachFromIndex where
instance ToJSON BatchDetachFromIndex where
toJSON BatchDetachFromIndex'{..}
= object
(catMaybes
[Just ("IndexReference" .= _bdfiIndexReference),
Just ("TargetReference" .= _bdfiTargetReference)])
newtype BatchDetachFromIndexResponse = BatchDetachFromIndexResponse'
{ _bdfiDetachedObjectIdentifier :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDetachFromIndexResponse
:: BatchDetachFromIndexResponse
batchDetachFromIndexResponse =
BatchDetachFromIndexResponse' {_bdfiDetachedObjectIdentifier = Nothing}
bdfiDetachedObjectIdentifier :: Lens' BatchDetachFromIndexResponse (Maybe Text)
bdfiDetachedObjectIdentifier = lens _bdfiDetachedObjectIdentifier (\ s a -> s{_bdfiDetachedObjectIdentifier = a})
instance FromJSON BatchDetachFromIndexResponse where
parseJSON
= withObject "BatchDetachFromIndexResponse"
(\ x ->
BatchDetachFromIndexResponse' <$>
(x .:? "DetachedObjectIdentifier"))
instance Hashable BatchDetachFromIndexResponse where
instance NFData BatchDetachFromIndexResponse where
data BatchDetachObject = BatchDetachObject'
{ _bdoBatchReferenceName :: !(Maybe Text)
, _bdoParentReference :: !ObjectReference
, _bdoLinkName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDetachObject
:: ObjectReference
-> Text
-> BatchDetachObject
batchDetachObject pParentReference_ pLinkName_ =
BatchDetachObject'
{ _bdoBatchReferenceName = Nothing
, _bdoParentReference = pParentReference_
, _bdoLinkName = pLinkName_
}
bdoBatchReferenceName :: Lens' BatchDetachObject (Maybe Text)
bdoBatchReferenceName = lens _bdoBatchReferenceName (\ s a -> s{_bdoBatchReferenceName = a})
bdoParentReference :: Lens' BatchDetachObject ObjectReference
bdoParentReference = lens _bdoParentReference (\ s a -> s{_bdoParentReference = a})
bdoLinkName :: Lens' BatchDetachObject Text
bdoLinkName = lens _bdoLinkName (\ s a -> s{_bdoLinkName = a})
instance Hashable BatchDetachObject where
instance NFData BatchDetachObject where
instance ToJSON BatchDetachObject where
toJSON BatchDetachObject'{..}
= object
(catMaybes
[("BatchReferenceName" .=) <$>
_bdoBatchReferenceName,
Just ("ParentReference" .= _bdoParentReference),
Just ("LinkName" .= _bdoLinkName)])
newtype BatchDetachObjectResponse = BatchDetachObjectResponse'
{ _bdoDetachedObjectIdentifier :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDetachObjectResponse
:: BatchDetachObjectResponse
batchDetachObjectResponse =
BatchDetachObjectResponse' {_bdoDetachedObjectIdentifier = Nothing}
bdoDetachedObjectIdentifier :: Lens' BatchDetachObjectResponse (Maybe Text)
bdoDetachedObjectIdentifier = lens _bdoDetachedObjectIdentifier (\ s a -> s{_bdoDetachedObjectIdentifier = a})
instance FromJSON BatchDetachObjectResponse where
parseJSON
= withObject "BatchDetachObjectResponse"
(\ x ->
BatchDetachObjectResponse' <$>
(x .:? "detachedObjectIdentifier"))
instance Hashable BatchDetachObjectResponse where
instance NFData BatchDetachObjectResponse where
data BatchDetachPolicy = BatchDetachPolicy'
{ _bdpPolicyReference :: !ObjectReference
, _bdpObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDetachPolicy
:: ObjectReference
-> ObjectReference
-> BatchDetachPolicy
batchDetachPolicy pPolicyReference_ pObjectReference_ =
BatchDetachPolicy'
{ _bdpPolicyReference = pPolicyReference_
, _bdpObjectReference = pObjectReference_
}
bdpPolicyReference :: Lens' BatchDetachPolicy ObjectReference
bdpPolicyReference = lens _bdpPolicyReference (\ s a -> s{_bdpPolicyReference = a})
bdpObjectReference :: Lens' BatchDetachPolicy ObjectReference
bdpObjectReference = lens _bdpObjectReference (\ s a -> s{_bdpObjectReference = a})
instance Hashable BatchDetachPolicy where
instance NFData BatchDetachPolicy where
instance ToJSON BatchDetachPolicy where
toJSON BatchDetachPolicy'{..}
= object
(catMaybes
[Just ("PolicyReference" .= _bdpPolicyReference),
Just ("ObjectReference" .= _bdpObjectReference)])
data BatchDetachPolicyResponse =
BatchDetachPolicyResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDetachPolicyResponse
:: BatchDetachPolicyResponse
batchDetachPolicyResponse = BatchDetachPolicyResponse'
instance FromJSON BatchDetachPolicyResponse where
parseJSON
= withObject "BatchDetachPolicyResponse"
(\ x -> pure BatchDetachPolicyResponse')
instance Hashable BatchDetachPolicyResponse where
instance NFData BatchDetachPolicyResponse where
newtype BatchDetachTypedLink = BatchDetachTypedLink'
{ _bdtlTypedLinkSpecifier :: TypedLinkSpecifier
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDetachTypedLink
:: TypedLinkSpecifier
-> BatchDetachTypedLink
batchDetachTypedLink pTypedLinkSpecifier_ =
BatchDetachTypedLink' {_bdtlTypedLinkSpecifier = pTypedLinkSpecifier_}
bdtlTypedLinkSpecifier :: Lens' BatchDetachTypedLink TypedLinkSpecifier
bdtlTypedLinkSpecifier = lens _bdtlTypedLinkSpecifier (\ s a -> s{_bdtlTypedLinkSpecifier = a})
instance Hashable BatchDetachTypedLink where
instance NFData BatchDetachTypedLink where
instance ToJSON BatchDetachTypedLink where
toJSON BatchDetachTypedLink'{..}
= object
(catMaybes
[Just
("TypedLinkSpecifier" .= _bdtlTypedLinkSpecifier)])
data BatchDetachTypedLinkResponse =
BatchDetachTypedLinkResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
batchDetachTypedLinkResponse
:: BatchDetachTypedLinkResponse
batchDetachTypedLinkResponse = BatchDetachTypedLinkResponse'
instance FromJSON BatchDetachTypedLinkResponse where
parseJSON
= withObject "BatchDetachTypedLinkResponse"
(\ x -> pure BatchDetachTypedLinkResponse')
instance Hashable BatchDetachTypedLinkResponse where
instance NFData BatchDetachTypedLinkResponse where
data BatchGetObjectAttributes = BatchGetObjectAttributes'
{ _bgoaObjectReference :: !ObjectReference
, _bgoaSchemaFacet :: !SchemaFacet
, _bgoaAttributeNames :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchGetObjectAttributes
:: ObjectReference
-> SchemaFacet
-> BatchGetObjectAttributes
batchGetObjectAttributes pObjectReference_ pSchemaFacet_ =
BatchGetObjectAttributes'
{ _bgoaObjectReference = pObjectReference_
, _bgoaSchemaFacet = pSchemaFacet_
, _bgoaAttributeNames = mempty
}
bgoaObjectReference :: Lens' BatchGetObjectAttributes ObjectReference
bgoaObjectReference = lens _bgoaObjectReference (\ s a -> s{_bgoaObjectReference = a})
bgoaSchemaFacet :: Lens' BatchGetObjectAttributes SchemaFacet
bgoaSchemaFacet = lens _bgoaSchemaFacet (\ s a -> s{_bgoaSchemaFacet = a})
bgoaAttributeNames :: Lens' BatchGetObjectAttributes [Text]
bgoaAttributeNames = lens _bgoaAttributeNames (\ s a -> s{_bgoaAttributeNames = a}) . _Coerce
instance Hashable BatchGetObjectAttributes where
instance NFData BatchGetObjectAttributes where
instance ToJSON BatchGetObjectAttributes where
toJSON BatchGetObjectAttributes'{..}
= object
(catMaybes
[Just ("ObjectReference" .= _bgoaObjectReference),
Just ("SchemaFacet" .= _bgoaSchemaFacet),
Just ("AttributeNames" .= _bgoaAttributeNames)])
newtype BatchGetObjectAttributesResponse = BatchGetObjectAttributesResponse'
{ _bgoaAttributes :: Maybe [AttributeKeyAndValue]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchGetObjectAttributesResponse
:: BatchGetObjectAttributesResponse
batchGetObjectAttributesResponse =
BatchGetObjectAttributesResponse' {_bgoaAttributes = Nothing}
bgoaAttributes :: Lens' BatchGetObjectAttributesResponse [AttributeKeyAndValue]
bgoaAttributes = lens _bgoaAttributes (\ s a -> s{_bgoaAttributes = a}) . _Default . _Coerce
instance FromJSON BatchGetObjectAttributesResponse
where
parseJSON
= withObject "BatchGetObjectAttributesResponse"
(\ x ->
BatchGetObjectAttributesResponse' <$>
(x .:? "Attributes" .!= mempty))
instance Hashable BatchGetObjectAttributesResponse
where
instance NFData BatchGetObjectAttributesResponse
where
newtype BatchGetObjectInformation = BatchGetObjectInformation'
{ _bgoiObjectReference :: ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchGetObjectInformation
:: ObjectReference
-> BatchGetObjectInformation
batchGetObjectInformation pObjectReference_ =
BatchGetObjectInformation' {_bgoiObjectReference = pObjectReference_}
bgoiObjectReference :: Lens' BatchGetObjectInformation ObjectReference
bgoiObjectReference = lens _bgoiObjectReference (\ s a -> s{_bgoiObjectReference = a})
instance Hashable BatchGetObjectInformation where
instance NFData BatchGetObjectInformation where
instance ToJSON BatchGetObjectInformation where
toJSON BatchGetObjectInformation'{..}
= object
(catMaybes
[Just ("ObjectReference" .= _bgoiObjectReference)])
data BatchGetObjectInformationResponse = BatchGetObjectInformationResponse'
{ _bgoiObjectIdentifier :: !(Maybe Text)
, _bgoiSchemaFacets :: !(Maybe [SchemaFacet])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchGetObjectInformationResponse
:: BatchGetObjectInformationResponse
batchGetObjectInformationResponse =
BatchGetObjectInformationResponse'
{_bgoiObjectIdentifier = Nothing, _bgoiSchemaFacets = Nothing}
bgoiObjectIdentifier :: Lens' BatchGetObjectInformationResponse (Maybe Text)
bgoiObjectIdentifier = lens _bgoiObjectIdentifier (\ s a -> s{_bgoiObjectIdentifier = a})
bgoiSchemaFacets :: Lens' BatchGetObjectInformationResponse [SchemaFacet]
bgoiSchemaFacets = lens _bgoiSchemaFacets (\ s a -> s{_bgoiSchemaFacets = a}) . _Default . _Coerce
instance FromJSON BatchGetObjectInformationResponse
where
parseJSON
= withObject "BatchGetObjectInformationResponse"
(\ x ->
BatchGetObjectInformationResponse' <$>
(x .:? "ObjectIdentifier") <*>
(x .:? "SchemaFacets" .!= mempty))
instance Hashable BatchGetObjectInformationResponse
where
instance NFData BatchGetObjectInformationResponse
where
data BatchListAttachedIndices = BatchListAttachedIndices'
{ _blaisNextToken :: !(Maybe Text)
, _blaisMaxResults :: !(Maybe Nat)
, _blaisTargetReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListAttachedIndices
:: ObjectReference
-> BatchListAttachedIndices
batchListAttachedIndices pTargetReference_ =
BatchListAttachedIndices'
{ _blaisNextToken = Nothing
, _blaisMaxResults = Nothing
, _blaisTargetReference = pTargetReference_
}
blaisNextToken :: Lens' BatchListAttachedIndices (Maybe Text)
blaisNextToken = lens _blaisNextToken (\ s a -> s{_blaisNextToken = a})
blaisMaxResults :: Lens' BatchListAttachedIndices (Maybe Natural)
blaisMaxResults = lens _blaisMaxResults (\ s a -> s{_blaisMaxResults = a}) . mapping _Nat
blaisTargetReference :: Lens' BatchListAttachedIndices ObjectReference
blaisTargetReference = lens _blaisTargetReference (\ s a -> s{_blaisTargetReference = a})
instance Hashable BatchListAttachedIndices where
instance NFData BatchListAttachedIndices where
instance ToJSON BatchListAttachedIndices where
toJSON BatchListAttachedIndices'{..}
= object
(catMaybes
[("NextToken" .=) <$> _blaisNextToken,
("MaxResults" .=) <$> _blaisMaxResults,
Just ("TargetReference" .= _blaisTargetReference)])
data BatchListAttachedIndicesResponse = BatchListAttachedIndicesResponse'
{ _blaiIndexAttachments :: !(Maybe [IndexAttachment])
, _blaiNextToken :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListAttachedIndicesResponse
:: BatchListAttachedIndicesResponse
batchListAttachedIndicesResponse =
BatchListAttachedIndicesResponse'
{_blaiIndexAttachments = Nothing, _blaiNextToken = Nothing}
blaiIndexAttachments :: Lens' BatchListAttachedIndicesResponse [IndexAttachment]
blaiIndexAttachments = lens _blaiIndexAttachments (\ s a -> s{_blaiIndexAttachments = a}) . _Default . _Coerce
blaiNextToken :: Lens' BatchListAttachedIndicesResponse (Maybe Text)
blaiNextToken = lens _blaiNextToken (\ s a -> s{_blaiNextToken = a})
instance FromJSON BatchListAttachedIndicesResponse
where
parseJSON
= withObject "BatchListAttachedIndicesResponse"
(\ x ->
BatchListAttachedIndicesResponse' <$>
(x .:? "IndexAttachments" .!= mempty) <*>
(x .:? "NextToken"))
instance Hashable BatchListAttachedIndicesResponse
where
instance NFData BatchListAttachedIndicesResponse
where
data BatchListIncomingTypedLinks = BatchListIncomingTypedLinks'
{ _blitlsFilterAttributeRanges :: !(Maybe [TypedLinkAttributeRange])
, _blitlsNextToken :: !(Maybe Text)
, _blitlsFilterTypedLink :: !(Maybe TypedLinkSchemaAndFacetName)
, _blitlsMaxResults :: !(Maybe Nat)
, _blitlsObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListIncomingTypedLinks
:: ObjectReference
-> BatchListIncomingTypedLinks
batchListIncomingTypedLinks pObjectReference_ =
BatchListIncomingTypedLinks'
{ _blitlsFilterAttributeRanges = Nothing
, _blitlsNextToken = Nothing
, _blitlsFilterTypedLink = Nothing
, _blitlsMaxResults = Nothing
, _blitlsObjectReference = pObjectReference_
}
blitlsFilterAttributeRanges :: Lens' BatchListIncomingTypedLinks [TypedLinkAttributeRange]
blitlsFilterAttributeRanges = lens _blitlsFilterAttributeRanges (\ s a -> s{_blitlsFilterAttributeRanges = a}) . _Default . _Coerce
blitlsNextToken :: Lens' BatchListIncomingTypedLinks (Maybe Text)
blitlsNextToken = lens _blitlsNextToken (\ s a -> s{_blitlsNextToken = a})
blitlsFilterTypedLink :: Lens' BatchListIncomingTypedLinks (Maybe TypedLinkSchemaAndFacetName)
blitlsFilterTypedLink = lens _blitlsFilterTypedLink (\ s a -> s{_blitlsFilterTypedLink = a})
blitlsMaxResults :: Lens' BatchListIncomingTypedLinks (Maybe Natural)
blitlsMaxResults = lens _blitlsMaxResults (\ s a -> s{_blitlsMaxResults = a}) . mapping _Nat
blitlsObjectReference :: Lens' BatchListIncomingTypedLinks ObjectReference
blitlsObjectReference = lens _blitlsObjectReference (\ s a -> s{_blitlsObjectReference = a})
instance Hashable BatchListIncomingTypedLinks where
instance NFData BatchListIncomingTypedLinks where
instance ToJSON BatchListIncomingTypedLinks where
toJSON BatchListIncomingTypedLinks'{..}
= object
(catMaybes
[("FilterAttributeRanges" .=) <$>
_blitlsFilterAttributeRanges,
("NextToken" .=) <$> _blitlsNextToken,
("FilterTypedLink" .=) <$> _blitlsFilterTypedLink,
("MaxResults" .=) <$> _blitlsMaxResults,
Just ("ObjectReference" .= _blitlsObjectReference)])
data BatchListIncomingTypedLinksResponse = BatchListIncomingTypedLinksResponse'
{ _blitlLinkSpecifiers :: !(Maybe [TypedLinkSpecifier])
, _blitlNextToken :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListIncomingTypedLinksResponse
:: BatchListIncomingTypedLinksResponse
batchListIncomingTypedLinksResponse =
BatchListIncomingTypedLinksResponse'
{_blitlLinkSpecifiers = Nothing, _blitlNextToken = Nothing}
blitlLinkSpecifiers :: Lens' BatchListIncomingTypedLinksResponse [TypedLinkSpecifier]
blitlLinkSpecifiers = lens _blitlLinkSpecifiers (\ s a -> s{_blitlLinkSpecifiers = a}) . _Default . _Coerce
blitlNextToken :: Lens' BatchListIncomingTypedLinksResponse (Maybe Text)
blitlNextToken = lens _blitlNextToken (\ s a -> s{_blitlNextToken = a})
instance FromJSON BatchListIncomingTypedLinksResponse
where
parseJSON
= withObject "BatchListIncomingTypedLinksResponse"
(\ x ->
BatchListIncomingTypedLinksResponse' <$>
(x .:? "LinkSpecifiers" .!= mempty) <*>
(x .:? "NextToken"))
instance Hashable BatchListIncomingTypedLinksResponse
where
instance NFData BatchListIncomingTypedLinksResponse
where
data BatchListIndex = BatchListIndex'
{ _batRangesOnIndexedValues :: !(Maybe [ObjectAttributeRange])
, _batNextToken :: !(Maybe Text)
, _batMaxResults :: !(Maybe Nat)
, _batIndexReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListIndex
:: ObjectReference
-> BatchListIndex
batchListIndex pIndexReference_ =
BatchListIndex'
{ _batRangesOnIndexedValues = Nothing
, _batNextToken = Nothing
, _batMaxResults = Nothing
, _batIndexReference = pIndexReference_
}
batRangesOnIndexedValues :: Lens' BatchListIndex [ObjectAttributeRange]
batRangesOnIndexedValues = lens _batRangesOnIndexedValues (\ s a -> s{_batRangesOnIndexedValues = a}) . _Default . _Coerce
batNextToken :: Lens' BatchListIndex (Maybe Text)
batNextToken = lens _batNextToken (\ s a -> s{_batNextToken = a})
batMaxResults :: Lens' BatchListIndex (Maybe Natural)
batMaxResults = lens _batMaxResults (\ s a -> s{_batMaxResults = a}) . mapping _Nat
batIndexReference :: Lens' BatchListIndex ObjectReference
batIndexReference = lens _batIndexReference (\ s a -> s{_batIndexReference = a})
instance Hashable BatchListIndex where
instance NFData BatchListIndex where
instance ToJSON BatchListIndex where
toJSON BatchListIndex'{..}
= object
(catMaybes
[("RangesOnIndexedValues" .=) <$>
_batRangesOnIndexedValues,
("NextToken" .=) <$> _batNextToken,
("MaxResults" .=) <$> _batMaxResults,
Just ("IndexReference" .= _batIndexReference)])
data BatchListIndexResponse = BatchListIndexResponse'
{ _bliIndexAttachments :: !(Maybe [IndexAttachment])
, _bliNextToken :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListIndexResponse
:: BatchListIndexResponse
batchListIndexResponse =
BatchListIndexResponse'
{_bliIndexAttachments = Nothing, _bliNextToken = Nothing}
bliIndexAttachments :: Lens' BatchListIndexResponse [IndexAttachment]
bliIndexAttachments = lens _bliIndexAttachments (\ s a -> s{_bliIndexAttachments = a}) . _Default . _Coerce
bliNextToken :: Lens' BatchListIndexResponse (Maybe Text)
bliNextToken = lens _bliNextToken (\ s a -> s{_bliNextToken = a})
instance FromJSON BatchListIndexResponse where
parseJSON
= withObject "BatchListIndexResponse"
(\ x ->
BatchListIndexResponse' <$>
(x .:? "IndexAttachments" .!= mempty) <*>
(x .:? "NextToken"))
instance Hashable BatchListIndexResponse where
instance NFData BatchListIndexResponse where
data BatchListObjectAttributes = BatchListObjectAttributes'
{ _bloaFacetFilter :: !(Maybe SchemaFacet)
, _bloaNextToken :: !(Maybe Text)
, _bloaMaxResults :: !(Maybe Nat)
, _bloaObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListObjectAttributes
:: ObjectReference
-> BatchListObjectAttributes
batchListObjectAttributes pObjectReference_ =
BatchListObjectAttributes'
{ _bloaFacetFilter = Nothing
, _bloaNextToken = Nothing
, _bloaMaxResults = Nothing
, _bloaObjectReference = pObjectReference_
}
bloaFacetFilter :: Lens' BatchListObjectAttributes (Maybe SchemaFacet)
bloaFacetFilter = lens _bloaFacetFilter (\ s a -> s{_bloaFacetFilter = a})
bloaNextToken :: Lens' BatchListObjectAttributes (Maybe Text)
bloaNextToken = lens _bloaNextToken (\ s a -> s{_bloaNextToken = a})
bloaMaxResults :: Lens' BatchListObjectAttributes (Maybe Natural)
bloaMaxResults = lens _bloaMaxResults (\ s a -> s{_bloaMaxResults = a}) . mapping _Nat
bloaObjectReference :: Lens' BatchListObjectAttributes ObjectReference
bloaObjectReference = lens _bloaObjectReference (\ s a -> s{_bloaObjectReference = a})
instance Hashable BatchListObjectAttributes where
instance NFData BatchListObjectAttributes where
instance ToJSON BatchListObjectAttributes where
toJSON BatchListObjectAttributes'{..}
= object
(catMaybes
[("FacetFilter" .=) <$> _bloaFacetFilter,
("NextToken" .=) <$> _bloaNextToken,
("MaxResults" .=) <$> _bloaMaxResults,
Just ("ObjectReference" .= _bloaObjectReference)])
data BatchListObjectAttributesResponse = BatchListObjectAttributesResponse'
{ _bNextToken :: !(Maybe Text)
, _bAttributes :: !(Maybe [AttributeKeyAndValue])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListObjectAttributesResponse
:: BatchListObjectAttributesResponse
batchListObjectAttributesResponse =
BatchListObjectAttributesResponse'
{_bNextToken = Nothing, _bAttributes = Nothing}
bNextToken :: Lens' BatchListObjectAttributesResponse (Maybe Text)
bNextToken = lens _bNextToken (\ s a -> s{_bNextToken = a})
bAttributes :: Lens' BatchListObjectAttributesResponse [AttributeKeyAndValue]
bAttributes = lens _bAttributes (\ s a -> s{_bAttributes = a}) . _Default . _Coerce
instance FromJSON BatchListObjectAttributesResponse
where
parseJSON
= withObject "BatchListObjectAttributesResponse"
(\ x ->
BatchListObjectAttributesResponse' <$>
(x .:? "NextToken") <*>
(x .:? "Attributes" .!= mempty))
instance Hashable BatchListObjectAttributesResponse
where
instance NFData BatchListObjectAttributesResponse
where
data BatchListObjectChildren = BatchListObjectChildren'
{ _bloclNextToken :: !(Maybe Text)
, _bloclMaxResults :: !(Maybe Nat)
, _bloclObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListObjectChildren
:: ObjectReference
-> BatchListObjectChildren
batchListObjectChildren pObjectReference_ =
BatchListObjectChildren'
{ _bloclNextToken = Nothing
, _bloclMaxResults = Nothing
, _bloclObjectReference = pObjectReference_
}
bloclNextToken :: Lens' BatchListObjectChildren (Maybe Text)
bloclNextToken = lens _bloclNextToken (\ s a -> s{_bloclNextToken = a})
bloclMaxResults :: Lens' BatchListObjectChildren (Maybe Natural)
bloclMaxResults = lens _bloclMaxResults (\ s a -> s{_bloclMaxResults = a}) . mapping _Nat
bloclObjectReference :: Lens' BatchListObjectChildren ObjectReference
bloclObjectReference = lens _bloclObjectReference (\ s a -> s{_bloclObjectReference = a})
instance Hashable BatchListObjectChildren where
instance NFData BatchListObjectChildren where
instance ToJSON BatchListObjectChildren where
toJSON BatchListObjectChildren'{..}
= object
(catMaybes
[("NextToken" .=) <$> _bloclNextToken,
("MaxResults" .=) <$> _bloclMaxResults,
Just ("ObjectReference" .= _bloclObjectReference)])
data BatchListObjectChildrenResponse = BatchListObjectChildrenResponse'
{ _blocChildren :: !(Maybe (Map Text Text))
, _blocNextToken :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListObjectChildrenResponse
:: BatchListObjectChildrenResponse
batchListObjectChildrenResponse =
BatchListObjectChildrenResponse'
{_blocChildren = Nothing, _blocNextToken = Nothing}
blocChildren :: Lens' BatchListObjectChildrenResponse (HashMap Text Text)
blocChildren = lens _blocChildren (\ s a -> s{_blocChildren = a}) . _Default . _Map
blocNextToken :: Lens' BatchListObjectChildrenResponse (Maybe Text)
blocNextToken = lens _blocNextToken (\ s a -> s{_blocNextToken = a})
instance FromJSON BatchListObjectChildrenResponse
where
parseJSON
= withObject "BatchListObjectChildrenResponse"
(\ x ->
BatchListObjectChildrenResponse' <$>
(x .:? "Children" .!= mempty) <*>
(x .:? "NextToken"))
instance Hashable BatchListObjectChildrenResponse
where
instance NFData BatchListObjectChildrenResponse where
data BatchListObjectParentPaths = BatchListObjectParentPaths'
{ _bloppsNextToken :: !(Maybe Text)
, _bloppsMaxResults :: !(Maybe Nat)
, _bloppsObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListObjectParentPaths
:: ObjectReference
-> BatchListObjectParentPaths
batchListObjectParentPaths pObjectReference_ =
BatchListObjectParentPaths'
{ _bloppsNextToken = Nothing
, _bloppsMaxResults = Nothing
, _bloppsObjectReference = pObjectReference_
}
bloppsNextToken :: Lens' BatchListObjectParentPaths (Maybe Text)
bloppsNextToken = lens _bloppsNextToken (\ s a -> s{_bloppsNextToken = a})
bloppsMaxResults :: Lens' BatchListObjectParentPaths (Maybe Natural)
bloppsMaxResults = lens _bloppsMaxResults (\ s a -> s{_bloppsMaxResults = a}) . mapping _Nat
bloppsObjectReference :: Lens' BatchListObjectParentPaths ObjectReference
bloppsObjectReference = lens _bloppsObjectReference (\ s a -> s{_bloppsObjectReference = a})
instance Hashable BatchListObjectParentPaths where
instance NFData BatchListObjectParentPaths where
instance ToJSON BatchListObjectParentPaths where
toJSON BatchListObjectParentPaths'{..}
= object
(catMaybes
[("NextToken" .=) <$> _bloppsNextToken,
("MaxResults" .=) <$> _bloppsMaxResults,
Just ("ObjectReference" .= _bloppsObjectReference)])
data BatchListObjectParentPathsResponse = BatchListObjectParentPathsResponse'
{ _bloppPathToObjectIdentifiersList :: !(Maybe [PathToObjectIdentifiers])
, _bloppNextToken :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListObjectParentPathsResponse
:: BatchListObjectParentPathsResponse
batchListObjectParentPathsResponse =
BatchListObjectParentPathsResponse'
{_bloppPathToObjectIdentifiersList = Nothing, _bloppNextToken = Nothing}
bloppPathToObjectIdentifiersList :: Lens' BatchListObjectParentPathsResponse [PathToObjectIdentifiers]
bloppPathToObjectIdentifiersList = lens _bloppPathToObjectIdentifiersList (\ s a -> s{_bloppPathToObjectIdentifiersList = a}) . _Default . _Coerce
bloppNextToken :: Lens' BatchListObjectParentPathsResponse (Maybe Text)
bloppNextToken = lens _bloppNextToken (\ s a -> s{_bloppNextToken = a})
instance FromJSON BatchListObjectParentPathsResponse
where
parseJSON
= withObject "BatchListObjectParentPathsResponse"
(\ x ->
BatchListObjectParentPathsResponse' <$>
(x .:? "PathToObjectIdentifiersList" .!= mempty) <*>
(x .:? "NextToken"))
instance Hashable BatchListObjectParentPathsResponse
where
instance NFData BatchListObjectParentPathsResponse
where
data BatchListObjectPolicies = BatchListObjectPolicies'
{ _blopsNextToken :: !(Maybe Text)
, _blopsMaxResults :: !(Maybe Nat)
, _blopsObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListObjectPolicies
:: ObjectReference
-> BatchListObjectPolicies
batchListObjectPolicies pObjectReference_ =
BatchListObjectPolicies'
{ _blopsNextToken = Nothing
, _blopsMaxResults = Nothing
, _blopsObjectReference = pObjectReference_
}
blopsNextToken :: Lens' BatchListObjectPolicies (Maybe Text)
blopsNextToken = lens _blopsNextToken (\ s a -> s{_blopsNextToken = a})
blopsMaxResults :: Lens' BatchListObjectPolicies (Maybe Natural)
blopsMaxResults = lens _blopsMaxResults (\ s a -> s{_blopsMaxResults = a}) . mapping _Nat
blopsObjectReference :: Lens' BatchListObjectPolicies ObjectReference
blopsObjectReference = lens _blopsObjectReference (\ s a -> s{_blopsObjectReference = a})
instance Hashable BatchListObjectPolicies where
instance NFData BatchListObjectPolicies where
instance ToJSON BatchListObjectPolicies where
toJSON BatchListObjectPolicies'{..}
= object
(catMaybes
[("NextToken" .=) <$> _blopsNextToken,
("MaxResults" .=) <$> _blopsMaxResults,
Just ("ObjectReference" .= _blopsObjectReference)])
data BatchListObjectPoliciesResponse = BatchListObjectPoliciesResponse'
{ _blopNextToken :: !(Maybe Text)
, _blopAttachedPolicyIds :: !(Maybe [Text])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListObjectPoliciesResponse
:: BatchListObjectPoliciesResponse
batchListObjectPoliciesResponse =
BatchListObjectPoliciesResponse'
{_blopNextToken = Nothing, _blopAttachedPolicyIds = Nothing}
blopNextToken :: Lens' BatchListObjectPoliciesResponse (Maybe Text)
blopNextToken = lens _blopNextToken (\ s a -> s{_blopNextToken = a})
blopAttachedPolicyIds :: Lens' BatchListObjectPoliciesResponse [Text]
blopAttachedPolicyIds = lens _blopAttachedPolicyIds (\ s a -> s{_blopAttachedPolicyIds = a}) . _Default . _Coerce
instance FromJSON BatchListObjectPoliciesResponse
where
parseJSON
= withObject "BatchListObjectPoliciesResponse"
(\ x ->
BatchListObjectPoliciesResponse' <$>
(x .:? "NextToken") <*>
(x .:? "AttachedPolicyIds" .!= mempty))
instance Hashable BatchListObjectPoliciesResponse
where
instance NFData BatchListObjectPoliciesResponse where
data BatchListOutgoingTypedLinks = BatchListOutgoingTypedLinks'
{ _blotlsFilterAttributeRanges :: !(Maybe [TypedLinkAttributeRange])
, _blotlsNextToken :: !(Maybe Text)
, _blotlsFilterTypedLink :: !(Maybe TypedLinkSchemaAndFacetName)
, _blotlsMaxResults :: !(Maybe Nat)
, _blotlsObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListOutgoingTypedLinks
:: ObjectReference
-> BatchListOutgoingTypedLinks
batchListOutgoingTypedLinks pObjectReference_ =
BatchListOutgoingTypedLinks'
{ _blotlsFilterAttributeRanges = Nothing
, _blotlsNextToken = Nothing
, _blotlsFilterTypedLink = Nothing
, _blotlsMaxResults = Nothing
, _blotlsObjectReference = pObjectReference_
}
blotlsFilterAttributeRanges :: Lens' BatchListOutgoingTypedLinks [TypedLinkAttributeRange]
blotlsFilterAttributeRanges = lens _blotlsFilterAttributeRanges (\ s a -> s{_blotlsFilterAttributeRanges = a}) . _Default . _Coerce
blotlsNextToken :: Lens' BatchListOutgoingTypedLinks (Maybe Text)
blotlsNextToken = lens _blotlsNextToken (\ s a -> s{_blotlsNextToken = a})
blotlsFilterTypedLink :: Lens' BatchListOutgoingTypedLinks (Maybe TypedLinkSchemaAndFacetName)
blotlsFilterTypedLink = lens _blotlsFilterTypedLink (\ s a -> s{_blotlsFilterTypedLink = a})
blotlsMaxResults :: Lens' BatchListOutgoingTypedLinks (Maybe Natural)
blotlsMaxResults = lens _blotlsMaxResults (\ s a -> s{_blotlsMaxResults = a}) . mapping _Nat
blotlsObjectReference :: Lens' BatchListOutgoingTypedLinks ObjectReference
blotlsObjectReference = lens _blotlsObjectReference (\ s a -> s{_blotlsObjectReference = a})
instance Hashable BatchListOutgoingTypedLinks where
instance NFData BatchListOutgoingTypedLinks where
instance ToJSON BatchListOutgoingTypedLinks where
toJSON BatchListOutgoingTypedLinks'{..}
= object
(catMaybes
[("FilterAttributeRanges" .=) <$>
_blotlsFilterAttributeRanges,
("NextToken" .=) <$> _blotlsNextToken,
("FilterTypedLink" .=) <$> _blotlsFilterTypedLink,
("MaxResults" .=) <$> _blotlsMaxResults,
Just ("ObjectReference" .= _blotlsObjectReference)])
data BatchListOutgoingTypedLinksResponse = BatchListOutgoingTypedLinksResponse'
{ _blotlTypedLinkSpecifiers :: !(Maybe [TypedLinkSpecifier])
, _blotlNextToken :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListOutgoingTypedLinksResponse
:: BatchListOutgoingTypedLinksResponse
batchListOutgoingTypedLinksResponse =
BatchListOutgoingTypedLinksResponse'
{_blotlTypedLinkSpecifiers = Nothing, _blotlNextToken = Nothing}
blotlTypedLinkSpecifiers :: Lens' BatchListOutgoingTypedLinksResponse [TypedLinkSpecifier]
blotlTypedLinkSpecifiers = lens _blotlTypedLinkSpecifiers (\ s a -> s{_blotlTypedLinkSpecifiers = a}) . _Default . _Coerce
blotlNextToken :: Lens' BatchListOutgoingTypedLinksResponse (Maybe Text)
blotlNextToken = lens _blotlNextToken (\ s a -> s{_blotlNextToken = a})
instance FromJSON BatchListOutgoingTypedLinksResponse
where
parseJSON
= withObject "BatchListOutgoingTypedLinksResponse"
(\ x ->
BatchListOutgoingTypedLinksResponse' <$>
(x .:? "TypedLinkSpecifiers" .!= mempty) <*>
(x .:? "NextToken"))
instance Hashable BatchListOutgoingTypedLinksResponse
where
instance NFData BatchListOutgoingTypedLinksResponse
where
data BatchListPolicyAttachments = BatchListPolicyAttachments'
{ _blpasNextToken :: !(Maybe Text)
, _blpasMaxResults :: !(Maybe Nat)
, _blpasPolicyReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListPolicyAttachments
:: ObjectReference
-> BatchListPolicyAttachments
batchListPolicyAttachments pPolicyReference_ =
BatchListPolicyAttachments'
{ _blpasNextToken = Nothing
, _blpasMaxResults = Nothing
, _blpasPolicyReference = pPolicyReference_
}
blpasNextToken :: Lens' BatchListPolicyAttachments (Maybe Text)
blpasNextToken = lens _blpasNextToken (\ s a -> s{_blpasNextToken = a})
blpasMaxResults :: Lens' BatchListPolicyAttachments (Maybe Natural)
blpasMaxResults = lens _blpasMaxResults (\ s a -> s{_blpasMaxResults = a}) . mapping _Nat
blpasPolicyReference :: Lens' BatchListPolicyAttachments ObjectReference
blpasPolicyReference = lens _blpasPolicyReference (\ s a -> s{_blpasPolicyReference = a})
instance Hashable BatchListPolicyAttachments where
instance NFData BatchListPolicyAttachments where
instance ToJSON BatchListPolicyAttachments where
toJSON BatchListPolicyAttachments'{..}
= object
(catMaybes
[("NextToken" .=) <$> _blpasNextToken,
("MaxResults" .=) <$> _blpasMaxResults,
Just ("PolicyReference" .= _blpasPolicyReference)])
data BatchListPolicyAttachmentsResponse = BatchListPolicyAttachmentsResponse'
{ _blpaObjectIdentifiers :: !(Maybe [Text])
, _blpaNextToken :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchListPolicyAttachmentsResponse
:: BatchListPolicyAttachmentsResponse
batchListPolicyAttachmentsResponse =
BatchListPolicyAttachmentsResponse'
{_blpaObjectIdentifiers = Nothing, _blpaNextToken = Nothing}
blpaObjectIdentifiers :: Lens' BatchListPolicyAttachmentsResponse [Text]
blpaObjectIdentifiers = lens _blpaObjectIdentifiers (\ s a -> s{_blpaObjectIdentifiers = a}) . _Default . _Coerce
blpaNextToken :: Lens' BatchListPolicyAttachmentsResponse (Maybe Text)
blpaNextToken = lens _blpaNextToken (\ s a -> s{_blpaNextToken = a})
instance FromJSON BatchListPolicyAttachmentsResponse
where
parseJSON
= withObject "BatchListPolicyAttachmentsResponse"
(\ x ->
BatchListPolicyAttachmentsResponse' <$>
(x .:? "ObjectIdentifiers" .!= mempty) <*>
(x .:? "NextToken"))
instance Hashable BatchListPolicyAttachmentsResponse
where
instance NFData BatchListPolicyAttachmentsResponse
where
data BatchLookupPolicy = BatchLookupPolicy'
{ _blplNextToken :: !(Maybe Text)
, _blplMaxResults :: !(Maybe Nat)
, _blplObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchLookupPolicy
:: ObjectReference
-> BatchLookupPolicy
batchLookupPolicy pObjectReference_ =
BatchLookupPolicy'
{ _blplNextToken = Nothing
, _blplMaxResults = Nothing
, _blplObjectReference = pObjectReference_
}
blplNextToken :: Lens' BatchLookupPolicy (Maybe Text)
blplNextToken = lens _blplNextToken (\ s a -> s{_blplNextToken = a})
blplMaxResults :: Lens' BatchLookupPolicy (Maybe Natural)
blplMaxResults = lens _blplMaxResults (\ s a -> s{_blplMaxResults = a}) . mapping _Nat
blplObjectReference :: Lens' BatchLookupPolicy ObjectReference
blplObjectReference = lens _blplObjectReference (\ s a -> s{_blplObjectReference = a})
instance Hashable BatchLookupPolicy where
instance NFData BatchLookupPolicy where
instance ToJSON BatchLookupPolicy where
toJSON BatchLookupPolicy'{..}
= object
(catMaybes
[("NextToken" .=) <$> _blplNextToken,
("MaxResults" .=) <$> _blplMaxResults,
Just ("ObjectReference" .= _blplObjectReference)])
data BatchLookupPolicyResponse = BatchLookupPolicyResponse'
{ _blpNextToken :: !(Maybe Text)
, _blpPolicyToPathList :: !(Maybe [PolicyToPath])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchLookupPolicyResponse
:: BatchLookupPolicyResponse
batchLookupPolicyResponse =
BatchLookupPolicyResponse'
{_blpNextToken = Nothing, _blpPolicyToPathList = Nothing}
blpNextToken :: Lens' BatchLookupPolicyResponse (Maybe Text)
blpNextToken = lens _blpNextToken (\ s a -> s{_blpNextToken = a})
blpPolicyToPathList :: Lens' BatchLookupPolicyResponse [PolicyToPath]
blpPolicyToPathList = lens _blpPolicyToPathList (\ s a -> s{_blpPolicyToPathList = a}) . _Default . _Coerce
instance FromJSON BatchLookupPolicyResponse where
parseJSON
= withObject "BatchLookupPolicyResponse"
(\ x ->
BatchLookupPolicyResponse' <$>
(x .:? "NextToken") <*>
(x .:? "PolicyToPathList" .!= mempty))
instance Hashable BatchLookupPolicyResponse where
instance NFData BatchLookupPolicyResponse where
data BatchReadException = BatchReadException'
{ _breType :: !(Maybe BatchReadExceptionType)
, _breMessage :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchReadException
:: BatchReadException
batchReadException =
BatchReadException' {_breType = Nothing, _breMessage = Nothing}
breType :: Lens' BatchReadException (Maybe BatchReadExceptionType)
breType = lens _breType (\ s a -> s{_breType = a})
breMessage :: Lens' BatchReadException (Maybe Text)
breMessage = lens _breMessage (\ s a -> s{_breMessage = a})
instance FromJSON BatchReadException where
parseJSON
= withObject "BatchReadException"
(\ x ->
BatchReadException' <$>
(x .:? "Type") <*> (x .:? "Message"))
instance Hashable BatchReadException where
instance NFData BatchReadException where
data BatchReadOperation = BatchReadOperation'
{ _broListIndex :: !(Maybe BatchListIndex)
, _broGetObjectInformation :: !(Maybe BatchGetObjectInformation)
, _broListAttachedIndices :: !(Maybe BatchListAttachedIndices)
, _broLookupPolicy :: !(Maybe BatchLookupPolicy)
, _broListObjectParentPaths :: !(Maybe BatchListObjectParentPaths)
, _broListObjectAttributes :: !(Maybe BatchListObjectAttributes)
, _broListIncomingTypedLinks :: !(Maybe BatchListIncomingTypedLinks)
, _broGetObjectAttributes :: !(Maybe BatchGetObjectAttributes)
, _broListObjectChildren :: !(Maybe BatchListObjectChildren)
, _broListPolicyAttachments :: !(Maybe BatchListPolicyAttachments)
, _broListOutgoingTypedLinks :: !(Maybe BatchListOutgoingTypedLinks)
, _broListObjectPolicies :: !(Maybe BatchListObjectPolicies)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchReadOperation
:: BatchReadOperation
batchReadOperation =
BatchReadOperation'
{ _broListIndex = Nothing
, _broGetObjectInformation = Nothing
, _broListAttachedIndices = Nothing
, _broLookupPolicy = Nothing
, _broListObjectParentPaths = Nothing
, _broListObjectAttributes = Nothing
, _broListIncomingTypedLinks = Nothing
, _broGetObjectAttributes = Nothing
, _broListObjectChildren = Nothing
, _broListPolicyAttachments = Nothing
, _broListOutgoingTypedLinks = Nothing
, _broListObjectPolicies = Nothing
}
broListIndex :: Lens' BatchReadOperation (Maybe BatchListIndex)
broListIndex = lens _broListIndex (\ s a -> s{_broListIndex = a})
broGetObjectInformation :: Lens' BatchReadOperation (Maybe BatchGetObjectInformation)
broGetObjectInformation = lens _broGetObjectInformation (\ s a -> s{_broGetObjectInformation = a})
broListAttachedIndices :: Lens' BatchReadOperation (Maybe BatchListAttachedIndices)
broListAttachedIndices = lens _broListAttachedIndices (\ s a -> s{_broListAttachedIndices = a})
broLookupPolicy :: Lens' BatchReadOperation (Maybe BatchLookupPolicy)
broLookupPolicy = lens _broLookupPolicy (\ s a -> s{_broLookupPolicy = a})
broListObjectParentPaths :: Lens' BatchReadOperation (Maybe BatchListObjectParentPaths)
broListObjectParentPaths = lens _broListObjectParentPaths (\ s a -> s{_broListObjectParentPaths = a})
broListObjectAttributes :: Lens' BatchReadOperation (Maybe BatchListObjectAttributes)
broListObjectAttributes = lens _broListObjectAttributes (\ s a -> s{_broListObjectAttributes = a})
broListIncomingTypedLinks :: Lens' BatchReadOperation (Maybe BatchListIncomingTypedLinks)
broListIncomingTypedLinks = lens _broListIncomingTypedLinks (\ s a -> s{_broListIncomingTypedLinks = a})
broGetObjectAttributes :: Lens' BatchReadOperation (Maybe BatchGetObjectAttributes)
broGetObjectAttributes = lens _broGetObjectAttributes (\ s a -> s{_broGetObjectAttributes = a})
broListObjectChildren :: Lens' BatchReadOperation (Maybe BatchListObjectChildren)
broListObjectChildren = lens _broListObjectChildren (\ s a -> s{_broListObjectChildren = a})
broListPolicyAttachments :: Lens' BatchReadOperation (Maybe BatchListPolicyAttachments)
broListPolicyAttachments = lens _broListPolicyAttachments (\ s a -> s{_broListPolicyAttachments = a})
broListOutgoingTypedLinks :: Lens' BatchReadOperation (Maybe BatchListOutgoingTypedLinks)
broListOutgoingTypedLinks = lens _broListOutgoingTypedLinks (\ s a -> s{_broListOutgoingTypedLinks = a})
broListObjectPolicies :: Lens' BatchReadOperation (Maybe BatchListObjectPolicies)
broListObjectPolicies = lens _broListObjectPolicies (\ s a -> s{_broListObjectPolicies = a})
instance Hashable BatchReadOperation where
instance NFData BatchReadOperation where
instance ToJSON BatchReadOperation where
toJSON BatchReadOperation'{..}
= object
(catMaybes
[("ListIndex" .=) <$> _broListIndex,
("GetObjectInformation" .=) <$>
_broGetObjectInformation,
("ListAttachedIndices" .=) <$>
_broListAttachedIndices,
("LookupPolicy" .=) <$> _broLookupPolicy,
("ListObjectParentPaths" .=) <$>
_broListObjectParentPaths,
("ListObjectAttributes" .=) <$>
_broListObjectAttributes,
("ListIncomingTypedLinks" .=) <$>
_broListIncomingTypedLinks,
("GetObjectAttributes" .=) <$>
_broGetObjectAttributes,
("ListObjectChildren" .=) <$> _broListObjectChildren,
("ListPolicyAttachments" .=) <$>
_broListPolicyAttachments,
("ListOutgoingTypedLinks" .=) <$>
_broListOutgoingTypedLinks,
("ListObjectPolicies" .=) <$>
_broListObjectPolicies])
data BatchReadOperationResponse = BatchReadOperationResponse'
{ _broExceptionResponse :: !(Maybe BatchReadException)
, _broSuccessfulResponse :: !(Maybe BatchReadSuccessfulResponse)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchReadOperationResponse
:: BatchReadOperationResponse
batchReadOperationResponse =
BatchReadOperationResponse'
{_broExceptionResponse = Nothing, _broSuccessfulResponse = Nothing}
broExceptionResponse :: Lens' BatchReadOperationResponse (Maybe BatchReadException)
broExceptionResponse = lens _broExceptionResponse (\ s a -> s{_broExceptionResponse = a})
broSuccessfulResponse :: Lens' BatchReadOperationResponse (Maybe BatchReadSuccessfulResponse)
broSuccessfulResponse = lens _broSuccessfulResponse (\ s a -> s{_broSuccessfulResponse = a})
instance FromJSON BatchReadOperationResponse where
parseJSON
= withObject "BatchReadOperationResponse"
(\ x ->
BatchReadOperationResponse' <$>
(x .:? "ExceptionResponse") <*>
(x .:? "SuccessfulResponse"))
instance Hashable BatchReadOperationResponse where
instance NFData BatchReadOperationResponse where
data BatchReadSuccessfulResponse = BatchReadSuccessfulResponse'
{ _brsListIndex :: !(Maybe BatchListIndexResponse)
, _brsGetObjectInformation :: !(Maybe BatchGetObjectInformationResponse)
, _brsListAttachedIndices :: !(Maybe BatchListAttachedIndicesResponse)
, _brsLookupPolicy :: !(Maybe BatchLookupPolicyResponse)
, _brsListObjectParentPaths :: !(Maybe BatchListObjectParentPathsResponse)
, _brsListObjectAttributes :: !(Maybe BatchListObjectAttributesResponse)
, _brsListIncomingTypedLinks :: !(Maybe BatchListIncomingTypedLinksResponse)
, _brsGetObjectAttributes :: !(Maybe BatchGetObjectAttributesResponse)
, _brsListObjectChildren :: !(Maybe BatchListObjectChildrenResponse)
, _brsListPolicyAttachments :: !(Maybe BatchListPolicyAttachmentsResponse)
, _brsListOutgoingTypedLinks :: !(Maybe BatchListOutgoingTypedLinksResponse)
, _brsListObjectPolicies :: !(Maybe BatchListObjectPoliciesResponse)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchReadSuccessfulResponse
:: BatchReadSuccessfulResponse
batchReadSuccessfulResponse =
BatchReadSuccessfulResponse'
{ _brsListIndex = Nothing
, _brsGetObjectInformation = Nothing
, _brsListAttachedIndices = Nothing
, _brsLookupPolicy = Nothing
, _brsListObjectParentPaths = Nothing
, _brsListObjectAttributes = Nothing
, _brsListIncomingTypedLinks = Nothing
, _brsGetObjectAttributes = Nothing
, _brsListObjectChildren = Nothing
, _brsListPolicyAttachments = Nothing
, _brsListOutgoingTypedLinks = Nothing
, _brsListObjectPolicies = Nothing
}
brsListIndex :: Lens' BatchReadSuccessfulResponse (Maybe BatchListIndexResponse)
brsListIndex = lens _brsListIndex (\ s a -> s{_brsListIndex = a})
brsGetObjectInformation :: Lens' BatchReadSuccessfulResponse (Maybe BatchGetObjectInformationResponse)
brsGetObjectInformation = lens _brsGetObjectInformation (\ s a -> s{_brsGetObjectInformation = a})
brsListAttachedIndices :: Lens' BatchReadSuccessfulResponse (Maybe BatchListAttachedIndicesResponse)
brsListAttachedIndices = lens _brsListAttachedIndices (\ s a -> s{_brsListAttachedIndices = a})
brsLookupPolicy :: Lens' BatchReadSuccessfulResponse (Maybe BatchLookupPolicyResponse)
brsLookupPolicy = lens _brsLookupPolicy (\ s a -> s{_brsLookupPolicy = a})
brsListObjectParentPaths :: Lens' BatchReadSuccessfulResponse (Maybe BatchListObjectParentPathsResponse)
brsListObjectParentPaths = lens _brsListObjectParentPaths (\ s a -> s{_brsListObjectParentPaths = a})
brsListObjectAttributes :: Lens' BatchReadSuccessfulResponse (Maybe BatchListObjectAttributesResponse)
brsListObjectAttributes = lens _brsListObjectAttributes (\ s a -> s{_brsListObjectAttributes = a})
brsListIncomingTypedLinks :: Lens' BatchReadSuccessfulResponse (Maybe BatchListIncomingTypedLinksResponse)
brsListIncomingTypedLinks = lens _brsListIncomingTypedLinks (\ s a -> s{_brsListIncomingTypedLinks = a})
brsGetObjectAttributes :: Lens' BatchReadSuccessfulResponse (Maybe BatchGetObjectAttributesResponse)
brsGetObjectAttributes = lens _brsGetObjectAttributes (\ s a -> s{_brsGetObjectAttributes = a})
brsListObjectChildren :: Lens' BatchReadSuccessfulResponse (Maybe BatchListObjectChildrenResponse)
brsListObjectChildren = lens _brsListObjectChildren (\ s a -> s{_brsListObjectChildren = a})
brsListPolicyAttachments :: Lens' BatchReadSuccessfulResponse (Maybe BatchListPolicyAttachmentsResponse)
brsListPolicyAttachments = lens _brsListPolicyAttachments (\ s a -> s{_brsListPolicyAttachments = a})
brsListOutgoingTypedLinks :: Lens' BatchReadSuccessfulResponse (Maybe BatchListOutgoingTypedLinksResponse)
brsListOutgoingTypedLinks = lens _brsListOutgoingTypedLinks (\ s a -> s{_brsListOutgoingTypedLinks = a})
brsListObjectPolicies :: Lens' BatchReadSuccessfulResponse (Maybe BatchListObjectPoliciesResponse)
brsListObjectPolicies = lens _brsListObjectPolicies (\ s a -> s{_brsListObjectPolicies = a})
instance FromJSON BatchReadSuccessfulResponse where
parseJSON
= withObject "BatchReadSuccessfulResponse"
(\ x ->
BatchReadSuccessfulResponse' <$>
(x .:? "ListIndex") <*>
(x .:? "GetObjectInformation")
<*> (x .:? "ListAttachedIndices")
<*> (x .:? "LookupPolicy")
<*> (x .:? "ListObjectParentPaths")
<*> (x .:? "ListObjectAttributes")
<*> (x .:? "ListIncomingTypedLinks")
<*> (x .:? "GetObjectAttributes")
<*> (x .:? "ListObjectChildren")
<*> (x .:? "ListPolicyAttachments")
<*> (x .:? "ListOutgoingTypedLinks")
<*> (x .:? "ListObjectPolicies"))
instance Hashable BatchReadSuccessfulResponse where
instance NFData BatchReadSuccessfulResponse where
data BatchRemoveFacetFromObject = BatchRemoveFacetFromObject'
{ _brffoSchemaFacet :: !SchemaFacet
, _brffoObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchRemoveFacetFromObject
:: SchemaFacet
-> ObjectReference
-> BatchRemoveFacetFromObject
batchRemoveFacetFromObject pSchemaFacet_ pObjectReference_ =
BatchRemoveFacetFromObject'
{ _brffoSchemaFacet = pSchemaFacet_
, _brffoObjectReference = pObjectReference_
}
brffoSchemaFacet :: Lens' BatchRemoveFacetFromObject SchemaFacet
brffoSchemaFacet = lens _brffoSchemaFacet (\ s a -> s{_brffoSchemaFacet = a})
brffoObjectReference :: Lens' BatchRemoveFacetFromObject ObjectReference
brffoObjectReference = lens _brffoObjectReference (\ s a -> s{_brffoObjectReference = a})
instance Hashable BatchRemoveFacetFromObject where
instance NFData BatchRemoveFacetFromObject where
instance ToJSON BatchRemoveFacetFromObject where
toJSON BatchRemoveFacetFromObject'{..}
= object
(catMaybes
[Just ("SchemaFacet" .= _brffoSchemaFacet),
Just ("ObjectReference" .= _brffoObjectReference)])
data BatchRemoveFacetFromObjectResponse =
BatchRemoveFacetFromObjectResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
batchRemoveFacetFromObjectResponse
:: BatchRemoveFacetFromObjectResponse
batchRemoveFacetFromObjectResponse = BatchRemoveFacetFromObjectResponse'
instance FromJSON BatchRemoveFacetFromObjectResponse
where
parseJSON
= withObject "BatchRemoveFacetFromObjectResponse"
(\ x -> pure BatchRemoveFacetFromObjectResponse')
instance Hashable BatchRemoveFacetFromObjectResponse
where
instance NFData BatchRemoveFacetFromObjectResponse
where
data BatchUpdateObjectAttributes = BatchUpdateObjectAttributes'
{ _buoaObjectReference :: !ObjectReference
, _buoaAttributeUpdates :: ![ObjectAttributeUpdate]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchUpdateObjectAttributes
:: ObjectReference
-> BatchUpdateObjectAttributes
batchUpdateObjectAttributes pObjectReference_ =
BatchUpdateObjectAttributes'
{_buoaObjectReference = pObjectReference_, _buoaAttributeUpdates = mempty}
buoaObjectReference :: Lens' BatchUpdateObjectAttributes ObjectReference
buoaObjectReference = lens _buoaObjectReference (\ s a -> s{_buoaObjectReference = a})
buoaAttributeUpdates :: Lens' BatchUpdateObjectAttributes [ObjectAttributeUpdate]
buoaAttributeUpdates = lens _buoaAttributeUpdates (\ s a -> s{_buoaAttributeUpdates = a}) . _Coerce
instance Hashable BatchUpdateObjectAttributes where
instance NFData BatchUpdateObjectAttributes where
instance ToJSON BatchUpdateObjectAttributes where
toJSON BatchUpdateObjectAttributes'{..}
= object
(catMaybes
[Just ("ObjectReference" .= _buoaObjectReference),
Just ("AttributeUpdates" .= _buoaAttributeUpdates)])
newtype BatchUpdateObjectAttributesResponse = BatchUpdateObjectAttributesResponse'
{ _buoaObjectIdentifier :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchUpdateObjectAttributesResponse
:: BatchUpdateObjectAttributesResponse
batchUpdateObjectAttributesResponse =
BatchUpdateObjectAttributesResponse' {_buoaObjectIdentifier = Nothing}
buoaObjectIdentifier :: Lens' BatchUpdateObjectAttributesResponse (Maybe Text)
buoaObjectIdentifier = lens _buoaObjectIdentifier (\ s a -> s{_buoaObjectIdentifier = a})
instance FromJSON BatchUpdateObjectAttributesResponse
where
parseJSON
= withObject "BatchUpdateObjectAttributesResponse"
(\ x ->
BatchUpdateObjectAttributesResponse' <$>
(x .:? "ObjectIdentifier"))
instance Hashable BatchUpdateObjectAttributesResponse
where
instance NFData BatchUpdateObjectAttributesResponse
where
data BatchWriteOperation = BatchWriteOperation'
{ _bDeleteObject :: !(Maybe BatchDeleteObject)
, _bDetachFromIndex :: !(Maybe BatchDetachFromIndex)
, _bRemoveFacetFromObject :: !(Maybe BatchRemoveFacetFromObject)
, _bAttachObject :: !(Maybe BatchAttachObject)
, _bCreateObject :: !(Maybe BatchCreateObject)
, _bAttachTypedLink :: !(Maybe BatchAttachTypedLink)
, _bDetachPolicy :: !(Maybe BatchDetachPolicy)
, _bCreateIndex :: !(Maybe BatchCreateIndex)
, _bDetachObject :: !(Maybe BatchDetachObject)
, _bAddFacetToObject :: !(Maybe BatchAddFacetToObject)
, _bDetachTypedLink :: !(Maybe BatchDetachTypedLink)
, _bUpdateObjectAttributes :: !(Maybe BatchUpdateObjectAttributes)
, _bAttachPolicy :: !(Maybe BatchAttachPolicy)
, _bAttachToIndex :: !(Maybe BatchAttachToIndex)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchWriteOperation
:: BatchWriteOperation
batchWriteOperation =
BatchWriteOperation'
{ _bDeleteObject = Nothing
, _bDetachFromIndex = Nothing
, _bRemoveFacetFromObject = Nothing
, _bAttachObject = Nothing
, _bCreateObject = Nothing
, _bAttachTypedLink = Nothing
, _bDetachPolicy = Nothing
, _bCreateIndex = Nothing
, _bDetachObject = Nothing
, _bAddFacetToObject = Nothing
, _bDetachTypedLink = Nothing
, _bUpdateObjectAttributes = Nothing
, _bAttachPolicy = Nothing
, _bAttachToIndex = Nothing
}
bDeleteObject :: Lens' BatchWriteOperation (Maybe BatchDeleteObject)
bDeleteObject = lens _bDeleteObject (\ s a -> s{_bDeleteObject = a})
bDetachFromIndex :: Lens' BatchWriteOperation (Maybe BatchDetachFromIndex)
bDetachFromIndex = lens _bDetachFromIndex (\ s a -> s{_bDetachFromIndex = a})
bRemoveFacetFromObject :: Lens' BatchWriteOperation (Maybe BatchRemoveFacetFromObject)
bRemoveFacetFromObject = lens _bRemoveFacetFromObject (\ s a -> s{_bRemoveFacetFromObject = a})
bAttachObject :: Lens' BatchWriteOperation (Maybe BatchAttachObject)
bAttachObject = lens _bAttachObject (\ s a -> s{_bAttachObject = a})
bCreateObject :: Lens' BatchWriteOperation (Maybe BatchCreateObject)
bCreateObject = lens _bCreateObject (\ s a -> s{_bCreateObject = a})
bAttachTypedLink :: Lens' BatchWriteOperation (Maybe BatchAttachTypedLink)
bAttachTypedLink = lens _bAttachTypedLink (\ s a -> s{_bAttachTypedLink = a})
bDetachPolicy :: Lens' BatchWriteOperation (Maybe BatchDetachPolicy)
bDetachPolicy = lens _bDetachPolicy (\ s a -> s{_bDetachPolicy = a})
bCreateIndex :: Lens' BatchWriteOperation (Maybe BatchCreateIndex)
bCreateIndex = lens _bCreateIndex (\ s a -> s{_bCreateIndex = a})
bDetachObject :: Lens' BatchWriteOperation (Maybe BatchDetachObject)
bDetachObject = lens _bDetachObject (\ s a -> s{_bDetachObject = a})
bAddFacetToObject :: Lens' BatchWriteOperation (Maybe BatchAddFacetToObject)
bAddFacetToObject = lens _bAddFacetToObject (\ s a -> s{_bAddFacetToObject = a})
bDetachTypedLink :: Lens' BatchWriteOperation (Maybe BatchDetachTypedLink)
bDetachTypedLink = lens _bDetachTypedLink (\ s a -> s{_bDetachTypedLink = a})
bUpdateObjectAttributes :: Lens' BatchWriteOperation (Maybe BatchUpdateObjectAttributes)
bUpdateObjectAttributes = lens _bUpdateObjectAttributes (\ s a -> s{_bUpdateObjectAttributes = a})
bAttachPolicy :: Lens' BatchWriteOperation (Maybe BatchAttachPolicy)
bAttachPolicy = lens _bAttachPolicy (\ s a -> s{_bAttachPolicy = a})
bAttachToIndex :: Lens' BatchWriteOperation (Maybe BatchAttachToIndex)
bAttachToIndex = lens _bAttachToIndex (\ s a -> s{_bAttachToIndex = a})
instance Hashable BatchWriteOperation where
instance NFData BatchWriteOperation where
instance ToJSON BatchWriteOperation where
toJSON BatchWriteOperation'{..}
= object
(catMaybes
[("DeleteObject" .=) <$> _bDeleteObject,
("DetachFromIndex" .=) <$> _bDetachFromIndex,
("RemoveFacetFromObject" .=) <$>
_bRemoveFacetFromObject,
("AttachObject" .=) <$> _bAttachObject,
("CreateObject" .=) <$> _bCreateObject,
("AttachTypedLink" .=) <$> _bAttachTypedLink,
("DetachPolicy" .=) <$> _bDetachPolicy,
("CreateIndex" .=) <$> _bCreateIndex,
("DetachObject" .=) <$> _bDetachObject,
("AddFacetToObject" .=) <$> _bAddFacetToObject,
("DetachTypedLink" .=) <$> _bDetachTypedLink,
("UpdateObjectAttributes" .=) <$>
_bUpdateObjectAttributes,
("AttachPolicy" .=) <$> _bAttachPolicy,
("AttachToIndex" .=) <$> _bAttachToIndex])
data BatchWriteOperationResponse = BatchWriteOperationResponse'
{ _bwoDeleteObject :: !(Maybe BatchDeleteObjectResponse)
, _bwoDetachFromIndex :: !(Maybe BatchDetachFromIndexResponse)
, _bwoRemoveFacetFromObject :: !(Maybe BatchRemoveFacetFromObjectResponse)
, _bwoAttachObject :: !(Maybe BatchAttachObjectResponse)
, _bwoCreateObject :: !(Maybe BatchCreateObjectResponse)
, _bwoAttachTypedLink :: !(Maybe BatchAttachTypedLinkResponse)
, _bwoDetachPolicy :: !(Maybe BatchDetachPolicyResponse)
, _bwoCreateIndex :: !(Maybe BatchCreateIndexResponse)
, _bwoDetachObject :: !(Maybe BatchDetachObjectResponse)
, _bwoAddFacetToObject :: !(Maybe BatchAddFacetToObjectResponse)
, _bwoDetachTypedLink :: !(Maybe BatchDetachTypedLinkResponse)
, _bwoUpdateObjectAttributes :: !(Maybe BatchUpdateObjectAttributesResponse)
, _bwoAttachPolicy :: !(Maybe BatchAttachPolicyResponse)
, _bwoAttachToIndex :: !(Maybe BatchAttachToIndexResponse)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchWriteOperationResponse
:: BatchWriteOperationResponse
batchWriteOperationResponse =
BatchWriteOperationResponse'
{ _bwoDeleteObject = Nothing
, _bwoDetachFromIndex = Nothing
, _bwoRemoveFacetFromObject = Nothing
, _bwoAttachObject = Nothing
, _bwoCreateObject = Nothing
, _bwoAttachTypedLink = Nothing
, _bwoDetachPolicy = Nothing
, _bwoCreateIndex = Nothing
, _bwoDetachObject = Nothing
, _bwoAddFacetToObject = Nothing
, _bwoDetachTypedLink = Nothing
, _bwoUpdateObjectAttributes = Nothing
, _bwoAttachPolicy = Nothing
, _bwoAttachToIndex = Nothing
}
bwoDeleteObject :: Lens' BatchWriteOperationResponse (Maybe BatchDeleteObjectResponse)
bwoDeleteObject = lens _bwoDeleteObject (\ s a -> s{_bwoDeleteObject = a})
bwoDetachFromIndex :: Lens' BatchWriteOperationResponse (Maybe BatchDetachFromIndexResponse)
bwoDetachFromIndex = lens _bwoDetachFromIndex (\ s a -> s{_bwoDetachFromIndex = a})
bwoRemoveFacetFromObject :: Lens' BatchWriteOperationResponse (Maybe BatchRemoveFacetFromObjectResponse)
bwoRemoveFacetFromObject = lens _bwoRemoveFacetFromObject (\ s a -> s{_bwoRemoveFacetFromObject = a})
bwoAttachObject :: Lens' BatchWriteOperationResponse (Maybe BatchAttachObjectResponse)
bwoAttachObject = lens _bwoAttachObject (\ s a -> s{_bwoAttachObject = a})
bwoCreateObject :: Lens' BatchWriteOperationResponse (Maybe BatchCreateObjectResponse)
bwoCreateObject = lens _bwoCreateObject (\ s a -> s{_bwoCreateObject = a})
bwoAttachTypedLink :: Lens' BatchWriteOperationResponse (Maybe BatchAttachTypedLinkResponse)
bwoAttachTypedLink = lens _bwoAttachTypedLink (\ s a -> s{_bwoAttachTypedLink = a})
bwoDetachPolicy :: Lens' BatchWriteOperationResponse (Maybe BatchDetachPolicyResponse)
bwoDetachPolicy = lens _bwoDetachPolicy (\ s a -> s{_bwoDetachPolicy = a})
bwoCreateIndex :: Lens' BatchWriteOperationResponse (Maybe BatchCreateIndexResponse)
bwoCreateIndex = lens _bwoCreateIndex (\ s a -> s{_bwoCreateIndex = a})
bwoDetachObject :: Lens' BatchWriteOperationResponse (Maybe BatchDetachObjectResponse)
bwoDetachObject = lens _bwoDetachObject (\ s a -> s{_bwoDetachObject = a})
bwoAddFacetToObject :: Lens' BatchWriteOperationResponse (Maybe BatchAddFacetToObjectResponse)
bwoAddFacetToObject = lens _bwoAddFacetToObject (\ s a -> s{_bwoAddFacetToObject = a})
bwoDetachTypedLink :: Lens' BatchWriteOperationResponse (Maybe BatchDetachTypedLinkResponse)
bwoDetachTypedLink = lens _bwoDetachTypedLink (\ s a -> s{_bwoDetachTypedLink = a})
bwoUpdateObjectAttributes :: Lens' BatchWriteOperationResponse (Maybe BatchUpdateObjectAttributesResponse)
bwoUpdateObjectAttributes = lens _bwoUpdateObjectAttributes (\ s a -> s{_bwoUpdateObjectAttributes = a})
bwoAttachPolicy :: Lens' BatchWriteOperationResponse (Maybe BatchAttachPolicyResponse)
bwoAttachPolicy = lens _bwoAttachPolicy (\ s a -> s{_bwoAttachPolicy = a})
bwoAttachToIndex :: Lens' BatchWriteOperationResponse (Maybe BatchAttachToIndexResponse)
bwoAttachToIndex = lens _bwoAttachToIndex (\ s a -> s{_bwoAttachToIndex = a})
instance FromJSON BatchWriteOperationResponse where
parseJSON
= withObject "BatchWriteOperationResponse"
(\ x ->
BatchWriteOperationResponse' <$>
(x .:? "DeleteObject") <*> (x .:? "DetachFromIndex")
<*> (x .:? "RemoveFacetFromObject")
<*> (x .:? "AttachObject")
<*> (x .:? "CreateObject")
<*> (x .:? "AttachTypedLink")
<*> (x .:? "DetachPolicy")
<*> (x .:? "CreateIndex")
<*> (x .:? "DetachObject")
<*> (x .:? "AddFacetToObject")
<*> (x .:? "DetachTypedLink")
<*> (x .:? "UpdateObjectAttributes")
<*> (x .:? "AttachPolicy")
<*> (x .:? "AttachToIndex"))
instance Hashable BatchWriteOperationResponse where
instance NFData BatchWriteOperationResponse where
data Directory = Directory'
{ _dDirectoryARN :: !(Maybe Text)
, _dState :: !(Maybe DirectoryState)
, _dName :: !(Maybe Text)
, _dCreationDateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
directory
:: Directory
directory =
Directory'
{ _dDirectoryARN = Nothing
, _dState = Nothing
, _dName = Nothing
, _dCreationDateTime = Nothing
}
dDirectoryARN :: Lens' Directory (Maybe Text)
dDirectoryARN = lens _dDirectoryARN (\ s a -> s{_dDirectoryARN = a})
dState :: Lens' Directory (Maybe DirectoryState)
dState = lens _dState (\ s a -> s{_dState = a})
dName :: Lens' Directory (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})
dCreationDateTime :: Lens' Directory (Maybe UTCTime)
dCreationDateTime = lens _dCreationDateTime (\ s a -> s{_dCreationDateTime = a}) . mapping _Time
instance FromJSON Directory where
parseJSON
= withObject "Directory"
(\ x ->
Directory' <$>
(x .:? "DirectoryArn") <*> (x .:? "State") <*>
(x .:? "Name")
<*> (x .:? "CreationDateTime"))
instance Hashable Directory where
instance NFData Directory where
data Facet = Facet'
{ _fObjectType :: !(Maybe ObjectType)
, _fName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
facet
:: Facet
facet = Facet' {_fObjectType = Nothing, _fName = Nothing}
fObjectType :: Lens' Facet (Maybe ObjectType)
fObjectType = lens _fObjectType (\ s a -> s{_fObjectType = a})
fName :: Lens' Facet (Maybe Text)
fName = lens _fName (\ s a -> s{_fName = a})
instance FromJSON Facet where
parseJSON
= withObject "Facet"
(\ x ->
Facet' <$> (x .:? "ObjectType") <*> (x .:? "Name"))
instance Hashable Facet where
instance NFData Facet where
data FacetAttribute = FacetAttribute'
{ _faAttributeReference :: !(Maybe FacetAttributeReference)
, _faAttributeDefinition :: !(Maybe FacetAttributeDefinition)
, _faRequiredBehavior :: !(Maybe RequiredAttributeBehavior)
, _faName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
facetAttribute
:: Text
-> FacetAttribute
facetAttribute pName_ =
FacetAttribute'
{ _faAttributeReference = Nothing
, _faAttributeDefinition = Nothing
, _faRequiredBehavior = Nothing
, _faName = pName_
}
faAttributeReference :: Lens' FacetAttribute (Maybe FacetAttributeReference)
faAttributeReference = lens _faAttributeReference (\ s a -> s{_faAttributeReference = a})
faAttributeDefinition :: Lens' FacetAttribute (Maybe FacetAttributeDefinition)
faAttributeDefinition = lens _faAttributeDefinition (\ s a -> s{_faAttributeDefinition = a})
faRequiredBehavior :: Lens' FacetAttribute (Maybe RequiredAttributeBehavior)
faRequiredBehavior = lens _faRequiredBehavior (\ s a -> s{_faRequiredBehavior = a})
faName :: Lens' FacetAttribute Text
faName = lens _faName (\ s a -> s{_faName = a})
instance FromJSON FacetAttribute where
parseJSON
= withObject "FacetAttribute"
(\ x ->
FacetAttribute' <$>
(x .:? "AttributeReference") <*>
(x .:? "AttributeDefinition")
<*> (x .:? "RequiredBehavior")
<*> (x .: "Name"))
instance Hashable FacetAttribute where
instance NFData FacetAttribute where
instance ToJSON FacetAttribute where
toJSON FacetAttribute'{..}
= object
(catMaybes
[("AttributeReference" .=) <$> _faAttributeReference,
("AttributeDefinition" .=) <$>
_faAttributeDefinition,
("RequiredBehavior" .=) <$> _faRequiredBehavior,
Just ("Name" .= _faName)])
data FacetAttributeDefinition = FacetAttributeDefinition'
{ _fadRules :: !(Maybe (Map Text Rule))
, _fadDefaultValue :: !(Maybe TypedAttributeValue)
, _fadIsImmutable :: !(Maybe Bool)
, _fadType :: !FacetAttributeType
} deriving (Eq, Read, Show, Data, Typeable, Generic)
facetAttributeDefinition
:: FacetAttributeType
-> FacetAttributeDefinition
facetAttributeDefinition pType_ =
FacetAttributeDefinition'
{ _fadRules = Nothing
, _fadDefaultValue = Nothing
, _fadIsImmutable = Nothing
, _fadType = pType_
}
fadRules :: Lens' FacetAttributeDefinition (HashMap Text Rule)
fadRules = lens _fadRules (\ s a -> s{_fadRules = a}) . _Default . _Map
fadDefaultValue :: Lens' FacetAttributeDefinition (Maybe TypedAttributeValue)
fadDefaultValue = lens _fadDefaultValue (\ s a -> s{_fadDefaultValue = a})
fadIsImmutable :: Lens' FacetAttributeDefinition (Maybe Bool)
fadIsImmutable = lens _fadIsImmutable (\ s a -> s{_fadIsImmutable = a})
fadType :: Lens' FacetAttributeDefinition FacetAttributeType
fadType = lens _fadType (\ s a -> s{_fadType = a})
instance FromJSON FacetAttributeDefinition where
parseJSON
= withObject "FacetAttributeDefinition"
(\ x ->
FacetAttributeDefinition' <$>
(x .:? "Rules" .!= mempty) <*> (x .:? "DefaultValue")
<*> (x .:? "IsImmutable")
<*> (x .: "Type"))
instance Hashable FacetAttributeDefinition where
instance NFData FacetAttributeDefinition where
instance ToJSON FacetAttributeDefinition where
toJSON FacetAttributeDefinition'{..}
= object
(catMaybes
[("Rules" .=) <$> _fadRules,
("DefaultValue" .=) <$> _fadDefaultValue,
("IsImmutable" .=) <$> _fadIsImmutable,
Just ("Type" .= _fadType)])
data FacetAttributeReference = FacetAttributeReference'
{ _farTargetFacetName :: !Text
, _farTargetAttributeName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
facetAttributeReference
:: Text
-> Text
-> FacetAttributeReference
facetAttributeReference pTargetFacetName_ pTargetAttributeName_ =
FacetAttributeReference'
{ _farTargetFacetName = pTargetFacetName_
, _farTargetAttributeName = pTargetAttributeName_
}
farTargetFacetName :: Lens' FacetAttributeReference Text
farTargetFacetName = lens _farTargetFacetName (\ s a -> s{_farTargetFacetName = a})
farTargetAttributeName :: Lens' FacetAttributeReference Text
farTargetAttributeName = lens _farTargetAttributeName (\ s a -> s{_farTargetAttributeName = a})
instance FromJSON FacetAttributeReference where
parseJSON
= withObject "FacetAttributeReference"
(\ x ->
FacetAttributeReference' <$>
(x .: "TargetFacetName") <*>
(x .: "TargetAttributeName"))
instance Hashable FacetAttributeReference where
instance NFData FacetAttributeReference where
instance ToJSON FacetAttributeReference where
toJSON FacetAttributeReference'{..}
= object
(catMaybes
[Just ("TargetFacetName" .= _farTargetFacetName),
Just
("TargetAttributeName" .= _farTargetAttributeName)])
data FacetAttributeUpdate = FacetAttributeUpdate'
{ _fauAttribute :: !(Maybe FacetAttribute)
, _fauAction :: !(Maybe UpdateActionType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
facetAttributeUpdate
:: FacetAttributeUpdate
facetAttributeUpdate =
FacetAttributeUpdate' {_fauAttribute = Nothing, _fauAction = Nothing}
fauAttribute :: Lens' FacetAttributeUpdate (Maybe FacetAttribute)
fauAttribute = lens _fauAttribute (\ s a -> s{_fauAttribute = a})
fauAction :: Lens' FacetAttributeUpdate (Maybe UpdateActionType)
fauAction = lens _fauAction (\ s a -> s{_fauAction = a})
instance Hashable FacetAttributeUpdate where
instance NFData FacetAttributeUpdate where
instance ToJSON FacetAttributeUpdate where
toJSON FacetAttributeUpdate'{..}
= object
(catMaybes
[("Attribute" .=) <$> _fauAttribute,
("Action" .=) <$> _fauAction])
data IndexAttachment = IndexAttachment'
{ _iaIndexedAttributes :: !(Maybe [AttributeKeyAndValue])
, _iaObjectIdentifier :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
indexAttachment
:: IndexAttachment
indexAttachment =
IndexAttachment'
{_iaIndexedAttributes = Nothing, _iaObjectIdentifier = Nothing}
iaIndexedAttributes :: Lens' IndexAttachment [AttributeKeyAndValue]
iaIndexedAttributes = lens _iaIndexedAttributes (\ s a -> s{_iaIndexedAttributes = a}) . _Default . _Coerce
iaObjectIdentifier :: Lens' IndexAttachment (Maybe Text)
iaObjectIdentifier = lens _iaObjectIdentifier (\ s a -> s{_iaObjectIdentifier = a})
instance FromJSON IndexAttachment where
parseJSON
= withObject "IndexAttachment"
(\ x ->
IndexAttachment' <$>
(x .:? "IndexedAttributes" .!= mempty) <*>
(x .:? "ObjectIdentifier"))
instance Hashable IndexAttachment where
instance NFData IndexAttachment where
data ObjectAttributeAction = ObjectAttributeAction'
{ _oaaObjectAttributeActionType :: !(Maybe UpdateActionType)
, _oaaObjectAttributeUpdateValue :: !(Maybe TypedAttributeValue)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
objectAttributeAction
:: ObjectAttributeAction
objectAttributeAction =
ObjectAttributeAction'
{ _oaaObjectAttributeActionType = Nothing
, _oaaObjectAttributeUpdateValue = Nothing
}
oaaObjectAttributeActionType :: Lens' ObjectAttributeAction (Maybe UpdateActionType)
oaaObjectAttributeActionType = lens _oaaObjectAttributeActionType (\ s a -> s{_oaaObjectAttributeActionType = a})
oaaObjectAttributeUpdateValue :: Lens' ObjectAttributeAction (Maybe TypedAttributeValue)
oaaObjectAttributeUpdateValue = lens _oaaObjectAttributeUpdateValue (\ s a -> s{_oaaObjectAttributeUpdateValue = a})
instance Hashable ObjectAttributeAction where
instance NFData ObjectAttributeAction where
instance ToJSON ObjectAttributeAction where
toJSON ObjectAttributeAction'{..}
= object
(catMaybes
[("ObjectAttributeActionType" .=) <$>
_oaaObjectAttributeActionType,
("ObjectAttributeUpdateValue" .=) <$>
_oaaObjectAttributeUpdateValue])
data ObjectAttributeRange = ObjectAttributeRange'
{ _oarRange :: !(Maybe TypedAttributeValueRange)
, _oarAttributeKey :: !(Maybe AttributeKey)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
objectAttributeRange
:: ObjectAttributeRange
objectAttributeRange =
ObjectAttributeRange' {_oarRange = Nothing, _oarAttributeKey = Nothing}
oarRange :: Lens' ObjectAttributeRange (Maybe TypedAttributeValueRange)
oarRange = lens _oarRange (\ s a -> s{_oarRange = a})
oarAttributeKey :: Lens' ObjectAttributeRange (Maybe AttributeKey)
oarAttributeKey = lens _oarAttributeKey (\ s a -> s{_oarAttributeKey = a})
instance Hashable ObjectAttributeRange where
instance NFData ObjectAttributeRange where
instance ToJSON ObjectAttributeRange where
toJSON ObjectAttributeRange'{..}
= object
(catMaybes
[("Range" .=) <$> _oarRange,
("AttributeKey" .=) <$> _oarAttributeKey])
data ObjectAttributeUpdate = ObjectAttributeUpdate'
{ _oauObjectAttributeAction :: !(Maybe ObjectAttributeAction)
, _oauObjectAttributeKey :: !(Maybe AttributeKey)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
objectAttributeUpdate
:: ObjectAttributeUpdate
objectAttributeUpdate =
ObjectAttributeUpdate'
{_oauObjectAttributeAction = Nothing, _oauObjectAttributeKey = Nothing}
oauObjectAttributeAction :: Lens' ObjectAttributeUpdate (Maybe ObjectAttributeAction)
oauObjectAttributeAction = lens _oauObjectAttributeAction (\ s a -> s{_oauObjectAttributeAction = a})
oauObjectAttributeKey :: Lens' ObjectAttributeUpdate (Maybe AttributeKey)
oauObjectAttributeKey = lens _oauObjectAttributeKey (\ s a -> s{_oauObjectAttributeKey = a})
instance Hashable ObjectAttributeUpdate where
instance NFData ObjectAttributeUpdate where
instance ToJSON ObjectAttributeUpdate where
toJSON ObjectAttributeUpdate'{..}
= object
(catMaybes
[("ObjectAttributeAction" .=) <$>
_oauObjectAttributeAction,
("ObjectAttributeKey" .=) <$>
_oauObjectAttributeKey])
newtype ObjectReference = ObjectReference'
{ _orSelector :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
objectReference
:: ObjectReference
objectReference = ObjectReference' {_orSelector = Nothing}
orSelector :: Lens' ObjectReference (Maybe Text)
orSelector = lens _orSelector (\ s a -> s{_orSelector = a})
instance FromJSON ObjectReference where
parseJSON
= withObject "ObjectReference"
(\ x -> ObjectReference' <$> (x .:? "Selector"))
instance Hashable ObjectReference where
instance NFData ObjectReference where
instance ToJSON ObjectReference where
toJSON ObjectReference'{..}
= object
(catMaybes [("Selector" .=) <$> _orSelector])
data PathToObjectIdentifiers = PathToObjectIdentifiers'
{ _ptoiObjectIdentifiers :: !(Maybe [Text])
, _ptoiPath :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pathToObjectIdentifiers
:: PathToObjectIdentifiers
pathToObjectIdentifiers =
PathToObjectIdentifiers'
{_ptoiObjectIdentifiers = Nothing, _ptoiPath = Nothing}
ptoiObjectIdentifiers :: Lens' PathToObjectIdentifiers [Text]
ptoiObjectIdentifiers = lens _ptoiObjectIdentifiers (\ s a -> s{_ptoiObjectIdentifiers = a}) . _Default . _Coerce
ptoiPath :: Lens' PathToObjectIdentifiers (Maybe Text)
ptoiPath = lens _ptoiPath (\ s a -> s{_ptoiPath = a})
instance FromJSON PathToObjectIdentifiers where
parseJSON
= withObject "PathToObjectIdentifiers"
(\ x ->
PathToObjectIdentifiers' <$>
(x .:? "ObjectIdentifiers" .!= mempty) <*>
(x .:? "Path"))
instance Hashable PathToObjectIdentifiers where
instance NFData PathToObjectIdentifiers where
data PolicyAttachment = PolicyAttachment'
{ _paPolicyId :: !(Maybe Text)
, _paPolicyType :: !(Maybe Text)
, _paObjectIdentifier :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
policyAttachment
:: PolicyAttachment
policyAttachment =
PolicyAttachment'
{ _paPolicyId = Nothing
, _paPolicyType = Nothing
, _paObjectIdentifier = Nothing
}
paPolicyId :: Lens' PolicyAttachment (Maybe Text)
paPolicyId = lens _paPolicyId (\ s a -> s{_paPolicyId = a})
paPolicyType :: Lens' PolicyAttachment (Maybe Text)
paPolicyType = lens _paPolicyType (\ s a -> s{_paPolicyType = a})
paObjectIdentifier :: Lens' PolicyAttachment (Maybe Text)
paObjectIdentifier = lens _paObjectIdentifier (\ s a -> s{_paObjectIdentifier = a})
instance FromJSON PolicyAttachment where
parseJSON
= withObject "PolicyAttachment"
(\ x ->
PolicyAttachment' <$>
(x .:? "PolicyId") <*> (x .:? "PolicyType") <*>
(x .:? "ObjectIdentifier"))
instance Hashable PolicyAttachment where
instance NFData PolicyAttachment where
data PolicyToPath = PolicyToPath'
{ _ptpPath :: !(Maybe Text)
, _ptpPolicies :: !(Maybe [PolicyAttachment])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
policyToPath
:: PolicyToPath
policyToPath = PolicyToPath' {_ptpPath = Nothing, _ptpPolicies = Nothing}
ptpPath :: Lens' PolicyToPath (Maybe Text)
ptpPath = lens _ptpPath (\ s a -> s{_ptpPath = a})
ptpPolicies :: Lens' PolicyToPath [PolicyAttachment]
ptpPolicies = lens _ptpPolicies (\ s a -> s{_ptpPolicies = a}) . _Default . _Coerce
instance FromJSON PolicyToPath where
parseJSON
= withObject "PolicyToPath"
(\ x ->
PolicyToPath' <$>
(x .:? "Path") <*> (x .:? "Policies" .!= mempty))
instance Hashable PolicyToPath where
instance NFData PolicyToPath where
data Rule = Rule'
{ _rParameters :: !(Maybe (Map Text Text))
, _rType :: !(Maybe RuleType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
rule
:: Rule
rule = Rule' {_rParameters = Nothing, _rType = Nothing}
rParameters :: Lens' Rule (HashMap Text Text)
rParameters = lens _rParameters (\ s a -> s{_rParameters = a}) . _Default . _Map
rType :: Lens' Rule (Maybe RuleType)
rType = lens _rType (\ s a -> s{_rType = a})
instance FromJSON Rule where
parseJSON
= withObject "Rule"
(\ x ->
Rule' <$>
(x .:? "Parameters" .!= mempty) <*> (x .:? "Type"))
instance Hashable Rule where
instance NFData Rule where
instance ToJSON Rule where
toJSON Rule'{..}
= object
(catMaybes
[("Parameters" .=) <$> _rParameters,
("Type" .=) <$> _rType])
data SchemaFacet = SchemaFacet'
{ _sfFacetName :: !(Maybe Text)
, _sfSchemaARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
schemaFacet
:: SchemaFacet
schemaFacet = SchemaFacet' {_sfFacetName = Nothing, _sfSchemaARN = Nothing}
sfFacetName :: Lens' SchemaFacet (Maybe Text)
sfFacetName = lens _sfFacetName (\ s a -> s{_sfFacetName = a})
sfSchemaARN :: Lens' SchemaFacet (Maybe Text)
sfSchemaARN = lens _sfSchemaARN (\ s a -> s{_sfSchemaARN = a})
instance FromJSON SchemaFacet where
parseJSON
= withObject "SchemaFacet"
(\ x ->
SchemaFacet' <$>
(x .:? "FacetName") <*> (x .:? "SchemaArn"))
instance Hashable SchemaFacet where
instance NFData SchemaFacet where
instance ToJSON SchemaFacet where
toJSON SchemaFacet'{..}
= object
(catMaybes
[("FacetName" .=) <$> _sfFacetName,
("SchemaArn" .=) <$> _sfSchemaARN])
data Tag = Tag'
{ _tagValue :: !(Maybe Text)
, _tagKey :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tag
:: Tag
tag = Tag' {_tagValue = Nothing, _tagKey = Nothing}
tagValue :: Lens' Tag (Maybe Text)
tagValue = lens _tagValue (\ s a -> s{_tagValue = a})
tagKey :: Lens' Tag (Maybe Text)
tagKey = lens _tagKey (\ s a -> s{_tagKey = a})
instance FromJSON Tag where
parseJSON
= withObject "Tag"
(\ x -> Tag' <$> (x .:? "Value") <*> (x .:? "Key"))
instance Hashable Tag where
instance NFData Tag where
instance ToJSON Tag where
toJSON Tag'{..}
= object
(catMaybes
[("Value" .=) <$> _tagValue, ("Key" .=) <$> _tagKey])
data TypedAttributeValue = TypedAttributeValue'
{ _tavBinaryValue :: !(Maybe Base64)
, _tavDatetimeValue :: !(Maybe POSIX)
, _tavNumberValue :: !(Maybe Text)
, _tavStringValue :: !(Maybe Text)
, _tavBooleanValue :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
typedAttributeValue
:: TypedAttributeValue
typedAttributeValue =
TypedAttributeValue'
{ _tavBinaryValue = Nothing
, _tavDatetimeValue = Nothing
, _tavNumberValue = Nothing
, _tavStringValue = Nothing
, _tavBooleanValue = Nothing
}
tavBinaryValue :: Lens' TypedAttributeValue (Maybe ByteString)
tavBinaryValue = lens _tavBinaryValue (\ s a -> s{_tavBinaryValue = a}) . mapping _Base64
tavDatetimeValue :: Lens' TypedAttributeValue (Maybe UTCTime)
tavDatetimeValue = lens _tavDatetimeValue (\ s a -> s{_tavDatetimeValue = a}) . mapping _Time
tavNumberValue :: Lens' TypedAttributeValue (Maybe Text)
tavNumberValue = lens _tavNumberValue (\ s a -> s{_tavNumberValue = a})
tavStringValue :: Lens' TypedAttributeValue (Maybe Text)
tavStringValue = lens _tavStringValue (\ s a -> s{_tavStringValue = a})
tavBooleanValue :: Lens' TypedAttributeValue (Maybe Bool)
tavBooleanValue = lens _tavBooleanValue (\ s a -> s{_tavBooleanValue = a})
instance FromJSON TypedAttributeValue where
parseJSON
= withObject "TypedAttributeValue"
(\ x ->
TypedAttributeValue' <$>
(x .:? "BinaryValue") <*> (x .:? "DatetimeValue") <*>
(x .:? "NumberValue")
<*> (x .:? "StringValue")
<*> (x .:? "BooleanValue"))
instance Hashable TypedAttributeValue where
instance NFData TypedAttributeValue where
instance ToJSON TypedAttributeValue where
toJSON TypedAttributeValue'{..}
= object
(catMaybes
[("BinaryValue" .=) <$> _tavBinaryValue,
("DatetimeValue" .=) <$> _tavDatetimeValue,
("NumberValue" .=) <$> _tavNumberValue,
("StringValue" .=) <$> _tavStringValue,
("BooleanValue" .=) <$> _tavBooleanValue])
data TypedAttributeValueRange = TypedAttributeValueRange'
{ _tavrEndValue :: !(Maybe TypedAttributeValue)
, _tavrStartValue :: !(Maybe TypedAttributeValue)
, _tavrStartMode :: !RangeMode
, _tavrEndMode :: !RangeMode
} deriving (Eq, Read, Show, Data, Typeable, Generic)
typedAttributeValueRange
:: RangeMode
-> RangeMode
-> TypedAttributeValueRange
typedAttributeValueRange pStartMode_ pEndMode_ =
TypedAttributeValueRange'
{ _tavrEndValue = Nothing
, _tavrStartValue = Nothing
, _tavrStartMode = pStartMode_
, _tavrEndMode = pEndMode_
}
tavrEndValue :: Lens' TypedAttributeValueRange (Maybe TypedAttributeValue)
tavrEndValue = lens _tavrEndValue (\ s a -> s{_tavrEndValue = a})
tavrStartValue :: Lens' TypedAttributeValueRange (Maybe TypedAttributeValue)
tavrStartValue = lens _tavrStartValue (\ s a -> s{_tavrStartValue = a})
tavrStartMode :: Lens' TypedAttributeValueRange RangeMode
tavrStartMode = lens _tavrStartMode (\ s a -> s{_tavrStartMode = a})
tavrEndMode :: Lens' TypedAttributeValueRange RangeMode
tavrEndMode = lens _tavrEndMode (\ s a -> s{_tavrEndMode = a})
instance Hashable TypedAttributeValueRange where
instance NFData TypedAttributeValueRange where
instance ToJSON TypedAttributeValueRange where
toJSON TypedAttributeValueRange'{..}
= object
(catMaybes
[("EndValue" .=) <$> _tavrEndValue,
("StartValue" .=) <$> _tavrStartValue,
Just ("StartMode" .= _tavrStartMode),
Just ("EndMode" .= _tavrEndMode)])
data TypedLinkAttributeDefinition = TypedLinkAttributeDefinition'
{ _tladRules :: !(Maybe (Map Text Rule))
, _tladDefaultValue :: !(Maybe TypedAttributeValue)
, _tladIsImmutable :: !(Maybe Bool)
, _tladName :: !Text
, _tladType :: !FacetAttributeType
, _tladRequiredBehavior :: !RequiredAttributeBehavior
} deriving (Eq, Read, Show, Data, Typeable, Generic)
typedLinkAttributeDefinition
:: Text
-> FacetAttributeType
-> RequiredAttributeBehavior
-> TypedLinkAttributeDefinition
typedLinkAttributeDefinition pName_ pType_ pRequiredBehavior_ =
TypedLinkAttributeDefinition'
{ _tladRules = Nothing
, _tladDefaultValue = Nothing
, _tladIsImmutable = Nothing
, _tladName = pName_
, _tladType = pType_
, _tladRequiredBehavior = pRequiredBehavior_
}
tladRules :: Lens' TypedLinkAttributeDefinition (HashMap Text Rule)
tladRules = lens _tladRules (\ s a -> s{_tladRules = a}) . _Default . _Map
tladDefaultValue :: Lens' TypedLinkAttributeDefinition (Maybe TypedAttributeValue)
tladDefaultValue = lens _tladDefaultValue (\ s a -> s{_tladDefaultValue = a})
tladIsImmutable :: Lens' TypedLinkAttributeDefinition (Maybe Bool)
tladIsImmutable = lens _tladIsImmutable (\ s a -> s{_tladIsImmutable = a})
tladName :: Lens' TypedLinkAttributeDefinition Text
tladName = lens _tladName (\ s a -> s{_tladName = a})
tladType :: Lens' TypedLinkAttributeDefinition FacetAttributeType
tladType = lens _tladType (\ s a -> s{_tladType = a})
tladRequiredBehavior :: Lens' TypedLinkAttributeDefinition RequiredAttributeBehavior
tladRequiredBehavior = lens _tladRequiredBehavior (\ s a -> s{_tladRequiredBehavior = a})
instance FromJSON TypedLinkAttributeDefinition where
parseJSON
= withObject "TypedLinkAttributeDefinition"
(\ x ->
TypedLinkAttributeDefinition' <$>
(x .:? "Rules" .!= mempty) <*> (x .:? "DefaultValue")
<*> (x .:? "IsImmutable")
<*> (x .: "Name")
<*> (x .: "Type")
<*> (x .: "RequiredBehavior"))
instance Hashable TypedLinkAttributeDefinition where
instance NFData TypedLinkAttributeDefinition where
instance ToJSON TypedLinkAttributeDefinition where
toJSON TypedLinkAttributeDefinition'{..}
= object
(catMaybes
[("Rules" .=) <$> _tladRules,
("DefaultValue" .=) <$> _tladDefaultValue,
("IsImmutable" .=) <$> _tladIsImmutable,
Just ("Name" .= _tladName),
Just ("Type" .= _tladType),
Just ("RequiredBehavior" .= _tladRequiredBehavior)])
data TypedLinkAttributeRange = TypedLinkAttributeRange'
{ _tlarAttributeName :: !(Maybe Text)
, _tlarRange :: !TypedAttributeValueRange
} deriving (Eq, Read, Show, Data, Typeable, Generic)
typedLinkAttributeRange
:: TypedAttributeValueRange
-> TypedLinkAttributeRange
typedLinkAttributeRange pRange_ =
TypedLinkAttributeRange' {_tlarAttributeName = Nothing, _tlarRange = pRange_}
tlarAttributeName :: Lens' TypedLinkAttributeRange (Maybe Text)
tlarAttributeName = lens _tlarAttributeName (\ s a -> s{_tlarAttributeName = a})
tlarRange :: Lens' TypedLinkAttributeRange TypedAttributeValueRange
tlarRange = lens _tlarRange (\ s a -> s{_tlarRange = a})
instance Hashable TypedLinkAttributeRange where
instance NFData TypedLinkAttributeRange where
instance ToJSON TypedLinkAttributeRange where
toJSON TypedLinkAttributeRange'{..}
= object
(catMaybes
[("AttributeName" .=) <$> _tlarAttributeName,
Just ("Range" .= _tlarRange)])
data TypedLinkFacet = TypedLinkFacet'
{ _tlfName :: !Text
, _tlfAttributes :: ![TypedLinkAttributeDefinition]
, _tlfIdentityAttributeOrder :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
typedLinkFacet
:: Text
-> TypedLinkFacet
typedLinkFacet pName_ =
TypedLinkFacet'
{ _tlfName = pName_
, _tlfAttributes = mempty
, _tlfIdentityAttributeOrder = mempty
}
tlfName :: Lens' TypedLinkFacet Text
tlfName = lens _tlfName (\ s a -> s{_tlfName = a})
tlfAttributes :: Lens' TypedLinkFacet [TypedLinkAttributeDefinition]
tlfAttributes = lens _tlfAttributes (\ s a -> s{_tlfAttributes = a}) . _Coerce
tlfIdentityAttributeOrder :: Lens' TypedLinkFacet [Text]
tlfIdentityAttributeOrder = lens _tlfIdentityAttributeOrder (\ s a -> s{_tlfIdentityAttributeOrder = a}) . _Coerce
instance Hashable TypedLinkFacet where
instance NFData TypedLinkFacet where
instance ToJSON TypedLinkFacet where
toJSON TypedLinkFacet'{..}
= object
(catMaybes
[Just ("Name" .= _tlfName),
Just ("Attributes" .= _tlfAttributes),
Just
("IdentityAttributeOrder" .=
_tlfIdentityAttributeOrder)])
data TypedLinkFacetAttributeUpdate = TypedLinkFacetAttributeUpdate'
{ _tlfauAttribute :: !TypedLinkAttributeDefinition
, _tlfauAction :: !UpdateActionType
} deriving (Eq, Read, Show, Data, Typeable, Generic)
typedLinkFacetAttributeUpdate
:: TypedLinkAttributeDefinition
-> UpdateActionType
-> TypedLinkFacetAttributeUpdate
typedLinkFacetAttributeUpdate pAttribute_ pAction_ =
TypedLinkFacetAttributeUpdate'
{_tlfauAttribute = pAttribute_, _tlfauAction = pAction_}
tlfauAttribute :: Lens' TypedLinkFacetAttributeUpdate TypedLinkAttributeDefinition
tlfauAttribute = lens _tlfauAttribute (\ s a -> s{_tlfauAttribute = a})
tlfauAction :: Lens' TypedLinkFacetAttributeUpdate UpdateActionType
tlfauAction = lens _tlfauAction (\ s a -> s{_tlfauAction = a})
instance Hashable TypedLinkFacetAttributeUpdate where
instance NFData TypedLinkFacetAttributeUpdate where
instance ToJSON TypedLinkFacetAttributeUpdate where
toJSON TypedLinkFacetAttributeUpdate'{..}
= object
(catMaybes
[Just ("Attribute" .= _tlfauAttribute),
Just ("Action" .= _tlfauAction)])
data TypedLinkSchemaAndFacetName = TypedLinkSchemaAndFacetName'
{ _tlsafnSchemaARN :: !Text
, _tlsafnTypedLinkName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
typedLinkSchemaAndFacetName
:: Text
-> Text
-> TypedLinkSchemaAndFacetName
typedLinkSchemaAndFacetName pSchemaARN_ pTypedLinkName_ =
TypedLinkSchemaAndFacetName'
{_tlsafnSchemaARN = pSchemaARN_, _tlsafnTypedLinkName = pTypedLinkName_}
tlsafnSchemaARN :: Lens' TypedLinkSchemaAndFacetName Text
tlsafnSchemaARN = lens _tlsafnSchemaARN (\ s a -> s{_tlsafnSchemaARN = a})
tlsafnTypedLinkName :: Lens' TypedLinkSchemaAndFacetName Text
tlsafnTypedLinkName = lens _tlsafnTypedLinkName (\ s a -> s{_tlsafnTypedLinkName = a})
instance FromJSON TypedLinkSchemaAndFacetName where
parseJSON
= withObject "TypedLinkSchemaAndFacetName"
(\ x ->
TypedLinkSchemaAndFacetName' <$>
(x .: "SchemaArn") <*> (x .: "TypedLinkName"))
instance Hashable TypedLinkSchemaAndFacetName where
instance NFData TypedLinkSchemaAndFacetName where
instance ToJSON TypedLinkSchemaAndFacetName where
toJSON TypedLinkSchemaAndFacetName'{..}
= object
(catMaybes
[Just ("SchemaArn" .= _tlsafnSchemaARN),
Just ("TypedLinkName" .= _tlsafnTypedLinkName)])
data TypedLinkSpecifier = TypedLinkSpecifier'
{ _tlsTypedLinkFacet :: !TypedLinkSchemaAndFacetName
, _tlsSourceObjectReference :: !ObjectReference
, _tlsTargetObjectReference :: !ObjectReference
, _tlsIdentityAttributeValues :: ![AttributeNameAndValue]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
typedLinkSpecifier
:: TypedLinkSchemaAndFacetName
-> ObjectReference
-> ObjectReference
-> TypedLinkSpecifier
typedLinkSpecifier pTypedLinkFacet_ pSourceObjectReference_ pTargetObjectReference_ =
TypedLinkSpecifier'
{ _tlsTypedLinkFacet = pTypedLinkFacet_
, _tlsSourceObjectReference = pSourceObjectReference_
, _tlsTargetObjectReference = pTargetObjectReference_
, _tlsIdentityAttributeValues = mempty
}
tlsTypedLinkFacet :: Lens' TypedLinkSpecifier TypedLinkSchemaAndFacetName
tlsTypedLinkFacet = lens _tlsTypedLinkFacet (\ s a -> s{_tlsTypedLinkFacet = a})
tlsSourceObjectReference :: Lens' TypedLinkSpecifier ObjectReference
tlsSourceObjectReference = lens _tlsSourceObjectReference (\ s a -> s{_tlsSourceObjectReference = a})
tlsTargetObjectReference :: Lens' TypedLinkSpecifier ObjectReference
tlsTargetObjectReference = lens _tlsTargetObjectReference (\ s a -> s{_tlsTargetObjectReference = a})
tlsIdentityAttributeValues :: Lens' TypedLinkSpecifier [AttributeNameAndValue]
tlsIdentityAttributeValues = lens _tlsIdentityAttributeValues (\ s a -> s{_tlsIdentityAttributeValues = a}) . _Coerce
instance FromJSON TypedLinkSpecifier where
parseJSON
= withObject "TypedLinkSpecifier"
(\ x ->
TypedLinkSpecifier' <$>
(x .: "TypedLinkFacet") <*>
(x .: "SourceObjectReference")
<*> (x .: "TargetObjectReference")
<*> (x .:? "IdentityAttributeValues" .!= mempty))
instance Hashable TypedLinkSpecifier where
instance NFData TypedLinkSpecifier where
instance ToJSON TypedLinkSpecifier where
toJSON TypedLinkSpecifier'{..}
= object
(catMaybes
[Just ("TypedLinkFacet" .= _tlsTypedLinkFacet),
Just
("SourceObjectReference" .=
_tlsSourceObjectReference),
Just
("TargetObjectReference" .=
_tlsTargetObjectReference),
Just
("IdentityAttributeValues" .=
_tlsIdentityAttributeValues)])