{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMakerGeoSpatial.Types.Property
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMakerGeoSpatial.Types.Property where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMakerGeoSpatial.Types.EoCloudCoverInput
import Amazonka.SageMakerGeoSpatial.Types.LandsatCloudCoverLandInput
import Amazonka.SageMakerGeoSpatial.Types.PlatformInput
import Amazonka.SageMakerGeoSpatial.Types.ViewOffNadirInput
import Amazonka.SageMakerGeoSpatial.Types.ViewSunAzimuthInput
import Amazonka.SageMakerGeoSpatial.Types.ViewSunElevationInput

-- |
--
-- /See:/ 'newProperty' smart constructor.
data Property = Property'
  { Property -> Maybe EoCloudCoverInput
eoCloudCover :: Prelude.Maybe EoCloudCoverInput,
    Property -> Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand :: Prelude.Maybe LandsatCloudCoverLandInput,
    Property -> Maybe PlatformInput
platform :: Prelude.Maybe PlatformInput,
    Property -> Maybe ViewOffNadirInput
viewOffNadir :: Prelude.Maybe ViewOffNadirInput,
    Property -> Maybe ViewSunAzimuthInput
viewSunAzimuth :: Prelude.Maybe ViewSunAzimuthInput,
    Property -> Maybe ViewSunElevationInput
viewSunElevation :: Prelude.Maybe ViewSunElevationInput
  }
  deriving (Property -> Property -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Property -> Property -> Bool
$c/= :: Property -> Property -> Bool
== :: Property -> Property -> Bool
$c== :: Property -> Property -> Bool
Prelude.Eq, ReadPrec [Property]
ReadPrec Property
Int -> ReadS Property
ReadS [Property]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Property]
$creadListPrec :: ReadPrec [Property]
readPrec :: ReadPrec Property
$creadPrec :: ReadPrec Property
readList :: ReadS [Property]
$creadList :: ReadS [Property]
readsPrec :: Int -> ReadS Property
$creadsPrec :: Int -> ReadS Property
Prelude.Read, Int -> Property -> ShowS
[Property] -> ShowS
Property -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Property] -> ShowS
$cshowList :: [Property] -> ShowS
show :: Property -> String
$cshow :: Property -> String
showsPrec :: Int -> Property -> ShowS
$cshowsPrec :: Int -> Property -> ShowS
Prelude.Show, forall x. Rep Property x -> Property
forall x. Property -> Rep Property x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Property x -> Property
$cfrom :: forall x. Property -> Rep Property x
Prelude.Generic)

-- |
-- Create a value of 'Property' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'eoCloudCover', 'property_eoCloudCover' -
--
-- 'landsatCloudCoverLand', 'property_landsatCloudCoverLand' -
--
-- 'platform', 'property_platform' -
--
-- 'viewOffNadir', 'property_viewOffNadir' -
--
-- 'viewSunAzimuth', 'property_viewSunAzimuth' -
--
-- 'viewSunElevation', 'property_viewSunElevation' -
newProperty ::
  Property
newProperty :: Property
newProperty =
  Property'
    { $sel:eoCloudCover:Property' :: Maybe EoCloudCoverInput
eoCloudCover = forall a. Maybe a
Prelude.Nothing,
      $sel:landsatCloudCoverLand:Property' :: Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand = forall a. Maybe a
Prelude.Nothing,
      $sel:platform:Property' :: Maybe PlatformInput
platform = forall a. Maybe a
Prelude.Nothing,
      $sel:viewOffNadir:Property' :: Maybe ViewOffNadirInput
viewOffNadir = forall a. Maybe a
Prelude.Nothing,
      $sel:viewSunAzimuth:Property' :: Maybe ViewSunAzimuthInput
viewSunAzimuth = forall a. Maybe a
Prelude.Nothing,
      $sel:viewSunElevation:Property' :: Maybe ViewSunElevationInput
viewSunElevation = forall a. Maybe a
Prelude.Nothing
    }

property_eoCloudCover :: Lens.Lens' Property (Prelude.Maybe EoCloudCoverInput)
property_eoCloudCover :: Lens' Property (Maybe EoCloudCoverInput)
property_eoCloudCover = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Property' {Maybe EoCloudCoverInput
eoCloudCover :: Maybe EoCloudCoverInput
$sel:eoCloudCover:Property' :: Property -> Maybe EoCloudCoverInput
eoCloudCover} -> Maybe EoCloudCoverInput
eoCloudCover) (\s :: Property
s@Property' {} Maybe EoCloudCoverInput
a -> Property
s {$sel:eoCloudCover:Property' :: Maybe EoCloudCoverInput
eoCloudCover = Maybe EoCloudCoverInput
a} :: Property)

