module Network.Google.ResourceManager.Types.Sum where
import Network.Google.Prelude
data OrganizationLifecycleState
= LifecycleStateUnspecified
| Active
| DeleteRequested
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OrganizationLifecycleState
instance FromHttpApiData OrganizationLifecycleState where
parseQueryParam = \case
"LIFECYCLE_STATE_UNSPECIFIED" -> Right LifecycleStateUnspecified
"ACTIVE" -> Right Active
"DELETE_REQUESTED" -> Right DeleteRequested
x -> Left ("Unable to parse OrganizationLifecycleState from: " <> x)
instance ToHttpApiData OrganizationLifecycleState where
toQueryParam = \case
LifecycleStateUnspecified -> "LIFECYCLE_STATE_UNSPECIFIED"
Active -> "ACTIVE"
DeleteRequested -> "DELETE_REQUESTED"
instance FromJSON OrganizationLifecycleState where
parseJSON = parseJSONText "OrganizationLifecycleState"
instance ToJSON OrganizationLifecycleState where
toJSON = toJSONText
data FolderOperationErrorErrorMessageId
= ErrorTypeUnspecified
| FolderHeightViolation
| MaxChildFoldersViolation
| FolderNameUniquenessViolation
| ResourceDeleted
| ParentDeleted
| CycleIntroducedError
| FolderAlreadyBeingMoved
| FolderToDeleteNonEmpty
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable FolderOperationErrorErrorMessageId
instance FromHttpApiData FolderOperationErrorErrorMessageId where
parseQueryParam = \case
"ERROR_TYPE_UNSPECIFIED" -> Right ErrorTypeUnspecified
"FOLDER_HEIGHT_VIOLATION" -> Right FolderHeightViolation
"MAX_CHILD_FOLDERS_VIOLATION" -> Right MaxChildFoldersViolation
"FOLDER_NAME_UNIQUENESS_VIOLATION" -> Right FolderNameUniquenessViolation
"RESOURCE_DELETED" -> Right ResourceDeleted
"PARENT_DELETED" -> Right ParentDeleted
"CYCLE_INTRODUCED_ERROR" -> Right CycleIntroducedError
"FOLDER_ALREADY_BEING_MOVED" -> Right FolderAlreadyBeingMoved
"FOLDER_TO_DELETE_NON_EMPTY" -> Right FolderToDeleteNonEmpty
x -> Left ("Unable to parse FolderOperationErrorErrorMessageId from: " <> x)
instance ToHttpApiData FolderOperationErrorErrorMessageId where
toQueryParam = \case
ErrorTypeUnspecified -> "ERROR_TYPE_UNSPECIFIED"
FolderHeightViolation -> "FOLDER_HEIGHT_VIOLATION"
MaxChildFoldersViolation -> "MAX_CHILD_FOLDERS_VIOLATION"
FolderNameUniquenessViolation -> "FOLDER_NAME_UNIQUENESS_VIOLATION"
ResourceDeleted -> "RESOURCE_DELETED"
ParentDeleted -> "PARENT_DELETED"
CycleIntroducedError -> "CYCLE_INTRODUCED_ERROR"
FolderAlreadyBeingMoved -> "FOLDER_ALREADY_BEING_MOVED"
FolderToDeleteNonEmpty -> "FOLDER_TO_DELETE_NON_EMPTY"
instance FromJSON FolderOperationErrorErrorMessageId where
parseJSON = parseJSONText "FolderOperationErrorErrorMessageId"
instance ToJSON FolderOperationErrorErrorMessageId where
toJSON = toJSONText
data FolderOperationOperationType
= OperationTypeUnspecified
| Create
| Move
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable FolderOperationOperationType
instance FromHttpApiData FolderOperationOperationType where
parseQueryParam = \case
"OPERATION_TYPE_UNSPECIFIED" -> Right OperationTypeUnspecified
"CREATE" -> Right Create
"MOVE" -> Right Move
x -> Left ("Unable to parse FolderOperationOperationType from: " <> x)
instance ToHttpApiData FolderOperationOperationType where
toQueryParam = \case
OperationTypeUnspecified -> "OPERATION_TYPE_UNSPECIFIED"
Create -> "CREATE"
Move -> "MOVE"
instance FromJSON FolderOperationOperationType where
parseJSON = parseJSONText "FolderOperationOperationType"
instance ToJSON FolderOperationOperationType where
toJSON = toJSONText
data ProjectLifecycleState
= PLSLifecycleStateUnspecified
| PLSActive
| PLSDeleteRequested
| PLSDeleteInProgress
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ProjectLifecycleState
instance FromHttpApiData ProjectLifecycleState where
parseQueryParam = \case
"LIFECYCLE_STATE_UNSPECIFIED" -> Right PLSLifecycleStateUnspecified
"ACTIVE" -> Right PLSActive
"DELETE_REQUESTED" -> Right PLSDeleteRequested
"DELETE_IN_PROGRESS" -> Right PLSDeleteInProgress
x -> Left ("Unable to parse ProjectLifecycleState from: " <> x)
instance ToHttpApiData ProjectLifecycleState where
toQueryParam = \case
PLSLifecycleStateUnspecified -> "LIFECYCLE_STATE_UNSPECIFIED"
PLSActive -> "ACTIVE"
PLSDeleteRequested -> "DELETE_REQUESTED"
PLSDeleteInProgress -> "DELETE_IN_PROGRESS"
instance FromJSON ProjectLifecycleState where
parseJSON = parseJSONText "ProjectLifecycleState"
instance ToJSON ProjectLifecycleState where
toJSON = toJSONText
data Xgafv
= X1
| X2
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable Xgafv
instance FromHttpApiData Xgafv where
parseQueryParam = \case
"1" -> Right X1
"2" -> Right X2
x -> Left ("Unable to parse Xgafv from: " <> x)
instance ToHttpApiData Xgafv where
toQueryParam = \case
X1 -> "1"
X2 -> "2"
instance FromJSON Xgafv where
parseJSON = parseJSONText "Xgafv"
instance ToJSON Xgafv where
toJSON = toJSONText