@@ -905,6 +905,7 @@ instance ToJSON Settings where
905data IPMApping = IPMApping'
905data IPMApping = IPMApping'
906 { _imaIPAddress :: !(Maybe Text)
906 { _imaIPAddress :: !(Maybe Text)
907 , _imaTimeToRetire :: !(Maybe DateTime')
907 , _imaTimeToRetire :: !(Maybe DateTime')
908+ , _imaType :: !(Maybe Text)
908 } deriving (Eq,Show,Data,Typeable,Generic)
909 } deriving (Eq,Show,Data,Typeable,Generic)
910-- | Creates a value of 'IPMApping' with the minimum fields required to make a request.
911-- | Creates a value of 'IPMApping' with the minimum fields required to make a request.
@@ -914,12 +915,15 @@ data IPMApping = IPMApping'
914-- * 'imaIPAddress'
915-- * 'imaIPAddress'
916-- * 'imaTimeToRetire'
917-- * 'imaTimeToRetire'
918 :: IPMApping
921 :: IPMApping
919ipMApping =
922ipMApping =
920 IPMApping'
923 IPMApping'
921 { _imaIPAddress = Nothing
924 { _imaIPAddress = Nothing
922 , _imaTimeToRetire = Nothing
925 , _imaTimeToRetire = Nothing
926+ , _imaType = Nothing
925-- | The IP address assigned.
929-- | The IP address assigned.
@@ -936,19 +940,27 @@ imaTimeToRetire
936 (\ s a -> s{_imaTimeToRetire = a})
940 (\ s a -> s{_imaTimeToRetire = a})
937 . mapping _DateTime
941 . mapping _DateTime
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})
939instance FromJSON IPMApping where
949instance FromJSON IPMApping where
940 parseJSON
950 parseJSON
941 = withObject "IPMApping"
951 = withObject "IPMApping"
943 IPMApping' <$>
953 IPMApping' <$>
944− (o .:? "ipAddress") <*> (o .:? "timeToRetire"))
954+ (o .:? "ipAddress") <*> (o .:? "timeToRetire") <*>
946instance ToJSON IPMApping where
957instance ToJSON IPMApping where
947 toJSON IPMApping'{..}
958 toJSON IPMApping'{..}
949 (catMaybes
960 (catMaybes
950 [("ipAddress" .=) <$> _imaIPAddress,
961 [("ipAddress" .=) <$> _imaIPAddress,
951− ("timeToRetire" .=) <$> _imaTimeToRetire])
962+ ("timeToRetire" .=) <$> _imaTimeToRetire,
963+ ("type" .=) <$> _imaType])
953-- | A database resource inside a Cloud SQL instance.
965-- | A database resource inside a Cloud SQL instance.
@@ -2782,8 +2794,7 @@ tKind = lens _tKind (\ s a -> s{_tKind = a})
2782tTier :: Lens' Tier (Maybe Text)
2794tTier :: Lens' Tier (Maybe Text)
2783tTier = lens _tTier (\ s a -> s{_tTier = a})
2795tTier = lens _tTier (\ s a -> s{_tTier = a})
2785−-- | The applicable regions for this tier. Can be us-east1, europe-west1 or
2797+-- | The applicable regions for this tier.
2787tRegion :: Lens' Tier [Text]
2798tRegion :: Lens' Tier [Text]
2789 = lens _tRegion (\ s a -> s{_tRegion = a}) . _Default
2800 = lens _tRegion (\ s a -> s{_tRegion = a}) . _Default
@@ -3197,6 +3208,54 @@ instance ToJSON OperationError where
3197 [Just ("kind" .= _opeKind), ("code" .=) <$> _opeCode,
3208 [Just ("kind" .= _opeKind), ("code" .=) <$> _opeCode,
3198 ("message" .=) <$> _opeMessage])
3209 ("message" .=) <$> _opeMessage])
3211+-- | Database Instance truncate log context.
3213+-- /See:/ 'truncateLogContext' smart constructor.
3214+data TruncateLogContext = TruncateLogContext'
3215+ { _tlcKind :: !Text
3216+ , _tlcLogType :: !(Maybe Text)
3217+ } deriving (Eq,Show,Data,Typeable,Generic)
3219+-- | Creates a value of 'TruncateLogContext' with the minimum fields required to make a request.
3221+-- Use one of the following lenses to modify other fields as desired:
3227+ :: TruncateLogContext
3228+truncateLogContext =
3229+ TruncateLogContext'
3230+ { _tlcKind = "sql#truncateLogContext"
3231+ , _tlcLogType = Nothing
3234+-- | This is always sql#truncateLogContext.
3235+tlcKind :: Lens' TruncateLogContext Text
3236+tlcKind = lens _tlcKind (\ s a -> s{_tlcKind = a})
3238+-- | The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and
3239+-- MYSQL_SLOW_TABLE.
3240+tlcLogType :: Lens' TruncateLogContext (Maybe Text)
3242+ = lens _tlcLogType (\ s a -> s{_tlcLogType = a})
3244+instance FromJSON TruncateLogContext where
3246+ = withObject "TruncateLogContext"
3248+ TruncateLogContext' <$>
3249+ (o .:? "kind" .!= "sql#truncateLogContext") <*>
3252+instance ToJSON TruncateLogContext where
3253+ toJSON TruncateLogContext'{..}
3256+ [Just ("kind" .= _tlcKind),
3257+ ("logType" .=) <$> _tlcLogType])
3200-- | Database instance clone request.
3259-- | Database instance clone request.
3202-- /See:/ 'instancesCloneRequest' smart constructor.
3261-- /See:/ 'instancesCloneRequest' smart constructor.
@@ -3712,6 +3771,45 @@ instance ToJSON FlagsListResponse where
3712 [Just ("kind" .= _flrKind),
3771 [Just ("kind" .= _flrKind),
3713 ("items" .=) <$> _flrItems])
3772 ("items" .=) <$> _flrItems])
3774+-- | Instance truncate log request.
3776+-- /See:/ 'instancesTruncateLogRequest' smart constructor.
3777+newtype InstancesTruncateLogRequest = InstancesTruncateLogRequest'
3778+ { _itlrTruncateLogContext :: Maybe TruncateLogContext
3779+ } deriving (Eq,Show,Data,Typeable,Generic)
3781+-- | Creates a value of 'InstancesTruncateLogRequest' with the minimum fields required to make a request.
3783+-- Use one of the following lenses to modify other fields as desired:
3785+-- * 'itlrTruncateLogContext'
3786+instancesTruncateLogRequest
3787+ :: InstancesTruncateLogRequest
3788+instancesTruncateLogRequest =
3789+ InstancesTruncateLogRequest'
3790+ { _itlrTruncateLogContext = Nothing
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})
3799+instance FromJSON InstancesTruncateLogRequest where
3801+ = withObject "InstancesTruncateLogRequest"
3803+ InstancesTruncateLogRequest' <$>
3804+ (o .:? "truncateLogContext"))
3806+instance ToJSON InstancesTruncateLogRequest where
3807+ toJSON InstancesTruncateLogRequest'{..}
3810+ [("truncateLogContext" .=) <$>
3811+ _itlrTruncateLogContext])
3715-- | Options for exporting data as SQL statements.
3813-- | Options for exporting data as SQL statements.
3717-- /See:/ 'exportContextSQLExportOptions' smart constructor.
3815-- /See:/ 'exportContextSQLExportOptions' smart constructor.