property_landsatCloudCoverLand :: Lens.Lens' Property (Prelude.Maybe LandsatCloudCoverLandInput)
property_landsatCloudCoverLand :: Lens' Property (Maybe LandsatCloudCoverLandInput)
property_landsatCloudCoverLand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Property' {Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand :: Maybe LandsatCloudCoverLandInput
$sel:landsatCloudCoverLand:Property' :: Property -> Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand} -> Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand) (\s :: Property
s@Property' {} Maybe LandsatCloudCoverLandInput
a -> Property
s {$sel:landsatCloudCoverLand:Property' :: Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand = Maybe LandsatCloudCoverLandInput
a} :: Property)

property_platform :: Lens.Lens' Property (Prelude.Maybe PlatformInput)
property_platform :: Lens' Property (Maybe PlatformInput)
property_platform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Property' {Maybe PlatformInput
platform :: Maybe PlatformInput
$sel:platform:Property' :: Property -> Maybe PlatformInput
platform} -> Maybe PlatformInput
platform) (\s :: Property
s@Property' {} Maybe PlatformInput
a -> Property
s {$sel:platform:Property' :: Maybe PlatformInput
platform = Maybe PlatformInput
a} :: Property)

property_viewOffNadir :: Lens.Lens' Property (Prelude.Maybe ViewOffNadirInput)
property_viewOffNadir :: Lens' Property (Maybe ViewOffNadirInput)
property_viewOffNadir = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Property' {Maybe ViewOffNadirInput
viewOffNadir :: Maybe ViewOffNadirInput
$sel:viewOffNadir:Property' :: Property -> Maybe ViewOffNadirInput
viewOffNadir} -> Maybe ViewOffNadirInput
viewOffNadir) (\s :: Property
s@Property' {} Maybe ViewOffNadirInput
a -> Property
s {$sel:viewOffNadir:Property' :: Maybe ViewOffNadirInput
viewOffNadir = Maybe ViewOffNadirInput
a} :: Property)

property_viewSunAzimuth :: Lens.Lens' Property (Prelude.Maybe ViewSunAzimuthInput)
property_viewSunAzimuth :: Lens' Property (Maybe ViewSunAzimuthInput)
property_viewSunAzimuth = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Property' {Maybe ViewSunAzimuthInput
viewSunAzimuth :: Maybe ViewSunAzimuthInput
$sel:viewSunAzimuth:Property' :: Property -> Maybe ViewSunAzimuthInput
viewSunAzimuth} -> Maybe ViewSunAzimuthInput
viewSunAzimuth) (\s :: Property
s@Property' {} Maybe ViewSunAzimuthInput
a -> Property
s {$sel:viewSunAzimuth:Property' :: Maybe ViewSunAzimuthInput
viewSunAzimuth = Maybe ViewSunAzimuthInput
a} :: Property)

property_viewSunElevation :: Lens.Lens' Property (Prelude.Maybe ViewSunElevationInput)
property_viewSunElevation :: Lens' Property (Maybe ViewSunElevationInput)
property_viewSunElevation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Property' {Maybe ViewSunElevationInput
viewSunElevation :: Maybe ViewSunElevationInput
$sel:viewSunElevation:Property' :: Property -> Maybe ViewSunElevationInput
viewSunElevation} -> Maybe ViewSunElevationInput
viewSunElevation) (\s :: Property
s@Property' {} Maybe ViewSunElevationInput
a -> Property
s {$sel:viewSunElevation:Property' :: Maybe ViewSunElevationInput
viewSunElevation = Maybe ViewSunElevationInput
a} :: Property)

instance Data.FromJSON Property where
  parseJSON :: Value -> Parser Property
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Property"
      ( \Object
x ->
          Maybe EoCloudCoverInput
-> Maybe LandsatCloudCoverLandInput
-> Maybe PlatformInput
-> Maybe ViewOffNadirInput
-> Maybe ViewSunAzimuthInput
-> Maybe ViewSunElevationInput
-> Property
Property'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EoCloudCover")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LandsatCloudCoverLand")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Platform")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ViewOffNadir")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ViewSunAzimuth")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ViewSunElevation")
      )

instance Prelude.Hashable Property where
  hashWithSalt :: Int -> Property -> Int
