@@ -905,6 +905,7 @@ instance ToJSON Settings where
905905data IPMApping = IPMApping'
906906 { _imaIPAddress :: !(Maybe Text)
907907 , _imaTimeToRetire :: !(Maybe DateTime')
908+ , _imaType :: !(Maybe Text)
908909 } deriving (Eq,Show,Data,Typeable,Generic)
909910
910911-- | Creates a value of 'IPMApping' with the minimum fields required to make a request.
@@ -914,12 +915,15 @@ data IPMApping = IPMApping'
914915-- * 'imaIPAddress'
915916--
916917-- * 'imaTimeToRetire'
918+--
919+-- * 'imaType'
917920ipMApping
918921 :: IPMApping
919922ipMApping =
920923 IPMApping'
921924 { _imaIPAddress = Nothing
922925 , _imaTimeToRetire = Nothing
926+ , _imaType = Nothing
923927 }
924928
925929-- | The IP address assigned.
@@ -936,19 +940,27 @@ imaTimeToRetire
936940 (\ s a -> s{_imaTimeToRetire = a})
937941 . mapping _DateTime
938942
943+-- | The type of this IP address. A PRIMARY address is an address that can
944+-- accept incoming connections. An OUTGOING address is the source address
945+-- of connections originating from the instance, if supported.
946+imaType :: Lens' IPMApping (Maybe Text)
947+imaType = lens _imaType (\ s a -> s{_imaType = a})
948+
939949instance FromJSON IPMApping where
940950 parseJSON
941951 = withObject "IPMApping"
942952 (\ o ->
943953 IPMApping' <$>
944− (o .:? "ipAddress") <*> (o .:? "timeToRetire"))
954+ (o .:? "ipAddress") <*> (o .:? "timeToRetire") <*>
955+ (o .:? "type"))
945956
946957instance ToJSON IPMApping where
947958 toJSON IPMApping'{..}
948959 = object
949960 (catMaybes
950961 [("ipAddress" .=) <$> _imaIPAddress,
951− ("timeToRetire" .=) <$> _imaTimeToRetire])
962+ ("timeToRetire" .=) <$> _imaTimeToRetire,
963+ ("type" .=) <$> _imaType])
952964
953965-- | A database resource inside a Cloud SQL instance.
954966--
@@ -2782,8 +2794,7 @@ tKind = lens _tKind (\ s a -> s{_tKind = a})
27822794tTier :: Lens' Tier (Maybe Text)
27832795tTier = lens _tTier (\ s a -> s{_tTier = a})
27842796
2785−-- | The applicable regions for this tier. Can be us-east1, europe-west1 or
2786−-- asia-east1.
2797+-- | The applicable regions for this tier.
27872798tRegion :: Lens' Tier [Text]
27882799tRegion
27892800 = lens _tRegion (\ s a -> s{_tRegion = a}) . _Default
@@ -3197,6 +3208,54 @@ instance ToJSON OperationError where
31973208 [Just ("kind" .= _opeKind), ("code" .=) <$> _opeCode,
31983209 ("message" .=) <$> _opeMessage])
31993210
3211+-- | Database Instance truncate log context.
3212+--
3213+-- /See:/ 'truncateLogContext' smart constructor.
3214+data TruncateLogContext = TruncateLogContext'
3215+ { _tlcKind :: !Text
3216+ , _tlcLogType :: !(Maybe Text)
3217+ } deriving (Eq,Show,Data,Typeable,Generic)
3218+
3219+-- | Creates a value of 'TruncateLogContext' with the minimum fields required to make a request.
3220+--
3221+-- Use one of the following lenses to modify other fields as desired:
3222+--
3223+-- * 'tlcKind'
3224+--
3225+-- * 'tlcLogType'
3226+truncateLogContext
3227+ :: TruncateLogContext
3228+truncateLogContext =
3229+ TruncateLogContext'
3230+ { _tlcKind = "sql#truncateLogContext"
3231+ , _tlcLogType = Nothing
3232+ }
3233+
3234+-- | This is always sql#truncateLogContext.
3235+tlcKind :: Lens' TruncateLogContext Text
3236+tlcKind = lens _tlcKind (\ s a -> s{_tlcKind = a})
3237+
3238+-- | The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and
3239+-- MYSQL_SLOW_TABLE.
3240+tlcLogType :: Lens' TruncateLogContext (Maybe Text)
3241+tlcLogType
3242+ = lens _tlcLogType (\ s a -> s{_tlcLogType = a})
3243+
3244+instance FromJSON TruncateLogContext where
3245+ parseJSON
3246+ = withObject "TruncateLogContext"
3247+ (\ o ->
3248+ TruncateLogContext' <$>
3249+ (o .:? "kind" .!= "sql#truncateLogContext") <*>
3250+ (o .:? "logType"))
3251+
3252+instance ToJSON TruncateLogContext where
3253+ toJSON TruncateLogContext'{..}
3254+ = object
3255+ (catMaybes
3256+ [Just ("kind" .= _tlcKind),
3257+ ("logType" .=) <$> _tlcLogType])
3258+
32003259-- | Database instance clone request.
32013260--
32023261-- /See:/ 'instancesCloneRequest' smart constructor.
@@ -3712,6 +3771,45 @@ instance ToJSON FlagsListResponse where
37123771 [Just ("kind" .= _flrKind),
37133772 ("items" .=) <$> _flrItems])
37143773
3774+-- | Instance truncate log request.
3775+--
3776+-- /See:/ 'instancesTruncateLogRequest' smart constructor.
3777+newtype InstancesTruncateLogRequest = InstancesTruncateLogRequest'
3778+ { _itlrTruncateLogContext :: Maybe TruncateLogContext
3779+ } deriving (Eq,Show,Data,Typeable,Generic)
3780+
3781+-- | Creates a value of 'InstancesTruncateLogRequest' with the minimum fields required to make a request.
3782+--
3783+-- Use one of the following lenses to modify other fields as desired:
3784+--
3785+-- * 'itlrTruncateLogContext'
3786+instancesTruncateLogRequest
3787+ :: InstancesTruncateLogRequest
3788+instancesTruncateLogRequest =
3789+ InstancesTruncateLogRequest'
3790+ { _itlrTruncateLogContext = Nothing
3791+ }
3792+
3793+-- | Contains details about the truncate log operation.
3794+itlrTruncateLogContext :: Lens' InstancesTruncateLogRequest (Maybe TruncateLogContext)
3795+itlrTruncateLogContext
3796+ = lens _itlrTruncateLogContext
3797+ (\ s a -> s{_itlrTruncateLogContext = a})
3798+
3799+instance FromJSON InstancesTruncateLogRequest where
3800+ parseJSON
3801+ = withObject "InstancesTruncateLogRequest"
3802+ (\ o ->
3803+ InstancesTruncateLogRequest' <$>
3804+ (o .:? "truncateLogContext"))
3805+
3806+instance ToJSON InstancesTruncateLogRequest where
3807+ toJSON InstancesTruncateLogRequest'{..}
3808+ = object
3809+ (catMaybes
3810+ [("truncateLogContext" .=) <$>
3811+ _itlrTruncateLogContext])
3812+
37153813-- | Options for exporting data as SQL statements.
37163814--
37173815-- /See:/ 'exportContextSQLExportOptions' smart constructor.