hashWithSalt Int
_salt Property' {Maybe EoCloudCoverInput
Maybe LandsatCloudCoverLandInput
Maybe PlatformInput
Maybe ViewOffNadirInput
Maybe ViewSunAzimuthInput
Maybe ViewSunElevationInput
viewSunElevation :: Maybe ViewSunElevationInput
viewSunAzimuth :: Maybe ViewSunAzimuthInput
viewOffNadir :: Maybe ViewOffNadirInput
platform :: Maybe PlatformInput
landsatCloudCoverLand :: Maybe LandsatCloudCoverLandInput
eoCloudCover :: Maybe EoCloudCoverInput
$sel:viewSunElevation:Property' :: Property -> Maybe ViewSunElevationInput
$sel:viewSunAzimuth:Property' :: Property -> Maybe ViewSunAzimuthInput
$sel:viewOffNadir:Property' :: Property -> Maybe ViewOffNadirInput
$sel:platform:Property' :: Property -> Maybe PlatformInput
$sel:landsatCloudCoverLand:Property' :: Property -> Maybe LandsatCloudCoverLandInput
$sel:eoCloudCover:Property' :: Property -> Maybe EoCloudCoverInput
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EoCloudCoverInput
eoCloudCover
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PlatformInput
platform
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ViewOffNadirInput
viewOffNadir
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ViewSunAzimuthInput
viewSunAzimuth
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ViewSunElevationInput
viewSunElevation

instance Prelude.NFData Property where
  rnf :: Property -> ()
rnf Property' {Maybe EoCloudCoverInput
Maybe LandsatCloudCoverLandInput
Maybe PlatformInput
Maybe ViewOffNadirInput
Maybe ViewSunAzimuthInput
Maybe ViewSunElevationInput
viewSunElevation :: Maybe ViewSunElevationInput
viewSunAzimuth :: Maybe ViewSunAzimuthInput
viewOffNadir :: Maybe ViewOffNadirInput
platform :: Maybe PlatformInput
landsatCloudCoverLand :: Maybe LandsatCloudCoverLandInput
eoCloudCover :: Maybe EoCloudCoverInput
$sel:viewSunElevation:Property' :: Property -> Maybe ViewSunElevationInput
$sel:viewSunAzimuth:Property' :: Property -> Maybe ViewSunAzimuthInput
$sel:viewOffNadir:Property' :: Property -> Maybe ViewOffNadirInput
$sel:platform:Property' :: Property -> Maybe PlatformInput
$sel:landsatCloudCoverLand:Property' :: Property -> Maybe LandsatCloudCoverLandInput
$sel:eoCloudCover:Property' :: Property -> Maybe EoCloudCoverInput
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe EoCloudCoverInput
eoCloudCover
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PlatformInput
platform
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ViewOffNadirInput
viewOffNadir
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ViewSunAzimuthInput
viewSunAzimuth
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ViewSunElevationInput
viewSunElevation

instance Data.ToJSON Property where
  toJSON :: Property -> Value
toJSON Property' {Maybe EoCloudCoverInput
Maybe LandsatCloudCoverLandInput
Maybe PlatformInput
Maybe ViewOffNadirInput
Maybe ViewSunAzimuthInput
Maybe ViewSunElevationInput
viewSunElevation :: Maybe ViewSunElevationInput
viewSunAzimuth :: Maybe ViewSunAzimuthInput
viewOffNadir :: Maybe ViewOffNadirInput
platform :: Maybe PlatformInput
landsatCloudCoverLand :: Maybe LandsatCloudCoverLandInput
eoCloudCover :: Maybe EoCloudCoverInput
$sel:viewSunElevation:Property' :: Property -> Maybe ViewSunElevationInput
$sel:viewSunAzimuth:Property' :: Property -> Maybe ViewSunAzimuthInput
$sel:viewOffNadir:Property' :: Property -> Maybe ViewOffNadirInput
$sel:platform:Property' :: Property -> Maybe PlatformInput
$sel:landsatCloudCoverLand:Property' :: Property -> Maybe LandsatCloudCoverLandInput
$sel:eoCloudCover:Property' :: Property -> Maybe EoCloudCoverInput
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"EoCloudCover" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EoCloudCoverInput
eoCloudCover,
            (Key
"LandsatCloudCoverLand" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LandsatCloudCoverLandInput
landsatCloudCoverLand,
            (Key
"Platform" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PlatformInput
platform,
            (Key
"ViewOffNadir" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ViewOffNadirInput
viewOffNadir,
            (Key
"ViewSunAzimuth" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ViewSunAzimuthInput
viewSunAzimuth,
            (Key
"ViewSunElevation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ViewSunElevationInput
viewSunElevation
          ]
      )