diff options
36 files changed, 7667 insertions, 1033 deletions
diff --git a/gen/Network/Google/Dataflow.hs b/gen/Network/Google/Dataflow.hs index cb6e863..5ff4456 100644 --- a/gen/Network/Google/Dataflow.hs +++ b/gen/Network/Google/Dataflow.hs @@ -15,21 +15,26 @@ -- -- Manages Google Cloud Dataflow projects on Google Cloud Platform. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> module Network.Google.Dataflow ( -- * Service Configuration dataflowService -- * OAuth Scopes + , computeScope , userInfoEmailScope , cloudPlatformScope + , computeReadOnlyScope -- * API Declaration , DataflowAPI -- * Resources + -- ** dataflow.projects.jobs.aggregated + , module Network.Google.Resource.Dataflow.Projects.Jobs.Aggregated + -- ** dataflow.projects.jobs.create , module Network.Google.Resource.Dataflow.Projects.Jobs.Create @@ -51,6 +56,9 @@ module Network.Google.Dataflow -- ** dataflow.projects.jobs.messages.list , module Network.Google.Resource.Dataflow.Projects.Jobs.Messages.List + -- ** dataflow.projects.jobs.snapshot + , module Network.Google.Resource.Dataflow.Projects.Jobs.Snapshot + -- ** dataflow.projects.jobs.update , module Network.Google.Resource.Dataflow.Projects.Jobs.Update @@ -63,6 +71,12 @@ module Network.Google.Dataflow -- ** dataflow.projects.locations.jobs.create , module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Create + -- ** dataflow.projects.locations.jobs.debug.getConfig + , module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.GetConfig + + -- ** dataflow.projects.locations.jobs.debug.sendCapture + , module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.SendCapture + -- ** dataflow.projects.locations.jobs.get , module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Get @@ -75,6 +89,9 @@ module Network.Google.Dataflow -- ** dataflow.projects.locations.jobs.messages.list , module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Messages.List + -- ** dataflow.projects.locations.jobs.snapshot + , module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Snapshot + -- ** dataflow.projects.locations.jobs.update , module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Update @@ -84,14 +101,35 @@ module Network.Google.Dataflow -- ** dataflow.projects.locations.jobs.workItems.reportStatus , module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.ReportStatus + -- ** dataflow.projects.locations.templates.create + , module Network.Google.Resource.Dataflow.Projects.Locations.Templates.Create + + -- ** dataflow.projects.locations.templates.get + , module Network.Google.Resource.Dataflow.Projects.Locations.Templates.Get + + -- ** dataflow.projects.locations.templates.launch + , module Network.Google.Resource.Dataflow.Projects.Locations.Templates.Launch + + -- ** dataflow.projects.locations.workerMessages + , module Network.Google.Resource.Dataflow.Projects.Locations.WorkerMessages + -- ** dataflow.projects.templates.create , module Network.Google.Resource.Dataflow.Projects.Templates.Create + -- ** dataflow.projects.templates.get + , module Network.Google.Resource.Dataflow.Projects.Templates.Get + + -- ** dataflow.projects.templates.launch + , module Network.Google.Resource.Dataflow.Projects.Templates.Launch + -- ** dataflow.projects.workerMessages , module Network.Google.Resource.Dataflow.Projects.WorkerMessages -- * Types + -- ** NameAndKindKind + , NameAndKindKind (..) + -- ** JobExecutionInfoStages , JobExecutionInfoStages , jobExecutionInfoStages @@ -101,7 +139,6 @@ module Network.Google.Dataflow , ComputationTopology , computationTopology , ctStateFamilies - , ctUserStageName , ctInputs , ctKeyRanges , ctOutputs @@ -115,14 +152,19 @@ module Network.Google.Dataflow , ssrShards , ssrOutcome - -- ** ResourceUtilizationReportMetricsItem - , ResourceUtilizationReportMetricsItem - , resourceUtilizationReportMetricsItem - , rurmiAddtional + -- ** ParameterMetadata + , ParameterMetadata + , parameterMetadata + , pmHelpText + , pmIsOptional + , pmName + , pmRegexes + , pmLabel -- ** CreateJobFromTemplateRequest , CreateJobFromTemplateRequest , createJobFromTemplateRequest + , cjftrLocation , cjftrEnvironment , cjftrJobName , cjftrGcsPath @@ -173,6 +215,15 @@ module Network.Google.Dataflow , whrPods , whrVMStartupTime + -- ** Snapshot + , Snapshot + , snapshot + , sCreationTime + , sTtl + , sSourceJobId + , sId + , sProjectId + -- ** SourceSplitOptions , SourceSplitOptions , sourceSplitOptions @@ -205,6 +256,19 @@ module Network.Google.Dataflow , ioOriginalName , ioOnlyCountKeyBytes + -- ** IntegerGauge + , IntegerGauge + , integerGauge + , igValue + , igTimestamp + + -- ** LaunchTemplateParameters + , LaunchTemplateParameters + , launchTemplateParameters + , ltpEnvironment + , ltpJobName + , ltpParameters + -- ** ReportWorkItemStatusRequest , ReportWorkItemStatusRequest , reportWorkItemStatusRequest @@ -213,11 +277,20 @@ module Network.Google.Dataflow , rwisrWorkItemStatuses , rwisrWorkerId + -- ** JobType + , JobType (..) + -- ** EnvironmentVersion , EnvironmentVersion , environmentVersion , evAddtional + -- ** StreamingApplianceSnapshotConfig + , StreamingApplianceSnapshotConfig + , streamingApplianceSnapshotConfig + , sascImportStateEndpoint + , sascSnapshotId + -- ** Sink , Sink , sink @@ -234,10 +307,33 @@ module Network.Google.Dataflow , workerHealthReportResponse , whrrReportInterval + -- ** DisplayData + , DisplayData + , displayData + , ddDurationValue + , ddBoolValue + , ddTimestampValue + , ddURL + , ddNamespace + , ddJavaClassValue + , ddShortStrValue + , ddKey + , ddInt64Value + , ddFloatValue + , ddStrValue + , ddLabel + -- ** SendDebugCaptureResponse , SendDebugCaptureResponse , sendDebugCaptureResponse + -- ** StructuredMessage + , StructuredMessage + , structuredMessage + , smMessageText + , smMessageKey + , smParameters + -- ** JobLabels , JobLabels , jobLabels @@ -250,18 +346,53 @@ module Network.Google.Dataflow , msnContext , msnName + -- ** BigQueryIODetails + , BigQueryIODetails + , bigQueryIODetails + , bqiodDataSet + , bqiodQuery + , bqiodProjectId + , bqiodTable + + -- ** FileIODetails + , FileIODetails + , fileIODetails + , fiodFilePattern + + -- ** WorkerPoolTeardownPolicy + , WorkerPoolTeardownPolicy (..) + -- ** CounterStructuredName , CounterStructuredName , counterStructuredName - , csnStandardOrigin + , csnOrigin + , csnOriginNamespace , csnComponentStepName - , csnOtherOrigin , csnPortion , csnOriginalStepName , csnName , csnExecutionStepName + , csnOriginalRequestingStepName + , csnInputIndex , csnWorkerId + -- ** JobMetadata + , JobMetadata + , jobMetadata + , jmSpannerDetails + , jmBigTableDetails + , jmSdkVersion + , jmPubsubDetails + , jmFileDetails + , jmBigQueryDetails + , jmDatastoreDetails + + -- ** GetTemplateResponse + , GetTemplateResponse + , getTemplateResponse + , gtrStatus + , gtrMetadata + -- ** WriteInstruction , WriteInstruction , writeInstruction @@ -286,8 +417,10 @@ module Network.Google.Dataflow , muMeanSum , muInternal , muSet + , muDistribution , muCumulative , muKind + , muGauge , muUpdateTime , muMeanCount , muName @@ -298,6 +431,13 @@ module Network.Google.Dataflow , sourceGetMetadataResponse , sgmrMetadata + -- ** TemplateMetadata + , TemplateMetadata + , templateMetadata + , tmName + , tmParameters + , tmDescription + -- ** Environment , Environment , environment @@ -332,6 +472,7 @@ module Network.Google.Dataflow , cuInternal , cuStringList , cuShortId + , cuIntegerGauge , cuDistribution , cuCumulative , cuStructuredNameAndMetadata @@ -346,6 +487,9 @@ module Network.Google.Dataflow , streamingStageLocation , sslStreamId + -- ** AutoscalingSettingsAlgorithm + , AutoscalingSettingsAlgorithm (..) + -- ** DerivedSource , DerivedSource , derivedSource @@ -358,9 +502,13 @@ module Network.Google.Dataflow , jmMetrics , jmMetricTime + -- ** TransformSummaryKind + , TransformSummaryKind (..) + -- ** SendDebugCaptureRequest , SendDebugCaptureRequest , sendDebugCaptureRequest + , sdcrLocation , sdcrData , sdcrComponentId , sdcrWorkerId @@ -370,6 +518,7 @@ module Network.Google.Dataflow , workItemStatus , wisReportedProgress , wisProgress + , wisTotalThrottlerWaitTimeSeconds , wisSourceOperationResponse , wisStopPosition , wisDynamicSourceSplit @@ -398,6 +547,16 @@ module Network.Google.Dataflow , wmcParameters , wmcCode + -- ** TransformSummary + , TransformSummary + , transformSummary + , tsDisplayData + , tsKind + , tsOutputCollectionName + , tsInputCollectionName + , tsName + , tsId + -- ** JobTransformNameMApping , JobTransformNameMApping , jobTransformNameMApping @@ -462,6 +621,13 @@ module Network.Google.Dataflow , fpmCount , fpmSum + -- ** CPUTime + , CPUTime + , cpuTime + , ctTotalMs + , ctRate + , ctTimestamp + -- ** LeaseWorkItemRequest , LeaseWorkItemRequest , leaseWorkItemRequest @@ -478,6 +644,9 @@ module Network.Google.Dataflow , sorSplit , sorGetMetadata + -- ** CounterStructuredNamePortion + , CounterStructuredNamePortion (..) + -- ** TopologyConfigUserStageToComputationNameMap , TopologyConfigUserStageToComputationNameMap , topologyConfigUserStageToComputationNameMap @@ -489,6 +658,15 @@ module Network.Google.Dataflow , stCommand , stExitCode + -- ** JobMessageMessageImportance + , JobMessageMessageImportance (..) + + -- ** DatastoreIODetails + , DatastoreIODetails + , datastoreIODetails + , diodNamespace + , diodProjectId + -- ** StatusDetailsItem , StatusDetailsItem , statusDetailsItem @@ -518,6 +696,7 @@ module Network.Google.Dataflow , ApproximateSplitRequest , approximateSplitRequest , asrFractionConsumed + , asrFractionOfRemainder , asrPosition -- ** SplitInt64 @@ -541,6 +720,13 @@ module Network.Google.Dataflow , getDebugConfigResponse , gdcrConfig + -- ** SdkVersion + , SdkVersion + , sdkVersion + , svSdkSupportStatus + , svVersionDisplayName + , svVersion + -- ** WorkItemServiceStateHarnessData , WorkItemServiceStateHarnessData , workItemServiceStateHarnessData @@ -555,24 +741,35 @@ module Network.Google.Dataflow -- ** ResourceUtilizationReport , ResourceUtilizationReport , resourceUtilizationReport - , rurMetrics + , rurCPUTime -- ** FailedLocation , FailedLocation , failedLocation , flName + -- ** SourceSplitResponseOutcome + , SourceSplitResponseOutcome (..) + -- ** WorkerMessageResponse , WorkerMessageResponse , workerMessageResponse , wmrWorkerHealthReportResponse , wmrWorkerMetricsResponse + , wmrWorkerShutdownNoticeResponse -- ** CreateJobFromTemplateRequestParameters , CreateJobFromTemplateRequestParameters , createJobFromTemplateRequestParameters , cjftrpAddtional + -- ** BigTableIODetails + , BigTableIODetails + , bigTableIODetails + , btiodInstanceId + , btiodProjectId + , btiodTableId + -- ** WorkItemServiceState , WorkItemServiceState , workItemServiceState @@ -585,6 +782,11 @@ module Network.Google.Dataflow , wissSplitRequest , wissMetricShortId + -- ** LaunchTemplateResponse + , LaunchTemplateResponse + , launchTemplateResponse + , ltrJob + -- ** StreamingSetupTask , StreamingSetupTask , streamingSetupTask @@ -592,6 +794,7 @@ module Network.Google.Dataflow , sstReceiveWorkPort , sstWorkerHarnessPort , sstDrain + , sstSnapshotConfig -- ** PartialGroupByKeyInstructionInputElementCodec , PartialGroupByKeyInstructionInputElementCodec @@ -602,6 +805,7 @@ module Network.Google.Dataflow , MapTask , mapTask , mtInstructions + , mtCounterPrefix , mtSystemName , mtStageName @@ -615,12 +819,21 @@ module Network.Google.Dataflow , sinkCodec , scAddtional + -- ** SourceSplitShardDerivationMode + , SourceSplitShardDerivationMode (..) + + -- ** WorkerPoolDefaultPackageSet + , WorkerPoolDefaultPackageSet (..) + -- ** IntegerMean , IntegerMean , integerMean , imCount , imSum + -- ** CounterMetadataKind + , CounterMetadataKind (..) + -- ** WorkerHealthReportPodsItem , WorkerHealthReportPodsItem , workerHealthReportPodsItem @@ -644,6 +857,11 @@ module Network.Google.Dataflow , slCustomSourceLocation , slPubsubLocation + -- ** WorkerLifecycleEventMetadata + , WorkerLifecycleEventMetadata + , workerLifecycleEventMetadata + , wlemAddtional + -- ** WorkerPoolPoolArgs , WorkerPoolPoolArgs , workerPoolPoolArgs @@ -652,9 +870,15 @@ module Network.Google.Dataflow -- ** RuntimeEnvironment , RuntimeEnvironment , runtimeEnvironment + , reNumWorkers + , reNetwork , reZone , reBypassTempDirValidation + , reSubnetwork + , reMachineType + , reAdditionalUserLabels , reServiceAccountEmail + , reAdditionalExperiments , reMaxWorkers , reTempLocation @@ -671,6 +895,9 @@ module Network.Google.Dataflow , sendWorkerMessagesResponse , swmrWorkerMessageResponses + -- ** JobCurrentState + , JobCurrentState (..) + -- ** StreamingSideInputLocation , StreamingSideInputLocation , streamingSideInputLocation @@ -680,6 +907,7 @@ module Network.Google.Dataflow -- ** GetDebugConfigRequest , GetDebugConfigRequest , getDebugConfigRequest + , gdcrLocation , gdcrComponentId , gdcrWorkerId @@ -689,6 +917,11 @@ module Network.Google.Dataflow , csnamName , csnamMetadata + -- ** WorkerShutdownNotice + , WorkerShutdownNotice + , workerShutdownNotice + , wsnReason + -- ** StreamingComputationTask , StreamingComputationTask , streamingComputationTask @@ -696,6 +929,13 @@ module Network.Google.Dataflow , sctDataDisks , sctComputationRanges + -- ** PipelineDescription + , PipelineDescription + , pipelineDescription + , pdExecutionPipelineStage + , pdDisplayData + , pdOriginalPipelineTransform + -- ** JobMessage , JobMessage , jobMessage @@ -704,17 +944,42 @@ module Network.Google.Dataflow , jmMessageImportance , jmId + -- ** WorkerLifecycleEvent + , WorkerLifecycleEvent + , workerLifecycleEvent + , wleEvent + , wleContainerStartTime + , wleMetadata + + -- ** RuntimeEnvironmentAdditionalUserLabels + , RuntimeEnvironmentAdditionalUserLabels + , runtimeEnvironmentAdditionalUserLabels + , reaulAddtional + + -- ** CounterMetadataStandardUnits + , CounterMetadataStandardUnits (..) + -- ** SeqMapTaskOutputInfo , SeqMapTaskOutputInfo , seqMapTaskOutputInfo , smtoiSink , smtoiTag + -- ** PubSubIODetails + , PubSubIODetails + , pubSubIODetails + , psiodTopic + , psiodSubscription + -- ** SourceGetMetadataRequest , SourceGetMetadataRequest , sourceGetMetadataRequest , sgmrSource + -- ** WorkerShutdownNoticeResponse + , WorkerShutdownNoticeResponse + , workerShutdownNoticeResponse + -- ** SeqMapTaskUserFn , SeqMapTaskUserFn , seqMapTaskUserFn @@ -728,14 +993,20 @@ module Network.Google.Dataflow -- ** Job , Job , job + , jStepsLocation + , jCreatedFromSnapshotId , jRequestedState + , jJobMetadata , jLocation + , jStartTime , jEnvironment , jClientRequestId + , jStageStates , jCurrentState , jReplacedByJobId , jTempFiles , jSteps + , jPipelineDescription , jExecutionInfo , jName , jTransformNameMApping @@ -747,6 +1018,9 @@ module Network.Google.Dataflow , jReplaceJobId , jCreateTime + -- ** AutoscalingEventEventType + , AutoscalingEventEventType (..) + -- ** ReadInstruction , ReadInstruction , readInstruction @@ -760,6 +1034,9 @@ module Network.Google.Dataflow , arpRemainingParallelism , arpPosition + -- ** DerivedSourceDerivationMode + , DerivedSourceDerivationMode (..) + -- ** SinkSpec , SinkSpec , sinkSpec @@ -797,12 +1074,36 @@ module Network.Google.Dataflow , sName , sProperties + -- ** ComponentSource + , ComponentSource + , componentSource + , csUserName + , csName + , csOriginalTransformOrCollection + + -- ** ExecutionStageSummaryKind + , ExecutionStageSummaryKind (..) + + -- ** Xgafv + , Xgafv (..) + -- ** Package , Package , package , pLocation , pName + -- ** ExecutionStageSummary + , ExecutionStageSummary + , executionStageSummary + , essOutputSource + , essKind + , essInputSource + , essName + , essComponentSource + , essId + , essComponentTransform + -- ** WorkerMessageCodeParameters , WorkerMessageCodeParameters , workerMessageCodeParameters @@ -814,6 +1115,12 @@ module Network.Google.Dataflow , dssResidual , dssPrimary + -- ** SnapshotJobRequest + , SnapshotJobRequest + , snapshotJobRequest + , sjrTtl + , sjrLocation + -- ** ReportWorkItemStatusResponse , ReportWorkItemStatusResponse , reportWorkItemStatusResponse @@ -844,6 +1151,11 @@ module Network.Google.Dataflow , ljrFailedLocation , ljrJobs + -- ** LaunchTemplateParametersParameters + , LaunchTemplateParametersParameters + , launchTemplateParametersParameters + , ltppAddtional + -- ** Source , Source , source @@ -867,17 +1179,28 @@ module Network.Google.Dataflow , wmTime , wmWorkerMessageCode , wmWorkerMetrics + , wmWorkerLifecycleEvent + , wmWorkerShutdownNotice , wmLabels -- ** KeyRangeLocation , KeyRangeLocation , keyRangeLocation - , krlPersistentDirectory , krlDataDisk + , krlDeprecatedPersistentDirectory , krlStart , krlDeliveryEndpoint , krlEnd + -- ** Histogram + , Histogram + , histogram + , hBucketCounts + , hFirstBucketOffSet + + -- ** JobRequestedState + , JobRequestedState (..) + -- ** MultiOutputInfo , MultiOutputInfo , multiOutputInfo @@ -893,6 +1216,12 @@ module Network.Google.Dataflow , pgbkiInputElementCodec , pgbkiOriginalCombineValuesInputStoreName + -- ** WorkerLifecycleEventEvent + , WorkerLifecycleEventEvent (..) + + -- ** ExecutionStageStateExecutionStageState + , ExecutionStageStateExecutionStageState (..) + -- ** ParDoInstruction , ParDoInstruction , parDoInstruction @@ -913,6 +1242,7 @@ module Network.Google.Dataflow , duMax , duCount , duMin + , duHistogram , duSumOfSquares , duSum @@ -944,6 +1274,8 @@ module Network.Google.Dataflow , streamingConfigTask , sctUserStepToStateFamilyNameMap , sctStreamingComputationConfigs + , sctWindmillServiceEndpoint + , sctWindmillServicePort -- ** MetricShortId , MetricShortId @@ -954,6 +1286,7 @@ module Network.Google.Dataflow -- ** SendWorkerMessagesRequest , SendWorkerMessagesRequest , sendWorkerMessagesRequest + , swmrLocation , swmrWorkerMessages -- ** SourceSplitShard @@ -969,6 +1302,16 @@ module Network.Google.Dataflow , siiKind , siiSources + -- ** ComponentTransform + , ComponentTransform + , componentTransform + , ctOriginalTransform + , ctUserName + , ctName + + -- ** WorkerPoolIPConfiguration + , WorkerPoolIPConfiguration (..) + -- ** JobExecutionInfo , JobExecutionInfo , jobExecutionInfo @@ -992,6 +1335,16 @@ module Network.Google.Dataflow , krddaStart , krddaEnd + -- ** AutoscalingEvent + , AutoscalingEvent + , autoscalingEvent + , aeCurrentNumWorkers + , aeTime + , aeEventType + , aeTargetNumWorkers + , aeWorkerPool + , aeDescription + -- ** SourceSplitRequest , SourceSplitRequest , sourceSplitRequest @@ -1003,6 +1356,7 @@ module Network.Google.Dataflow , listJobMessagesResponse , ljmrJobMessages , ljmrNextPageToken + , ljmrAutoscalingEvents -- ** PubsubLocation , PubsubLocation @@ -1020,6 +1374,9 @@ module Network.Google.Dataflow , floatingPointList , fplElements + -- ** CounterStructuredNameOrigin + , CounterStructuredNameOrigin (..) + -- ** InstructionInput , InstructionInput , instructionInput @@ -1036,16 +1393,48 @@ module Network.Google.Dataflow , smtStageName , smtUserFn + -- ** StreamingComputationTaskTaskType + , StreamingComputationTaskTaskType (..) + -- ** StreamingConfigTaskUserStepToStateFamilyNameMap , StreamingConfigTaskUserStepToStateFamilyNameMap , streamingConfigTaskUserStepToStateFamilyNameMap , sctustsfnmAddtional + -- ** ExecutionStageState + , ExecutionStageState + , executionStageState + , essExecutionStageName + , essCurrentStateTime + , essExecutionStageState + + -- ** StageSource + , StageSource + , stageSource + , ssSizeBytes + , ssUserName + , ssName + , ssOriginalTransformOrCollection + -- ** SourceOperationRequest , SourceOperationRequest , sourceOperationRequest - , sSplit - , sGetMetadata + , souSplit + , souGetMetadata + , souName + , souSystemName + , souStageName + , souOriginalName + + -- ** SdkVersionSdkSupportStatus + , SdkVersionSdkSupportStatus (..) + + -- ** SpannerIODetails + , SpannerIODetails + , spannerIODetails + , siodInstanceId + , siodDatabaseId + , siodProjectId -- ** LeaseWorkItemResponse , LeaseWorkItemResponse @@ -1061,10 +1450,17 @@ module Network.Google.Dataflow , pShufflePosition , pKey , pEnd + + -- ** Parameter + , Parameter + , parameter + , parValue + , parKey ) where import Network.Google.Dataflow.Types import Network.Google.Prelude +import Network.Google.Resource.Dataflow.Projects.Jobs.Aggregated import Network.Google.Resource.Dataflow.Projects.Jobs.Create import Network.Google.Resource.Dataflow.Projects.Jobs.Debug.GetConfig import Network.Google.Resource.Dataflow.Projects.Jobs.Debug.SendCapture @@ -1072,44 +1468,65 @@ import Network.Google.Resource.Dataflow.Projects.Jobs.Get import Network.Google.Resource.Dataflow.Projects.Jobs.GetMetrics import Network.Google.Resource.Dataflow.Projects.Jobs.List import Network.Google.Resource.Dataflow.Projects.Jobs.Messages.List +import Network.Google.Resource.Dataflow.Projects.Jobs.Snapshot import Network.Google.Resource.Dataflow.Projects.Jobs.Update import Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.Lease import Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.ReportStatus import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Create +import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.GetConfig +import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.SendCapture import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Get import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.GetMetrics import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.List import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Messages.List +import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Snapshot import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Update import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.Lease import Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.ReportStatus +import Network.Google.Resource.Dataflow.Projects.Locations.Templates.Create +import Network.Google.Resource.Dataflow.Projects.Locations.Templates.Get +import Network.Google.Resource.Dataflow.Projects.Locations.Templates.Launch +import Network.Google.Resource.Dataflow.Projects.Locations.WorkerMessages import Network.Google.Resource.Dataflow.Projects.Templates.Create +import Network.Google.Resource.Dataflow.Projects.Templates.Get +import Network.Google.Resource.Dataflow.Projects.Templates.Launch import Network.Google.Resource.Dataflow.Projects.WorkerMessages {- $resources TODO -} --- | Represents the entirety of the methods and resources available for the Google Dataflow API service. +-- | Represents the entirety of the methods and resources available for the Dataflow API service. type DataflowAPI = - ProjectsTemplatesCreateResource :<|> - ProjectsJobsDebugGetConfigResource + ProjectsTemplatesLaunchResource :<|> + ProjectsTemplatesGetResource + :<|> ProjectsTemplatesCreateResource + :<|> ProjectsJobsDebugGetConfigResource :<|> ProjectsJobsDebugSendCaptureResource :<|> ProjectsJobsWorkItemsLeaseResource :<|> ProjectsJobsWorkItemsReportStatusResource :<|> ProjectsJobsMessagesListResource + :<|> ProjectsJobsSnapshotResource :<|> ProjectsJobsListResource + :<|> ProjectsJobsAggregatedResource :<|> ProjectsJobsGetResource :<|> ProjectsJobsCreateResource :<|> ProjectsJobsUpdateResource :<|> ProjectsJobsGetMetricsResource + :<|> ProjectsLocationsTemplatesLaunchResource + :<|> ProjectsLocationsTemplatesGetResource + :<|> ProjectsLocationsTemplatesCreateResource + :<|> ProjectsLocationsJobsDebugGetConfigResource + :<|> ProjectsLocationsJobsDebugSendCaptureResource :<|> ProjectsLocationsJobsWorkItemsLeaseResource :<|> ProjectsLocationsJobsWorkItemsReportStatusResource :<|> ProjectsLocationsJobsMessagesListResource + :<|> ProjectsLocationsJobsSnapshotResource :<|> ProjectsLocationsJobsListResource :<|> ProjectsLocationsJobsGetResource :<|> ProjectsLocationsJobsCreateResource :<|> ProjectsLocationsJobsUpdateResource :<|> ProjectsLocationsJobsGetMetricsResource + :<|> ProjectsLocationsWorkerMessagesResource :<|> ProjectsWorkerMessagesResource diff --git a/gen/Network/Google/Dataflow/Types.hs b/gen/Network/Google/Dataflow/Types.hs index 223c23b..6157c34 100644 --- a/gen/Network/Google/Dataflow/Types.hs +++ b/gen/Network/Google/Dataflow/Types.hs @@ -20,8 +20,13 @@ module Network.Google.Dataflow.Types dataflowService -- * OAuth Scopes + , computeScope , userInfoEmailScope , cloudPlatformScope + , computeReadOnlyScope + + -- * NameAndKindKind + , NameAndKindKind (..) -- * JobExecutionInfoStages , JobExecutionInfoStages @@ -32,7 +37,6 @@ module Network.Google.Dataflow.Types , ComputationTopology , computationTopology , ctStateFamilies - , ctUserStageName , ctInputs , ctKeyRanges , ctOutputs @@ -46,14 +50,19 @@ module Network.Google.Dataflow.Types , ssrShards , ssrOutcome - -- * ResourceUtilizationReportMetricsItem - , ResourceUtilizationReportMetricsItem - , resourceUtilizationReportMetricsItem - , rurmiAddtional + -- * ParameterMetadata + , ParameterMetadata + , parameterMetadata + , pmHelpText + , pmIsOptional + , pmName + , pmRegexes + , pmLabel -- * CreateJobFromTemplateRequest , CreateJobFromTemplateRequest , createJobFromTemplateRequest + , cjftrLocation , cjftrEnvironment , cjftrJobName , cjftrGcsPath @@ -104,6 +113,15 @@ module Network.Google.Dataflow.Types , whrPods , whrVMStartupTime + -- * Snapshot + , Snapshot + , snapshot + , sCreationTime + , sTtl + , sSourceJobId + , sId + , sProjectId + -- * SourceSplitOptions , SourceSplitOptions , sourceSplitOptions @@ -136,6 +154,19 @@ module Network.Google.Dataflow.Types , ioOriginalName , ioOnlyCountKeyBytes + -- * IntegerGauge + , IntegerGauge + , integerGauge + , igValue + , igTimestamp + + -- * LaunchTemplateParameters + , LaunchTemplateParameters + , launchTemplateParameters + , ltpEnvironment + , ltpJobName + , ltpParameters + -- * ReportWorkItemStatusRequest , ReportWorkItemStatusRequest , reportWorkItemStatusRequest @@ -144,11 +175,20 @@ module Network.Google.Dataflow.Types , rwisrWorkItemStatuses , rwisrWorkerId + -- * JobType + , JobType (..) + -- * EnvironmentVersion , EnvironmentVersion , environmentVersion , evAddtional + -- * StreamingApplianceSnapshotConfig + , StreamingApplianceSnapshotConfig + , streamingApplianceSnapshotConfig + , sascImportStateEndpoint + , sascSnapshotId + -- * Sink , Sink , sink @@ -165,10 +205,33 @@ module Network.Google.Dataflow.Types , workerHealthReportResponse , whrrReportInterval + -- * DisplayData + , DisplayData + , displayData + , ddDurationValue + , ddBoolValue + , ddTimestampValue + , ddURL + , ddNamespace + , ddJavaClassValue + , ddShortStrValue + , ddKey + , ddInt64Value + , ddFloatValue + , ddStrValue + , ddLabel + -- * SendDebugCaptureResponse , SendDebugCaptureResponse , sendDebugCaptureResponse + -- * StructuredMessage + , StructuredMessage + , structuredMessage + , smMessageText + , smMessageKey + , smParameters + -- * JobLabels , JobLabels , jobLabels @@ -181,18 +244,53 @@ module Network.Google.Dataflow.Types , msnContext , msnName + -- * BigQueryIODetails + , BigQueryIODetails + , bigQueryIODetails + , bqiodDataSet + , bqiodQuery + , bqiodProjectId + , bqiodTable + + -- * FileIODetails + , FileIODetails + , fileIODetails + , fiodFilePattern + + -- * WorkerPoolTeardownPolicy + , WorkerPoolTeardownPolicy (..) + -- * CounterStructuredName , CounterStructuredName , counterStructuredName - , csnStandardOrigin + , csnOrigin + , csnOriginNamespace , csnComponentStepName - , csnOtherOrigin , csnPortion , csnOriginalStepName , csnName , csnExecutionStepName + , csnOriginalRequestingStepName + , csnInputIndex , csnWorkerId + -- * JobMetadata + , JobMetadata + , jobMetadata + , jmSpannerDetails + , jmBigTableDetails + , jmSdkVersion + , jmPubsubDetails + , jmFileDetails + , jmBigQueryDetails + , jmDatastoreDetails + + -- * GetTemplateResponse + , GetTemplateResponse + , getTemplateResponse + , gtrStatus + , gtrMetadata + -- * WriteInstruction , WriteInstruction , writeInstruction @@ -217,8 +315,10 @@ module Network.Google.Dataflow.Types , muMeanSum , muInternal , muSet + , muDistribution , muCumulative , muKind + , muGauge , muUpdateTime , muMeanCount , muName @@ -229,6 +329,13 @@ module Network.Google.Dataflow.Types , sourceGetMetadataResponse , sgmrMetadata + -- * TemplateMetadata + , TemplateMetadata + , templateMetadata + , tmName + , tmParameters + , tmDescription + -- * Environment , Environment , environment @@ -263,6 +370,7 @@ module Network.Google.Dataflow.Types , cuInternal , cuStringList , cuShortId + , cuIntegerGauge , cuDistribution , cuCumulative , cuStructuredNameAndMetadata @@ -277,6 +385,9 @@ module Network.Google.Dataflow.Types , streamingStageLocation , sslStreamId + -- * AutoscalingSettingsAlgorithm + , AutoscalingSettingsAlgorithm (..) + -- * DerivedSource , DerivedSource , derivedSource @@ -289,9 +400,13 @@ module Network.Google.Dataflow.Types , jmMetrics , jmMetricTime + -- * TransformSummaryKind + , TransformSummaryKind (..) + -- * SendDebugCaptureRequest , SendDebugCaptureRequest , sendDebugCaptureRequest + , sdcrLocation , sdcrData , sdcrComponentId , sdcrWorkerId @@ -301,6 +416,7 @@ module Network.Google.Dataflow.Types , workItemStatus , wisReportedProgress , wisProgress + , wisTotalThrottlerWaitTimeSeconds , wisSourceOperationResponse , wisStopPosition , wisDynamicSourceSplit @@ -329,6 +445,16 @@ module Network.Google.Dataflow.Types , wmcParameters , wmcCode + -- * TransformSummary + , TransformSummary + , transformSummary + , tsDisplayData + , tsKind + , tsOutputCollectionName + , tsInputCollectionName + , tsName + , tsId + -- * JobTransformNameMApping , JobTransformNameMApping , jobTransformNameMApping @@ -393,6 +519,13 @@ module Network.Google.Dataflow.Types , fpmCount , fpmSum + -- * CPUTime + , CPUTime + , cpuTime + , ctTotalMs + , ctRate + , ctTimestamp + -- * LeaseWorkItemRequest , LeaseWorkItemRequest , leaseWorkItemRequest @@ -409,6 +542,9 @@ module Network.Google.Dataflow.Types , sorSplit , sorGetMetadata + -- * CounterStructuredNamePortion + , CounterStructuredNamePortion (..) + -- * TopologyConfigUserStageToComputationNameMap , TopologyConfigUserStageToComputationNameMap , topologyConfigUserStageToComputationNameMap @@ -420,6 +556,15 @@ module Network.Google.Dataflow.Types , stCommand , stExitCode + -- * JobMessageMessageImportance + , JobMessageMessageImportance (..) + + -- * DatastoreIODetails + , DatastoreIODetails + , datastoreIODetails + , diodNamespace + , diodProjectId + -- * StatusDetailsItem , StatusDetailsItem , statusDetailsItem @@ -449,6 +594,7 @@ module Network.Google.Dataflow.Types , ApproximateSplitRequest , approximateSplitRequest , asrFractionConsumed + , asrFractionOfRemainder , asrPosition -- * SplitInt64 @@ -472,6 +618,13 @@ module Network.Google.Dataflow.Types , getDebugConfigResponse , gdcrConfig + -- * SdkVersion + , SdkVersion + , sdkVersion + , svSdkSupportStatus + , svVersionDisplayName + , svVersion + -- * WorkItemServiceStateHarnessData , WorkItemServiceStateHarnessData , workItemServiceStateHarnessData @@ -486,24 +639,35 @@ module Network.Google.Dataflow.Types -- * ResourceUtilizationReport , ResourceUtilizationReport , resourceUtilizationReport - , rurMetrics + , rurCPUTime -- * FailedLocation , FailedLocation , failedLocation , flName + -- * SourceSplitResponseOutcome + , SourceSplitResponseOutcome (..) + -- * WorkerMessageResponse , WorkerMessageResponse , workerMessageResponse , wmrWorkerHealthReportResponse , wmrWorkerMetricsResponse + , wmrWorkerShutdownNoticeResponse -- * CreateJobFromTemplateRequestParameters , CreateJobFromTemplateRequestParameters , createJobFromTemplateRequestParameters , cjftrpAddtional + -- * BigTableIODetails + , BigTableIODetails + , bigTableIODetails + , btiodInstanceId + , btiodProjectId + , btiodTableId + -- * WorkItemServiceState , WorkItemServiceState , workItemServiceState @@ -516,6 +680,11 @@ module Network.Google.Dataflow.Types , wissSplitRequest , wissMetricShortId + -- * LaunchTemplateResponse + , LaunchTemplateResponse + , launchTemplateResponse + , ltrJob + -- * StreamingSetupTask , StreamingSetupTask , streamingSetupTask @@ -523,6 +692,7 @@ module Network.Google.Dataflow.Types , sstReceiveWorkPort , sstWorkerHarnessPort , sstDrain + , sstSnapshotConfig -- * PartialGroupByKeyInstructionInputElementCodec , PartialGroupByKeyInstructionInputElementCodec @@ -533,6 +703,7 @@ module Network.Google.Dataflow.Types , MapTask , mapTask , mtInstructions + , mtCounterPrefix , mtSystemName , mtStageName @@ -546,12 +717,21 @@ module Network.Google.Dataflow.Types , sinkCodec , scAddtional + -- * SourceSplitShardDerivationMode + , SourceSplitShardDerivationMode (..) + + -- * WorkerPoolDefaultPackageSet + , WorkerPoolDefaultPackageSet (..) + -- * IntegerMean , IntegerMean , integerMean , imCount , imSum + -- * CounterMetadataKind + , CounterMetadataKind (..) + -- * WorkerHealthReportPodsItem , WorkerHealthReportPodsItem , workerHealthReportPodsItem @@ -575,6 +755,11 @@ module Network.Google.Dataflow.Types , slCustomSourceLocation , slPubsubLocation + -- * WorkerLifecycleEventMetadata + , WorkerLifecycleEventMetadata + , workerLifecycleEventMetadata + , wlemAddtional + -- * WorkerPoolPoolArgs , WorkerPoolPoolArgs , workerPoolPoolArgs @@ -583,9 +768,15 @@ module Network.Google.Dataflow.Types -- * RuntimeEnvironment , RuntimeEnvironment , runtimeEnvironment + , reNumWorkers + , reNetwork , reZone , reBypassTempDirValidation + , reSubnetwork + , reMachineType + , reAdditionalUserLabels , reServiceAccountEmail + , reAdditionalExperiments , reMaxWorkers , reTempLocation @@ -602,6 +793,9 @@ module Network.Google.Dataflow.Types , sendWorkerMessagesResponse , swmrWorkerMessageResponses + -- * JobCurrentState + , JobCurrentState (..) + -- * StreamingSideInputLocation , StreamingSideInputLocation , streamingSideInputLocation @@ -611,6 +805,7 @@ module Network.Google.Dataflow.Types -- * GetDebugConfigRequest , GetDebugConfigRequest , getDebugConfigRequest + , gdcrLocation , gdcrComponentId , gdcrWorkerId @@ -620,6 +815,11 @@ module Network.Google.Dataflow.Types , csnamName , csnamMetadata + -- * WorkerShutdownNotice + , WorkerShutdownNotice + , workerShutdownNotice + , wsnReason + -- * StreamingComputationTask , StreamingComputationTask , streamingComputationTask @@ -627,6 +827,13 @@ module Network.Google.Dataflow.Types , sctDataDisks , sctComputationRanges + -- * PipelineDescription + , PipelineDescription + , pipelineDescription + , pdExecutionPipelineStage + , pdDisplayData + , pdOriginalPipelineTransform + -- * JobMessage , JobMessage , jobMessage @@ -635,17 +842,42 @@ module Network.Google.Dataflow.Types , jmMessageImportance , jmId + -- * WorkerLifecycleEvent + , WorkerLifecycleEvent + , workerLifecycleEvent + , wleEvent + , wleContainerStartTime + , wleMetadata + + -- * RuntimeEnvironmentAdditionalUserLabels + , RuntimeEnvironmentAdditionalUserLabels + , runtimeEnvironmentAdditionalUserLabels + , reaulAddtional + + -- * CounterMetadataStandardUnits + , CounterMetadataStandardUnits (..) + -- * SeqMapTaskOutputInfo , SeqMapTaskOutputInfo , seqMapTaskOutputInfo , smtoiSink , smtoiTag + -- * PubSubIODetails + , PubSubIODetails + , pubSubIODetails + , psiodTopic + , psiodSubscription + -- * SourceGetMetadataRequest , SourceGetMetadataRequest , sourceGetMetadataRequest , sgmrSource + -- * WorkerShutdownNoticeResponse + , WorkerShutdownNoticeResponse + , workerShutdownNoticeResponse + -- * SeqMapTaskUserFn , SeqMapTaskUserFn , seqMapTaskUserFn @@ -659,14 +891,20 @@ module Network.Google.Dataflow.Types -- * Job , Job , job + , jStepsLocation + , jCreatedFromSnapshotId , jRequestedState + , jJobMetadata , jLocation + , jStartTime , jEnvironment , jClientRequestId + , jStageStates , jCurrentState , jReplacedByJobId , jTempFiles , jSteps + , jPipelineDescription , jExecutionInfo , jName , jTransformNameMApping @@ -678,6 +916,9 @@ module Network.Google.Dataflow.Types , jReplaceJobId , jCreateTime + -- * AutoscalingEventEventType + , AutoscalingEventEventType (..) + -- * ReadInstruction , ReadInstruction , readInstruction @@ -691,6 +932,9 @@ module Network.Google.Dataflow.Types , arpRemainingParallelism , arpPosition + -- * DerivedSourceDerivationMode + , DerivedSourceDerivationMode (..) + -- * SinkSpec , SinkSpec , sinkSpec @@ -728,12 +972,36 @@ module Network.Google.Dataflow.Types , sName , sProperties + -- * ComponentSource + , ComponentSource + , componentSource + , csUserName + , csName + , csOriginalTransformOrCollection + + -- * ExecutionStageSummaryKind + , ExecutionStageSummaryKind (..) + + -- * Xgafv + , Xgafv (..) + -- * Package , Package , package , pLocation , pName + -- * ExecutionStageSummary + , ExecutionStageSummary + , executionStageSummary + , essOutputSource + , essKind + , essInputSource + , essName + , essComponentSource + , essId + , essComponentTransform + -- * WorkerMessageCodeParameters , WorkerMessageCodeParameters , workerMessageCodeParameters @@ -745,6 +1013,12 @@ module Network.Google.Dataflow.Types , dssResidual , dssPrimary + -- * SnapshotJobRequest + , SnapshotJobRequest + , snapshotJobRequest + , sjrTtl + , sjrLocation + -- * ReportWorkItemStatusResponse , ReportWorkItemStatusResponse , reportWorkItemStatusResponse @@ -775,6 +1049,11 @@ module Network.Google.Dataflow.Types , ljrFailedLocation , ljrJobs + -- * LaunchTemplateParametersParameters + , LaunchTemplateParametersParameters + , launchTemplateParametersParameters + , ltppAddtional + -- * Source , Source , source @@ -798,17 +1077,28 @@ module Network.Google.Dataflow.Types , wmTime , wmWorkerMessageCode , wmWorkerMetrics + , wmWorkerLifecycleEvent + , wmWorkerShutdownNotice , wmLabels -- * KeyRangeLocation , KeyRangeLocation , keyRangeLocation - , krlPersistentDirectory , krlDataDisk + , krlDeprecatedPersistentDirectory , krlStart , krlDeliveryEndpoint , krlEnd + -- * Histogram + , Histogram + , histogram + , hBucketCounts + , hFirstBucketOffSet + + -- * JobRequestedState + , JobRequestedState (..) + -- * MultiOutputInfo , MultiOutputInfo , multiOutputInfo @@ -824,6 +1114,12 @@ module Network.Google.Dataflow.Types , pgbkiInputElementCodec , pgbkiOriginalCombineValuesInputStoreName + -- * WorkerLifecycleEventEvent + , WorkerLifecycleEventEvent (..) + + -- * ExecutionStageStateExecutionStageState + , ExecutionStageStateExecutionStageState (..) + -- * ParDoInstruction , ParDoInstruction , parDoInstruction @@ -844,6 +1140,7 @@ module Network.Google.Dataflow.Types , duMax , duCount , duMin + , duHistogram , duSumOfSquares , duSum @@ -875,6 +1172,8 @@ module Network.Google.Dataflow.Types , streamingConfigTask , sctUserStepToStateFamilyNameMap , sctStreamingComputationConfigs + , sctWindmillServiceEndpoint + , sctWindmillServicePort -- * MetricShortId , MetricShortId @@ -885,6 +1184,7 @@ module Network.Google.Dataflow.Types -- * SendWorkerMessagesRequest , SendWorkerMessagesRequest , sendWorkerMessagesRequest + , swmrLocation , swmrWorkerMessages -- * SourceSplitShard @@ -900,6 +1200,16 @@ module Network.Google.Dataflow.Types , siiKind , siiSources + -- * ComponentTransform + , ComponentTransform + , componentTransform + , ctOriginalTransform + , ctUserName + , ctName + + -- * WorkerPoolIPConfiguration + , WorkerPoolIPConfiguration (..) + -- * JobExecutionInfo , JobExecutionInfo , jobExecutionInfo @@ -923,6 +1233,16 @@ module Network.Google.Dataflow.Types , krddaStart , krddaEnd + -- * AutoscalingEvent + , AutoscalingEvent + , autoscalingEvent + , aeCurrentNumWorkers + , aeTime + , aeEventType + , aeTargetNumWorkers + , aeWorkerPool + , aeDescription + -- * SourceSplitRequest , SourceSplitRequest , sourceSplitRequest @@ -934,6 +1254,7 @@ module Network.Google.Dataflow.Types , listJobMessagesResponse , ljmrJobMessages , ljmrNextPageToken + , ljmrAutoscalingEvents -- * PubsubLocation , PubsubLocation @@ -951,6 +1272,9 @@ module Network.Google.Dataflow.Types , floatingPointList , fplElements + -- * CounterStructuredNameOrigin + , CounterStructuredNameOrigin (..) + -- * InstructionInput , InstructionInput , instructionInput @@ -967,16 +1291,48 @@ module Network.Google.Dataflow.Types , smtStageName , smtUserFn + -- * StreamingComputationTaskTaskType + , StreamingComputationTaskTaskType (..) + -- * StreamingConfigTaskUserStepToStateFamilyNameMap , StreamingConfigTaskUserStepToStateFamilyNameMap , streamingConfigTaskUserStepToStateFamilyNameMap , sctustsfnmAddtional + -- * ExecutionStageState + , ExecutionStageState + , executionStageState + , essExecutionStageName + , essCurrentStateTime + , essExecutionStageState + + -- * StageSource + , StageSource + , stageSource + , ssSizeBytes + , ssUserName + , ssName + , ssOriginalTransformOrCollection + -- * SourceOperationRequest , SourceOperationRequest , sourceOperationRequest - , sSplit - , sGetMetadata + , souSplit + , souGetMetadata + , souName + , souSystemName + , souStageName + , souOriginalName + + -- * SdkVersionSdkSupportStatus + , SdkVersionSdkSupportStatus (..) + + -- * SpannerIODetails + , SpannerIODetails + , spannerIODetails + , siodInstanceId + , siodDatabaseId + , siodProjectId -- * LeaseWorkItemResponse , LeaseWorkItemResponse @@ -992,18 +1348,28 @@ module Network.Google.Dataflow.Types , pShufflePosition , pKey , pEnd + + -- * Parameter + , Parameter + , parameter + , parValue + , parKey ) where import Network.Google.Dataflow.Types.Product import Network.Google.Dataflow.Types.Sum import Network.Google.Prelude --- | Default request referring to version 'v1b3' of the Google Dataflow API. This contains the host and root path used as a starting point for constructing service requests. +-- | Default request referring to version 'v1b3' of the Dataflow API. This contains the host and root path used as a starting point for constructing service requests. dataflowService :: ServiceConfig dataflowService = defaultService (ServiceId "dataflow:v1b3") "dataflow.googleapis.com" +-- | View and manage your Google Compute Engine resources +computeScope :: Proxy '["https://www.googleapis.com/auth/compute"] +computeScope = Proxy; + -- | View your email address userInfoEmailScope :: Proxy '["https://www.googleapis.com/auth/userinfo.email"] userInfoEmailScope = Proxy; @@ -1011,3 +1377,7 @@ userInfoEmailScope = Proxy; -- | View and manage your data across Google Cloud Platform services cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"] cloudPlatformScope = Proxy; + +-- | View your Google Compute Engine resources +computeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/compute.readonly"] +computeReadOnlyScope = Proxy; diff --git a/gen/Network/Google/Dataflow/Types/Product.hs b/gen/Network/Google/Dataflow/Types/Product.hs index bd57c40..1db6c51 100644 --- a/gen/Network/Google/Dataflow/Types/Product.hs +++ b/gen/Network/Google/Dataflow/Types/Product.hs @@ -60,7 +60,6 @@ instance ToJSON JobExecutionInfoStages where -- /See:/ 'computationTopology' smart constructor. data ComputationTopology = ComputationTopology' { _ctStateFamilies :: !(Maybe [StateFamilyConfig]) - , _ctUserStageName :: !(Maybe Text) , _ctInputs :: !(Maybe [StreamLocation]) , _ctKeyRanges :: !(Maybe [KeyRangeLocation]) , _ctOutputs :: !(Maybe [StreamLocation]) @@ -74,8 +73,6 @@ data ComputationTopology = ComputationTopology' -- -- * 'ctStateFamilies' -- --- * 'ctUserStageName' --- -- * 'ctInputs' -- -- * 'ctKeyRanges' @@ -90,7 +87,6 @@ computationTopology computationTopology = ComputationTopology' { _ctStateFamilies = Nothing - , _ctUserStageName = Nothing , _ctInputs = Nothing , _ctKeyRanges = Nothing , _ctOutputs = Nothing @@ -106,12 +102,6 @@ ctStateFamilies . _Default . _Coerce --- | The user stage name. -ctUserStageName :: Lens' ComputationTopology (Maybe Text) -ctUserStageName - = lens _ctUserStageName - (\ s a -> s{_ctUserStageName = a}) - -- | The inputs to the computation. ctInputs :: Lens' ComputationTopology [StreamLocation] ctInputs @@ -151,8 +141,7 @@ instance FromJSON ComputationTopology where (\ o -> ComputationTopology' <$> (o .:? "stateFamilies" .!= mempty) <*> - (o .:? "userStageName") - <*> (o .:? "inputs" .!= mempty) + (o .:? "inputs" .!= mempty) <*> (o .:? "keyRanges" .!= mempty) <*> (o .:? "outputs" .!= mempty) <*> (o .:? "computationId") @@ -163,7 +152,6 @@ instance ToJSON ComputationTopology where = object (catMaybes [("stateFamilies" .=) <$> _ctStateFamilies, - ("userStageName" .=) <$> _ctUserStageName, ("inputs" .=) <$> _ctInputs, ("keyRanges" .=) <$> _ctKeyRanges, ("outputs" .=) <$> _ctOutputs, @@ -176,7 +164,7 @@ instance ToJSON ComputationTopology where data SourceSplitResponse = SourceSplitResponse' { _ssrBundles :: !(Maybe [DerivedSource]) , _ssrShards :: !(Maybe [SourceSplitShard]) - , _ssrOutcome :: !(Maybe Text) + , _ssrOutcome :: !(Maybe SourceSplitResponseOutcome) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'SourceSplitResponse' with the minimum fields required to make a request. @@ -218,7 +206,7 @@ ssrShards -- \"as is\" without splitting. \"bundles\" is ignored in this case. If -- this is SPLITTING_HAPPENED, then \"bundles\" contains a list of bundles -- into which the source was split. -ssrOutcome :: Lens' SourceSplitResponse (Maybe Text) +ssrOutcome :: Lens' SourceSplitResponse (Maybe SourceSplitResponseOutcome) ssrOutcome = lens _ssrOutcome (\ s a -> s{_ssrOutcome = a}) @@ -239,49 +227,92 @@ instance ToJSON SourceSplitResponse where ("shards" .=) <$> _ssrShards, ("outcome" .=) <$> _ssrOutcome]) +-- | Metadata for a specific parameter. -- --- /See:/ 'resourceUtilizationReportMetricsItem' smart constructor. -newtype ResourceUtilizationReportMetricsItem = ResourceUtilizationReportMetricsItem' - { _rurmiAddtional :: HashMap Text JSONValue +-- /See:/ 'parameterMetadata' smart constructor. +data ParameterMetadata = ParameterMetadata' + { _pmHelpText :: !(Maybe Text) + , _pmIsOptional :: !(Maybe Bool) + , _pmName :: !(Maybe Text) + , _pmRegexes :: !(Maybe [Text]) + , _pmLabel :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) --- | Creates a value of 'ResourceUtilizationReportMetricsItem' with the minimum fields required to make a request. +-- | Creates a value of 'ParameterMetadata' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- --- * 'rurmiAddtional' -resourceUtilizationReportMetricsItem - :: HashMap Text JSONValue -- ^ 'rurmiAddtional' - -> ResourceUtilizationReportMetricsItem -resourceUtilizationReportMetricsItem pRurmiAddtional_ = - ResourceUtilizationReportMetricsItem' - { _rurmiAddtional = _Coerce # pRurmiAddtional_ +-- * 'pmHelpText' +-- +-- * 'pmIsOptional' +-- +-- * 'pmName' +-- +-- * 'pmRegexes' +-- +-- * 'pmLabel' +parameterMetadata + :: ParameterMetadata +parameterMetadata = + ParameterMetadata' + { _pmHelpText = Nothing + , _pmIsOptional = Nothing + , _pmName = Nothing + , _pmRegexes = Nothing + , _pmLabel = Nothing } --- | Properties of the object. -rurmiAddtional :: Lens' ResourceUtilizationReportMetricsItem (HashMap Text JSONValue) -rurmiAddtional - = lens _rurmiAddtional - (\ s a -> s{_rurmiAddtional = a}) +-- | Required. The help text to display for the parameter. +pmHelpText :: Lens' ParameterMetadata (Maybe Text) +pmHelpText + = lens _pmHelpText (\ s a -> s{_pmHelpText = a}) + +-- | Optional. Whether the parameter is optional. Defaults to false. +pmIsOptional :: Lens' ParameterMetadata (Maybe Bool) +pmIsOptional + = lens _pmIsOptional (\ s a -> s{_pmIsOptional = a}) + +-- | Required. The name of the parameter. +pmName :: Lens' ParameterMetadata (Maybe Text) +pmName = lens _pmName (\ s a -> s{_pmName = a}) + +-- | Optional. Regexes that the parameter must match. +pmRegexes :: Lens' ParameterMetadata [Text] +pmRegexes + = lens _pmRegexes (\ s a -> s{_pmRegexes = a}) . + _Default . _Coerce -instance FromJSON - ResourceUtilizationReportMetricsItem where +-- | Required. The label to display for the parameter. +pmLabel :: Lens' ParameterMetadata (Maybe Text) +pmLabel = lens _pmLabel (\ s a -> s{_pmLabel = a}) + +instance FromJSON ParameterMetadata where parseJSON - = withObject "ResourceUtilizationReportMetricsItem" + = withObject "ParameterMetadata" (\ o -> - ResourceUtilizationReportMetricsItem' <$> - (parseJSONObject o)) + ParameterMetadata' <$> + (o .:? "helpText") <*> (o .:? "isOptional") <*> + (o .:? "name") + <*> (o .:? "regexes" .!= mempty) + <*> (o .:? "label")) -instance ToJSON ResourceUtilizationReportMetricsItem - where - toJSON = toJSON . _rurmiAddtional +instance ToJSON ParameterMetadata where + toJSON ParameterMetadata'{..} + = object + (catMaybes + [("helpText" .=) <$> _pmHelpText, + ("isOptional" .=) <$> _pmIsOptional, + ("name" .=) <$> _pmName, + ("regexes" .=) <$> _pmRegexes, + ("label" .=) <$> _pmLabel]) -- | A request to create a Cloud Dataflow job from a template. -- -- /See:/ 'createJobFromTemplateRequest' smart constructor. data CreateJobFromTemplateRequest = CreateJobFromTemplateRequest' - { _cjftrEnvironment :: !(Maybe RuntimeEnvironment) + { _cjftrLocation :: !(Maybe Text) + , _cjftrEnvironment :: !(Maybe RuntimeEnvironment) , _cjftrJobName :: !(Maybe Text) , _cjftrGcsPath :: !(Maybe Text) , _cjftrParameters :: !(Maybe CreateJobFromTemplateRequestParameters) @@ -291,6 +322,8 @@ data CreateJobFromTemplateRequest = CreateJobFromTemplateRequest' -- -- Use one of the following lenses to modify other fields as desired: -- +-- * 'cjftrLocation' +-- -- * 'cjftrEnvironment' -- -- * 'cjftrJobName' @@ -302,12 +335,19 @@ createJobFromTemplateRequest :: CreateJobFromTemplateRequest createJobFromTemplateRequest = CreateJobFromTemplateRequest' - { _cjftrEnvironment = Nothing + { _cjftrLocation = Nothing + , _cjftrEnvironment = Nothing , _cjftrJobName = Nothing , _cjftrGcsPath = Nothing , _cjftrParameters = Nothing } +-- | The location to which to direct the request. +cjftrLocation :: Lens' CreateJobFromTemplateRequest (Maybe Text) +cjftrLocation + = lens _cjftrLocation + (\ s a -> s{_cjftrLocation = a}) + -- | The runtime environment for the job. cjftrEnvironment :: Lens' CreateJobFromTemplateRequest (Maybe RuntimeEnvironment) cjftrEnvironment @@ -336,15 +376,17 @@ instance FromJSON CreateJobFromTemplateRequest where = withObject "CreateJobFromTemplateRequest" (\ o -> CreateJobFromTemplateRequest' <$> - (o .:? "environment") <*> (o .:? "jobName") <*> - (o .:? "gcsPath") + (o .:? "location") <*> (o .:? "environment") <*> + (o .:? "jobName") + <*> (o .:? "gcsPath") <*> (o .:? "parameters")) instance ToJSON CreateJobFromTemplateRequest where toJSON CreateJobFromTemplateRequest'{..} = object (catMaybes - [("environment" .=) <$> _cjftrEnvironment, + [("location" .=) <$> _cjftrLocation, + ("environment" .=) <$> _cjftrEnvironment, ("jobName" .=) <$> _cjftrJobName, ("gcsPath" .=) <$> _cjftrGcsPath, ("parameters" .=) <$> _cjftrParameters]) @@ -362,7 +404,7 @@ instance ToJSON CreateJobFromTemplateRequest where -- needed, put the localized message in the error details or localize it in -- the client. The optional error details may contain arbitrary information -- about the error. There is a predefined set of error detail types in the --- package \`google.rpc\` which can be used for common error conditions. # +-- package \`google.rpc\` that can be used for common error conditions. # -- Language mapping The \`Status\` message is the logical representation of -- the error model, but it is not necessarily the actual wire format. When -- the \`Status\` message is exposed in different client libraries and @@ -375,15 +417,15 @@ instance ToJSON CreateJobFromTemplateRequest where -- Partial errors. If a service needs to return partial errors to the -- client, it may embed the \`Status\` in the normal response to indicate -- the partial errors. - Workflow errors. A typical workflow has multiple --- steps. Each step may have a \`Status\` message for error reporting --- purpose. - Batch operations. If a client uses batch request and batch --- response, the \`Status\` message should be used directly inside batch --- response, one for each error sub-response. - Asynchronous operations. If --- an API call embeds asynchronous operation results in its response, the --- status of those operations should be represented directly using the --- \`Status\` message. - Logging. If some API errors are stored in logs, --- the message \`Status\` could be used directly after any stripping needed --- for security\/privacy reasons. +-- steps. Each step may have a \`Status\` message for error reporting. - +-- Batch operations. If a client uses batch request and batch response, the +-- \`Status\` message should be used directly inside batch response, one +-- for each error sub-response. - Asynchronous operations. If an API call +-- embeds asynchronous operation results in its response, the status of +-- those operations should be represented directly using the \`Status\` +-- message. - Logging. If some API errors are stored in logs, the message +-- \`Status\` could be used directly after any stripping needed for +-- security\/privacy reasons. -- -- /See:/ 'status' smart constructor. data Status = Status' @@ -410,8 +452,8 @@ status = , _sMessage = Nothing } --- | A list of messages that carry the error details. There will be a common --- set of message types for APIs to use. +-- | A list of messages that carry the error details. There is a common set +-- of message types for APIs to use. sDetails :: Lens' Status [StatusDetailsItem] sDetails = lens _sDetails (\ s a -> s{_sDetails = a}) . @@ -450,7 +492,7 @@ instance ToJSON Status where -- -- /See:/ 'nameAndKind' smart constructor. data NameAndKind = NameAndKind' - { _nakKind :: !(Maybe Text) + { _nakKind :: !(Maybe NameAndKindKind) , _nakName :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -470,7 +512,7 @@ nameAndKind = } -- | Counter aggregation kind. -nakKind :: Lens' NameAndKind (Maybe Text) +nakKind :: Lens' NameAndKind (Maybe NameAndKindKind) nakKind = lens _nakKind (\ s a -> s{_nakKind = a}) -- | Name of the counter. @@ -532,7 +574,7 @@ instance ToJSON IntegerList where -- /See:/ 'workItem' smart constructor. data WorkItem = WorkItem' { _wiJobId :: !(Maybe Text) - , _wiReportStatusInterval :: !(Maybe Text) + , _wiReportStatusInterval :: !(Maybe GDuration) , _wiShellTask :: !(Maybe ShellTask) , _wiStreamingSetupTask :: !(Maybe StreamingSetupTask) , _wiInitialReportIndex :: !(Maybe (Textual Int64)) @@ -542,7 +584,7 @@ data WorkItem = WorkItem' , _wiSourceOperationTask :: !(Maybe SourceOperationRequest) , _wiId :: !(Maybe (Textual Int64)) , _wiProjectId :: !(Maybe Text) - , _wiLeaseExpireTime :: !(Maybe Text) + , _wiLeaseExpireTime :: !(Maybe DateTime') , _wiConfiguration :: !(Maybe Text) , _wiStreamingConfigTask :: !(Maybe StreamingConfigTask) , _wiSeqMapTask :: !(Maybe SeqMapTask) @@ -607,10 +649,11 @@ wiJobId :: Lens' WorkItem (Maybe Text) wiJobId = lens _wiJobId (\ s a -> s{_wiJobId = a}) -- | Recommended reporting interval. -wiReportStatusInterval :: Lens' WorkItem (Maybe Text) +wiReportStatusInterval :: Lens' WorkItem (Maybe Scientific) wiReportStatusInterval = lens _wiReportStatusInterval (\ s a -> s{_wiReportStatusInterval = a}) + . mapping _GDuration -- | Additional information for ShellTask WorkItems. wiShellTask :: Lens' WorkItem (Maybe ShellTask) @@ -667,10 +710,11 @@ wiProjectId = lens _wiProjectId (\ s a -> s{_wiProjectId = a}) -- | Time when the lease on this Work will expire. -wiLeaseExpireTime :: Lens' WorkItem (Maybe Text) +wiLeaseExpireTime :: Lens' WorkItem (Maybe UTCTime) wiLeaseExpireTime = lens _wiLeaseExpireTime (\ s a -> s{_wiLeaseExpireTime = a}) + . mapping _DateTime -- | Work item-specific configuration as an opaque blob. wiConfiguration :: Lens' WorkItem (Maybe Text) @@ -740,9 +784,9 @@ instance ToJSON WorkItem where -- /See:/ 'workerHealthReport' smart constructor. data WorkerHealthReport = WorkerHealthReport' { _whrVMIsHealthy :: !(Maybe Bool) - , _whrReportInterval :: !(Maybe Text) + , _whrReportInterval :: !(Maybe GDuration) , _whrPods :: !(Maybe [WorkerHealthReportPodsItem]) - , _whrVMStartupTime :: !(Maybe Text) + , _whrVMStartupTime :: !(Maybe DateTime') } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'WorkerHealthReport' with the minimum fields required to make a request. @@ -775,10 +819,11 @@ whrVMIsHealthy -- | The interval at which the worker is sending health reports. The default -- value of 0 should be interpreted as the field is not being explicitly -- set by the worker. -whrReportInterval :: Lens' WorkerHealthReport (Maybe Text) +whrReportInterval :: Lens' WorkerHealthReport (Maybe Scientific) whrReportInterval = lens _whrReportInterval (\ s a -> s{_whrReportInterval = a}) + . mapping _GDuration -- | The pods running on the worker. See: -- http:\/\/kubernetes.io\/v1.1\/docs\/api-reference\/v1\/definitions.html#_v1_pod @@ -790,10 +835,11 @@ whrPods . _Coerce -- | The time the VM was booted. -whrVMStartupTime :: Lens' WorkerHealthReport (Maybe Text) +whrVMStartupTime :: Lens' WorkerHealthReport (Maybe UTCTime) whrVMStartupTime = lens _whrVMStartupTime (\ s a -> s{_whrVMStartupTime = a}) + . mapping _DateTime instance FromJSON WorkerHealthReport where parseJSON @@ -813,6 +859,88 @@ instance ToJSON WorkerHealthReport where ("pods" .=) <$> _whrPods, ("vmStartupTime" .=) <$> _whrVMStartupTime]) +-- | Represents a snapshot of a job. +-- +-- /See:/ 'snapshot' smart constructor. +data Snapshot = Snapshot' + { _sCreationTime :: !(Maybe DateTime') + , _sTtl :: !(Maybe GDuration) + , _sSourceJobId :: !(Maybe Text) + , _sId :: !(Maybe Text) + , _sProjectId :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Snapshot' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sCreationTime' +-- +-- * 'sTtl' +-- +-- * 'sSourceJobId' +-- +-- * 'sId' +-- +-- * 'sProjectId' +snapshot + :: Snapshot +snapshot = + Snapshot' + { _sCreationTime = Nothing + , _sTtl = Nothing + , _sSourceJobId = Nothing + , _sId = Nothing + , _sProjectId = Nothing + } + +-- | The time this snapshot was created. +sCreationTime :: Lens' Snapshot (Maybe UTCTime) +sCreationTime + = lens _sCreationTime + (\ s a -> s{_sCreationTime = a}) + . mapping _DateTime + +-- | The time after which this snapshot will be automatically deleted. +sTtl :: Lens' Snapshot (Maybe Scientific) +sTtl + = lens _sTtl (\ s a -> s{_sTtl = a}) . + mapping _GDuration + +-- | The job this snapshot was created from. +sSourceJobId :: Lens' Snapshot (Maybe Text) +sSourceJobId + = lens _sSourceJobId (\ s a -> s{_sSourceJobId = a}) + +-- | The unique ID of this snapshot. +sId :: Lens' Snapshot (Maybe Text) +sId = lens _sId (\ s a -> s{_sId = a}) + +-- | The project this snapshot belongs to. +sProjectId :: Lens' Snapshot (Maybe Text) +sProjectId + = lens _sProjectId (\ s a -> s{_sProjectId = a}) + +instance FromJSON Snapshot where + parseJSON + = withObject "Snapshot" + (\ o -> + Snapshot' <$> + (o .:? "creationTime") <*> (o .:? "ttl") <*> + (o .:? "sourceJobId") + <*> (o .:? "id") + <*> (o .:? "projectId")) + +instance ToJSON Snapshot where + toJSON Snapshot'{..} + = object + (catMaybes + [("creationTime" .=) <$> _sCreationTime, + ("ttl" .=) <$> _sTtl, + ("sourceJobId" .=) <$> _sSourceJobId, + ("id" .=) <$> _sId, + ("projectId" .=) <$> _sProjectId]) + -- | Hints for splitting a Source into bundles (parts for parallel -- processing) using SourceSplitRequest. -- @@ -907,7 +1035,7 @@ instance ToJSON WorkerPoolMetadata where -- /See:/ 'autoscalingSettings' smart constructor. data AutoscalingSettings = AutoscalingSettings' { _asMaxNumWorkers :: !(Maybe (Textual Int32)) - , _asAlgorithm :: !(Maybe Text) + , _asAlgorithm :: !(Maybe AutoscalingSettingsAlgorithm) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'AutoscalingSettings' with the minimum fields required to make a request. @@ -933,7 +1061,7 @@ asMaxNumWorkers . mapping _Coerce -- | The algorithm to use for autoscaling. -asAlgorithm :: Lens' AutoscalingSettings (Maybe Text) +asAlgorithm :: Lens' AutoscalingSettings (Maybe AutoscalingSettingsAlgorithm) asAlgorithm = lens _asAlgorithm (\ s a -> s{_asAlgorithm = a}) @@ -1088,11 +1216,118 @@ instance ToJSON InstructionOutput where ("originalName" .=) <$> _ioOriginalName, ("onlyCountKeyBytes" .=) <$> _ioOnlyCountKeyBytes]) +-- | A metric value representing temporal values of a variable. +-- +-- /See:/ 'integerGauge' smart constructor. +data IntegerGauge = IntegerGauge' + { _igValue :: !(Maybe SplitInt64) + , _igTimestamp :: !(Maybe DateTime') + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IntegerGauge' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igValue' +-- +-- * 'igTimestamp' +integerGauge + :: IntegerGauge +integerGauge = + IntegerGauge' + { _igValue = Nothing + , _igTimestamp = Nothing + } + +-- | The value of the variable represented by this gauge. +igValue :: Lens' IntegerGauge (Maybe SplitInt64) +igValue = lens _igValue (\ s a -> s{_igValue = a}) + +-- | The time at which this value was measured. Measured as msecs from epoch. +igTimestamp :: Lens' IntegerGauge (Maybe UTCTime) +igTimestamp + = lens _igTimestamp (\ s a -> s{_igTimestamp = a}) . + mapping _DateTime + +instance FromJSON IntegerGauge where + parseJSON + = withObject "IntegerGauge" + (\ o -> + IntegerGauge' <$> + (o .:? "value") <*> (o .:? "timestamp")) + +instance ToJSON IntegerGauge where + toJSON IntegerGauge'{..} + = object + (catMaybes + [("value" .=) <$> _igValue, + ("timestamp" .=) <$> _igTimestamp]) + +-- | Parameters to provide to the template being launched. +-- +-- /See:/ 'launchTemplateParameters' smart constructor. +data LaunchTemplateParameters = LaunchTemplateParameters' + { _ltpEnvironment :: !(Maybe RuntimeEnvironment) + , _ltpJobName :: !(Maybe Text) + , _ltpParameters :: !(Maybe LaunchTemplateParametersParameters) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LaunchTemplateParameters' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltpEnvironment' +-- +-- * 'ltpJobName' +-- +-- * 'ltpParameters' +launchTemplateParameters + :: LaunchTemplateParameters +launchTemplateParameters = + LaunchTemplateParameters' + { _ltpEnvironment = Nothing + , _ltpJobName = Nothing + , _ltpParameters = Nothing + } + +-- | The runtime environment for the job. +ltpEnvironment :: Lens' LaunchTemplateParameters (Maybe RuntimeEnvironment) +ltpEnvironment + = lens _ltpEnvironment + (\ s a -> s{_ltpEnvironment = a}) + +-- | Required. The job name to use for the created job. +ltpJobName :: Lens' LaunchTemplateParameters (Maybe Text) +ltpJobName + = lens _ltpJobName (\ s a -> s{_ltpJobName = a}) + +-- | The runtime parameters to pass to the job. +ltpParameters :: Lens' LaunchTemplateParameters (Maybe LaunchTemplateParametersParameters) +ltpParameters + = lens _ltpParameters + (\ s a -> s{_ltpParameters = a}) + +instance FromJSON LaunchTemplateParameters where + parseJSON + = withObject "LaunchTemplateParameters" + (\ o -> + LaunchTemplateParameters' <$> + (o .:? "environment") <*> (o .:? "jobName") <*> + (o .:? "parameters")) + +instance ToJSON LaunchTemplateParameters where + toJSON LaunchTemplateParameters'{..} + = object + (catMaybes + [("environment" .=) <$> _ltpEnvironment, + ("jobName" .=) <$> _ltpJobName, + ("parameters" .=) <$> _ltpParameters]) + -- | Request to report the status of WorkItems. -- -- /See:/ 'reportWorkItemStatusRequest' smart constructor. data ReportWorkItemStatusRequest = ReportWorkItemStatusRequest' - { _rwisrCurrentWorkerTime :: !(Maybe Text) + { _rwisrCurrentWorkerTime :: !(Maybe DateTime') , _rwisrLocation :: !(Maybe Text) , _rwisrWorkItemStatuses :: !(Maybe [WorkItemStatus]) , _rwisrWorkerId :: !(Maybe Text) @@ -1120,10 +1355,11 @@ reportWorkItemStatusRequest = } -- | The current timestamp at the worker. -rwisrCurrentWorkerTime :: Lens' ReportWorkItemStatusRequest (Maybe Text) +rwisrCurrentWorkerTime :: Lens' ReportWorkItemStatusRequest (Maybe UTCTime) rwisrCurrentWorkerTime = lens _rwisrCurrentWorkerTime (\ s a -> s{_rwisrCurrentWorkerTime = a}) + . mapping _DateTime -- | The location which contains the WorkItem\'s job. rwisrLocation :: Lens' ReportWorkItemStatusRequest (Maybe Text) @@ -1204,6 +1440,59 @@ instance FromJSON EnvironmentVersion where instance ToJSON EnvironmentVersion where toJSON = toJSON . _evAddtional +-- | Streaming appliance snapshot configuration. +-- +-- /See:/ 'streamingApplianceSnapshotConfig' smart constructor. +data StreamingApplianceSnapshotConfig = StreamingApplianceSnapshotConfig' + { _sascImportStateEndpoint :: !(Maybe Text) + , _sascSnapshotId :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StreamingApplianceSnapshotConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sascImportStateEndpoint' +-- +-- * 'sascSnapshotId' +streamingApplianceSnapshotConfig + :: StreamingApplianceSnapshotConfig +streamingApplianceSnapshotConfig = + StreamingApplianceSnapshotConfig' + { _sascImportStateEndpoint = Nothing + , _sascSnapshotId = Nothing + } + +-- | Indicates which endpoint is used to import appliance state. +sascImportStateEndpoint :: Lens' StreamingApplianceSnapshotConfig (Maybe Text) +sascImportStateEndpoint + = lens _sascImportStateEndpoint + (\ s a -> s{_sascImportStateEndpoint = a}) + +-- | If set, indicates the snapshot id for the snapshot being performed. +sascSnapshotId :: Lens' StreamingApplianceSnapshotConfig (Maybe Text) +sascSnapshotId + = lens _sascSnapshotId + (\ s a -> s{_sascSnapshotId = a}) + +instance FromJSON StreamingApplianceSnapshotConfig + where + parseJSON + = withObject "StreamingApplianceSnapshotConfig" + (\ o -> + StreamingApplianceSnapshotConfig' <$> + (o .:? "importStateEndpoint") <*> + (o .:? "snapshotId")) + +instance ToJSON StreamingApplianceSnapshotConfig + where + toJSON StreamingApplianceSnapshotConfig'{..} + = object + (catMaybes + [("importStateEndpoint" .=) <$> + _sascImportStateEndpoint, + ("snapshotId" .=) <$> _sascSnapshotId]) + -- | A sink that records can be encoded and written to. -- -- /See:/ 'sink' smart constructor. @@ -1288,7 +1577,7 @@ instance ToJSON StringList where -- -- /See:/ 'workerHealthReportResponse' smart constructor. newtype WorkerHealthReportResponse = WorkerHealthReportResponse' - { _whrrReportInterval :: Maybe Text + { _whrrReportInterval :: Maybe GDuration } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'WorkerHealthReportResponse' with the minimum fields required to make a request. @@ -1306,10 +1595,11 @@ workerHealthReportResponse = -- | A positive value indicates the worker should change its reporting -- interval to the specified value. The default value of zero means no -- change in report rate is requested by the server. -whrrReportInterval :: Lens' WorkerHealthReportResponse (Maybe Text) +whrrReportInterval :: Lens' WorkerHealthReportResponse (Maybe Scientific) whrrReportInterval = lens _whrrReportInterval (\ s a -> s{_whrrReportInterval = a}) + . mapping _GDuration instance FromJSON WorkerHealthReportResponse where parseJSON @@ -1324,6 +1614,176 @@ instance ToJSON WorkerHealthReportResponse where (catMaybes [("reportInterval" .=) <$> _whrrReportInterval]) +-- | Data provided with a pipeline or transform to provide descriptive info. +-- +-- /See:/ 'displayData' smart constructor. +data DisplayData = DisplayData' + { _ddDurationValue :: !(Maybe GDuration) + , _ddBoolValue :: !(Maybe Bool) + , _ddTimestampValue :: !(Maybe DateTime') + , _ddURL :: !(Maybe Text) + , _ddNamespace :: !(Maybe Text) + , _ddJavaClassValue :: !(Maybe Text) + , _ddShortStrValue :: !(Maybe Text) + , _ddKey :: !(Maybe Text) + , _ddInt64Value :: !(Maybe (Textual Int64)) + , _ddFloatValue :: !(Maybe (Textual Double)) + , _ddStrValue :: !(Maybe Text) + , _ddLabel :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisplayData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddDurationValue' +-- +-- * 'ddBoolValue' +-- +-- * 'ddTimestampValue' +-- +-- * 'ddURL' +-- +-- * 'ddNamespace' +-- +-- * 'ddJavaClassValue' +-- +-- * 'ddShortStrValue' +-- +-- * 'ddKey' +-- +-- * 'ddInt64Value' +-- +-- * 'ddFloatValue' +-- +-- * 'ddStrValue' +-- +-- * 'ddLabel' +displayData + :: DisplayData +displayData = + DisplayData' + { _ddDurationValue = Nothing + , _ddBoolValue = Nothing + , _ddTimestampValue = Nothing + , _ddURL = Nothing + , _ddNamespace = Nothing + , _ddJavaClassValue = Nothing + , _ddShortStrValue = Nothing + , _ddKey = Nothing + , _ddInt64Value = Nothing + , _ddFloatValue = Nothing + , _ddStrValue = Nothing + , _ddLabel = Nothing + } + +-- | Contains value if the data is of duration type. +ddDurationValue :: Lens' DisplayData (Maybe Scientific) +ddDurationValue + = lens _ddDurationValue + (\ s a -> s{_ddDurationValue = a}) + . mapping _GDuration + +-- | Contains value if the data is of a boolean type. +ddBoolValue :: Lens' DisplayData (Maybe Bool) +ddBoolValue + = lens _ddBoolValue (\ s a -> s{_ddBoolValue = a}) + +-- | Contains value if the data is of timestamp type. +ddTimestampValue :: Lens' DisplayData (Maybe UTCTime) +ddTimestampValue + = lens _ddTimestampValue + (\ s a -> s{_ddTimestampValue = a}) + . mapping _DateTime + +-- | An optional full URL. +ddURL :: Lens' DisplayData (Maybe Text) +ddURL = lens _ddURL (\ s a -> s{_ddURL = a}) + +-- | The namespace for the key. This is usually a class name or programming +-- language namespace (i.e. python module) which defines the display data. +-- This allows a dax monitoring system to specially handle the data and +-- perform custom rendering. +ddNamespace :: Lens' DisplayData (Maybe Text) +ddNamespace + = lens _ddNamespace (\ s a -> s{_ddNamespace = a}) + +-- | Contains value if the data is of java class type. +ddJavaClassValue :: Lens' DisplayData (Maybe Text) +ddJavaClassValue + = lens _ddJavaClassValue + (\ s a -> s{_ddJavaClassValue = a}) + +-- | A possible additional shorter value to display. For example a +-- java_class_name_value of com.mypackage.MyDoFn will be stored with MyDoFn +-- as the short_str_value and com.mypackage.MyDoFn as the java_class_name +-- value. short_str_value can be displayed and java_class_name_value will +-- be displayed as a tooltip. +ddShortStrValue :: Lens' DisplayData (Maybe Text) +ddShortStrValue + = lens _ddShortStrValue + (\ s a -> s{_ddShortStrValue = a}) + +-- | The key identifying the display data. This is intended to be used as a +-- label for the display data when viewed in a dax monitoring system. +ddKey :: Lens' DisplayData (Maybe Text) +ddKey = lens _ddKey (\ s a -> s{_ddKey = a}) + +-- | Contains value if the data is of int64 type. +ddInt64Value :: Lens' DisplayData (Maybe Int64) +ddInt64Value + = lens _ddInt64Value (\ s a -> s{_ddInt64Value = a}) + . mapping _Coerce + +-- | Contains value if the data is of float type. +ddFloatValue :: Lens' DisplayData (Maybe Double) +ddFloatValue + = lens _ddFloatValue (\ s a -> s{_ddFloatValue = a}) + . mapping _Coerce + +-- | Contains value if the data is of string type. +ddStrValue :: Lens' DisplayData (Maybe Text) +ddStrValue + = lens _ddStrValue (\ s a -> s{_ddStrValue = a}) + +-- | An optional label to display in a dax UI for the element. +ddLabel :: Lens' DisplayData (Maybe Text) +ddLabel = lens _ddLabel (\ s a -> s{_ddLabel = a}) + +instance FromJSON DisplayData where + parseJSON + = withObject "DisplayData" + (\ o -> + DisplayData' <$> + (o .:? "durationValue") <*> (o .:? "boolValue") <*> + (o .:? "timestampValue") + <*> (o .:? "url") + <*> (o .:? "namespace") + <*> (o .:? "javaClassValue") + <*> (o .:? "shortStrValue") + <*> (o .:? "key") + <*> (o .:? "int64Value") + <*> (o .:? "floatValue") + <*> (o .:? "strValue") + <*> (o .:? "label")) + +instance ToJSON DisplayData where + toJSON DisplayData'{..} + = object + (catMaybes + [("durationValue" .=) <$> _ddDurationValue, + ("boolValue" .=) <$> _ddBoolValue, + ("timestampValue" .=) <$> _ddTimestampValue, + ("url" .=) <$> _ddURL, + ("namespace" .=) <$> _ddNamespace, + ("javaClassValue" .=) <$> _ddJavaClassValue, + ("shortStrValue" .=) <$> _ddShortStrValue, + ("key" .=) <$> _ddKey, + ("int64Value" .=) <$> _ddInt64Value, + ("floatValue" .=) <$> _ddFloatValue, + ("strValue" .=) <$> _ddStrValue, + ("label" .=) <$> _ddLabel]) + -- | Response to a send capture request. nothing -- -- /See:/ 'sendDebugCaptureResponse' smart constructor. @@ -1345,6 +1805,70 @@ instance FromJSON SendDebugCaptureResponse where instance ToJSON SendDebugCaptureResponse where toJSON = const emptyObject +-- | A rich message format, including a human readable string, a key for +-- identifying the message, and structured data associated with the message +-- for programmatic consumption. +-- +-- /See:/ 'structuredMessage' smart constructor. +data StructuredMessage = StructuredMessage' + { _smMessageText :: !(Maybe Text) + , _smMessageKey :: !(Maybe Text) + , _smParameters :: !(Maybe [Parameter]) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StructuredMessage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'smMessageText' +-- +-- * 'smMessageKey' +-- +-- * 'smParameters' +structuredMessage + :: StructuredMessage +structuredMessage = + StructuredMessage' + { _smMessageText = Nothing + , _smMessageKey = Nothing + , _smParameters = Nothing + } + +-- | Human-readable version of message. +smMessageText :: Lens' StructuredMessage (Maybe Text) +smMessageText + = lens _smMessageText + (\ s a -> s{_smMessageText = a}) + +-- | Idenfier for this message type. Used by external systems to +-- internationalize or personalize message. +smMessageKey :: Lens' StructuredMessage (Maybe Text) +smMessageKey + = lens _smMessageKey (\ s a -> s{_smMessageKey = a}) + +-- | The structured data associated with this message. +smParameters :: Lens' StructuredMessage [Parameter] +smParameters + = lens _smParameters (\ s a -> s{_smParameters = a}) + . _Default + . _Coerce + +instance FromJSON StructuredMessage where + parseJSON + = withObject "StructuredMessage" + (\ o -> + StructuredMessage' <$> + (o .:? "messageText") <*> (o .:? "messageKey") <*> + (o .:? "parameters" .!= mempty)) + +instance ToJSON StructuredMessage where + toJSON StructuredMessage'{..} + = object + (catMaybes + [("messageText" .=) <$> _smMessageText, + ("messageKey" .=) <$> _smMessageKey, + ("parameters" .=) <$> _smParameters]) + -- | User-defined labels for this job. The labels map can contain no more -- than 64 entries. Entries of the labels map are UTF8 strings that comply -- with the following restrictions: * Keys must conform to regexp: @@ -1446,31 +1970,138 @@ instance ToJSON MetricStructuredName where ("context" .=) <$> _msnContext, ("name" .=) <$> _msnName]) +-- | Metadata for a BigQuery connector used by the job. +-- +-- /See:/ 'bigQueryIODetails' smart constructor. +data BigQueryIODetails = BigQueryIODetails' + { _bqiodDataSet :: !(Maybe Text) + , _bqiodQuery :: !(Maybe Text) + , _bqiodProjectId :: !(Maybe Text) + , _bqiodTable :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BigQueryIODetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bqiodDataSet' +-- +-- * 'bqiodQuery' +-- +-- * 'bqiodProjectId' +-- +-- * 'bqiodTable' +bigQueryIODetails + :: BigQueryIODetails +bigQueryIODetails = + BigQueryIODetails' + { _bqiodDataSet = Nothing + , _bqiodQuery = Nothing + , _bqiodProjectId = Nothing + , _bqiodTable = Nothing + } + +-- | Dataset accessed in the connection. +bqiodDataSet :: Lens' BigQueryIODetails (Maybe Text) +bqiodDataSet + = lens _bqiodDataSet (\ s a -> s{_bqiodDataSet = a}) + +-- | Query used to access data in the connection. +bqiodQuery :: Lens' BigQueryIODetails (Maybe Text) +bqiodQuery + = lens _bqiodQuery (\ s a -> s{_bqiodQuery = a}) + +-- | Project accessed in the connection. +bqiodProjectId :: Lens' BigQueryIODetails (Maybe Text) +bqiodProjectId + = lens _bqiodProjectId + (\ s a -> s{_bqiodProjectId = a}) + +-- | Table accessed in the connection. +bqiodTable :: Lens' BigQueryIODetails (Maybe Text) +bqiodTable + = lens _bqiodTable (\ s a -> s{_bqiodTable = a}) + +instance FromJSON BigQueryIODetails where + parseJSON + = withObject "BigQueryIODetails" + (\ o -> + BigQueryIODetails' <$> + (o .:? "dataset") <*> (o .:? "query") <*> + (o .:? "projectId") + <*> (o .:? "table")) + +instance ToJSON BigQueryIODetails where + toJSON BigQueryIODetails'{..} + = object + (catMaybes + [("dataset" .=) <$> _bqiodDataSet, + ("query" .=) <$> _bqiodQuery, + ("projectId" .=) <$> _bqiodProjectId, + ("table" .=) <$> _bqiodTable]) + +-- | Metadata for a File connector used by the job. +-- +-- /See:/ 'fileIODetails' smart constructor. +newtype FileIODetails = FileIODetails' + { _fiodFilePattern :: Maybe Text + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FileIODetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fiodFilePattern' +fileIODetails + :: FileIODetails +fileIODetails = + FileIODetails' + { _fiodFilePattern = Nothing + } + +-- | File Pattern used to access files by the connector. +fiodFilePattern :: Lens' FileIODetails (Maybe Text) +fiodFilePattern + = lens _fiodFilePattern + (\ s a -> s{_fiodFilePattern = a}) + +instance FromJSON FileIODetails where + parseJSON + = withObject "FileIODetails" + (\ o -> FileIODetails' <$> (o .:? "filePattern")) + +instance ToJSON FileIODetails where + toJSON FileIODetails'{..} + = object + (catMaybes [("filePattern" .=) <$> _fiodFilePattern]) + -- | Identifies a counter within a per-job namespace. Counters whose -- structured names are the same get merged into a single value for the -- job. -- -- /See:/ 'counterStructuredName' smart constructor. data CounterStructuredName = CounterStructuredName' - { _csnStandardOrigin :: !(Maybe Text) - , _csnComponentStepName :: !(Maybe Text) - , _csnOtherOrigin :: !(Maybe Text) - , _csnPortion :: !(Maybe Text) - , _csnOriginalStepName :: !(Maybe Text) - , _csnName :: !(Maybe Text) - , _csnExecutionStepName :: !(Maybe Text) - , _csnWorkerId :: !(Maybe Text) + { _csnOrigin :: !(Maybe CounterStructuredNameOrigin) + , _csnOriginNamespace :: !(Maybe Text) + , _csnComponentStepName :: !(Maybe Text) + , _csnPortion :: !(Maybe CounterStructuredNamePortion) + , _csnOriginalStepName :: !(Maybe Text) + , _csnName :: !(Maybe Text) + , _csnExecutionStepName :: !(Maybe Text) + , _csnOriginalRequestingStepName :: !(Maybe Text) + , _csnInputIndex :: !(Maybe (Textual Int32)) + , _csnWorkerId :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'CounterStructuredName' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- --- * 'csnStandardOrigin' +-- * 'csnOrigin' -- --- * 'csnComponentStepName' +-- * 'csnOriginNamespace' -- --- * 'csnOtherOrigin' +-- * 'csnComponentStepName' -- -- * 'csnPortion' -- @@ -1480,26 +2111,37 @@ data CounterStructuredName = CounterStructuredName' -- -- * 'csnExecutionStepName' -- +-- * 'csnOriginalRequestingStepName' +-- +-- * 'csnInputIndex' +-- -- * 'csnWorkerId' counterStructuredName :: CounterStructuredName counterStructuredName = CounterStructuredName' - { _csnStandardOrigin = Nothing + { _csnOrigin = Nothing + , _csnOriginNamespace = Nothing , _csnComponentStepName = Nothing - , _csnOtherOrigin = Nothing , _csnPortion = Nothing , _csnOriginalStepName = Nothing , _csnName = Nothing , _csnExecutionStepName = Nothing + , _csnOriginalRequestingStepName = Nothing + , _csnInputIndex = Nothing , _csnWorkerId = Nothing } -- | One of the standard Origins defined above. -csnStandardOrigin :: Lens' CounterStructuredName (Maybe Text) -csnStandardOrigin - = lens _csnStandardOrigin - (\ s a -> s{_csnStandardOrigin = a}) +csnOrigin :: Lens' CounterStructuredName (Maybe CounterStructuredNameOrigin) +csnOrigin + = lens _csnOrigin (\ s a -> s{_csnOrigin = a}) + +-- | A string containing a more specific namespace of the counter\'s origin. +csnOriginNamespace :: Lens' CounterStructuredName (Maybe Text) +csnOriginNamespace + = lens _csnOriginNamespace + (\ s a -> s{_csnOriginNamespace = a}) -- | Name of the optimized step being executed by the workers. csnComponentStepName :: Lens' CounterStructuredName (Maybe Text) @@ -1507,14 +2149,8 @@ csnComponentStepName = lens _csnComponentStepName (\ s a -> s{_csnComponentStepName = a}) --- | A string containing the origin of the counter. -csnOtherOrigin :: Lens' CounterStructuredName (Maybe Text) -csnOtherOrigin - = lens _csnOtherOrigin - (\ s a -> s{_csnOtherOrigin = a}) - -- | Portion of this counter, either key or value. -csnPortion :: Lens' CounterStructuredName (Maybe Text) +csnPortion :: Lens' CounterStructuredName (Maybe CounterStructuredNamePortion) csnPortion = lens _csnPortion (\ s a -> s{_csnPortion = a}) @@ -1536,6 +2172,24 @@ csnExecutionStepName = lens _csnExecutionStepName (\ s a -> s{_csnExecutionStepName = a}) +-- | The step name requesting an operation, such as GBK. I.e. the ParDo +-- causing a read\/write from shuffle to occur, or a read from side inputs. +csnOriginalRequestingStepName :: Lens' CounterStructuredName (Maybe Text) +csnOriginalRequestingStepName + = lens _csnOriginalRequestingStepName + (\ s a -> s{_csnOriginalRequestingStepName = a}) + +-- | Index of an input collection that\'s being read from\/written to as a +-- side input. The index identifies a step\'s side inputs starting by 1 +-- (e.g. the first side input has input_index 1, the third has input_index +-- 3). Side inputs are identified by a pair of (original_step_name, +-- input_index). This field helps uniquely identify them. +csnInputIndex :: Lens' CounterStructuredName (Maybe Int32) +csnInputIndex + = lens _csnInputIndex + (\ s a -> s{_csnInputIndex = a}) + . mapping _Coerce + -- | ID of a particular worker. csnWorkerId :: Lens' CounterStructuredName (Maybe Text) csnWorkerId @@ -1546,28 +2200,203 @@ instance FromJSON CounterStructuredName where = withObject "CounterStructuredName" (\ o -> CounterStructuredName' <$> - (o .:? "standardOrigin") <*> + (o .:? "origin") <*> (o .:? "originNamespace") <*> (o .:? "componentStepName") - <*> (o .:? "otherOrigin") <*> (o .:? "portion") <*> (o .:? "originalStepName") <*> (o .:? "name") <*> (o .:? "executionStepName") + <*> (o .:? "originalRequestingStepName") + <*> (o .:? "inputIndex") <*> (o .:? "workerId")) instance ToJSON CounterStructuredName where toJSON CounterStructuredName'{..} = object (catMaybes - [("standardOrigin" .=) <$> _csnStandardOrigin, + [("origin" .=) <$> _csnOrigin, + ("originNamespace" .=) <$> _csnOriginNamespace, ("componentStepName" .=) <$> _csnComponentStepName, - ("otherOrigin" .=) <$> _csnOtherOrigin, ("portion" .=) <$> _csnPortion, ("originalStepName" .=) <$> _csnOriginalStepName, ("name" .=) <$> _csnName, ("executionStepName" .=) <$> _csnExecutionStepName, + ("originalRequestingStepName" .=) <$> + _csnOriginalRequestingStepName, + ("inputIndex" .=) <$> _csnInputIndex, ("workerId" .=) <$> _csnWorkerId]) +-- | Metadata available primarily for filtering jobs. Will be included in the +-- ListJob response and Job SUMMARY view+. +-- +-- /See:/ 'jobMetadata' smart constructor. +data JobMetadata = JobMetadata' + { _jmSpannerDetails :: !(Maybe [SpannerIODetails]) + , _jmBigTableDetails :: !(Maybe [BigTableIODetails]) + , _jmSdkVersion :: !(Maybe SdkVersion) + , _jmPubsubDetails :: !(Maybe [PubSubIODetails]) + , _jmFileDetails :: !(Maybe [FileIODetails]) + , _jmBigQueryDetails :: !(Maybe [BigQueryIODetails]) + , _jmDatastoreDetails :: !(Maybe [DatastoreIODetails]) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jmSpannerDetails' +-- +-- * 'jmBigTableDetails' +-- +-- * 'jmSdkVersion' +-- +-- * 'jmPubsubDetails' +-- +-- * 'jmFileDetails' +-- +-- * 'jmBigQueryDetails' +-- +-- * 'jmDatastoreDetails' +jobMetadata + :: JobMetadata +jobMetadata = + JobMetadata' + { _jmSpannerDetails = Nothing + , _jmBigTableDetails = Nothing + , _jmSdkVersion = Nothing + , _jmPubsubDetails = Nothing + , _jmFileDetails = Nothing + , _jmBigQueryDetails = Nothing + , _jmDatastoreDetails = Nothing + } + +-- | Identification of a Spanner source used in the Dataflow job. +jmSpannerDetails :: Lens' JobMetadata [SpannerIODetails] +jmSpannerDetails + = lens _jmSpannerDetails + (\ s a -> s{_jmSpannerDetails = a}) + . _Default + . _Coerce + +-- | Identification of a BigTable source used in the Dataflow job. +jmBigTableDetails :: Lens' JobMetadata [BigTableIODetails] +jmBigTableDetails + = lens _jmBigTableDetails + (\ s a -> s{_jmBigTableDetails = a}) + . _Default + . _Coerce + +-- | The SDK version used to run the job. +jmSdkVersion :: Lens' JobMetadata (Maybe SdkVersion) +jmSdkVersion + = lens _jmSdkVersion (\ s a -> s{_jmSdkVersion = a}) + +-- | Identification of a PubSub source used in the Dataflow job. +jmPubsubDetails :: Lens' JobMetadata [PubSubIODetails] +jmPubsubDetails + = lens _jmPubsubDetails + (\ s a -> s{_jmPubsubDetails = a}) + . _Default + . _Coerce + +-- | Identification of a File source used in the Dataflow job. +jmFileDetails :: Lens' JobMetadata [FileIODetails] +jmFileDetails + = lens _jmFileDetails + (\ s a -> s{_jmFileDetails = a}) + . _Default + . _Coerce + +-- | Identification of a BigQuery source used in the Dataflow job. +jmBigQueryDetails :: Lens' JobMetadata [BigQueryIODetails] +jmBigQueryDetails + = lens _jmBigQueryDetails + (\ s a -> s{_jmBigQueryDetails = a}) + . _Default + . _Coerce + +-- | Identification of a Datastore source used in the Dataflow job. +jmDatastoreDetails :: Lens' JobMetadata [DatastoreIODetails] +jmDatastoreDetails + = lens _jmDatastoreDetails + (\ s a -> s{_jmDatastoreDetails = a}) + . _Default + . _Coerce + +instance FromJSON JobMetadata where + parseJSON + = withObject "JobMetadata" + (\ o -> + JobMetadata' <$> + (o .:? "spannerDetails" .!= mempty) <*> + (o .:? "bigTableDetails" .!= mempty) + <*> (o .:? "sdkVersion") + <*> (o .:? "pubsubDetails" .!= mempty) + <*> (o .:? "fileDetails" .!= mempty) + <*> (o .:? "bigqueryDetails" .!= mempty) + <*> (o .:? "datastoreDetails" .!= mempty)) + +instance ToJSON JobMetadata where + toJSON JobMetadata'{..} + = object + (catMaybes + [("spannerDetails" .=) <$> _jmSpannerDetails, + ("bigTableDetails" .=) <$> _jmBigTableDetails, + ("sdkVersion" .=) <$> _jmSdkVersion, + ("pubsubDetails" .=) <$> _jmPubsubDetails, + ("fileDetails" .=) <$> _jmFileDetails, + ("bigqueryDetails" .=) <$> _jmBigQueryDetails, + ("datastoreDetails" .=) <$> _jmDatastoreDetails]) + +-- | The response to a GetTemplate request. +-- +-- /See:/ 'getTemplateResponse' smart constructor. +data GetTemplateResponse = GetTemplateResponse' + { _gtrStatus :: !(Maybe Status) + , _gtrMetadata :: !(Maybe TemplateMetadata) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetTemplateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gtrStatus' +-- +-- * 'gtrMetadata' +getTemplateResponse + :: GetTemplateResponse +getTemplateResponse = + GetTemplateResponse' + { _gtrStatus = Nothing + , _gtrMetadata = Nothing + } + +-- | The status of the get template request. Any problems with the request +-- will be indicated in the error_details. +gtrStatus :: Lens' GetTemplateResponse (Maybe Status) +gtrStatus + = lens _gtrStatus (\ s a -> s{_gtrStatus = a}) + +-- | The template metadata describing the template name, available +-- parameters, etc. +gtrMetadata :: Lens' GetTemplateResponse (Maybe TemplateMetadata) +gtrMetadata + = lens _gtrMetadata (\ s a -> s{_gtrMetadata = a}) + +instance FromJSON GetTemplateResponse where + parseJSON + = withObject "GetTemplateResponse" + (\ o -> + GetTemplateResponse' <$> + (o .:? "status") <*> (o .:? "metadata")) + +instance ToJSON GetTemplateResponse where + toJSON GetTemplateResponse'{..} + = object + (catMaybes + [("status" .=) <$> _gtrStatus, + ("metadata" .=) <$> _gtrMetadata]) + -- | An instruction that writes records. Takes one input, produces no -- outputs. -- @@ -1724,15 +2553,17 @@ instance ToJSON Disk where -- -- /See:/ 'metricUpdate' smart constructor. data MetricUpdate = MetricUpdate' - { _muMeanSum :: !(Maybe JSONValue) - , _muInternal :: !(Maybe JSONValue) - , _muSet :: !(Maybe JSONValue) - , _muCumulative :: !(Maybe Bool) - , _muKind :: !(Maybe Text) - , _muUpdateTime :: !(Maybe Text) - , _muMeanCount :: !(Maybe JSONValue) - , _muName :: !(Maybe MetricStructuredName) - , _muScalar :: !(Maybe JSONValue) + { _muMeanSum :: !(Maybe JSONValue) + , _muInternal :: !(Maybe JSONValue) + , _muSet :: !(Maybe JSONValue) + , _muDistribution :: !(Maybe JSONValue) + , _muCumulative :: !(Maybe Bool) + , _muKind :: !(Maybe Text) + , _muGauge :: !(Maybe JSONValue) + , _muUpdateTime :: !(Maybe DateTime') + , _muMeanCount :: !(Maybe JSONValue) + , _muName :: !(Maybe MetricStructuredName) + , _muScalar :: !(Maybe JSONValue) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'MetricUpdate' with the minimum fields required to make a request. @@ -1745,10 +2576,14 @@ data MetricUpdate = MetricUpdate' -- -- * 'muSet' -- +-- * 'muDistribution' +-- -- * 'muCumulative' -- -- * 'muKind' -- +-- * 'muGauge' +-- -- * 'muUpdateTime' -- -- * 'muMeanCount' @@ -1763,8 +2598,10 @@ metricUpdate = { _muMeanSum = Nothing , _muInternal = Nothing , _muSet = Nothing + , _muDistribution = Nothing , _muCumulative = Nothing , _muKind = Nothing + , _muGauge = Nothing , _muUpdateTime = Nothing , _muMeanCount = Nothing , _muName = Nothing @@ -1792,6 +2629,13 @@ muInternal muSet :: Lens' MetricUpdate (Maybe JSONValue) muSet = lens _muSet (\ s a -> s{_muSet = a}) +-- | A struct value describing properties of a distribution of numeric +-- values. +muDistribution :: Lens' MetricUpdate (Maybe JSONValue) +muDistribution + = lens _muDistribution + (\ s a -> s{_muDistribution = a}) + -- | True if this metric is reported as the total cumulative aggregate value -- accumulated since the worker started working on this WorkItem. By -- default this is false, indicating that this metric is reported as a @@ -1801,18 +2645,26 @@ muCumulative = lens _muCumulative (\ s a -> s{_muCumulative = a}) -- | Metric aggregation kind. The possible metric aggregation kinds are --- \"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", and \"Or\". The --- specified aggregation kind is case-insensitive. If omitted, this is not --- an aggregated value but instead a single metric sample value. +-- \"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", \"Or\", and +-- \"Distribution\". The specified aggregation kind is case-insensitive. If +-- omitted, this is not an aggregated value but instead a single metric +-- sample value. muKind :: Lens' MetricUpdate (Maybe Text) muKind = lens _muKind (\ s a -> s{_muKind = a}) +-- | A struct value describing properties of a Gauge. Metrics of gauge type +-- show the value of a metric across time, and is aggregated based on the +-- newest value. +muGauge :: Lens' MetricUpdate (Maybe JSONValue) +muGauge = lens _muGauge (\ s a -> s{_muGauge = a}) + -- | Timestamp associated with the metric value. Optional when workers are -- reporting work progress; it will be filled in responses from the metrics -- API. -muUpdateTime :: Lens' MetricUpdate (Maybe Text) +muUpdateTime :: Lens' MetricUpdate (Maybe UTCTime) muUpdateTime = lens _muUpdateTime (\ s a -> s{_muUpdateTime = a}) + . mapping _DateTime -- | Worker-computed aggregate value for the \"Mean\" aggregation kind. This -- holds the count of the aggregated values and is used in combination with @@ -1839,8 +2691,10 @@ instance FromJSON MetricUpdate where MetricUpdate' <$> (o .:? "meanSum") <*> (o .:? "internal") <*> (o .:? "set") + <*> (o .:? "distribution") <*> (o .:? "cumulative") <*> (o .:? "kind") + <*> (o .:? "gauge") <*> (o .:? "updateTime") <*> (o .:? "meanCount") <*> (o .:? "name") @@ -1853,8 +2707,9 @@ instance ToJSON MetricUpdate where [("meanSum" .=) <$> _muMeanSum, ("internal" .=) <$> _muInternal, ("set" .=) <$> _muSet, + ("distribution" .=) <$> _muDistribution, ("cumulative" .=) <$> _muCumulative, - ("kind" .=) <$> _muKind, + ("kind" .=) <$> _muKind, ("gauge" .=) <$> _muGauge, ("updateTime" .=) <$> _muUpdateTime, ("meanCount" .=) <$> _muMeanCount, ("name" .=) <$> _muName, @@ -1895,6 +2750,66 @@ instance ToJSON SourceGetMetadataResponse where = object (catMaybes [("metadata" .=) <$> _sgmrMetadata]) +-- | Metadata describing a template. +-- +-- /See:/ 'templateMetadata' smart constructor. +data TemplateMetadata = TemplateMetadata' + { _tmName :: !(Maybe Text) + , _tmParameters :: !(Maybe [ParameterMetadata]) + , _tmDescription :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TemplateMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tmName' +-- +-- * 'tmParameters' +-- +-- * 'tmDescription' +templateMetadata + :: TemplateMetadata +templateMetadata = + TemplateMetadata' + { _tmName = Nothing + , _tmParameters = Nothing + , _tmDescription = Nothing + } + +-- | Required. The name of the template. +tmName :: Lens' TemplateMetadata (Maybe Text) +tmName = lens _tmName (\ s a -> s{_tmName = a}) + +-- | The parameters for the template. +tmParameters :: Lens' TemplateMetadata [ParameterMetadata] +tmParameters + = lens _tmParameters (\ s a -> s{_tmParameters = a}) + . _Default + . _Coerce + +-- | Optional. A description of the template. +tmDescription :: Lens' TemplateMetadata (Maybe Text) +tmDescription + = lens _tmDescription + (\ s a -> s{_tmDescription = a}) + +instance FromJSON TemplateMetadata where + parseJSON + = withObject "TemplateMetadata" + (\ o -> + TemplateMetadata' <$> + (o .:? "name") <*> (o .:? "parameters" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON TemplateMetadata where + toJSON TemplateMetadata'{..} + = object + (catMaybes + [("name" .=) <$> _tmName, + ("parameters" .=) <$> _tmParameters, + ("description" .=) <$> _tmDescription]) + -- | Describes the environment in which a Dataflow Job runs. -- -- /See:/ 'environment' smart constructor. @@ -2155,6 +3070,7 @@ data CounterUpdate = CounterUpdate' , _cuInternal :: !(Maybe JSONValue) , _cuStringList :: !(Maybe StringList) , _cuShortId :: !(Maybe (Textual Int64)) + , _cuIntegerGauge :: !(Maybe IntegerGauge) , _cuDistribution :: !(Maybe DistributionUpdate) , _cuCumulative :: !(Maybe Bool) , _cuStructuredNameAndMetadata :: !(Maybe CounterStructuredNameAndMetadata) @@ -2181,6 +3097,8 @@ data CounterUpdate = CounterUpdate' -- -- * 'cuShortId' -- +-- * 'cuIntegerGauge' +-- -- * 'cuDistribution' -- -- * 'cuCumulative' @@ -2206,6 +3124,7 @@ counterUpdate = , _cuInternal = Nothing , _cuStringList = Nothing , _cuShortId = Nothing + , _cuIntegerGauge = Nothing , _cuDistribution = Nothing , _cuCumulative = Nothing , _cuStructuredNameAndMetadata = Nothing @@ -2252,6 +3171,12 @@ cuShortId = lens _cuShortId (\ s a -> s{_cuShortId = a}) . mapping _Coerce +-- | Gauge data +cuIntegerGauge :: Lens' CounterUpdate (Maybe IntegerGauge) +cuIntegerGauge + = lens _cuIntegerGauge + (\ s a -> s{_cuIntegerGauge = a}) + -- | Distribution data cuDistribution :: Lens' CounterUpdate (Maybe DistributionUpdate) cuDistribution @@ -2310,6 +3235,7 @@ instance FromJSON CounterUpdate where <*> (o .:? "internal") <*> (o .:? "stringList") <*> (o .:? "shortId") + <*> (o .:? "integerGauge") <*> (o .:? "distribution") <*> (o .:? "cumulative") <*> (o .:? "structuredNameAndMetadata") @@ -2329,6 +3255,7 @@ instance ToJSON CounterUpdate where ("internal" .=) <$> _cuInternal, ("stringList" .=) <$> _cuStringList, ("shortId" .=) <$> _cuShortId, + ("integerGauge" .=) <$> _cuIntegerGauge, ("distribution" .=) <$> _cuDistribution, ("cumulative" .=) <$> _cuCumulative, ("structuredNameAndMetadata" .=) <$> @@ -2382,7 +3309,7 @@ instance ToJSON StreamingStageLocation where -- -- /See:/ 'derivedSource' smart constructor. data DerivedSource = DerivedSource' - { _dsDerivationMode :: !(Maybe Text) + { _dsDerivationMode :: !(Maybe DerivedSourceDerivationMode) , _dsSource :: !(Maybe Source) } deriving (Eq,Show,Data,Typeable,Generic) @@ -2402,7 +3329,7 @@ derivedSource = } -- | What source to base the produced source on (if any). -dsDerivationMode :: Lens' DerivedSource (Maybe Text) +dsDerivationMode :: Lens' DerivedSource (Maybe DerivedSourceDerivationMode) dsDerivationMode = lens _dsDerivationMode (\ s a -> s{_dsDerivationMode = a}) @@ -2434,7 +3361,7 @@ instance ToJSON DerivedSource where -- /See:/ 'jobMetrics' smart constructor. data JobMetrics = JobMetrics' { _jmMetrics :: !(Maybe [MetricUpdate]) - , _jmMetricTime :: !(Maybe Text) + , _jmMetricTime :: !(Maybe DateTime') } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'JobMetrics' with the minimum fields required to make a request. @@ -2460,9 +3387,10 @@ jmMetrics . _Coerce -- | Timestamp as of which metric values are current. -jmMetricTime :: Lens' JobMetrics (Maybe Text) +jmMetricTime :: Lens' JobMetrics (Maybe UTCTime) jmMetricTime = lens _jmMetricTime (\ s a -> s{_jmMetricTime = a}) + . mapping _DateTime instance FromJSON JobMetrics where parseJSON @@ -2483,7 +3411,8 @@ instance ToJSON JobMetrics where -- -- /See:/ 'sendDebugCaptureRequest' smart constructor. data SendDebugCaptureRequest = SendDebugCaptureRequest' - { _sdcrData :: !(Maybe Text) + { _sdcrLocation :: !(Maybe Text) + , _sdcrData :: !(Maybe Text) , _sdcrComponentId :: !(Maybe Text) , _sdcrWorkerId :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -2492,6 +3421,8 @@ data SendDebugCaptureRequest = SendDebugCaptureRequest' -- -- Use one of the following lenses to modify other fields as desired: -- +-- * 'sdcrLocation' +-- -- * 'sdcrData' -- -- * 'sdcrComponentId' @@ -2501,11 +3432,17 @@ sendDebugCaptureRequest :: SendDebugCaptureRequest sendDebugCaptureRequest = SendDebugCaptureRequest' - { _sdcrData = Nothing + { _sdcrLocation = Nothing + , _sdcrData = Nothing , _sdcrComponentId = Nothing , _sdcrWorkerId = Nothing } +-- | The location which contains the job specified by job_id. +sdcrLocation :: Lens' SendDebugCaptureRequest (Maybe Text) +sdcrLocation + = lens _sdcrLocation (\ s a -> s{_sdcrLocation = a}) + -- | The encoded debug information. sdcrData :: Lens' SendDebugCaptureRequest (Maybe Text) sdcrData = lens _sdcrData (\ s a -> s{_sdcrData = a}) @@ -2526,14 +3463,16 @@ instance FromJSON SendDebugCaptureRequest where = withObject "SendDebugCaptureRequest" (\ o -> SendDebugCaptureRequest' <$> - (o .:? "data") <*> (o .:? "componentId") <*> - (o .:? "workerId")) + (o .:? "location") <*> (o .:? "data") <*> + (o .:? "componentId") + <*> (o .:? "workerId")) instance ToJSON SendDebugCaptureRequest where toJSON SendDebugCaptureRequest'{..} = object (catMaybes - [("data" .=) <$> _sdcrData, + [("location" .=) <$> _sdcrLocation, + ("data" .=) <$> _sdcrData, ("componentId" .=) <$> _sdcrComponentId, ("workerId" .=) <$> _sdcrWorkerId]) @@ -2541,19 +3480,20 @@ instance ToJSON SendDebugCaptureRequest where -- -- /See:/ 'workItemStatus' smart constructor. data WorkItemStatus = WorkItemStatus' - { _wisReportedProgress :: !(Maybe ApproximateReportedProgress) - , _wisProgress :: !(Maybe ApproximateProgress) - , _wisSourceOperationResponse :: !(Maybe SourceOperationResponse) - , _wisStopPosition :: !(Maybe Position) - , _wisDynamicSourceSplit :: !(Maybe DynamicSourceSplit) - , _wisCompleted :: !(Maybe Bool) - , _wisSourceFork :: !(Maybe SourceFork) - , _wisReportIndex :: !(Maybe (Textual Int64)) - , _wisRequestedLeaseDuration :: !(Maybe Text) - , _wisErrors :: !(Maybe [Status]) - , _wisCounterUpdates :: !(Maybe [CounterUpdate]) - , _wisMetricUpdates :: !(Maybe [MetricUpdate]) - , _wisWorkItemId :: !(Maybe Text) + { _wisReportedProgress :: !(Maybe ApproximateReportedProgress) + , _wisProgress :: !(Maybe ApproximateProgress) + , _wisTotalThrottlerWaitTimeSeconds :: !(Maybe (Textual Double)) + , _wisSourceOperationResponse :: !(Maybe SourceOperationResponse) + , _wisStopPosition :: !(Maybe Position) + , _wisDynamicSourceSplit :: !(Maybe DynamicSourceSplit) + , _wisCompleted :: !(Maybe Bool) + , _wisSourceFork :: !(Maybe SourceFork) + , _wisReportIndex :: !(Maybe (Textual Int64)) + , _wisRequestedLeaseDuration :: !(Maybe GDuration) + , _wisErrors :: !(Maybe [Status]) + , _wisCounterUpdates :: !(Maybe [CounterUpdate]) + , _wisMetricUpdates :: !(Maybe [MetricUpdate]) + , _wisWorkItemId :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'WorkItemStatus' with the minimum fields required to make a request. @@ -2564,6 +3504,8 @@ data WorkItemStatus = WorkItemStatus' -- -- * 'wisProgress' -- +-- * 'wisTotalThrottlerWaitTimeSeconds' +-- -- * 'wisSourceOperationResponse' -- -- * 'wisStopPosition' @@ -2591,6 +3533,7 @@ workItemStatus = WorkItemStatus' { _wisReportedProgress = Nothing , _wisProgress = Nothing + , _wisTotalThrottlerWaitTimeSeconds = Nothing , _wisSourceOperationResponse = Nothing , _wisStopPosition = Nothing , _wisDynamicSourceSplit = Nothing @@ -2615,6 +3558,13 @@ wisProgress :: Lens' WorkItemStatus (Maybe ApproximateProgress) wisProgress = lens _wisProgress (\ s a -> s{_wisProgress = a}) +-- | Total time the worker spent being throttled by external systems. +wisTotalThrottlerWaitTimeSeconds :: Lens' WorkItemStatus (Maybe Double) +wisTotalThrottlerWaitTimeSeconds + = lens _wisTotalThrottlerWaitTimeSeconds + (\ s a -> s{_wisTotalThrottlerWaitTimeSeconds = a}) + . mapping _Coerce + -- | If the work item represented a SourceOperationRequest, and the work is -- completed, contains the result of the operation. wisSourceOperationResponse :: Lens' WorkItemStatus (Maybe SourceOperationResponse) @@ -2685,10 +3635,11 @@ wisReportIndex . mapping _Coerce -- | Amount of time the worker requests for its lease. -wisRequestedLeaseDuration :: Lens' WorkItemStatus (Maybe Text) +wisRequestedLeaseDuration :: Lens' WorkItemStatus (Maybe Scientific) wisRequestedLeaseDuration = lens _wisRequestedLeaseDuration (\ s a -> s{_wisRequestedLeaseDuration = a}) + . mapping _GDuration -- | Specifies errors which occurred during processing. If errors are -- provided, and completed = true, then the WorkItem is considered to have @@ -2727,7 +3678,8 @@ instance FromJSON WorkItemStatus where (\ o -> WorkItemStatus' <$> (o .:? "reportedProgress") <*> (o .:? "progress") <*> - (o .:? "sourceOperationResponse") + (o .:? "totalThrottlerWaitTimeSeconds") + <*> (o .:? "sourceOperationResponse") <*> (o .:? "stopPosition") <*> (o .:? "dynamicSourceSplit") <*> (o .:? "completed") @@ -2745,6 +3697,8 @@ instance ToJSON WorkItemStatus where (catMaybes [("reportedProgress" .=) <$> _wisReportedProgress, ("progress" .=) <$> _wisProgress, + ("totalThrottlerWaitTimeSeconds" .=) <$> + _wisTotalThrottlerWaitTimeSeconds, ("sourceOperationResponse" .=) <$> _wisSourceOperationResponse, ("stopPosition" .=) <$> _wisStopPosition, @@ -2905,6 +3859,104 @@ instance ToJSON WorkerMessageCode where [("parameters" .=) <$> _wmcParameters, ("code" .=) <$> _wmcCode]) +-- | Description of the type, names\/ids, and input\/outputs for a transform. +-- +-- /See:/ 'transformSummary' smart constructor. +data TransformSummary = TransformSummary' + { _tsDisplayData :: !(Maybe [DisplayData]) + , _tsKind :: !(Maybe TransformSummaryKind) + , _tsOutputCollectionName :: !(Maybe [Text]) + , _tsInputCollectionName :: !(Maybe [Text]) + , _tsName :: !(Maybe Text) + , _tsId :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransformSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsDisplayData' +-- +-- * 'tsKind' +-- +-- * 'tsOutputCollectionName' +-- +-- * 'tsInputCollectionName' +-- +-- * 'tsName' +-- +-- * 'tsId' +transformSummary + :: TransformSummary +transformSummary = + TransformSummary' + { _tsDisplayData = Nothing + , _tsKind = Nothing + , _tsOutputCollectionName = Nothing + , _tsInputCollectionName = Nothing + , _tsName = Nothing + , _tsId = Nothing + } + +-- | Transform-specific display data. +tsDisplayData :: Lens' TransformSummary [DisplayData] +tsDisplayData + = lens _tsDisplayData + (\ s a -> s{_tsDisplayData = a}) + . _Default + . _Coerce + +-- | Type of transform. +tsKind :: Lens' TransformSummary (Maybe TransformSummaryKind) +tsKind = lens _tsKind (\ s a -> s{_tsKind = a}) + +-- | User names for all collection outputs to this transform. +tsOutputCollectionName :: Lens' TransformSummary [Text] +tsOutputCollectionName + = lens _tsOutputCollectionName + (\ s a -> s{_tsOutputCollectionName = a}) + . _Default + . _Coerce + +-- | User names for all collection inputs to this transform. +tsInputCollectionName :: Lens' TransformSummary [Text] +tsInputCollectionName + = lens _tsInputCollectionName + (\ s a -> s{_tsInputCollectionName = a}) + . _Default + . _Coerce + +-- | User provided name for this transform instance. +tsName :: Lens' TransformSummary (Maybe Text) +tsName = lens _tsName (\ s a -> s{_tsName = a}) + +-- | SDK generated id of this transform instance. +tsId :: Lens' TransformSummary (Maybe Text) +tsId = lens _tsId (\ s a -> s{_tsId = a}) + +instance FromJSON TransformSummary where + parseJSON + = withObject "TransformSummary" + (\ o -> + TransformSummary' <$> + (o .:? "displayData" .!= mempty) <*> (o .:? "kind") + <*> (o .:? "outputCollectionName" .!= mempty) + <*> (o .:? "inputCollectionName" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON TransformSummary where + toJSON TransformSummary'{..} + = object + (catMaybes + [("displayData" .=) <$> _tsDisplayData, + ("kind" .=) <$> _tsKind, + ("outputCollectionName" .=) <$> + _tsOutputCollectionName, + ("inputCollectionName" .=) <$> + _tsInputCollectionName, + ("name" .=) <$> _tsName, ("id" .=) <$> _tsId]) + -- | The map of transform name prefixes of the job to be replaced to the -- corresponding name prefixes of the new job. -- @@ -3509,15 +4561,78 @@ instance ToJSON FloatingPointMean where (catMaybes [("count" .=) <$> _fpmCount, ("sum" .=) <$> _fpmSum]) +-- | Modeled after information exposed by \/proc\/stat. +-- +-- /See:/ 'cpuTime' smart constructor. +data CPUTime = CPUTime' + { _ctTotalMs :: !(Maybe (Textual Word64)) + , _ctRate :: !(Maybe (Textual Double)) + , _ctTimestamp :: !(Maybe DateTime') + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CPUTime' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctTotalMs' +-- +-- * 'ctRate' +-- +-- * 'ctTimestamp' +cpuTime + :: CPUTime +cpuTime = + CPUTime' + { _ctTotalMs = Nothing + , _ctRate = Nothing + , _ctTimestamp = Nothing + } + +-- | Total active CPU time across all cores (ie., non-idle) in milliseconds +-- since start-up. +ctTotalMs :: Lens' CPUTime (Maybe Word64) +ctTotalMs + = lens _ctTotalMs (\ s a -> s{_ctTotalMs = a}) . + mapping _Coerce + +-- | Average CPU utilization rate (% non-idle cpu \/ second) since previous +-- sample. +ctRate :: Lens' CPUTime (Maybe Double) +ctRate + = lens _ctRate (\ s a -> s{_ctRate = a}) . + mapping _Coerce + +-- | Timestamp of the measurement. +ctTimestamp :: Lens' CPUTime (Maybe UTCTime) +ctTimestamp + = lens _ctTimestamp (\ s a -> s{_ctTimestamp = a}) . + mapping _DateTime + +instance FromJSON CPUTime where + parseJSON + = withObject "CPUTime" + (\ o -> + CPUTime' <$> + (o .:? "totalMs") <*> (o .:? "rate") <*> + (o .:? "timestamp")) + +instance ToJSON CPUTime where + toJSON CPUTime'{..} + = object + (catMaybes + [("totalMs" .=) <$> _ctTotalMs, + ("rate" .=) <$> _ctRate, + ("timestamp" .=) <$> _ctTimestamp]) + -- | Request to lease WorkItems. -- -- /See:/ 'leaseWorkItemRequest' smart constructor. data LeaseWorkItemRequest = LeaseWorkItemRequest' { _lwirWorkItemTypes :: !(Maybe [Text]) - , _lwirCurrentWorkerTime :: !(Maybe Text) + , _lwirCurrentWorkerTime :: !(Maybe DateTime') , _lwirLocation :: !(Maybe Text) , _lwirWorkerCapabilities :: !(Maybe [Text]) - , _lwirRequestedLeaseDuration :: !(Maybe Text) + , _lwirRequestedLeaseDuration :: !(Maybe GDuration) , _lwirWorkerId :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -3557,10 +4672,11 @@ lwirWorkItemTypes . _Coerce -- | The current timestamp at the worker. -lwirCurrentWorkerTime :: Lens' LeaseWorkItemRequest (Maybe Text) +lwirCurrentWorkerTime :: Lens' LeaseWorkItemRequest (Maybe UTCTime) lwirCurrentWorkerTime = lens _lwirCurrentWorkerTime (\ s a -> s{_lwirCurrentWorkerTime = a}) + . mapping _DateTime -- | The location which contains the WorkItem\'s job. lwirLocation :: Lens' LeaseWorkItemRequest (Maybe Text) @@ -3577,10 +4693,11 @@ lwirWorkerCapabilities . _Coerce -- | The initial lease period. -lwirRequestedLeaseDuration :: Lens' LeaseWorkItemRequest (Maybe Text) +lwirRequestedLeaseDuration :: Lens' LeaseWorkItemRequest (Maybe Scientific) lwirRequestedLeaseDuration = lens _lwirRequestedLeaseDuration (\ s a -> s{_lwirRequestedLeaseDuration = a}) + . mapping _GDuration -- | Identifies the worker leasing work -- typically the ID of the virtual -- machine running the worker. @@ -3749,6 +4866,55 @@ instance ToJSON ShellTask where [("command" .=) <$> _stCommand, ("exitCode" .=) <$> _stExitCode]) +-- | Metadata for a Datastore connector used by the job. +-- +-- /See:/ 'datastoreIODetails' smart constructor. +data DatastoreIODetails = DatastoreIODetails' + { _diodNamespace :: !(Maybe Text) + , _diodProjectId :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatastoreIODetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'diodNamespace' +-- +-- * 'diodProjectId' +datastoreIODetails + :: DatastoreIODetails +datastoreIODetails = + DatastoreIODetails' + { _diodNamespace = Nothing + , _diodProjectId = Nothing + } + +-- | Namespace used in the connection. +diodNamespace :: Lens' DatastoreIODetails (Maybe Text) +diodNamespace + = lens _diodNamespace + (\ s a -> s{_diodNamespace = a}) + +-- | ProjectId accessed in the connection. +diodProjectId :: Lens' DatastoreIODetails (Maybe Text) +diodProjectId + = lens _diodProjectId + (\ s a -> s{_diodProjectId = a}) + +instance FromJSON DatastoreIODetails where + parseJSON + = withObject "DatastoreIODetails" + (\ o -> + DatastoreIODetails' <$> + (o .:? "namespace") <*> (o .:? "projectId")) + +instance ToJSON DatastoreIODetails where + toJSON DatastoreIODetails'{..} + = object + (catMaybes + [("namespace" .=) <$> _diodNamespace, + ("projectId" .=) <$> _diodProjectId]) + -- -- /See:/ 'statusDetailsItem' smart constructor. newtype StatusDetailsItem = StatusDetailsItem' @@ -3836,7 +5002,8 @@ instance ToJSON ReportedParallelism where ("isInfinite" .=) <$> _rpIsInfinite]) -- | Named properties associated with the step. Each kind of predefined step --- has its own required set of properties. +-- has its own required set of properties. Must be provided on Create. Only +-- retrieved with JOB_VIEW_ALL. -- -- /See:/ 'stepProperties' smart constructor. newtype StepProperties = StepProperties' @@ -3971,8 +5138,9 @@ instance ToJSON TopologyConfig where -- -- /See:/ 'approximateSplitRequest' smart constructor. data ApproximateSplitRequest = ApproximateSplitRequest' - { _asrFractionConsumed :: !(Maybe (Textual Double)) - , _asrPosition :: !(Maybe Position) + { _asrFractionConsumed :: !(Maybe (Textual Double)) + , _asrFractionOfRemainder :: !(Maybe (Textual Double)) + , _asrPosition :: !(Maybe Position) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'ApproximateSplitRequest' with the minimum fields required to make a request. @@ -3981,12 +5149,15 @@ data ApproximateSplitRequest = ApproximateSplitRequest' -- -- * 'asrFractionConsumed' -- +-- * 'asrFractionOfRemainder' +-- -- * 'asrPosition' approximateSplitRequest :: ApproximateSplitRequest approximateSplitRequest = ApproximateSplitRequest' { _asrFractionConsumed = Nothing + , _asrFractionOfRemainder = Nothing , _asrPosition = Nothing } @@ -3998,6 +5169,14 @@ asrFractionConsumed (\ s a -> s{_asrFractionConsumed = a}) . mapping _Coerce +-- | The fraction of the remainder of work to split the work item at, from +-- 0.0 (split at the current position) to 1.0 (end of the input). +asrFractionOfRemainder :: Lens' ApproximateSplitRequest (Maybe Double) +asrFractionOfRemainder + = lens _asrFractionOfRemainder + (\ s a -> s{_asrFractionOfRemainder = a}) + . mapping _Coerce + -- | A Position at which to split the work item. asrPosition :: Lens' ApproximateSplitRequest (Maybe Position) asrPosition @@ -4008,13 +5187,17 @@ instance FromJSON ApproximateSplitRequest where = withObject "ApproximateSplitRequest" (\ o -> ApproximateSplitRequest' <$> - (o .:? "fractionConsumed") <*> (o .:? "position")) + (o .:? "fractionConsumed") <*> + (o .:? "fractionOfRemainder") + <*> (o .:? "position")) instance ToJSON ApproximateSplitRequest where toJSON ApproximateSplitRequest'{..} = object (catMaybes [("fractionConsumed" .=) <$> _asrFractionConsumed, + ("fractionOfRemainder" .=) <$> + _asrFractionOfRemainder, ("position" .=) <$> _asrPosition]) -- | A representation of an int64, n, that is immune to precision loss when @@ -4205,6 +5388,67 @@ instance ToJSON GetDebugConfigResponse where toJSON GetDebugConfigResponse'{..} = object (catMaybes [("config" .=) <$> _gdcrConfig]) +-- | The version of the SDK used to run the jobl +-- +-- /See:/ 'sdkVersion' smart constructor. +data SdkVersion = SdkVersion' + { _svSdkSupportStatus :: !(Maybe SdkVersionSdkSupportStatus) + , _svVersionDisplayName :: !(Maybe Text) + , _svVersion :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SdkVersion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svSdkSupportStatus' +-- +-- * 'svVersionDisplayName' +-- +-- * 'svVersion' +sdkVersion + :: SdkVersion +sdkVersion = + SdkVersion' + { _svSdkSupportStatus = Nothing + , _svVersionDisplayName = Nothing + , _svVersion = Nothing + } + +-- | The support status for this SDK version. +svSdkSupportStatus :: Lens' SdkVersion (Maybe SdkVersionSdkSupportStatus) +svSdkSupportStatus + = lens _svSdkSupportStatus + (\ s a -> s{_svSdkSupportStatus = a}) + +-- | A readable string describing the version of the sdk. +svVersionDisplayName :: Lens' SdkVersion (Maybe Text) +svVersionDisplayName + = lens _svVersionDisplayName + (\ s a -> s{_svVersionDisplayName = a}) + +-- | The version of the SDK used to run the job. +svVersion :: Lens' SdkVersion (Maybe Text) +svVersion + = lens _svVersion (\ s a -> s{_svVersion = a}) + +instance FromJSON SdkVersion where + parseJSON + = withObject "SdkVersion" + (\ o -> + SdkVersion' <$> + (o .:? "sdkSupportStatus") <*> + (o .:? "versionDisplayName") + <*> (o .:? "version")) + +instance ToJSON SdkVersion where + toJSON SdkVersion'{..} + = object + (catMaybes + [("sdkSupportStatus" .=) <$> _svSdkSupportStatus, + ("versionDisplayName" .=) <$> _svVersionDisplayName, + ("version" .=) <$> _svVersion]) + -- | Other data returned by the service, specific to the particular worker -- harness. -- @@ -4301,31 +5545,29 @@ instance ToJSON DataDiskAssignment where -- | Worker metrics exported from workers. This contains resource utilization -- metrics accumulated from a variety of sources. For more information, see --- go\/df-resource-signals. Note that this proto closely follows the --- structure of its DFE siblings in its contents. +-- go\/df-resource-signals. -- -- /See:/ 'resourceUtilizationReport' smart constructor. newtype ResourceUtilizationReport = ResourceUtilizationReport' - { _rurMetrics :: Maybe [ResourceUtilizationReportMetricsItem] + { _rurCPUTime :: Maybe [CPUTime] } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'ResourceUtilizationReport' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- --- * 'rurMetrics' +-- * 'rurCPUTime' resourceUtilizationReport :: ResourceUtilizationReport resourceUtilizationReport = ResourceUtilizationReport' - { _rurMetrics = Nothing + { _rurCPUTime = Nothing } --- | Each Struct must parallel DFE worker metrics protos (eg., cpu_time --- metric will have nested values “timestamp_ms, total_ms, rate”). -rurMetrics :: Lens' ResourceUtilizationReport [ResourceUtilizationReportMetricsItem] -rurMetrics - = lens _rurMetrics (\ s a -> s{_rurMetrics = a}) . +-- | CPU utilization samples. +rurCPUTime :: Lens' ResourceUtilizationReport [CPUTime] +rurCPUTime + = lens _rurCPUTime (\ s a -> s{_rurCPUTime = a}) . _Default . _Coerce @@ -4334,11 +5576,11 @@ instance FromJSON ResourceUtilizationReport where = withObject "ResourceUtilizationReport" (\ o -> ResourceUtilizationReport' <$> - (o .:? "metrics" .!= mempty)) + (o .:? "cpuTime" .!= mempty)) instance ToJSON ResourceUtilizationReport where toJSON ResourceUtilizationReport'{..} - = object (catMaybes [("metrics" .=) <$> _rurMetrics]) + = object (catMaybes [("cpuTime" .=) <$> _rurCPUTime]) -- | Indicates which location failed to respond to a request for data. -- @@ -4377,8 +5619,9 @@ instance ToJSON FailedLocation where -- -- /See:/ 'workerMessageResponse' smart constructor. data WorkerMessageResponse = WorkerMessageResponse' - { _wmrWorkerHealthReportResponse :: !(Maybe WorkerHealthReportResponse) - , _wmrWorkerMetricsResponse :: !(Maybe ResourceUtilizationReportResponse) + { _wmrWorkerHealthReportResponse :: !(Maybe WorkerHealthReportResponse) + , _wmrWorkerMetricsResponse :: !(Maybe ResourceUtilizationReportResponse) + , _wmrWorkerShutdownNoticeResponse :: !(Maybe WorkerShutdownNoticeResponse) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'WorkerMessageResponse' with the minimum fields required to make a request. @@ -4388,12 +5631,15 @@ data WorkerMessageResponse = WorkerMessageResponse' -- * 'wmrWorkerHealthReportResponse' -- -- * 'wmrWorkerMetricsResponse' +-- +-- * 'wmrWorkerShutdownNoticeResponse' workerMessageResponse :: WorkerMessageResponse workerMessageResponse = WorkerMessageResponse' { _wmrWorkerHealthReportResponse = Nothing , _wmrWorkerMetricsResponse = Nothing + , _wmrWorkerShutdownNoticeResponse = Nothing } -- | The service\'s response to a worker\'s health report. @@ -4408,13 +5654,20 @@ wmrWorkerMetricsResponse = lens _wmrWorkerMetricsResponse (\ s a -> s{_wmrWorkerMetricsResponse = a}) +-- | Service\'s response to shutdown notice (currently empty). +wmrWorkerShutdownNoticeResponse :: Lens' WorkerMessageResponse (Maybe WorkerShutdownNoticeResponse) +wmrWorkerShutdownNoticeResponse + = lens _wmrWorkerShutdownNoticeResponse + (\ s a -> s{_wmrWorkerShutdownNoticeResponse = a}) + instance FromJSON WorkerMessageResponse where parseJSON = withObject "WorkerMessageResponse" (\ o -> WorkerMessageResponse' <$> (o .:? "workerHealthReportResponse") <*> - (o .:? "workerMetricsResponse")) + (o .:? "workerMetricsResponse") + <*> (o .:? "workerShutdownNoticeResponse")) instance ToJSON WorkerMessageResponse where toJSON WorkerMessageResponse'{..} @@ -4423,7 +5676,9 @@ instance ToJSON WorkerMessageResponse where [("workerHealthReportResponse" .=) <$> _wmrWorkerHealthReportResponse, ("workerMetricsResponse" .=) <$> - _wmrWorkerMetricsResponse]) + _wmrWorkerMetricsResponse, + ("workerShutdownNoticeResponse" .=) <$> + _wmrWorkerShutdownNoticeResponse]) -- | The runtime parameters to pass to the job. -- @@ -4463,17 +5718,77 @@ instance ToJSON CreateJobFromTemplateRequestParameters where toJSON = toJSON . _cjftrpAddtional +-- | Metadata for a BigTable connector used by the job. +-- +-- /See:/ 'bigTableIODetails' smart constructor. +data BigTableIODetails = BigTableIODetails' + { _btiodInstanceId :: !(Maybe Text) + , _btiodProjectId :: !(Maybe Text) + , _btiodTableId :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BigTableIODetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'btiodInstanceId' +-- +-- * 'btiodProjectId' +-- +-- * 'btiodTableId' +bigTableIODetails + :: BigTableIODetails +bigTableIODetails = + BigTableIODetails' + { _btiodInstanceId = Nothing + , _btiodProjectId = Nothing + , _btiodTableId = Nothing + } + +-- | InstanceId accessed in the connection. +btiodInstanceId :: Lens' BigTableIODetails (Maybe Text) +btiodInstanceId + = lens _btiodInstanceId + (\ s a -> s{_btiodInstanceId = a}) + +-- | ProjectId accessed in the connection. +btiodProjectId :: Lens' BigTableIODetails (Maybe Text) +btiodProjectId + = lens _btiodProjectId + (\ s a -> s{_btiodProjectId = a}) + +-- | TableId accessed in the connection. +btiodTableId :: Lens' BigTableIODetails (Maybe Text) +btiodTableId + = lens _btiodTableId (\ s a -> s{_btiodTableId = a}) + +instance FromJSON BigTableIODetails where + parseJSON + = withObject "BigTableIODetails" + (\ o -> + BigTableIODetails' <$> + (o .:? "instanceId") <*> (o .:? "projectId") <*> + (o .:? "tableId")) + +instance ToJSON BigTableIODetails where + toJSON BigTableIODetails'{..} + = object + (catMaybes + [("instanceId" .=) <$> _btiodInstanceId, + ("projectId" .=) <$> _btiodProjectId, + ("tableId" .=) <$> _btiodTableId]) + -- | The Dataflow service\'s idea of the current state of a WorkItem being -- processed by a worker. -- -- /See:/ 'workItemServiceState' smart constructor. data WorkItemServiceState = WorkItemServiceState' { _wissNextReportIndex :: !(Maybe (Textual Int64)) - , _wissReportStatusInterval :: !(Maybe Text) + , _wissReportStatusInterval :: !(Maybe GDuration) , _wissHarnessData :: !(Maybe WorkItemServiceStateHarnessData) , _wissSuggestedStopPoint :: !(Maybe ApproximateProgress) , _wissSuggestedStopPosition :: !(Maybe Position) - , _wissLeaseExpireTime :: !(Maybe Text) + , _wissLeaseExpireTime :: !(Maybe DateTime') , _wissSplitRequest :: !(Maybe ApproximateSplitRequest) , _wissMetricShortId :: !(Maybe [MetricShortId]) } deriving (Eq,Show,Data,Typeable,Generic) @@ -4521,10 +5836,11 @@ wissNextReportIndex . mapping _Coerce -- | New recommended reporting interval. -wissReportStatusInterval :: Lens' WorkItemServiceState (Maybe Text) +wissReportStatusInterval :: Lens' WorkItemServiceState (Maybe Scientific) wissReportStatusInterval = lens _wissReportStatusInterval (\ s a -> s{_wissReportStatusInterval = a}) + . mapping _GDuration -- | Other data returned by the service, specific to the particular worker -- harness. @@ -4546,10 +5862,11 @@ wissSuggestedStopPosition (\ s a -> s{_wissSuggestedStopPosition = a}) -- | Time at which the current lease will expire. -wissLeaseExpireTime :: Lens' WorkItemServiceState (Maybe Text) +wissLeaseExpireTime :: Lens' WorkItemServiceState (Maybe UTCTime) wissLeaseExpireTime = lens _wissLeaseExpireTime (\ s a -> s{_wissLeaseExpireTime = a}) + . mapping _DateTime -- | The progress point in the WorkItem where the Dataflow service suggests -- that the worker truncate the task. @@ -4600,6 +5917,39 @@ instance ToJSON WorkItemServiceState where ("splitRequest" .=) <$> _wissSplitRequest, ("metricShortId" .=) <$> _wissMetricShortId]) +-- | Response to the request to launch a template. +-- +-- /See:/ 'launchTemplateResponse' smart constructor. +newtype LaunchTemplateResponse = LaunchTemplateResponse' + { _ltrJob :: Maybe Job + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LaunchTemplateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltrJob' +launchTemplateResponse + :: LaunchTemplateResponse +launchTemplateResponse = + LaunchTemplateResponse' + { _ltrJob = Nothing + } + +-- | The job that was launched, if the request was not a dry run and the job +-- was successfully launched. +ltrJob :: Lens' LaunchTemplateResponse (Maybe Job) +ltrJob = lens _ltrJob (\ s a -> s{_ltrJob = a}) + +instance FromJSON LaunchTemplateResponse where + parseJSON + = withObject "LaunchTemplateResponse" + (\ o -> LaunchTemplateResponse' <$> (o .:? "job")) + +instance ToJSON LaunchTemplateResponse where + toJSON LaunchTemplateResponse'{..} + = object (catMaybes [("job" .=) <$> _ltrJob]) + -- | A task which initializes part of a streaming Dataflow job. -- -- /See:/ 'streamingSetupTask' smart constructor. @@ -4608,6 +5958,7 @@ data StreamingSetupTask = StreamingSetupTask' , _sstReceiveWorkPort :: !(Maybe (Textual Int32)) , _sstWorkerHarnessPort :: !(Maybe (Textual Int32)) , _sstDrain :: !(Maybe Bool) + , _sstSnapshotConfig :: !(Maybe StreamingApplianceSnapshotConfig) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'StreamingSetupTask' with the minimum fields required to make a request. @@ -4621,6 +5972,8 @@ data StreamingSetupTask = StreamingSetupTask' -- * 'sstWorkerHarnessPort' -- -- * 'sstDrain' +-- +-- * 'sstSnapshotConfig' streamingSetupTask :: StreamingSetupTask streamingSetupTask = @@ -4629,6 +5982,7 @@ streamingSetupTask = , _sstReceiveWorkPort = Nothing , _sstWorkerHarnessPort = Nothing , _sstDrain = Nothing + , _sstSnapshotConfig = Nothing } -- | The global topology of the streaming Dataflow job. @@ -4657,6 +6011,12 @@ sstWorkerHarnessPort sstDrain :: Lens' StreamingSetupTask (Maybe Bool) sstDrain = lens _sstDrain (\ s a -> s{_sstDrain = a}) +-- | Configures streaming appliance snapshot. +sstSnapshotConfig :: Lens' StreamingSetupTask (Maybe StreamingApplianceSnapshotConfig) +sstSnapshotConfig + = lens _sstSnapshotConfig + (\ s a -> s{_sstSnapshotConfig = a}) + instance FromJSON StreamingSetupTask where parseJSON = withObject "StreamingSetupTask" @@ -4665,7 +6025,8 @@ instance FromJSON StreamingSetupTask where (o .:? "streamingComputationTopology") <*> (o .:? "receiveWorkPort") <*> (o .:? "workerHarnessPort") - <*> (o .:? "drain")) + <*> (o .:? "drain") + <*> (o .:? "snapshotConfig")) instance ToJSON StreamingSetupTask where toJSON StreamingSetupTask'{..} @@ -4675,7 +6036,8 @@ instance ToJSON StreamingSetupTask where _sstStreamingComputationTopology, ("receiveWorkPort" .=) <$> _sstReceiveWorkPort, ("workerHarnessPort" .=) <$> _sstWorkerHarnessPort, - ("drain" .=) <$> _sstDrain]) + ("drain" .=) <$> _sstDrain, + ("snapshotConfig" .=) <$> _sstSnapshotConfig]) -- | The codec to use for interpreting an element in the input PTable. -- @@ -4724,9 +6086,10 @@ instance ToJSON -- -- /See:/ 'mapTask' smart constructor. data MapTask = MapTask' - { _mtInstructions :: !(Maybe [ParallelInstruction]) - , _mtSystemName :: !(Maybe Text) - , _mtStageName :: !(Maybe Text) + { _mtInstructions :: !(Maybe [ParallelInstruction]) + , _mtCounterPrefix :: !(Maybe Text) + , _mtSystemName :: !(Maybe Text) + , _mtStageName :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'MapTask' with the minimum fields required to make a request. @@ -4735,6 +6098,8 @@ data MapTask = MapTask' -- -- * 'mtInstructions' -- +-- * 'mtCounterPrefix' +-- -- * 'mtSystemName' -- -- * 'mtStageName' @@ -4743,6 +6108,7 @@ mapTask mapTask = MapTask' { _mtInstructions = Nothing + , _mtCounterPrefix = Nothing , _mtSystemName = Nothing , _mtStageName = Nothing } @@ -4755,6 +6121,13 @@ mtInstructions . _Default . _Coerce +-- | Counter prefix that can be used to prefix counters. Not currently used +-- in Dataflow. +mtCounterPrefix :: Lens' MapTask (Maybe Text) +mtCounterPrefix + = lens _mtCounterPrefix + (\ s a -> s{_mtCounterPrefix = a}) + -- | System-defined name of this MapTask. Unique across the workflow. mtSystemName :: Lens' MapTask (Maybe Text) mtSystemName @@ -4772,7 +6145,8 @@ instance FromJSON MapTask where (\ o -> MapTask' <$> (o .:? "instructions" .!= mempty) <*> - (o .:? "systemName") + (o .:? "counterPrefix") + <*> (o .:? "systemName") <*> (o .:? "stageName")) instance ToJSON MapTask where @@ -4780,6 +6154,7 @@ instance ToJSON MapTask where = object (catMaybes [("instructions" .=) <$> _mtInstructions, + ("counterPrefix" .=) <$> _mtCounterPrefix, ("systemName" .=) <$> _mtSystemName, ("stageName" .=) <$> _mtStageName]) @@ -5080,6 +6455,43 @@ instance ToJSON StreamLocation where _slCustomSourceLocation, ("pubsubLocation" .=) <$> _slPubsubLocation]) +-- | Other stats that can accompany an event. E.g. { \"downloaded_bytes\" : +-- \"123456\" } +-- +-- /See:/ 'workerLifecycleEventMetadata' smart constructor. +newtype WorkerLifecycleEventMetadata = WorkerLifecycleEventMetadata' + { _wlemAddtional :: HashMap Text Text + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkerLifecycleEventMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wlemAddtional' +workerLifecycleEventMetadata + :: HashMap Text Text -- ^ 'wlemAddtional' + -> WorkerLifecycleEventMetadata +workerLifecycleEventMetadata pWlemAddtional_ = + WorkerLifecycleEventMetadata' + { _wlemAddtional = _Coerce # pWlemAddtional_ + } + +wlemAddtional :: Lens' WorkerLifecycleEventMetadata (HashMap Text Text) +wlemAddtional + = lens _wlemAddtional + (\ s a -> s{_wlemAddtional = a}) + . _Coerce + +instance FromJSON WorkerLifecycleEventMetadata where + parseJSON + = withObject "WorkerLifecycleEventMetadata" + (\ o -> + WorkerLifecycleEventMetadata' <$> + (parseJSONObject o)) + +instance ToJSON WorkerLifecycleEventMetadata where + toJSON = toJSON . _wlemAddtional + -- | Extra arguments for this worker pool. -- -- /See:/ 'workerPoolPoolArgs' smart constructor. @@ -5119,9 +6531,15 @@ instance ToJSON WorkerPoolPoolArgs where -- -- /See:/ 'runtimeEnvironment' smart constructor. data RuntimeEnvironment = RuntimeEnvironment' - { _reZone :: !(Maybe Text) + { _reNumWorkers :: !(Maybe (Textual Int32)) + , _reNetwork :: !(Maybe Text) + , _reZone :: !(Maybe Text) , _reBypassTempDirValidation :: !(Maybe Bool) + , _reSubnetwork :: !(Maybe Text) + , _reMachineType :: !(Maybe Text) + , _reAdditionalUserLabels :: !(Maybe RuntimeEnvironmentAdditionalUserLabels) , _reServiceAccountEmail :: !(Maybe Text) + , _reAdditionalExperiments :: !(Maybe [Text]) , _reMaxWorkers :: !(Maybe (Textual Int32)) , _reTempLocation :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -5130,12 +6548,24 @@ data RuntimeEnvironment = RuntimeEnvironment' -- -- Use one of the following lenses to modify other fields as desired: -- +-- * 'reNumWorkers' +-- +-- * 'reNetwork' +-- -- * 'reZone' -- -- * 'reBypassTempDirValidation' -- +-- * 'reSubnetwork' +-- +-- * 'reMachineType' +-- +-- * 'reAdditionalUserLabels' +-- -- * 'reServiceAccountEmail' -- +-- * 'reAdditionalExperiments' +-- -- * 'reMaxWorkers' -- -- * 'reTempLocation' @@ -5143,13 +6573,31 @@ runtimeEnvironment :: RuntimeEnvironment runtimeEnvironment = RuntimeEnvironment' - { _reZone = Nothing + { _reNumWorkers = Nothing + , _reNetwork = Nothing + , _reZone = Nothing , _reBypassTempDirValidation = Nothing + , _reSubnetwork = Nothing + , _reMachineType = Nothing + , _reAdditionalUserLabels = Nothing , _reServiceAccountEmail = Nothing + , _reAdditionalExperiments = Nothing , _reMaxWorkers = Nothing , _reTempLocation = Nothing } +-- | The initial number of Google Compute Engine instnaces for the job. +reNumWorkers :: Lens' RuntimeEnvironment (Maybe Int32) +reNumWorkers + = lens _reNumWorkers (\ s a -> s{_reNumWorkers = a}) + . mapping _Coerce + +-- | Network to which VMs will be assigned. If empty or unspecified, the +-- service will use the network \"default\". +reNetwork :: Lens' RuntimeEnvironment (Maybe Text) +reNetwork + = lens _reNetwork (\ s a -> s{_reNetwork = a}) + -- | The Compute Engine [availability -- zone](https:\/\/cloud.google.com\/compute\/docs\/regions-zones\/regions-zones) -- for launching worker instances to run your pipeline. @@ -5163,12 +6611,39 @@ reBypassTempDirValidation = lens _reBypassTempDirValidation (\ s a -> s{_reBypassTempDirValidation = a}) +-- | Subnetwork to which VMs will be assigned, if desired. Expected to be of +-- the form \"regions\/REGION\/subnetworks\/SUBNETWORK\". +reSubnetwork :: Lens' RuntimeEnvironment (Maybe Text) +reSubnetwork + = lens _reSubnetwork (\ s a -> s{_reSubnetwork = a}) + +-- | The machine type to use for the job. Defaults to the value from the +-- template if not specified. +reMachineType :: Lens' RuntimeEnvironment (Maybe Text) +reMachineType + = lens _reMachineType + (\ s a -> s{_reMachineType = a}) + +-- | Additional user labels attached to the job. +reAdditionalUserLabels :: Lens' RuntimeEnvironment (Maybe RuntimeEnvironmentAdditionalUserLabels) +reAdditionalUserLabels + = lens _reAdditionalUserLabels + (\ s a -> s{_reAdditionalUserLabels = a}) + -- | The email address of the service account to run the job as. reServiceAccountEmail :: Lens' RuntimeEnvironment (Maybe Text) reServiceAccountEmail = lens _reServiceAccountEmail (\ s a -> s{_reServiceAccountEmail = a}) +-- | Additional experiment flags for the job. +reAdditionalExperiments :: Lens' RuntimeEnvironment [Text] +reAdditionalExperiments + = lens _reAdditionalExperiments + (\ s a -> s{_reAdditionalExperiments = a}) + . _Default + . _Coerce + -- | The maximum number of Google Compute Engine instances to be made -- available to your pipeline during execution, from 1 to 1000. reMaxWorkers :: Lens' RuntimeEnvironment (Maybe Int32) @@ -5188,8 +6663,14 @@ instance FromJSON RuntimeEnvironment where = withObject "RuntimeEnvironment" (\ o -> RuntimeEnvironment' <$> - (o .:? "zone") <*> (o .:? "bypassTempDirValidation") + (o .:? "numWorkers") <*> (o .:? "network") <*> + (o .:? "zone") + <*> (o .:? "bypassTempDirValidation") + <*> (o .:? "subnetwork") + <*> (o .:? "machineType") + <*> (o .:? "additionalUserLabels") <*> (o .:? "serviceAccountEmail") + <*> (o .:? "additionalExperiments" .!= mempty) <*> (o .:? "maxWorkers") <*> (o .:? "tempLocation")) @@ -5197,11 +6678,19 @@ instance ToJSON RuntimeEnvironment where toJSON RuntimeEnvironment'{..} = object (catMaybes - [("zone" .=) <$> _reZone, + [("numWorkers" .=) <$> _reNumWorkers, + ("network" .=) <$> _reNetwork, + ("zone" .=) <$> _reZone, ("bypassTempDirValidation" .=) <$> _reBypassTempDirValidation, + ("subnetwork" .=) <$> _reSubnetwork, + ("machineType" .=) <$> _reMachineType, + ("additionalUserLabels" .=) <$> + _reAdditionalUserLabels, ("serviceAccountEmail" .=) <$> _reServiceAccountEmail, + ("additionalExperiments" .=) <$> + _reAdditionalExperiments, ("maxWorkers" .=) <$> _reMaxWorkers, ("tempLocation" .=) <$> _reTempLocation]) @@ -5210,9 +6699,9 @@ instance ToJSON RuntimeEnvironment where -- -- /See:/ 'counterMetadata' smart constructor. data CounterMetadata = CounterMetadata' - { _cmKind :: !(Maybe Text) + { _cmKind :: !(Maybe CounterMetadataKind) , _cmDescription :: !(Maybe Text) - , _cmStandardUnits :: !(Maybe Text) + , _cmStandardUnits :: !(Maybe CounterMetadataStandardUnits) , _cmOtherUnits :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -5238,7 +6727,7 @@ counterMetadata = } -- | Counter aggregation kind. -cmKind :: Lens' CounterMetadata (Maybe Text) +cmKind :: Lens' CounterMetadata (Maybe CounterMetadataKind) cmKind = lens _cmKind (\ s a -> s{_cmKind = a}) -- | Human-readable description of the counter semantics. @@ -5248,7 +6737,7 @@ cmDescription (\ s a -> s{_cmDescription = a}) -- | System defined Units, see above enum. -cmStandardUnits :: Lens' CounterMetadata (Maybe Text) +cmStandardUnits :: Lens' CounterMetadata (Maybe CounterMetadataStandardUnits) cmStandardUnits = lens _cmStandardUnits (\ s a -> s{_cmStandardUnits = a}) @@ -5368,7 +6857,8 @@ instance ToJSON StreamingSideInputLocation where -- -- /See:/ 'getDebugConfigRequest' smart constructor. data GetDebugConfigRequest = GetDebugConfigRequest' - { _gdcrComponentId :: !(Maybe Text) + { _gdcrLocation :: !(Maybe Text) + , _gdcrComponentId :: !(Maybe Text) , _gdcrWorkerId :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -5376,6 +6866,8 @@ data GetDebugConfigRequest = GetDebugConfigRequest' -- -- Use one of the following lenses to modify other fields as desired: -- +-- * 'gdcrLocation' +-- -- * 'gdcrComponentId' -- -- * 'gdcrWorkerId' @@ -5383,10 +6875,16 @@ getDebugConfigRequest :: GetDebugConfigRequest getDebugConfigRequest = GetDebugConfigRequest' - { _gdcrComponentId = Nothing + { _gdcrLocation = Nothing + , _gdcrComponentId = Nothing , _gdcrWorkerId = Nothing } +-- | The location which contains the job specified by job_id. +gdcrLocation :: Lens' GetDebugConfigRequest (Maybe Text) +gdcrLocation + = lens _gdcrLocation (\ s a -> s{_gdcrLocation = a}) + -- | The internal component id for which debug configuration is requested. gdcrComponentId :: Lens' GetDebugConfigRequest (Maybe Text) gdcrComponentId @@ -5403,13 +6901,15 @@ instance FromJSON GetDebugConfigRequest where = withObject "GetDebugConfigRequest" (\ o -> GetDebugConfigRequest' <$> - (o .:? "componentId") <*> (o .:? "workerId")) + (o .:? "location") <*> (o .:? "componentId") <*> + (o .:? "workerId")) instance ToJSON GetDebugConfigRequest where toJSON GetDebugConfigRequest'{..} = object (catMaybes - [("componentId" .=) <$> _gdcrComponentId, + [("location" .=) <$> _gdcrLocation, + ("componentId" .=) <$> _gdcrComponentId, ("workerId" .=) <$> _gdcrWorkerId]) -- | A single message which encapsulates structured name and metadata for a @@ -5463,12 +6963,49 @@ instance ToJSON CounterStructuredNameAndMetadata [("name" .=) <$> _csnamName, ("metadata" .=) <$> _csnamMetadata]) +-- | Shutdown notification from workers. This is to be sent by the shutdown +-- script of the worker VM so that the backend knows that the VM is being +-- shut down. +-- +-- /See:/ 'workerShutdownNotice' smart constructor. +newtype WorkerShutdownNotice = WorkerShutdownNotice' + { _wsnReason :: Maybe Text + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkerShutdownNotice' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wsnReason' +workerShutdownNotice + :: WorkerShutdownNotice +workerShutdownNotice = + WorkerShutdownNotice' + { _wsnReason = Nothing + } + +-- | The reason for the worker shutdown. Current possible values are: +-- \"UNKNOWN\": shutdown reason is unknown. \"PREEMPTION\": shutdown reason +-- is preemption. Other possible reasons may be added in the future. +wsnReason :: Lens' WorkerShutdownNotice (Maybe Text) +wsnReason + = lens _wsnReason (\ s a -> s{_wsnReason = a}) + +instance FromJSON WorkerShutdownNotice where + parseJSON + = withObject "WorkerShutdownNotice" + (\ o -> WorkerShutdownNotice' <$> (o .:? "reason")) + +instance ToJSON WorkerShutdownNotice where + toJSON WorkerShutdownNotice'{..} + = object (catMaybes [("reason" .=) <$> _wsnReason]) + -- | A task which describes what action should be performed for the specified -- streaming computation ranges. -- -- /See:/ 'streamingComputationTask' smart constructor. data StreamingComputationTask = StreamingComputationTask' - { _sctTaskType :: !(Maybe Text) + { _sctTaskType :: !(Maybe StreamingComputationTaskTaskType) , _sctDataDisks :: !(Maybe [MountedDataDisk]) , _sctComputationRanges :: !(Maybe [StreamingComputationRanges]) } deriving (Eq,Show,Data,Typeable,Generic) @@ -5492,7 +7029,7 @@ streamingComputationTask = } -- | A type of streaming computation task. -sctTaskType :: Lens' StreamingComputationTask (Maybe Text) +sctTaskType :: Lens' StreamingComputationTask (Maybe StreamingComputationTaskTaskType) sctTaskType = lens _sctTaskType (\ s a -> s{_sctTaskType = a}) @@ -5527,13 +7064,86 @@ instance ToJSON StreamingComputationTask where ("dataDisks" .=) <$> _sctDataDisks, ("computationRanges" .=) <$> _sctComputationRanges]) +-- | A descriptive representation of submitted pipeline as well as the +-- executed form. This data is provided by the Dataflow service for ease of +-- visualizing the pipeline and interpretting Dataflow provided metrics. +-- +-- /See:/ 'pipelineDescription' smart constructor. +data PipelineDescription = PipelineDescription' + { _pdExecutionPipelineStage :: !(Maybe [ExecutionStageSummary]) + , _pdDisplayData :: !(Maybe [DisplayData]) + , _pdOriginalPipelineTransform :: !(Maybe [TransformSummary]) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PipelineDescription' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdExecutionPipelineStage' +-- +-- * 'pdDisplayData' +-- +-- * 'pdOriginalPipelineTransform' +pipelineDescription + :: PipelineDescription +pipelineDescription = + PipelineDescription' + { _pdExecutionPipelineStage = Nothing + , _pdDisplayData = Nothing + , _pdOriginalPipelineTransform = Nothing + } + +-- | Description of each stage of execution of the pipeline. +pdExecutionPipelineStage :: Lens' PipelineDescription [ExecutionStageSummary] +pdExecutionPipelineStage + = lens _pdExecutionPipelineStage + (\ s a -> s{_pdExecutionPipelineStage = a}) + . _Default + . _Coerce + +-- | Pipeline level display data. +pdDisplayData :: Lens' PipelineDescription [DisplayData] +pdDisplayData + = lens _pdDisplayData + (\ s a -> s{_pdDisplayData = a}) + . _Default + . _Coerce + +-- | Description of each transform in the pipeline and collections between +-- them. +pdOriginalPipelineTransform :: Lens' PipelineDescription [TransformSummary] +pdOriginalPipelineTransform + = lens _pdOriginalPipelineTransform + (\ s a -> s{_pdOriginalPipelineTransform = a}) + . _Default + . _Coerce + +instance FromJSON PipelineDescription where + parseJSON + = withObject "PipelineDescription" + (\ o -> + PipelineDescription' <$> + (o .:? "executionPipelineStage" .!= mempty) <*> + (o .:? "displayData" .!= mempty) + <*> (o .:? "originalPipelineTransform" .!= mempty)) + +instance ToJSON PipelineDescription where + toJSON PipelineDescription'{..} + = object + (catMaybes + [("executionPipelineStage" .=) <$> + _pdExecutionPipelineStage, + ("displayData" .=) <$> _pdDisplayData, + ("originalPipelineTransform" .=) <$> + _pdOriginalPipelineTransform]) + -- | A particular message pertaining to a Dataflow job. -- -- /See:/ 'jobMessage' smart constructor. data JobMessage = JobMessage' - { _jmTime :: !(Maybe Text) + { _jmTime :: !(Maybe DateTime') , _jmMessageText :: !(Maybe Text) - , _jmMessageImportance :: !(Maybe Text) + , _jmMessageImportance :: !(Maybe JobMessageMessageImportance) , _jmId :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -5559,8 +7169,10 @@ jobMessage = } -- | The timestamp of the message. -jmTime :: Lens' JobMessage (Maybe Text) -jmTime = lens _jmTime (\ s a -> s{_jmTime = a}) +jmTime :: Lens' JobMessage (Maybe UTCTime) +jmTime + = lens _jmTime (\ s a -> s{_jmTime = a}) . + mapping _DateTime -- | The text of the message. jmMessageText :: Lens' JobMessage (Maybe Text) @@ -5569,13 +7181,12 @@ jmMessageText (\ s a -> s{_jmMessageText = a}) -- | Importance level of the message. -jmMessageImportance :: Lens' JobMessage (Maybe Text) +jmMessageImportance :: Lens' JobMessage (Maybe JobMessageMessageImportance) jmMessageImportance = lens _jmMessageImportance (\ s a -> s{_jmMessageImportance = a}) --- | Identifies the message. This is automatically generated by the service; --- the caller should treat it as an opaque string. +-- | Deprecated. jmId :: Lens' JobMessage (Maybe Text) jmId = lens _jmId (\ s a -> s{_jmId = a}) @@ -5597,6 +7208,110 @@ instance ToJSON JobMessage where ("messageImportance" .=) <$> _jmMessageImportance, ("id" .=) <$> _jmId]) +-- | A report of an event in a worker\'s lifecycle. The proto contains one +-- event, because the worker is expected to asynchronously send each +-- message immediately after the event. Due to this asynchrony, messages +-- may arrive out of order (or missing), and it is up to the consumer to +-- interpret. The timestamp of the event is in the enclosing WorkerMessage +-- proto. +-- +-- /See:/ 'workerLifecycleEvent' smart constructor. +data WorkerLifecycleEvent = WorkerLifecycleEvent' + { _wleEvent :: !(Maybe WorkerLifecycleEventEvent) + , _wleContainerStartTime :: !(Maybe DateTime') + , _wleMetadata :: !(Maybe WorkerLifecycleEventMetadata) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkerLifecycleEvent' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wleEvent' +-- +-- * 'wleContainerStartTime' +-- +-- * 'wleMetadata' +workerLifecycleEvent + :: WorkerLifecycleEvent +workerLifecycleEvent = + WorkerLifecycleEvent' + { _wleEvent = Nothing + , _wleContainerStartTime = Nothing + , _wleMetadata = Nothing + } + +-- | The event being reported. +wleEvent :: Lens' WorkerLifecycleEvent (Maybe WorkerLifecycleEventEvent) +wleEvent = lens _wleEvent (\ s a -> s{_wleEvent = a}) + +-- | The start time of this container. All events will report this so that +-- events can be grouped together across container\/VM restarts. +wleContainerStartTime :: Lens' WorkerLifecycleEvent (Maybe UTCTime) +wleContainerStartTime + = lens _wleContainerStartTime + (\ s a -> s{_wleContainerStartTime = a}) + . mapping _DateTime + +-- | Other stats that can accompany an event. E.g. { \"downloaded_bytes\" : +-- \"123456\" } +wleMetadata :: Lens' WorkerLifecycleEvent (Maybe WorkerLifecycleEventMetadata) +wleMetadata + = lens _wleMetadata (\ s a -> s{_wleMetadata = a}) + +instance FromJSON WorkerLifecycleEvent where + parseJSON + = withObject "WorkerLifecycleEvent" + (\ o -> + WorkerLifecycleEvent' <$> + (o .:? "event") <*> (o .:? "containerStartTime") <*> + (o .:? "metadata")) + +instance ToJSON WorkerLifecycleEvent where + toJSON WorkerLifecycleEvent'{..} + = object + (catMaybes + [("event" .=) <$> _wleEvent, + ("containerStartTime" .=) <$> _wleContainerStartTime, + ("metadata" .=) <$> _wleMetadata]) + +-- | Additional user labels attached to the job. +-- +-- /See:/ 'runtimeEnvironmentAdditionalUserLabels' smart constructor. +newtype RuntimeEnvironmentAdditionalUserLabels = RuntimeEnvironmentAdditionalUserLabels' + { _reaulAddtional :: HashMap Text Text + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RuntimeEnvironmentAdditionalUserLabels' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'reaulAddtional' +runtimeEnvironmentAdditionalUserLabels + :: HashMap Text Text -- ^ 'reaulAddtional' + -> RuntimeEnvironmentAdditionalUserLabels +runtimeEnvironmentAdditionalUserLabels pReaulAddtional_ = + RuntimeEnvironmentAdditionalUserLabels' + { _reaulAddtional = _Coerce # pReaulAddtional_ + } + +reaulAddtional :: Lens' RuntimeEnvironmentAdditionalUserLabels (HashMap Text Text) +reaulAddtional + = lens _reaulAddtional + (\ s a -> s{_reaulAddtional = a}) + . _Coerce + +instance FromJSON + RuntimeEnvironmentAdditionalUserLabels where + parseJSON + = withObject "RuntimeEnvironmentAdditionalUserLabels" + (\ o -> + RuntimeEnvironmentAdditionalUserLabels' <$> + (parseJSONObject o)) + +instance ToJSON + RuntimeEnvironmentAdditionalUserLabels where + toJSON = toJSON . _reaulAddtional + -- | Information about an output of a SeqMapTask. -- -- /See:/ 'seqMapTaskOutputInfo' smart constructor. @@ -5643,6 +7358,54 @@ instance ToJSON SeqMapTaskOutputInfo where [("sink" .=) <$> _smtoiSink, ("tag" .=) <$> _smtoiTag]) +-- | Metadata for a PubSub connector used by the job. +-- +-- /See:/ 'pubSubIODetails' smart constructor. +data PubSubIODetails = PubSubIODetails' + { _psiodTopic :: !(Maybe Text) + , _psiodSubscription :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PubSubIODetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psiodTopic' +-- +-- * 'psiodSubscription' +pubSubIODetails + :: PubSubIODetails +pubSubIODetails = + PubSubIODetails' + { _psiodTopic = Nothing + , _psiodSubscription = Nothing + } + +-- | Topic accessed in the connection. +psiodTopic :: Lens' PubSubIODetails (Maybe Text) +psiodTopic + = lens _psiodTopic (\ s a -> s{_psiodTopic = a}) + +-- | Subscription used in the connection. +psiodSubscription :: Lens' PubSubIODetails (Maybe Text) +psiodSubscription + = lens _psiodSubscription + (\ s a -> s{_psiodSubscription = a}) + +instance FromJSON PubSubIODetails where + parseJSON + = withObject "PubSubIODetails" + (\ o -> + PubSubIODetails' <$> + (o .:? "topic") <*> (o .:? "subscription")) + +instance ToJSON PubSubIODetails where + toJSON PubSubIODetails'{..} + = object + (catMaybes + [("topic" .=) <$> _psiodTopic, + ("subscription" .=) <$> _psiodSubscription]) + -- | A request to compute the SourceMetadata of a Source. -- -- /See:/ 'sourceGetMetadataRequest' smart constructor. @@ -5677,6 +7440,27 @@ instance ToJSON SourceGetMetadataRequest where toJSON SourceGetMetadataRequest'{..} = object (catMaybes [("source" .=) <$> _sgmrSource]) +-- | Service-side response to WorkerMessage issuing shutdown notice. +-- +-- /See:/ 'workerShutdownNoticeResponse' smart constructor. +data WorkerShutdownNoticeResponse = + WorkerShutdownNoticeResponse' + deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkerShutdownNoticeResponse' with the minimum fields required to make a request. +-- +workerShutdownNoticeResponse + :: WorkerShutdownNoticeResponse +workerShutdownNoticeResponse = WorkerShutdownNoticeResponse' + +instance FromJSON WorkerShutdownNoticeResponse where + parseJSON + = withObject "WorkerShutdownNoticeResponse" + (\ o -> pure WorkerShutdownNoticeResponse') + +instance ToJSON WorkerShutdownNoticeResponse where + toJSON = const emptyObject + -- | The user function to invoke. -- -- /See:/ 'seqMapTaskUserFn' smart constructor. @@ -5756,38 +7540,54 @@ instance ToJSON -- -- /See:/ 'job' smart constructor. data Job = Job' - { _jRequestedState :: !(Maybe Text) - , _jLocation :: !(Maybe Text) - , _jEnvironment :: !(Maybe Environment) - , _jClientRequestId :: !(Maybe Text) - , _jCurrentState :: !(Maybe Text) - , _jReplacedByJobId :: !(Maybe Text) - , _jTempFiles :: !(Maybe [Text]) - , _jSteps :: !(Maybe [Step]) - , _jExecutionInfo :: !(Maybe JobExecutionInfo) - , _jName :: !(Maybe Text) - , _jTransformNameMApping :: !(Maybe JobTransformNameMApping) - , _jId :: !(Maybe Text) - , _jLabels :: !(Maybe JobLabels) - , _jProjectId :: !(Maybe Text) - , _jType :: !(Maybe Text) - , _jCurrentStateTime :: !(Maybe Text) - , _jReplaceJobId :: !(Maybe Text) - , _jCreateTime :: !(Maybe Text) + { _jStepsLocation :: !(Maybe Text) + , _jCreatedFromSnapshotId :: !(Maybe Text) + , _jRequestedState :: !(Maybe JobRequestedState) + , _jJobMetadata :: !(Maybe JobMetadata) + , _jLocation :: !(Maybe Text) + , _jStartTime :: !(Maybe DateTime') + , _jEnvironment :: !(Maybe Environment) + , _jClientRequestId :: !(Maybe Text) + , _jStageStates :: !(Maybe [ExecutionStageState]) + , _jCurrentState :: !(Maybe JobCurrentState) + , _jReplacedByJobId :: !(Maybe Text) + , _jTempFiles :: !(Maybe [Text]) + , _jSteps :: !(Maybe [Step]) + , _jPipelineDescription :: !(Maybe PipelineDescription) + , _jExecutionInfo :: !(Maybe JobExecutionInfo) + , _jName :: !(Maybe Text) + , _jTransformNameMApping :: !(Maybe JobTransformNameMApping) + , _jId :: !(Maybe Text) + , _jLabels :: !(Maybe JobLabels) + , _jProjectId :: !(Maybe Text) + , _jType :: !(Maybe JobType) + , _jCurrentStateTime :: !(Maybe DateTime') + , _jReplaceJobId :: !(Maybe Text) + , _jCreateTime :: !(Maybe DateTime') } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'Job' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- +-- * 'jStepsLocation' +-- +-- * 'jCreatedFromSnapshotId' +-- -- * 'jRequestedState' -- +-- * 'jJobMetadata' +-- -- * 'jLocation' -- +-- * 'jStartTime' +-- -- * 'jEnvironment' -- -- * 'jClientRequestId' -- +-- * 'jStageStates' +-- -- * 'jCurrentState' -- -- * 'jReplacedByJobId' @@ -5796,6 +7596,8 @@ data Job = Job' -- -- * 'jSteps' -- +-- * 'jPipelineDescription' +-- -- * 'jExecutionInfo' -- -- * 'jName' @@ -5819,14 +7621,20 @@ job :: Job job = Job' - { _jRequestedState = Nothing + { _jStepsLocation = Nothing + , _jCreatedFromSnapshotId = Nothing + , _jRequestedState = Nothing + , _jJobMetadata = Nothing , _jLocation = Nothing + , _jStartTime = Nothing , _jEnvironment = Nothing , _jClientRequestId = Nothing + , _jStageStates = Nothing , _jCurrentState = Nothing , _jReplacedByJobId = Nothing , _jTempFiles = Nothing , _jSteps = Nothing + , _jPipelineDescription = Nothing , _jExecutionInfo = Nothing , _jName = Nothing , _jTransformNameMApping = Nothing @@ -5839,22 +7647,53 @@ job = , _jCreateTime = Nothing } +-- | The GCS location where the steps are stored. +jStepsLocation :: Lens' Job (Maybe Text) +jStepsLocation + = lens _jStepsLocation + (\ s a -> s{_jStepsLocation = a}) + +-- | If this is specified, the job\'s initial state is populated from the +-- given snapshot. +jCreatedFromSnapshotId :: Lens' Job (Maybe Text) +jCreatedFromSnapshotId + = lens _jCreatedFromSnapshotId + (\ s a -> s{_jCreatedFromSnapshotId = a}) + -- | The job\'s requested state. \`UpdateJob\` may be used to switch between -- the \`JOB_STATE_STOPPED\` and \`JOB_STATE_RUNNING\` states, by setting -- requested_state. \`UpdateJob\` may also be used to directly set a job\'s -- requested state to \`JOB_STATE_CANCELLED\` or \`JOB_STATE_DONE\`, -- irrevocably terminating the job if it has not already reached a terminal -- state. -jRequestedState :: Lens' Job (Maybe Text) +jRequestedState :: Lens' Job (Maybe JobRequestedState) jRequestedState = lens _jRequestedState (\ s a -> s{_jRequestedState = a}) +-- | This field is populated by the Dataflow service to support filtering +-- jobs by the metadata values provided here. Populated for ListJobs and +-- all GetJob views SUMMARY and higher. +jJobMetadata :: Lens' Job (Maybe JobMetadata) +jJobMetadata + = lens _jJobMetadata (\ s a -> s{_jJobMetadata = a}) + -- | The location that contains this job. jLocation :: Lens' Job (Maybe Text) jLocation = lens _jLocation (\ s a -> s{_jLocation = a}) +-- | The timestamp when the job was started (transitioned to +-- JOB_STATE_PENDING). Flexible resource scheduling jobs are started with +-- some delay after job creation, so start_time is unset before start and +-- is updated when the job is started by the Cloud Dataflow service. For +-- other jobs, start_time always equals to create_time and is immutable and +-- set by the Cloud Dataflow service. +jStartTime :: Lens' Job (Maybe UTCTime) +jStartTime + = lens _jStartTime (\ s a -> s{_jStartTime = a}) . + mapping _DateTime + -- | The environment for the job. jEnvironment :: Lens' Job (Maybe Environment) jEnvironment @@ -5872,13 +7711,21 @@ jClientRequestId = lens _jClientRequestId (\ s a -> s{_jClientRequestId = a}) +-- | This field may be mutated by the Cloud Dataflow service; callers cannot +-- mutate it. +jStageStates :: Lens' Job [ExecutionStageState] +jStageStates + = lens _jStageStates (\ s a -> s{_jStageStates = a}) + . _Default + . _Coerce + -- | The current state of the job. Jobs are created in the -- \`JOB_STATE_STOPPED\` state unless otherwise specified. A job in the -- \`JOB_STATE_RUNNING\` state may asynchronously enter a terminal state. -- After a job has reached a terminal state, no further state updates may -- be made. This field may be mutated by the Cloud Dataflow service; -- callers cannot mutate it. -jCurrentState :: Lens' Job (Maybe Text) +jCurrentState :: Lens' Job (Maybe JobCurrentState) jCurrentState = lens _jCurrentState (\ s a -> s{_jCurrentState = a}) @@ -5902,13 +7749,23 @@ jTempFiles _Default . _Coerce --- | The top-level steps that constitute the entire job. +-- | Exactly one of step or steps_location should be specified. The top-level +-- steps that constitute the entire job. jSteps :: Lens' Job [Step] jSteps = lens _jSteps (\ s a -> s{_jSteps = a}) . _Default . _Coerce --- | Information about how the Cloud Dataflow service will run the job. +-- | Preliminary field: The format of this data may change at any time. A +-- description of the user pipeline and stages through which it is +-- executed. Created by Cloud Dataflow service. Only retrieved with +-- JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. +jPipelineDescription :: Lens' Job (Maybe PipelineDescription) +jPipelineDescription + = lens _jPipelineDescription + (\ s a -> s{_jPipelineDescription = a}) + +-- | Deprecated. jExecutionInfo :: Lens' Job (Maybe JobExecutionInfo) jExecutionInfo = lens _jExecutionInfo @@ -5950,14 +7807,15 @@ jProjectId = lens _jProjectId (\ s a -> s{_jProjectId = a}) -- | The type of Cloud Dataflow job. -jType :: Lens' Job (Maybe Text) +jType :: Lens' Job (Maybe JobType) jType = lens _jType (\ s a -> s{_jType = a}) -- | The timestamp associated with the current state. -jCurrentStateTime :: Lens' Job (Maybe Text) +jCurrentStateTime :: Lens' Job (Maybe UTCTime) jCurrentStateTime = lens _jCurrentStateTime (\ s a -> s{_jCurrentStateTime = a}) + . mapping _DateTime -- | If this job is an update of an existing job, this field is the job ID of -- the job it replaced. When sending a \`CreateJobRequest\`, you can update @@ -5970,22 +7828,30 @@ jReplaceJobId -- | The timestamp when the job was initially created. Immutable and set by -- the Cloud Dataflow service. -jCreateTime :: Lens' Job (Maybe Text) +jCreateTime :: Lens' Job (Maybe UTCTime) jCreateTime - = lens _jCreateTime (\ s a -> s{_jCreateTime = a}) + = lens _jCreateTime (\ s a -> s{_jCreateTime = a}) . + mapping _DateTime instance FromJSON Job where parseJSON = withObject "Job" (\ o -> Job' <$> - (o .:? "requestedState") <*> (o .:? "location") <*> - (o .:? "environment") + (o .:? "stepsLocation") <*> + (o .:? "createdFromSnapshotId") + <*> (o .:? "requestedState") + <*> (o .:? "jobMetadata") + <*> (o .:? "location") + <*> (o .:? "startTime") + <*> (o .:? "environment") <*> (o .:? "clientRequestId") + <*> (o .:? "stageStates" .!= mempty) <*> (o .:? "currentState") <*> (o .:? "replacedByJobId") <*> (o .:? "tempFiles" .!= mempty) <*> (o .:? "steps" .!= mempty) + <*> (o .:? "pipelineDescription") <*> (o .:? "executionInfo") <*> (o .:? "name") <*> (o .:? "transformNameMapping") @@ -6001,14 +7867,21 @@ instance ToJSON Job where toJSON Job'{..} = object (catMaybes - [("requestedState" .=) <$> _jRequestedState, + [("stepsLocation" .=) <$> _jStepsLocation, + ("createdFromSnapshotId" .=) <$> + _jCreatedFromSnapshotId, + ("requestedState" .=) <$> _jRequestedState, + ("jobMetadata" .=) <$> _jJobMetadata, ("location" .=) <$> _jLocation, + ("startTime" .=) <$> _jStartTime, ("environment" .=) <$> _jEnvironment, ("clientRequestId" .=) <$> _jClientRequestId, + ("stageStates" .=) <$> _jStageStates, ("currentState" .=) <$> _jCurrentState, ("replacedByJobId" .=) <$> _jReplacedByJobId, ("tempFiles" .=) <$> _jTempFiles, ("steps" .=) <$> _jSteps, + ("pipelineDescription" .=) <$> _jPipelineDescription, ("executionInfo" .=) <$> _jExecutionInfo, ("name" .=) <$> _jName, ("transformNameMapping" .=) <$> @@ -6202,7 +8075,7 @@ data WorkerPool = WorkerPool' , _wpNumWorkers :: !(Maybe (Textual Int32)) , _wpNetwork :: !(Maybe Text) , _wpZone :: !(Maybe Text) - , _wpIPConfiguration :: !(Maybe Text) + , _wpIPConfiguration :: !(Maybe WorkerPoolIPConfiguration) , _wpPackages :: !(Maybe [Package]) , _wpOnHostMaintenance :: !(Maybe Text) , _wpDiskSourceImage :: !(Maybe Text) @@ -6210,8 +8083,8 @@ data WorkerPool = WorkerPool' , _wpMachineType :: !(Maybe Text) , _wpMetadata :: !(Maybe WorkerPoolMetadata) , _wpDiskType :: !(Maybe Text) - , _wpTeardownPolicy :: !(Maybe Text) - , _wpDefaultPackageSet :: !(Maybe Text) + , _wpTeardownPolicy :: !(Maybe WorkerPoolTeardownPolicy) + , _wpDefaultPackageSet :: !(Maybe WorkerPoolDefaultPackageSet) , _wpPoolArgs :: !(Maybe WorkerPoolPoolArgs) , _wpWorkerHarnessContainerImage :: !(Maybe Text) , _wpDataDisks :: !(Maybe [Disk]) @@ -6344,7 +8217,7 @@ wpZone :: Lens' WorkerPool (Maybe Text) wpZone = lens _wpZone (\ s a -> s{_wpZone = a}) -- | Configuration for VM IPs. -wpIPConfiguration :: Lens' WorkerPool (Maybe Text) +wpIPConfiguration :: Lens' WorkerPool (Maybe WorkerPoolIPConfiguration) wpIPConfiguration = lens _wpIPConfiguration (\ s a -> s{_wpIPConfiguration = a}) @@ -6405,7 +8278,7 @@ wpDiskType -- \`TEARDOWN_ALWAYS\` policy except for small, manually supervised test -- jobs. If unknown or unspecified, the service will attempt to choose a -- reasonable default. -wpTeardownPolicy :: Lens' WorkerPool (Maybe Text) +wpTeardownPolicy :: Lens' WorkerPool (Maybe WorkerPoolTeardownPolicy) wpTeardownPolicy = lens _wpTeardownPolicy (\ s a -> s{_wpTeardownPolicy = a}) @@ -6413,7 +8286,7 @@ wpTeardownPolicy -- | The default package set to install. This allows the service to select a -- default set of packages which are useful to worker harnesses written in -- a particular language. -wpDefaultPackageSet :: Lens' WorkerPool (Maybe Text) +wpDefaultPackageSet :: Lens' WorkerPool (Maybe WorkerPoolDefaultPackageSet) wpDefaultPackageSet = lens _wpDefaultPackageSet (\ s a -> s{_wpDefaultPackageSet = a}) @@ -6541,7 +8414,8 @@ sName :: Lens' Step (Maybe Text) sName = lens _sName (\ s a -> s{_sName = a}) -- | Named properties associated with the step. Each kind of predefined step --- has its own required set of properties. +-- has its own required set of properties. Must be provided on Create. Only +-- retrieved with JOB_VIEW_ALL. sProperties :: Lens' Step (Maybe StepProperties) sProperties = lens _sProperties (\ s a -> s{_sProperties = a}) @@ -6561,6 +8435,67 @@ instance ToJSON Step where [("kind" .=) <$> _sKind, ("name" .=) <$> _sName, ("properties" .=) <$> _sProperties]) +-- | Description of an interstitial value between transforms in an execution +-- stage. +-- +-- /See:/ 'componentSource' smart constructor. +data ComponentSource = ComponentSource' + { _csUserName :: !(Maybe Text) + , _csName :: !(Maybe Text) + , _csOriginalTransformOrCollection :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ComponentSource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csUserName' +-- +-- * 'csName' +-- +-- * 'csOriginalTransformOrCollection' +componentSource + :: ComponentSource +componentSource = + ComponentSource' + { _csUserName = Nothing + , _csName = Nothing + , _csOriginalTransformOrCollection = Nothing + } + +-- | Human-readable name for this transform; may be user or system generated. +csUserName :: Lens' ComponentSource (Maybe Text) +csUserName + = lens _csUserName (\ s a -> s{_csUserName = a}) + +-- | Dataflow service generated name for this source. +csName :: Lens' ComponentSource (Maybe Text) +csName = lens _csName (\ s a -> s{_csName = a}) + +-- | User name for the original user transform or collection with which this +-- source is most closely associated. +csOriginalTransformOrCollection :: Lens' ComponentSource (Maybe Text) +csOriginalTransformOrCollection + = lens _csOriginalTransformOrCollection + (\ s a -> s{_csOriginalTransformOrCollection = a}) + +instance FromJSON ComponentSource where + parseJSON + = withObject "ComponentSource" + (\ o -> + ComponentSource' <$> + (o .:? "userName") <*> (o .:? "name") <*> + (o .:? "originalTransformOrCollection")) + +instance ToJSON ComponentSource where + toJSON ComponentSource'{..} + = object + (catMaybes + [("userName" .=) <$> _csUserName, + ("name" .=) <$> _csName, + ("originalTransformOrCollection" .=) <$> + _csOriginalTransformOrCollection]) + -- | The packages that must be installed in order for a worker to run the -- steps of the Cloud Dataflow job that will be assigned to its worker -- pool. This is the mechanism by which the Cloud Dataflow SDK causes code @@ -6614,6 +8549,120 @@ instance ToJSON Package where [("location" .=) <$> _pLocation, ("name" .=) <$> _pName]) +-- | Description of the composing transforms, names\/ids, and input\/outputs +-- of a stage of execution. Some composing transforms and sources may have +-- been generated by the Dataflow service during execution planning. +-- +-- /See:/ 'executionStageSummary' smart constructor. +data ExecutionStageSummary = ExecutionStageSummary' + { _essOutputSource :: !(Maybe [StageSource]) + , _essKind :: !(Maybe ExecutionStageSummaryKind) + , _essInputSource :: !(Maybe [StageSource]) + , _essName :: !(Maybe Text) + , _essComponentSource :: !(Maybe [ComponentSource]) + , _essId :: !(Maybe Text) + , _essComponentTransform :: !(Maybe [ComponentTransform]) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExecutionStageSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'essOutputSource' +-- +-- * 'essKind' +-- +-- * 'essInputSource' +-- +-- * 'essName' +-- +-- * 'essComponentSource' +-- +-- * 'essId' +-- +-- * 'essComponentTransform' +executionStageSummary + :: ExecutionStageSummary +executionStageSummary = + ExecutionStageSummary' + { _essOutputSource = Nothing + , _essKind = Nothing + , _essInputSource = Nothing + , _essName = Nothing + , _essComponentSource = Nothing + , _essId = Nothing + , _essComponentTransform = Nothing + } + +-- | Output sources for this stage. +essOutputSource :: Lens' ExecutionStageSummary [StageSource] +essOutputSource + = lens _essOutputSource + (\ s a -> s{_essOutputSource = a}) + . _Default + . _Coerce + +-- | Type of tranform this stage is executing. +essKind :: Lens' ExecutionStageSummary (Maybe ExecutionStageSummaryKind) +essKind = lens _essKind (\ s a -> s{_essKind = a}) + +-- | Input sources for this stage. +essInputSource :: Lens' ExecutionStageSummary [StageSource] +essInputSource + = lens _essInputSource + (\ s a -> s{_essInputSource = a}) + . _Default + . _Coerce + +-- | Dataflow service generated name for this stage. +essName :: Lens' ExecutionStageSummary (Maybe Text) +essName = lens _essName (\ s a -> s{_essName = a}) + +-- | Collections produced and consumed by component transforms of this stage. +essComponentSource :: Lens' ExecutionStageSummary [ComponentSource] +essComponentSource + = lens _essComponentSource + (\ s a -> s{_essComponentSource = a}) + . _Default + . _Coerce + +-- | Dataflow service generated id for this stage. +essId :: Lens' ExecutionStageSummary (Maybe Text) +essId = lens _essId (\ s a -> s{_essId = a}) + +-- | Transforms that comprise this execution stage. +essComponentTransform :: Lens' ExecutionStageSummary [ComponentTransform] +essComponentTransform + = lens _essComponentTransform + (\ s a -> s{_essComponentTransform = a}) + . _Default + . _Coerce + +instance FromJSON ExecutionStageSummary where + parseJSON + = withObject "ExecutionStageSummary" + (\ o -> + ExecutionStageSummary' <$> + (o .:? "outputSource" .!= mempty) <*> (o .:? "kind") + <*> (o .:? "inputSource" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "componentSource" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "componentTransform" .!= mempty)) + +instance ToJSON ExecutionStageSummary where + toJSON ExecutionStageSummary'{..} + = object + (catMaybes + [("outputSource" .=) <$> _essOutputSource, + ("kind" .=) <$> _essKind, + ("inputSource" .=) <$> _essInputSource, + ("name" .=) <$> _essName, + ("componentSource" .=) <$> _essComponentSource, + ("id" .=) <$> _essId, + ("componentTransform" .=) <$> + _essComponentTransform]) + -- | Parameters contains specific information about the code. This is a -- struct to allow parameters of different types. Examples: 1. For a -- \"HARNESS_STARTED\" message parameters might provide the name of the @@ -6713,6 +8762,54 @@ instance ToJSON DynamicSourceSplit where [("residual" .=) <$> _dssResidual, ("primary" .=) <$> _dssPrimary]) +-- | Request to create a snapshot of a job. +-- +-- /See:/ 'snapshotJobRequest' smart constructor. +data SnapshotJobRequest = SnapshotJobRequest' + { _sjrTtl :: !(Maybe GDuration) + , _sjrLocation :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotJobRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sjrTtl' +-- +-- * 'sjrLocation' +snapshotJobRequest + :: SnapshotJobRequest +snapshotJobRequest = + SnapshotJobRequest' + { _sjrTtl = Nothing + , _sjrLocation = Nothing + } + +-- | TTL for the snapshot. +sjrTtl :: Lens' SnapshotJobRequest (Maybe Scientific) +sjrTtl + = lens _sjrTtl (\ s a -> s{_sjrTtl = a}) . + mapping _GDuration + +-- | The location that contains this job. +sjrLocation :: Lens' SnapshotJobRequest (Maybe Text) +sjrLocation + = lens _sjrLocation (\ s a -> s{_sjrLocation = a}) + +instance FromJSON SnapshotJobRequest where + parseJSON + = withObject "SnapshotJobRequest" + (\ o -> + SnapshotJobRequest' <$> + (o .:? "ttl") <*> (o .:? "location")) + +instance ToJSON SnapshotJobRequest where + toJSON SnapshotJobRequest'{..} + = object + (catMaybes + [("ttl" .=) <$> _sjrTtl, + ("location" .=) <$> _sjrLocation]) + -- | Response from a request to report the status of WorkItems. -- -- /See:/ 'reportWorkItemStatusResponse' smart constructor. @@ -6969,6 +9066,44 @@ instance ToJSON ListJobsResponse where ("failedLocation" .=) <$> _ljrFailedLocation, ("jobs" .=) <$> _ljrJobs]) +-- | The runtime parameters to pass to the job. +-- +-- /See:/ 'launchTemplateParametersParameters' smart constructor. +newtype LaunchTemplateParametersParameters = LaunchTemplateParametersParameters' + { _ltppAddtional :: HashMap Text Text + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LaunchTemplateParametersParameters' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltppAddtional' +launchTemplateParametersParameters + :: HashMap Text Text -- ^ 'ltppAddtional' + -> LaunchTemplateParametersParameters +launchTemplateParametersParameters pLtppAddtional_ = + LaunchTemplateParametersParameters' + { _ltppAddtional = _Coerce # pLtppAddtional_ + } + +ltppAddtional :: Lens' LaunchTemplateParametersParameters (HashMap Text Text) +ltppAddtional + = lens _ltppAddtional + (\ s a -> s{_ltppAddtional = a}) + . _Coerce + +instance FromJSON LaunchTemplateParametersParameters + where + parseJSON + = withObject "LaunchTemplateParametersParameters" + (\ o -> + LaunchTemplateParametersParameters' <$> + (parseJSONObject o)) + +instance ToJSON LaunchTemplateParametersParameters + where + toJSON = toJSON . _ltppAddtional + -- | A source that records can be read and decoded from. -- -- /See:/ 'source' smart constructor. @@ -7078,7 +9213,7 @@ instance ToJSON Source where -- -- /See:/ 'approximateProgress' smart constructor. data ApproximateProgress = ApproximateProgress' - { _apRemainingTime :: !(Maybe Text) + { _apRemainingTime :: !(Maybe GDuration) , _apPercentComplete :: !(Maybe (Textual Double)) , _apPosition :: !(Maybe Position) } deriving (Eq,Show,Data,Typeable,Generic) @@ -7102,10 +9237,11 @@ approximateProgress = } -- | Obsolete. -apRemainingTime :: Lens' ApproximateProgress (Maybe Text) +apRemainingTime :: Lens' ApproximateProgress (Maybe Scientific) apRemainingTime = lens _apRemainingTime (\ s a -> s{_apRemainingTime = a}) + . mapping _GDuration -- | Obsolete. apPercentComplete :: Lens' ApproximateProgress (Maybe Double) @@ -7139,11 +9275,13 @@ instance ToJSON ApproximateProgress where -- -- /See:/ 'workerMessage' smart constructor. data WorkerMessage = WorkerMessage' - { _wmWorkerHealthReport :: !(Maybe WorkerHealthReport) - , _wmTime :: !(Maybe Text) - , _wmWorkerMessageCode :: !(Maybe WorkerMessageCode) - , _wmWorkerMetrics :: !(Maybe ResourceUtilizationReport) - , _wmLabels :: !(Maybe WorkerMessageLabels) + { _wmWorkerHealthReport :: !(Maybe WorkerHealthReport) + , _wmTime :: !(Maybe DateTime') + , _wmWorkerMessageCode :: !(Maybe WorkerMessageCode) + , _wmWorkerMetrics :: !(Maybe ResourceUtilizationReport) + , _wmWorkerLifecycleEvent :: !(Maybe WorkerLifecycleEvent) + , _wmWorkerShutdownNotice :: !(Maybe WorkerShutdownNotice) + , _wmLabels :: !(Maybe WorkerMessageLabels) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'WorkerMessage' with the minimum fields required to make a request. @@ -7158,6 +9296,10 @@ data WorkerMessage = WorkerMessage' -- -- * 'wmWorkerMetrics' -- +-- * 'wmWorkerLifecycleEvent' +-- +-- * 'wmWorkerShutdownNotice' +-- -- * 'wmLabels' workerMessage :: WorkerMessage @@ -7167,6 +9309,8 @@ workerMessage = , _wmTime = Nothing , _wmWorkerMessageCode = Nothing , _wmWorkerMetrics = Nothing + , _wmWorkerLifecycleEvent = Nothing + , _wmWorkerShutdownNotice = Nothing , _wmLabels = Nothing } @@ -7177,8 +9321,10 @@ wmWorkerHealthReport (\ s a -> s{_wmWorkerHealthReport = a}) -- | The timestamp of the worker_message. -wmTime :: Lens' WorkerMessage (Maybe Text) -wmTime = lens _wmTime (\ s a -> s{_wmTime = a}) +wmTime :: Lens' WorkerMessage (Maybe UTCTime) +wmTime + = lens _wmTime (\ s a -> s{_wmTime = a}) . + mapping _DateTime -- | A worker message code. wmWorkerMessageCode :: Lens' WorkerMessage (Maybe WorkerMessageCode) @@ -7192,6 +9338,18 @@ wmWorkerMetrics = lens _wmWorkerMetrics (\ s a -> s{_wmWorkerMetrics = a}) +-- | Record of worker lifecycle events. +wmWorkerLifecycleEvent :: Lens' WorkerMessage (Maybe WorkerLifecycleEvent) +wmWorkerLifecycleEvent + = lens _wmWorkerLifecycleEvent + (\ s a -> s{_wmWorkerLifecycleEvent = a}) + +-- | Shutdown notice by workers. +wmWorkerShutdownNotice :: Lens' WorkerMessage (Maybe WorkerShutdownNotice) +wmWorkerShutdownNotice + = lens _wmWorkerShutdownNotice + (\ s a -> s{_wmWorkerShutdownNotice = a}) + -- | Labels are used to group WorkerMessages. For example, a worker_message -- about a particular container might have the labels: { \"JOB_ID\": -- \"2015-04-22\", \"WORKER_ID\": \"wordcount-vm-2015…\" @@ -7210,6 +9368,8 @@ instance FromJSON WorkerMessage where (o .:? "workerHealthReport") <*> (o .:? "time") <*> (o .:? "workerMessageCode") <*> (o .:? "workerMetrics") + <*> (o .:? "workerLifecycleEvent") + <*> (o .:? "workerShutdownNotice") <*> (o .:? "labels")) instance ToJSON WorkerMessage where @@ -7220,6 +9380,10 @@ instance ToJSON WorkerMessage where ("time" .=) <$> _wmTime, ("workerMessageCode" .=) <$> _wmWorkerMessageCode, ("workerMetrics" .=) <$> _wmWorkerMetrics, + ("workerLifecycleEvent" .=) <$> + _wmWorkerLifecycleEvent, + ("workerShutdownNotice" .=) <$> + _wmWorkerShutdownNotice, ("labels" .=) <$> _wmLabels]) -- | Location information for a specific key-range of a sharded computation. @@ -7228,21 +9392,21 @@ instance ToJSON WorkerMessage where -- -- /See:/ 'keyRangeLocation' smart constructor. data KeyRangeLocation = KeyRangeLocation' - { _krlPersistentDirectory :: !(Maybe Text) - , _krlDataDisk :: !(Maybe Text) - , _krlStart :: !(Maybe Text) - , _krlDeliveryEndpoint :: !(Maybe Text) - , _krlEnd :: !(Maybe Text) + { _krlDataDisk :: !(Maybe Text) + , _krlDeprecatedPersistentDirectory :: !(Maybe Text) + , _krlStart :: !(Maybe Text) + , _krlDeliveryEndpoint :: !(Maybe Text) + , _krlEnd :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'KeyRangeLocation' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- --- * 'krlPersistentDirectory' --- -- * 'krlDataDisk' -- +-- * 'krlDeprecatedPersistentDirectory' +-- -- * 'krlStart' -- -- * 'krlDeliveryEndpoint' @@ -7252,20 +9416,13 @@ keyRangeLocation :: KeyRangeLocation keyRangeLocation = KeyRangeLocation' - { _krlPersistentDirectory = Nothing - , _krlDataDisk = Nothing + { _krlDataDisk = Nothing + , _krlDeprecatedPersistentDirectory = Nothing , _krlStart = Nothing , _krlDeliveryEndpoint = Nothing , _krlEnd = Nothing } --- | The location of the persistent state for this range, as a persistent --- directory in the worker local filesystem. -krlPersistentDirectory :: Lens' KeyRangeLocation (Maybe Text) -krlPersistentDirectory - = lens _krlPersistentDirectory - (\ s a -> s{_krlPersistentDirectory = a}) - -- | The name of the data disk where data for this range is stored. This name -- is local to the Google Cloud Platform project and uniquely identifies -- the disk within that project, for example @@ -7274,6 +9431,13 @@ krlDataDisk :: Lens' KeyRangeLocation (Maybe Text) krlDataDisk = lens _krlDataDisk (\ s a -> s{_krlDataDisk = a}) +-- | DEPRECATED. The location of the persistent state for this range, as a +-- persistent directory in the worker local filesystem. +krlDeprecatedPersistentDirectory :: Lens' KeyRangeLocation (Maybe Text) +krlDeprecatedPersistentDirectory + = lens _krlDeprecatedPersistentDirectory + (\ s a -> s{_krlDeprecatedPersistentDirectory = a}) + -- | The start (inclusive) of the key range. krlStart :: Lens' KeyRangeLocation (Maybe Text) krlStart = lens _krlStart (\ s a -> s{_krlStart = a}) @@ -7294,7 +9458,8 @@ instance FromJSON KeyRangeLocation where = withObject "KeyRangeLocation" (\ o -> KeyRangeLocation' <$> - (o .:? "persistentDirectory") <*> (o .:? "dataDisk") + (o .:? "dataDisk") <*> + (o .:? "deprecatedPersistentDirectory") <*> (o .:? "start") <*> (o .:? "deliveryEndpoint") <*> (o .:? "end")) @@ -7303,13 +9468,76 @@ instance ToJSON KeyRangeLocation where toJSON KeyRangeLocation'{..} = object (catMaybes - [("persistentDirectory" .=) <$> - _krlPersistentDirectory, - ("dataDisk" .=) <$> _krlDataDisk, + [("dataDisk" .=) <$> _krlDataDisk, + ("deprecatedPersistentDirectory" .=) <$> + _krlDeprecatedPersistentDirectory, ("start" .=) <$> _krlStart, ("deliveryEndpoint" .=) <$> _krlDeliveryEndpoint, ("end" .=) <$> _krlEnd]) +-- | Histogram of value counts for a distribution. Buckets have an inclusive +-- lower bound and exclusive upper bound and use \"1,2,5 bucketing\": The +-- first bucket range is from [0,1) and all subsequent bucket boundaries +-- are powers of ten multiplied by 1, 2, or 5. Thus, bucket boundaries are +-- 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, ... Negative values are not +-- supported. +-- +-- /See:/ 'histogram' smart constructor. +data Histogram = Histogram' + { _hBucketCounts :: !(Maybe [Textual Int64]) + , _hFirstBucketOffSet :: !(Maybe (Textual Int32)) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Histogram' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hBucketCounts' +-- +-- * 'hFirstBucketOffSet' +histogram + :: Histogram +histogram = + Histogram' + { _hBucketCounts = Nothing + , _hFirstBucketOffSet = Nothing + } + +-- | Counts of values in each bucket. For efficiency, prefix and trailing +-- buckets with count = 0 are elided. Buckets can store the full range of +-- values of an unsigned long, with ULLONG_MAX falling into the 59th bucket +-- with range [1e19, 2e19). +hBucketCounts :: Lens' Histogram [Int64] +hBucketCounts + = lens _hBucketCounts + (\ s a -> s{_hBucketCounts = a}) + . _Default + . _Coerce + +-- | Starting index of first stored bucket. The non-inclusive upper-bound of +-- the ith bucket is given by: pow(10,(i-first_bucket_offset)\/3) * +-- (1,2,5)[(i-first_bucket_offset)%3] +hFirstBucketOffSet :: Lens' Histogram (Maybe Int32) +hFirstBucketOffSet + = lens _hFirstBucketOffSet + (\ s a -> s{_hFirstBucketOffSet = a}) + . mapping _Coerce + +instance FromJSON Histogram where + parseJSON + = withObject "Histogram" + (\ o -> + Histogram' <$> + (o .:? "bucketCounts" .!= mempty) <*> + (o .:? "firstBucketOffset")) + +instance ToJSON Histogram where + toJSON Histogram'{..} + = object + (catMaybes + [("bucketCounts" .=) <$> _hBucketCounts, + ("firstBucketOffset" .=) <$> _hFirstBucketOffSet]) + -- | Information about an output of a multi-output DoFn. -- -- /See:/ 'multiOutputInfo' smart constructor. @@ -7579,6 +9807,7 @@ data DistributionUpdate = DistributionUpdate' { _duMax :: !(Maybe SplitInt64) , _duCount :: !(Maybe SplitInt64) , _duMin :: !(Maybe SplitInt64) + , _duHistogram :: !(Maybe Histogram) , _duSumOfSquares :: !(Maybe (Textual Double)) , _duSum :: !(Maybe SplitInt64) } deriving (Eq,Show,Data,Typeable,Generic) @@ -7593,6 +9822,8 @@ data DistributionUpdate = DistributionUpdate' -- -- * 'duMin' -- +-- * 'duHistogram' +-- -- * 'duSumOfSquares' -- -- * 'duSum' @@ -7603,6 +9834,7 @@ distributionUpdate = { _duMax = Nothing , _duCount = Nothing , _duMin = Nothing + , _duHistogram = Nothing , _duSumOfSquares = Nothing , _duSum = Nothing } @@ -7619,6 +9851,11 @@ duCount = lens _duCount (\ s a -> s{_duCount = a}) duMin :: Lens' DistributionUpdate (Maybe SplitInt64) duMin = lens _duMin (\ s a -> s{_duMin = a}) +-- | (Optional) Histogram of value counts for the distribution. +duHistogram :: Lens' DistributionUpdate (Maybe Histogram) +duHistogram + = lens _duHistogram (\ s a -> s{_duHistogram = a}) + -- | Use a double since the sum of squares is likely to overflow int64. duSumOfSquares :: Lens' DistributionUpdate (Maybe Double) duSumOfSquares @@ -7637,6 +9874,7 @@ instance FromJSON DistributionUpdate where (\ o -> DistributionUpdate' <$> (o .:? "max") <*> (o .:? "count") <*> (o .:? "min") + <*> (o .:? "histogram") <*> (o .:? "sumOfSquares") <*> (o .:? "sum")) @@ -7646,6 +9884,7 @@ instance ToJSON DistributionUpdate where (catMaybes [("max" .=) <$> _duMax, ("count" .=) <$> _duCount, ("min" .=) <$> _duMin, + ("histogram" .=) <$> _duHistogram, ("sumOfSquares" .=) <$> _duSumOfSquares, ("sum" .=) <$> _duSum]) @@ -7848,6 +10087,8 @@ instance ToJSON SideInputInfoKind where data StreamingConfigTask = StreamingConfigTask' { _sctUserStepToStateFamilyNameMap :: !(Maybe StreamingConfigTaskUserStepToStateFamilyNameMap) , _sctStreamingComputationConfigs :: !(Maybe [StreamingComputationConfig]) + , _sctWindmillServiceEndpoint :: !(Maybe Text) + , _sctWindmillServicePort :: !(Maybe (Textual Int64)) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'StreamingConfigTask' with the minimum fields required to make a request. @@ -7857,12 +10098,18 @@ data StreamingConfigTask = StreamingConfigTask' -- * 'sctUserStepToStateFamilyNameMap' -- -- * 'sctStreamingComputationConfigs' +-- +-- * 'sctWindmillServiceEndpoint' +-- +-- * 'sctWindmillServicePort' streamingConfigTask :: StreamingConfigTask streamingConfigTask = StreamingConfigTask' { _sctUserStepToStateFamilyNameMap = Nothing , _sctStreamingComputationConfigs = Nothing + , _sctWindmillServiceEndpoint = Nothing + , _sctWindmillServicePort = Nothing } -- | Map from user step names to state families. @@ -7879,13 +10126,32 @@ sctStreamingComputationConfigs . _Default . _Coerce +-- | If present, the worker must use this endpoint to communicate with +-- Windmill Service dispatchers, otherwise the worker must continue to use +-- whatever endpoint it had been using. +sctWindmillServiceEndpoint :: Lens' StreamingConfigTask (Maybe Text) +sctWindmillServiceEndpoint + = lens _sctWindmillServiceEndpoint + (\ s a -> s{_sctWindmillServiceEndpoint = a}) + +-- | If present, the worker must use this port to communicate with Windmill +-- Service dispatchers. Only applicable when windmill_service_endpoint is +-- specified. +sctWindmillServicePort :: Lens' StreamingConfigTask (Maybe Int64) +sctWindmillServicePort + = lens _sctWindmillServicePort + (\ s a -> s{_sctWindmillServicePort = a}) + . mapping _Coerce + instance FromJSON StreamingConfigTask where parseJSON = withObject "StreamingConfigTask" (\ o -> StreamingConfigTask' <$> (o .:? "userStepToStateFamilyNameMap") <*> - (o .:? "streamingComputationConfigs" .!= mempty)) + (o .:? "streamingComputationConfigs" .!= mempty) + <*> (o .:? "windmillServiceEndpoint") + <*> (o .:? "windmillServicePort")) instance ToJSON StreamingConfigTask where toJSON StreamingConfigTask'{..} @@ -7894,7 +10160,11 @@ instance ToJSON StreamingConfigTask where [("userStepToStateFamilyNameMap" .=) <$> _sctUserStepToStateFamilyNameMap, ("streamingComputationConfigs" .=) <$> - _sctStreamingComputationConfigs]) + _sctStreamingComputationConfigs, + ("windmillServiceEndpoint" .=) <$> + _sctWindmillServiceEndpoint, + ("windmillServicePort" .=) <$> + _sctWindmillServicePort]) -- | The metric short id is returned to the user alongside an offset into -- ReportWorkItemStatusRequest @@ -7951,22 +10221,31 @@ instance ToJSON MetricShortId where -- | A request for sending worker messages to the service. -- -- /See:/ 'sendWorkerMessagesRequest' smart constructor. -newtype SendWorkerMessagesRequest = SendWorkerMessagesRequest' - { _swmrWorkerMessages :: Maybe [WorkerMessage] +data SendWorkerMessagesRequest = SendWorkerMessagesRequest' + { _swmrLocation :: !(Maybe Text) + , _swmrWorkerMessages :: !(Maybe [WorkerMessage]) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'SendWorkerMessagesRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- +-- * 'swmrLocation' +-- -- * 'swmrWorkerMessages' sendWorkerMessagesRequest :: SendWorkerMessagesRequest sendWorkerMessagesRequest = SendWorkerMessagesRequest' - { _swmrWorkerMessages = Nothing + { _swmrLocation = Nothing + , _swmrWorkerMessages = Nothing } +-- | The location which contains the job +swmrLocation :: Lens' SendWorkerMessagesRequest (Maybe Text) +swmrLocation + = lens _swmrLocation (\ s a -> s{_swmrLocation = a}) + -- | The WorkerMessages to send. swmrWorkerMessages :: Lens' SendWorkerMessagesRequest [WorkerMessage] swmrWorkerMessages @@ -7980,19 +10259,21 @@ instance FromJSON SendWorkerMessagesRequest where = withObject "SendWorkerMessagesRequest" (\ o -> SendWorkerMessagesRequest' <$> - (o .:? "workerMessages" .!= mempty)) + (o .:? "location") <*> + (o .:? "workerMessages" .!= mempty)) instance ToJSON SendWorkerMessagesRequest where toJSON SendWorkerMessagesRequest'{..} = object (catMaybes - [("workerMessages" .=) <$> _swmrWorkerMessages]) + [("location" .=) <$> _swmrLocation, + ("workerMessages" .=) <$> _swmrWorkerMessages]) -- | DEPRECATED in favor of DerivedSource. -- -- /See:/ 'sourceSplitShard' smart constructor. data SourceSplitShard = SourceSplitShard' - { _sssDerivationMode :: !(Maybe Text) + { _sssDerivationMode :: !(Maybe SourceSplitShardDerivationMode) , _sssSource :: !(Maybe Source) } deriving (Eq,Show,Data,Typeable,Generic) @@ -8012,7 +10293,7 @@ sourceSplitShard = } -- | DEPRECATED -sssDerivationMode :: Lens' SourceSplitShard (Maybe Text) +sssDerivationMode :: Lens' SourceSplitShard (Maybe SourceSplitShardDerivationMode) sssDerivationMode = lens _sssDerivationMode (\ s a -> s{_sssDerivationMode = a}) @@ -8097,6 +10378,65 @@ instance ToJSON SideInputInfo where [("tag" .=) <$> _siiTag, ("kind" .=) <$> _siiKind, ("sources" .=) <$> _siiSources]) +-- | Description of a transform executed as part of an execution stage. +-- +-- /See:/ 'componentTransform' smart constructor. +data ComponentTransform = ComponentTransform' + { _ctOriginalTransform :: !(Maybe Text) + , _ctUserName :: !(Maybe Text) + , _ctName :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ComponentTransform' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctOriginalTransform' +-- +-- * 'ctUserName' +-- +-- * 'ctName' +componentTransform + :: ComponentTransform +componentTransform = + ComponentTransform' + { _ctOriginalTransform = Nothing + , _ctUserName = Nothing + , _ctName = Nothing + } + +-- | User name for the original user transform with which this transform is +-- most closely associated. +ctOriginalTransform :: Lens' ComponentTransform (Maybe Text) +ctOriginalTransform + = lens _ctOriginalTransform + (\ s a -> s{_ctOriginalTransform = a}) + +-- | Human-readable name for this transform; may be user or system generated. +ctUserName :: Lens' ComponentTransform (Maybe Text) +ctUserName + = lens _ctUserName (\ s a -> s{_ctUserName = a}) + +-- | Dataflow service generated name for this source. +ctName :: Lens' ComponentTransform (Maybe Text) +ctName = lens _ctName (\ s a -> s{_ctName = a}) + +instance FromJSON ComponentTransform where + parseJSON + = withObject "ComponentTransform" + (\ o -> + ComponentTransform' <$> + (o .:? "originalTransform") <*> (o .:? "userName") + <*> (o .:? "name")) + +instance ToJSON ComponentTransform where + toJSON ComponentTransform'{..} + = object + (catMaybes + [("originalTransform" .=) <$> _ctOriginalTransform, + ("userName" .=) <$> _ctUserName, + ("name" .=) <$> _ctName]) + -- | Additional information about how a Cloud Dataflow job will be executed -- that isn\'t contained in the submitted job. -- @@ -8276,6 +10616,108 @@ instance ToJSON KeyRangeDataDiskAssignment where ("start" .=) <$> _krddaStart, ("end" .=) <$> _krddaEnd]) +-- | A structured message reporting an autoscaling decision made by the +-- Dataflow service. +-- +-- /See:/ 'autoscalingEvent' smart constructor. +data AutoscalingEvent = AutoscalingEvent' + { _aeCurrentNumWorkers :: !(Maybe (Textual Int64)) + , _aeTime :: !(Maybe DateTime') + , _aeEventType :: !(Maybe AutoscalingEventEventType) + , _aeTargetNumWorkers :: !(Maybe (Textual Int64)) + , _aeWorkerPool :: !(Maybe Text) + , _aeDescription :: !(Maybe StructuredMessage) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingEvent' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aeCurrentNumWorkers' +-- +-- * 'aeTime' +-- +-- * 'aeEventType' +-- +-- * 'aeTargetNumWorkers' +-- +-- * 'aeWorkerPool' +-- +-- * 'aeDescription' +autoscalingEvent + :: AutoscalingEvent +autoscalingEvent = + AutoscalingEvent' + { _aeCurrentNumWorkers = Nothing + , _aeTime = Nothing + , _aeEventType = Nothing + , _aeTargetNumWorkers = Nothing + , _aeWorkerPool = Nothing + , _aeDescription = Nothing + } + +-- | The current number of workers the job has. +aeCurrentNumWorkers :: Lens' AutoscalingEvent (Maybe Int64) +aeCurrentNumWorkers + = lens _aeCurrentNumWorkers + (\ s a -> s{_aeCurrentNumWorkers = a}) + . mapping _Coerce + +-- | The time this event was emitted to indicate a new target or current +-- num_workers value. +aeTime :: Lens' AutoscalingEvent (Maybe UTCTime) +aeTime + = lens _aeTime (\ s a -> s{_aeTime = a}) . + mapping _DateTime + +-- | The type of autoscaling event to report. +aeEventType :: Lens' AutoscalingEvent (Maybe AutoscalingEventEventType) +aeEventType + = lens _aeEventType (\ s a -> s{_aeEventType = a}) + +-- | The target number of workers the worker pool wants to resize to use. +aeTargetNumWorkers :: Lens' AutoscalingEvent (Maybe Int64) +aeTargetNumWorkers + = lens _aeTargetNumWorkers + (\ s a -> s{_aeTargetNumWorkers = a}) + . mapping _Coerce + +-- | A short and friendly name for the worker pool this event refers to, +-- populated from the value of PoolStageRelation::user_pool_name. +aeWorkerPool :: Lens' AutoscalingEvent (Maybe Text) +aeWorkerPool + = lens _aeWorkerPool (\ s a -> s{_aeWorkerPool = a}) + +-- | A message describing why the system decided to adjust the current number +-- of workers, why it failed, or why the system decided to not make any +-- changes to the number of workers. +aeDescription :: Lens' AutoscalingEvent (Maybe StructuredMessage) +aeDescription + = lens _aeDescription + (\ s a -> s{_aeDescription = a}) + +instance FromJSON AutoscalingEvent where + parseJSON + = withObject "AutoscalingEvent" + (\ o -> + AutoscalingEvent' <$> + (o .:? "currentNumWorkers") <*> (o .:? "time") <*> + (o .:? "eventType") + <*> (o .:? "targetNumWorkers") + <*> (o .:? "workerPool") + <*> (o .:? "description")) + +instance ToJSON AutoscalingEvent where + toJSON AutoscalingEvent'{..} + = object + (catMaybes + [("currentNumWorkers" .=) <$> _aeCurrentNumWorkers, + ("time" .=) <$> _aeTime, + ("eventType" .=) <$> _aeEventType, + ("targetNumWorkers" .=) <$> _aeTargetNumWorkers, + ("workerPool" .=) <$> _aeWorkerPool, + ("description" .=) <$> _aeDescription]) + -- | Represents the operation to split a high-level Source specification into -- bundles (parts for parallel processing). At a high level, splitting of a -- source into bundles happens as follows: SourceSplitRequest is applied to @@ -8337,8 +10779,9 @@ instance ToJSON SourceSplitRequest where -- -- /See:/ 'listJobMessagesResponse' smart constructor. data ListJobMessagesResponse = ListJobMessagesResponse' - { _ljmrJobMessages :: !(Maybe [JobMessage]) - , _ljmrNextPageToken :: !(Maybe Text) + { _ljmrJobMessages :: !(Maybe [JobMessage]) + , _ljmrNextPageToken :: !(Maybe Text) + , _ljmrAutoscalingEvents :: !(Maybe [AutoscalingEvent]) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'ListJobMessagesResponse' with the minimum fields required to make a request. @@ -8348,12 +10791,15 @@ data ListJobMessagesResponse = ListJobMessagesResponse' -- * 'ljmrJobMessages' -- -- * 'ljmrNextPageToken' +-- +-- * 'ljmrAutoscalingEvents' listJobMessagesResponse :: ListJobMessagesResponse listJobMessagesResponse = ListJobMessagesResponse' { _ljmrJobMessages = Nothing , _ljmrNextPageToken = Nothing + , _ljmrAutoscalingEvents = Nothing } -- | Messages in ascending timestamp order. @@ -8370,20 +10816,30 @@ ljmrNextPageToken = lens _ljmrNextPageToken (\ s a -> s{_ljmrNextPageToken = a}) +-- | Autoscaling events in ascending timestamp order. +ljmrAutoscalingEvents :: Lens' ListJobMessagesResponse [AutoscalingEvent] +ljmrAutoscalingEvents + = lens _ljmrAutoscalingEvents + (\ s a -> s{_ljmrAutoscalingEvents = a}) + . _Default + . _Coerce + instance FromJSON ListJobMessagesResponse where parseJSON = withObject "ListJobMessagesResponse" (\ o -> ListJobMessagesResponse' <$> (o .:? "jobMessages" .!= mempty) <*> - (o .:? "nextPageToken")) + (o .:? "nextPageToken") + <*> (o .:? "autoscalingEvents" .!= mempty)) instance ToJSON ListJobMessagesResponse where toJSON ListJobMessagesResponse'{..} = object (catMaybes [("jobMessages" .=) <$> _ljmrJobMessages, - ("nextPageToken" .=) <$> _ljmrNextPageToken]) + ("nextPageToken" .=) <$> _ljmrNextPageToken, + ("autoscalingEvents" .=) <$> _ljmrAutoscalingEvents]) -- | Identifies a pubsub location to use for transferring data into or out of -- a streaming Dataflow job. @@ -8455,7 +10911,7 @@ plIdLabel :: Lens' PubsubLocation (Maybe Text) plIdLabel = lens _plIdLabel (\ s a -> s{_plIdLabel = a}) --- | A pubsub topic, in the form of \"pubsub.googleapis.com\/topics\/ \/\" +-- | A pubsub topic, in the form of \"pubsub.googleapis.com\/topics\/\/\" plTopic :: Lens' PubsubLocation (Maybe Text) plTopic = lens _plTopic (\ s a -> s{_plTopic = a}) @@ -8466,7 +10922,7 @@ plWithAttributes (\ s a -> s{_plWithAttributes = a}) -- | A pubsub subscription, in the form of --- \"pubsub.googleapis.com\/subscriptions\/ \/\" +-- \"pubsub.googleapis.com\/subscriptions\/\/\" plSubscription :: Lens' PubsubLocation (Maybe Text) plSubscription = lens _plSubscription @@ -8726,52 +11182,299 @@ instance ToJSON StreamingConfigTaskUserStepToStateFamilyNameMap where toJSON = toJSON . _sctustsfnmAddtional +-- | A message describing the state of a particular execution stage. +-- +-- /See:/ 'executionStageState' smart constructor. +data ExecutionStageState = ExecutionStageState' + { _essExecutionStageName :: !(Maybe Text) + , _essCurrentStateTime :: !(Maybe DateTime') + , _essExecutionStageState :: !(Maybe ExecutionStageStateExecutionStageState) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExecutionStageState' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'essExecutionStageName' +-- +-- * 'essCurrentStateTime' +-- +-- * 'essExecutionStageState' +executionStageState + :: ExecutionStageState +executionStageState = + ExecutionStageState' + { _essExecutionStageName = Nothing + , _essCurrentStateTime = Nothing + , _essExecutionStageState = Nothing + } + +-- | The name of the execution stage. +essExecutionStageName :: Lens' ExecutionStageState (Maybe Text) +essExecutionStageName + = lens _essExecutionStageName + (\ s a -> s{_essExecutionStageName = a}) + +-- | The time at which the stage transitioned to this state. +essCurrentStateTime :: Lens' ExecutionStageState (Maybe UTCTime) +essCurrentStateTime + = lens _essCurrentStateTime + (\ s a -> s{_essCurrentStateTime = a}) + . mapping _DateTime + +-- | Executions stage states allow the same set of values as JobState. +essExecutionStageState :: Lens' ExecutionStageState (Maybe ExecutionStageStateExecutionStageState) +essExecutionStageState + = lens _essExecutionStageState + (\ s a -> s{_essExecutionStageState = a}) + +instance FromJSON ExecutionStageState where + parseJSON + = withObject "ExecutionStageState" + (\ o -> + ExecutionStageState' <$> + (o .:? "executionStageName") <*> + (o .:? "currentStateTime") + <*> (o .:? "executionStageState")) + +instance ToJSON ExecutionStageState where + toJSON ExecutionStageState'{..} + = object + (catMaybes + [("executionStageName" .=) <$> + _essExecutionStageName, + ("currentStateTime" .=) <$> _essCurrentStateTime, + ("executionStageState" .=) <$> + _essExecutionStageState]) + +-- | Description of an input or output of an execution stage. +-- +-- /See:/ 'stageSource' smart constructor. +data StageSource = StageSource' + { _ssSizeBytes :: !(Maybe (Textual Int64)) + , _ssUserName :: !(Maybe Text) + , _ssName :: !(Maybe Text) + , _ssOriginalTransformOrCollection :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StageSource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssSizeBytes' +-- +-- * 'ssUserName' +-- +-- * 'ssName' +-- +-- * 'ssOriginalTransformOrCollection' +stageSource + :: StageSource +stageSource = + StageSource' + { _ssSizeBytes = Nothing + , _ssUserName = Nothing + , _ssName = Nothing + , _ssOriginalTransformOrCollection = Nothing + } + +-- | Size of the source, if measurable. +ssSizeBytes :: Lens' StageSource (Maybe Int64) +ssSizeBytes + = lens _ssSizeBytes (\ s a -> s{_ssSizeBytes = a}) . + mapping _Coerce + +-- | Human-readable name for this source; may be user or system generated. +ssUserName :: Lens' StageSource (Maybe Text) +ssUserName + = lens _ssUserName (\ s a -> s{_ssUserName = a}) + +-- | Dataflow service generated name for this source. +ssName :: Lens' StageSource (Maybe Text) +ssName = lens _ssName (\ s a -> s{_ssName = a}) + +-- | User name for the original user transform or collection with which this +-- source is most closely associated. +ssOriginalTransformOrCollection :: Lens' StageSource (Maybe Text) +ssOriginalTransformOrCollection + = lens _ssOriginalTransformOrCollection + (\ s a -> s{_ssOriginalTransformOrCollection = a}) + +instance FromJSON StageSource where + parseJSON + = withObject "StageSource" + (\ o -> + StageSource' <$> + (o .:? "sizeBytes") <*> (o .:? "userName") <*> + (o .:? "name") + <*> (o .:? "originalTransformOrCollection")) + +instance ToJSON StageSource where + toJSON StageSource'{..} + = object + (catMaybes + [("sizeBytes" .=) <$> _ssSizeBytes, + ("userName" .=) <$> _ssUserName, + ("name" .=) <$> _ssName, + ("originalTransformOrCollection" .=) <$> + _ssOriginalTransformOrCollection]) + -- | A work item that represents the different operations that can be -- performed on a user-defined Source specification. -- -- /See:/ 'sourceOperationRequest' smart constructor. data SourceOperationRequest = SourceOperationRequest' - { _sSplit :: !(Maybe SourceSplitRequest) - , _sGetMetadata :: !(Maybe SourceGetMetadataRequest) + { _souSplit :: !(Maybe SourceSplitRequest) + , _souGetMetadata :: !(Maybe SourceGetMetadataRequest) + , _souName :: !(Maybe Text) + , _souSystemName :: !(Maybe Text) + , _souStageName :: !(Maybe Text) + , _souOriginalName :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'SourceOperationRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- --- * 'sSplit' +-- * 'souSplit' -- --- * 'sGetMetadata' +-- * 'souGetMetadata' +-- +-- * 'souName' +-- +-- * 'souSystemName' +-- +-- * 'souStageName' +-- +-- * 'souOriginalName' sourceOperationRequest :: SourceOperationRequest sourceOperationRequest = SourceOperationRequest' - { _sSplit = Nothing - , _sGetMetadata = Nothing + { _souSplit = Nothing + , _souGetMetadata = Nothing + , _souName = Nothing + , _souSystemName = Nothing + , _souStageName = Nothing + , _souOriginalName = Nothing } -- | Information about a request to split a source. -sSplit :: Lens' SourceOperationRequest (Maybe SourceSplitRequest) -sSplit = lens _sSplit (\ s a -> s{_sSplit = a}) +souSplit :: Lens' SourceOperationRequest (Maybe SourceSplitRequest) +souSplit = lens _souSplit (\ s a -> s{_souSplit = a}) -- | Information about a request to get metadata about a source. -sGetMetadata :: Lens' SourceOperationRequest (Maybe SourceGetMetadataRequest) -sGetMetadata - = lens _sGetMetadata (\ s a -> s{_sGetMetadata = a}) +souGetMetadata :: Lens' SourceOperationRequest (Maybe SourceGetMetadataRequest) +souGetMetadata + = lens _souGetMetadata + (\ s a -> s{_souGetMetadata = a}) + +-- | User-provided name of the Read instruction for this source. +souName :: Lens' SourceOperationRequest (Maybe Text) +souName = lens _souName (\ s a -> s{_souName = a}) + +-- | System-defined name of the Read instruction for this source. Unique +-- across the workflow. +souSystemName :: Lens' SourceOperationRequest (Maybe Text) +souSystemName + = lens _souSystemName + (\ s a -> s{_souSystemName = a}) + +-- | System-defined name of the stage containing the source operation. Unique +-- across the workflow. +souStageName :: Lens' SourceOperationRequest (Maybe Text) +souStageName + = lens _souStageName (\ s a -> s{_souStageName = a}) + +-- | System-defined name for the Read instruction for this source in the +-- original workflow graph. +souOriginalName :: Lens' SourceOperationRequest (Maybe Text) +souOriginalName + = lens _souOriginalName + (\ s a -> s{_souOriginalName = a}) instance FromJSON SourceOperationRequest where parseJSON = withObject "SourceOperationRequest" (\ o -> SourceOperationRequest' <$> - (o .:? "split") <*> (o .:? "getMetadata")) + (o .:? "split") <*> (o .:? "getMetadata") <*> + (o .:? "name") + <*> (o .:? "systemName") + <*> (o .:? "stageName") + <*> (o .:? "originalName")) instance ToJSON SourceOperationRequest where toJSON SourceOperationRequest'{..} = object (catMaybes - [("split" .=) <$> _sSplit, - ("getMetadata" .=) <$> _sGetMetadata]) + [("split" .=) <$> _souSplit, + ("getMetadata" .=) <$> _souGetMetadata, + ("name" .=) <$> _souName, + ("systemName" .=) <$> _souSystemName, + ("stageName" .=) <$> _souStageName, + ("originalName" .=) <$> _souOriginalName]) + +-- | Metadata for a Spanner connector used by the job. +-- +-- /See:/ 'spannerIODetails' smart constructor. +data SpannerIODetails = SpannerIODetails' + { _siodInstanceId :: !(Maybe Text) + , _siodDatabaseId :: !(Maybe Text) + , _siodProjectId :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SpannerIODetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siodInstanceId' +-- +-- * 'siodDatabaseId' +-- +-- * 'siodProjectId' +spannerIODetails + :: SpannerIODetails +spannerIODetails = + SpannerIODetails' + { _siodInstanceId = Nothing + , _siodDatabaseId = Nothing + , _siodProjectId = Nothing + } + +-- | InstanceId accessed in the connection. +siodInstanceId :: Lens' SpannerIODetails (Maybe Text) +siodInstanceId + = lens _siodInstanceId + (\ s a -> s{_siodInstanceId = a}) + +-- | DatabaseId accessed in the connection. +siodDatabaseId :: Lens' SpannerIODetails (Maybe Text) +siodDatabaseId + = lens _siodDatabaseId + (\ s a -> s{_siodDatabaseId = a}) + +-- | ProjectId accessed in the connection. +siodProjectId :: Lens' SpannerIODetails (Maybe Text) +siodProjectId + = lens _siodProjectId + (\ s a -> s{_siodProjectId = a}) + +instance FromJSON SpannerIODetails where + parseJSON + = withObject "SpannerIODetails" + (\ o -> + SpannerIODetails' <$> + (o .:? "instanceId") <*> (o .:? "databaseId") <*> + (o .:? "projectId")) + +instance ToJSON SpannerIODetails where + toJSON SpannerIODetails'{..} + = object + (catMaybes + [("instanceId" .=) <$> _siodInstanceId, + ("databaseId" .=) <$> _siodDatabaseId, + ("projectId" .=) <$> _siodProjectId]) -- | Response to a request to lease WorkItems. -- @@ -8907,3 +11610,46 @@ instance ToJSON Position where ("recordIndex" .=) <$> _pRecordIndex, ("shufflePosition" .=) <$> _pShufflePosition, ("key" .=) <$> _pKey, ("end" .=) <$> _pEnd]) + +-- | Structured data associated with this message. +-- +-- /See:/ 'parameter' smart constructor. +data Parameter = Parameter' + { _parValue :: !(Maybe JSONValue) + , _parKey :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Parameter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'parValue' +-- +-- * 'parKey' +parameter + :: Parameter +parameter = + Parameter' + { _parValue = Nothing + , _parKey = Nothing + } + +-- | Value for this parameter. +parValue :: Lens' Parameter (Maybe JSONValue) +parValue = lens _parValue (\ s a -> s{_parValue = a}) + +-- | Key or name for this parameter. +parKey :: Lens' Parameter (Maybe Text) +parKey = lens _parKey (\ s a -> s{_parKey = a}) + +instance FromJSON Parameter where + parseJSON + = withObject "Parameter" + (\ o -> + Parameter' <$> (o .:? "value") <*> (o .:? "key")) + +instance ToJSON Parameter where + toJSON Parameter'{..} + = object + (catMaybes + [("value" .=) <$> _parValue, ("key" .=) <$> _parKey]) diff --git a/gen/Network/Google/Dataflow/Types/Sum.hs b/gen/Network/Google/Dataflow/Types/Sum.hs index b0bcf0c..38f4249 100644 --- a/gen/Network/Google/Dataflow/Types/Sum.hs +++ b/gen/Network/Google/Dataflow/Types/Sum.hs @@ -16,4 +16,1326 @@ -- module Network.Google.Dataflow.Types.Sum where -import Network.Google.Prelude +import Network.Google.Prelude hiding (Bytes) + +-- | Counter aggregation kind. +data NameAndKindKind + = Invalid + -- ^ @INVALID@ + -- Counter aggregation kind was not set. + | Sum + -- ^ @SUM@ + -- Aggregated value is the sum of all contributed values. + | Max + -- ^ @MAX@ + -- Aggregated value is the max of all contributed values. + | Min + -- ^ @MIN@ + -- Aggregated value is the min of all contributed values. + | Mean + -- ^ @MEAN@ + -- Aggregated value is the mean of all contributed values. + | OR + -- ^ @OR@ + -- Aggregated value represents the logical \'or\' of all contributed + -- values. + | And + -- ^ @AND@ + -- Aggregated value represents the logical \'and\' of all contributed + -- values. + | Set + -- ^ @SET@ + -- Aggregated value is a set of unique contributed values. + | Distribution + -- ^ @DISTRIBUTION@ + -- Aggregated value captures statistics about a distribution. + | LatestValue + -- ^ @LATEST_VALUE@ + -- Aggregated value tracks the latest value of a variable. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable NameAndKindKind + +instance FromHttpApiData NameAndKindKind where + parseQueryParam = \case + "INVALID" -> Right Invalid + "SUM" -> Right Sum + "MAX" -> Right Max + "MIN" -> Right Min + "MEAN" -> Right Mean + "OR" -> Right OR + "AND" -> Right And + "SET" -> Right Set + "DISTRIBUTION" -> Right Distribution + "LATEST_VALUE" -> Right LatestValue + x -> Left ("Unable to parse NameAndKindKind from: " <> x) + +instance ToHttpApiData NameAndKindKind where + toQueryParam = \case + Invalid -> "INVALID" + Sum -> "SUM" + Max -> "MAX" + Min -> "MIN" + Mean -> "MEAN" + OR -> "OR" + And -> "AND" + Set -> "SET" + Distribution -> "DISTRIBUTION" + LatestValue -> "LATEST_VALUE" + +instance FromJSON NameAndKindKind where + parseJSON = parseJSONText "NameAndKindKind" + +instance ToJSON NameAndKindKind where + toJSON = toJSONText + +-- | The type of Cloud Dataflow job. +data JobType + = JobTypeUnknown + -- ^ @JOB_TYPE_UNKNOWN@ + -- The type of the job is unspecified, or unknown. + | JobTypeBatch + -- ^ @JOB_TYPE_BATCH@ + -- A batch job with a well-defined end point: data is read, data is + -- processed, data is written, and the job is done. + | JobTypeStreaming + -- ^ @JOB_TYPE_STREAMING@ + -- A continuously streaming job with no end: data is read, processed, and + -- written continuously. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable JobType + +instance FromHttpApiData JobType where + parseQueryParam = \case + "JOB_TYPE_UNKNOWN" -> Right JobTypeUnknown + "JOB_TYPE_BATCH" -> Right JobTypeBatch + "JOB_TYPE_STREAMING" -> Right JobTypeStreaming + x -> Left ("Unable to parse JobType from: " <> x) + +instance ToHttpApiData JobType where + toQueryParam = \case + JobTypeUnknown -> "JOB_TYPE_UNKNOWN" + JobTypeBatch -> "JOB_TYPE_BATCH" + JobTypeStreaming -> "JOB_TYPE_STREAMING" + +instance FromJSON JobType where + parseJSON = parseJSONText "JobType" + +instance ToJSON JobType where + toJSON = toJSONText + +-- | Sets the policy for determining when to turndown worker pool. Allowed +-- values are: \`TEARDOWN_ALWAYS\`, \`TEARDOWN_ON_SUCCESS\`, and +-- \`TEARDOWN_NEVER\`. \`TEARDOWN_ALWAYS\` means workers are always torn +-- down regardless of whether the job succeeds. \`TEARDOWN_ON_SUCCESS\` +-- means workers are torn down if the job succeeds. \`TEARDOWN_NEVER\` +-- means the workers are never torn down. If the workers are not torn down +-- by the service, they will continue to run and use Google Compute Engine +-- VM resources in the user\'s project until they are explicitly terminated +-- by the user. Because of this, Google recommends using the +-- \`TEARDOWN_ALWAYS\` policy except for small, manually supervised test +-- jobs. If unknown or unspecified, the service will attempt to choose a +-- reasonable default. +data WorkerPoolTeardownPolicy + = TeardownPolicyUnknown + -- ^ @TEARDOWN_POLICY_UNKNOWN@ + -- The teardown policy isn\'t specified, or is unknown. + | TeardownAlways + -- ^ @TEARDOWN_ALWAYS@ + -- Always teardown the resource. + | TeardownOnSuccess + -- ^ @TEARDOWN_ON_SUCCESS@ + -- Teardown the resource on success. This is useful for debugging failures. + | TeardownNever + -- ^ @TEARDOWN_NEVER@ + -- Never teardown the resource. This is useful for debugging and + -- development. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable WorkerPoolTeardownPolicy + +instance FromHttpApiData WorkerPoolTeardownPolicy where + parseQueryParam = \case + "TEARDOWN_POLICY_UNKNOWN" -> Right TeardownPolicyUnknown + "TEARDOWN_ALWAYS" -> Right TeardownAlways + "TEARDOWN_ON_SUCCESS" -> Right TeardownOnSuccess + "TEARDOWN_NEVER" -> Right TeardownNever + x -> Left ("Unable to parse WorkerPoolTeardownPolicy from: " <> x) + +instance ToHttpApiData WorkerPoolTeardownPolicy where + toQueryParam = \case + TeardownPolicyUnknown -> "TEARDOWN_POLICY_UNKNOWN" + TeardownAlways -> "TEARDOWN_ALWAYS" + TeardownOnSuccess -> "TEARDOWN_ON_SUCCESS" + TeardownNever -> "TEARDOWN_NEVER" + +instance FromJSON WorkerPoolTeardownPolicy where + parseJSON = parseJSONText "WorkerPoolTeardownPolicy" + +instance ToJSON WorkerPoolTeardownPolicy where + toJSON = toJSONText + +-- | The algorithm to use for autoscaling. +data AutoscalingSettingsAlgorithm + = AutoscalingAlgorithmUnknown + -- ^ @AUTOSCALING_ALGORITHM_UNKNOWN@ + -- The algorithm is unknown, or unspecified. + | AutoscalingAlgorithmNone + -- ^ @AUTOSCALING_ALGORITHM_NONE@ + -- Disable autoscaling. + | AutoscalingAlgorithmBasic + -- ^ @AUTOSCALING_ALGORITHM_BASIC@ + -- Increase worker count over time to reduce job execution time. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable AutoscalingSettingsAlgorithm + +instance FromHttpApiData AutoscalingSettingsAlgorithm where + parseQueryParam = \case + "AUTOSCALING_ALGORITHM_UNKNOWN" -> Right AutoscalingAlgorithmUnknown + "AUTOSCALING_ALGORITHM_NONE" -> Right AutoscalingAlgorithmNone + "AUTOSCALING_ALGORITHM_BASIC" -> Right AutoscalingAlgorithmBasic + x -> Left ("Unable to parse AutoscalingSettingsAlgorithm from: " <> x) + +instance ToHttpApiData AutoscalingSettingsAlgorithm where + toQueryParam = \case + AutoscalingAlgorithmUnknown -> "AUTOSCALING_ALGORITHM_UNKNOWN" + AutoscalingAlgorithmNone -> "AUTOSCALING_ALGORITHM_NONE" + AutoscalingAlgorithmBasic -> "AUTOSCALING_ALGORITHM_BASIC" + +instance FromJSON AutoscalingSettingsAlgorithm where + parseJSON = parseJSONText "AutoscalingSettingsAlgorithm" + +instance ToJSON AutoscalingSettingsAlgorithm where + toJSON = toJSONText + +-- | Type of transform. +data TransformSummaryKind + = UnknownKind + -- ^ @UNKNOWN_KIND@ + -- Unrecognized transform type. + | ParDoKind + -- ^ @PAR_DO_KIND@ + -- ParDo transform. + | GroupByKeyKind + -- ^ @GROUP_BY_KEY_KIND@ + -- Group By Key transform. + | FlattenKind + -- ^ @FLATTEN_KIND@ + -- Flatten transform. + | ReadKind + -- ^ @READ_KIND@ + -- Read transform. + | WriteKind + -- ^ @WRITE_KIND@ + -- Write transform. + | ConstantKind + -- ^ @CONSTANT_KIND@ + -- Constructs from a constant value, such as with Create.of. + | SingletonKind + -- ^ @SINGLETON_KIND@ + -- Creates a Singleton view of a collection. + | ShuffleKind + -- ^ @SHUFFLE_KIND@ + -- Opening or closing a shuffle session, often as part of a GroupByKey. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable TransformSummaryKind + +instance FromHttpApiData TransformSummaryKind where + parseQueryParam = \case + "UNKNOWN_KIND" -> Right UnknownKind + "PAR_DO_KIND" -> Right ParDoKind + "GROUP_BY_KEY_KIND" -> Right GroupByKeyKind + "FLATTEN_KIND" -> Right FlattenKind + "READ_KIND" -> Right ReadKind + "WRITE_KIND" -> Right WriteKind + "CONSTANT_KIND" -> Right ConstantKind + "SINGLETON_KIND" -> Right SingletonKind + "SHUFFLE_KIND" -> Right ShuffleKind + x -> Left ("Unable to parse TransformSummaryKind from: " <> x) + +instance ToHttpApiData TransformSummaryKind where + toQueryParam = \case + UnknownKind -> "UNKNOWN_KIND" + ParDoKind -> "PAR_DO_KIND" + GroupByKeyKind -> "GROUP_BY_KEY_KIND" + FlattenKind -> "FLATTEN_KIND" + ReadKind -> "READ_KIND" + WriteKind -> "WRITE_KIND" + ConstantKind -> "CONSTANT_KIND" + SingletonKind -> "SINGLETON_KIND" + ShuffleKind -> "SHUFFLE_KIND" + +instance FromJSON TransformSummaryKind where + parseJSON = parseJSONText "TransformSummaryKind" + +instance ToJSON TransformSummaryKind where + toJSON = toJSONText + +-- | Portion of this counter, either key or value. +data CounterStructuredNamePortion + = All + -- ^ @ALL@ + -- Counter portion has not been set. + | Key + -- ^ @KEY@ + -- Counter reports a key. + | Value + -- ^ @VALUE@ + -- Counter reports a value. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable CounterStructuredNamePortion + +instance FromHttpApiData CounterStructuredNamePortion where + parseQueryParam = \case + "ALL" -> Right All + "KEY" -> Right Key + "VALUE" -> Right Value + x -> Left ("Unable to parse CounterStructuredNamePortion from: " <> x) + +instance ToHttpApiData CounterStructuredNamePortion where + toQueryParam = \case + All -> "ALL" + Key -> "KEY" + Value -> "VALUE" + +instance FromJSON CounterStructuredNamePortion where + parseJSON = parseJSONText "CounterStructuredNamePortion" + +instance ToJSON CounterStructuredNamePortion where + toJSON = toJSONText + +-- | Importance level of the message. +data JobMessageMessageImportance + = JobMessageImportanceUnknown + -- ^ @JOB_MESSAGE_IMPORTANCE_UNKNOWN@ + -- The message importance isn\'t specified, or is unknown. + | JobMessageDebug + -- ^ @JOB_MESSAGE_DEBUG@ + -- The message is at the \'debug\' level: typically only useful for + -- software engineers working on the code the job is running. Typically, + -- Dataflow pipeline runners do not display log messages at this level by + -- default. + | JobMessageDetailed + -- ^ @JOB_MESSAGE_DETAILED@ + -- The message is at the \'detailed\' level: somewhat verbose, but + -- potentially useful to users. Typically, Dataflow pipeline runners do not + -- display log messages at this level by default. These messages are + -- displayed by default in the Dataflow monitoring UI. + | JobMessageBasic + -- ^ @JOB_MESSAGE_BASIC@ + -- The message is at the \'basic\' level: useful for keeping track of the + -- execution of a Dataflow pipeline. Typically, Dataflow pipeline runners + -- display log messages at this level by default, and these messages are + -- displayed by default in the Dataflow monitoring UI. + | JobMessageWarning + -- ^ @JOB_MESSAGE_WARNING@ + -- The message is at the \'warning\' level: indicating a condition + -- pertaining to a job which may require human intervention. Typically, + -- Dataflow pipeline runners display log messages at this level by default, + -- and these messages are displayed by default in the Dataflow monitoring + -- UI. + | JobMessageError + -- ^ @JOB_MESSAGE_ERROR@ + -- The message is at the \'error\' level: indicating a condition preventing + -- a job from succeeding. Typically, Dataflow pipeline runners display log + -- messages at this level by default, and these messages are displayed by + -- default in the Dataflow monitoring UI. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable JobMessageMessageImportance + +instance FromHttpApiData JobMessageMessageImportance where + parseQueryParam = \case + "JOB_MESSAGE_IMPORTANCE_UNKNOWN" -> Right JobMessageImportanceUnknown + "JOB_MESSAGE_DEBUG" -> Right JobMessageDebug + "JOB_MESSAGE_DETAILED" -> Right JobMessageDetailed + "JOB_MESSAGE_BASIC" -> Right JobMessageBasic + "JOB_MESSAGE_WARNING" -> Right JobMessageWarning + "JOB_MESSAGE_ERROR" -> Right JobMessageError + x -> Left ("Unable to parse JobMessageMessageImportance from: " <> x) + +instance ToHttpApiData JobMessageMessageImportance where + toQueryParam = \case + JobMessageImportanceUnknown -> "JOB_MESSAGE_IMPORTANCE_UNKNOWN" + JobMessageDebug -> "JOB_MESSAGE_DEBUG" + JobMessageDetailed -> "JOB_MESSAGE_DETAILED" + JobMessageBasic -> "JOB_MESSAGE_BASIC" + JobMessageWarning -> "JOB_MESSAGE_WARNING" + JobMessageError -> "JOB_MESSAGE_ERROR" + +instance FromJSON JobMessageMessageImportance where + parseJSON = parseJSONText "JobMessageMessageImportance" + +instance ToJSON JobMessageMessageImportance where + toJSON = toJSONText + +-- | Indicates whether splitting happened and produced a list of bundles. If +-- this is USE_CURRENT_SOURCE_AS_IS, the current source should be processed +-- \"as is\" without splitting. \"bundles\" is ignored in this case. If +-- this is SPLITTING_HAPPENED, then \"bundles\" contains a list of bundles +-- into which the source was split. +data SourceSplitResponseOutcome + = SourceSplitOutcomeUnknown + -- ^ @SOURCE_SPLIT_OUTCOME_UNKNOWN@ + -- The source split outcome is unknown, or unspecified. + | SourceSplitOutcomeUseCurrent + -- ^ @SOURCE_SPLIT_OUTCOME_USE_CURRENT@ + -- The current source should be processed \"as is\" without splitting. + | SourceSplitOutcomeSplittingHAppened + -- ^ @SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED@ + -- Splitting produced a list of bundles. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable SourceSplitResponseOutcome + +instance FromHttpApiData SourceSplitResponseOutcome where + parseQueryParam = \case + "SOURCE_SPLIT_OUTCOME_UNKNOWN" -> Right SourceSplitOutcomeUnknown + "SOURCE_SPLIT_OUTCOME_USE_CURRENT" -> Right SourceSplitOutcomeUseCurrent + "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" -> Right SourceSplitOutcomeSplittingHAppened + x -> Left ("Unable to parse SourceSplitResponseOutcome from: " <> x) + +instance ToHttpApiData SourceSplitResponseOutcome where + toQueryParam = \case + SourceSplitOutcomeUnknown -> "SOURCE_SPLIT_OUTCOME_UNKNOWN" + SourceSplitOutcomeUseCurrent -> "SOURCE_SPLIT_OUTCOME_USE_CURRENT" + SourceSplitOutcomeSplittingHAppened -> "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" + +instance FromJSON SourceSplitResponseOutcome where + parseJSON = parseJSONText "SourceSplitResponseOutcome" + +instance ToJSON SourceSplitResponseOutcome where + toJSON = toJSONText + +-- | DEPRECATED +data SourceSplitShardDerivationMode + = SourceDerivationModeUnknown + -- ^ @SOURCE_DERIVATION_MODE_UNKNOWN@ + -- The source derivation is unknown, or unspecified. + | SourceDerivationModeIndependent + -- ^ @SOURCE_DERIVATION_MODE_INDEPENDENT@ + -- Produce a completely independent Source with no base. + | SourceDerivationModeChildOfCurrent + -- ^ @SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT@ + -- Produce a Source based on the Source being split. + | SourceDerivationModeSiblingOfCurrent + -- ^ @SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT@ + -- Produce a Source based on the base of the Source being split. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable SourceSplitShardDerivationMode + +instance FromHttpApiData SourceSplitShardDerivationMode where + parseQueryParam = \case + "SOURCE_DERIVATION_MODE_UNKNOWN" -> Right SourceDerivationModeUnknown + "SOURCE_DERIVATION_MODE_INDEPENDENT" -> Right SourceDerivationModeIndependent + "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" -> Right SourceDerivationModeChildOfCurrent + "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" -> Right SourceDerivationModeSiblingOfCurrent + x -> Left ("Unable to parse SourceSplitShardDerivationMode from: " <> x) + +instance ToHttpApiData SourceSplitShardDerivationMode where + toQueryParam = \case + SourceDerivationModeUnknown -> "SOURCE_DERIVATION_MODE_UNKNOWN" + SourceDerivationModeIndependent -> "SOURCE_DERIVATION_MODE_INDEPENDENT" + SourceDerivationModeChildOfCurrent -> "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" + SourceDerivationModeSiblingOfCurrent -> "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" + +instance FromJSON SourceSplitShardDerivationMode where + parseJSON = parseJSONText "SourceSplitShardDerivationMode" + +instance ToJSON SourceSplitShardDerivationMode where + toJSON = toJSONText + +-- | The default package set to install. This allows the service to select a +-- default set of packages which are useful to worker harnesses written in +-- a particular language. +data WorkerPoolDefaultPackageSet + = DefaultPackageSetUnknown + -- ^ @DEFAULT_PACKAGE_SET_UNKNOWN@ + -- The default set of packages to stage is unknown, or unspecified. + | DefaultPackageSetNone + -- ^ @DEFAULT_PACKAGE_SET_NONE@ + -- Indicates that no packages should be staged at the worker unless + -- explicitly specified by the job. + | DefaultPackageSetJava + -- ^ @DEFAULT_PACKAGE_SET_JAVA@ + -- Stage packages typically useful to workers written in Java. + | DefaultPackageSetPython + -- ^ @DEFAULT_PACKAGE_SET_PYTHON@ + -- Stage pacakges typically useful to workers written in Python. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable WorkerPoolDefaultPackageSet + +instance FromHttpApiData WorkerPoolDefaultPackageSet where + parseQueryParam = \case + "DEFAULT_PACKAGE_SET_UNKNOWN" -> Right DefaultPackageSetUnknown + "DEFAULT_PACKAGE_SET_NONE" -> Right DefaultPackageSetNone + "DEFAULT_PACKAGE_SET_JAVA" -> Right DefaultPackageSetJava + "DEFAULT_PACKAGE_SET_PYTHON" -> Right DefaultPackageSetPython + x -> Left ("Unable to parse WorkerPoolDefaultPackageSet from: " <> x) + +instance ToHttpApiData WorkerPoolDefaultPackageSet where + toQueryParam = \case + DefaultPackageSetUnknown -> "DEFAULT_PACKAGE_SET_UNKNOWN" + DefaultPackageSetNone -> "DEFAULT_PACKAGE_SET_NONE" + DefaultPackageSetJava -> "DEFAULT_PACKAGE_SET_JAVA" + DefaultPackageSetPython -> "DEFAULT_PACKAGE_SET_PYTHON" + +instance FromJSON WorkerPoolDefaultPackageSet where + parseJSON = parseJSONText "WorkerPoolDefaultPackageSet" + +instance ToJSON WorkerPoolDefaultPackageSet where + toJSON = toJSONText + +-- | Counter aggregation kind. +data CounterMetadataKind + = CMKInvalid + -- ^ @INVALID@ + -- Counter aggregation kind was not set. + | CMKSum + -- ^ @SUM@ + -- Aggregated value is the sum of all contributed values. + | CMKMax + -- ^ @MAX@ + -- Aggregated value is the max of all contributed values. + | CMKMin + -- ^ @MIN@ + -- Aggregated value is the min of all contributed values. + | CMKMean + -- ^ @MEAN@ + -- Aggregated value is the mean of all contributed values. + | CMKOR + -- ^ @OR@ + -- Aggregated value represents the logical \'or\' of all contributed + -- values. + | CMKAnd + -- ^ @AND@ + -- Aggregated value represents the logical \'and\' of all contributed + -- values. + | CMKSet + -- ^ @SET@ + -- Aggregated value is a set of unique contributed values. + | CMKDistribution + -- ^ @DISTRIBUTION@ + -- Aggregated value captures statistics about a distribution. + | CMKLatestValue + -- ^ @LATEST_VALUE@ + -- Aggregated value tracks the latest value of a variable. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable CounterMetadataKind + +instance FromHttpApiData CounterMetadataKind where + parseQueryParam = \case + "INVALID" -> Right CMKInvalid + "SUM" -> Right CMKSum + "MAX" -> Right CMKMax + "MIN" -> Right CMKMin + "MEAN" -> Right CMKMean + "OR" -> Right CMKOR + "AND" -> Right CMKAnd + "SET" -> Right CMKSet + "DISTRIBUTION" -> Right CMKDistribution + "LATEST_VALUE" -> Right CMKLatestValue + x -> Left ("Unable to parse CounterMetadataKind from: " <> x) + +instance ToHttpApiData CounterMetadataKind where + toQueryParam = \case + CMKInvalid -> "INVALID" + CMKSum -> "SUM" + CMKMax -> "MAX" + CMKMin -> "MIN" + CMKMean -> "MEAN" + CMKOR -> "OR" + CMKAnd -> "AND" + CMKSet -> "SET" + CMKDistribution -> "DISTRIBUTION" + CMKLatestValue -> "LATEST_VALUE" + +instance FromJSON CounterMetadataKind where + parseJSON = parseJSONText "CounterMetadataKind" + +instance ToJSON CounterMetadataKind where + toJSON = toJSONText + +-- | The current state of the job. Jobs are created in the +-- \`JOB_STATE_STOPPED\` state unless otherwise specified. A job in the +-- \`JOB_STATE_RUNNING\` state may asynchronously enter a terminal state. +-- After a job has reached a terminal state, no further state updates may +-- be made. This field may be mutated by the Cloud Dataflow service; +-- callers cannot mutate it. +data JobCurrentState + = JobStateUnknown + -- ^ @JOB_STATE_UNKNOWN@ + -- The job\'s run state isn\'t specified. + | JobStateStopped + -- ^ @JOB_STATE_STOPPED@ + -- \`JOB_STATE_STOPPED\` indicates that the job has not yet started to run. + | JobStateRunning + -- ^ @JOB_STATE_RUNNING@ + -- \`JOB_STATE_RUNNING\` indicates that the job is currently running. + | JobStateDone + -- ^ @JOB_STATE_DONE@ + -- \`JOB_STATE_DONE\` indicates that the job has successfully completed. + -- This is a terminal job state. This state may be set by the Cloud + -- Dataflow service, as a transition from \`JOB_STATE_RUNNING\`. It may + -- also be set via a Cloud Dataflow \`UpdateJob\` call, if the job has not + -- yet reached a terminal state. + | JobStateFailed + -- ^ @JOB_STATE_FAILED@ + -- \`JOB_STATE_FAILED\` indicates that the job has failed. This is a + -- terminal job state. This state may only be set by the Cloud Dataflow + -- service, and only as a transition from \`JOB_STATE_RUNNING\`. + | JobStateCancelled + -- ^ @JOB_STATE_CANCELLED@ + -- \`JOB_STATE_CANCELLED\` indicates that the job has been explicitly + -- cancelled. This is a terminal job state. This state may only be set via + -- a Cloud Dataflow \`UpdateJob\` call, and only if the job has not yet + -- reached another terminal state. + | JobStateUpdated + -- ^ @JOB_STATE_UPDATED@ + -- \`JOB_STATE_UPDATED\` indicates that the job was successfully updated, + -- meaning that this job was stopped and another job was started, + -- inheriting state from this one. This is a terminal job state. This state + -- may only be set by the Cloud Dataflow service, and only as a transition + -- from \`JOB_STATE_RUNNING\`. + | JobStateDraining + -- ^ @JOB_STATE_DRAINING@ + -- \`JOB_STATE_DRAINING\` indicates that the job is in the process of + -- draining. A draining job has stopped pulling from its input sources and + -- is processing any data that remains in-flight. This state may be set via + -- a Cloud Dataflow \`UpdateJob\` call, but only as a transition from + -- \`JOB_STATE_RUNNING\`. Jobs that are draining may only transition to + -- \`JOB_STATE_DRAINED\`, \`JOB_STATE_CANCELLED\`, or \`JOB_STATE_FAILED\`. + | JobStateDrained + -- ^ @JOB_STATE_DRAINED@ + -- \`JOB_STATE_DRAINED\` indicates that the job has been drained. A drained + -- job terminated by stopping pulling from its input sources and processing + -- any data that remained in-flight when draining was requested. This state + -- is a terminal state, may only be set by the Cloud Dataflow service, and + -- only as a transition from \`JOB_STATE_DRAINING\`. + | JobStatePending + -- ^ @JOB_STATE_PENDING@ + -- \`JOB_STATE_PENDING\` indicates that the job has been created but is not + -- yet running. Jobs that are pending may only transition to + -- \`JOB_STATE_RUNNING\`, or \`JOB_STATE_FAILED\`. + | JobStateCancelling + -- ^ @JOB_STATE_CANCELLING@ + -- \`JOB_STATE_CANCELLING\` indicates that the job has been explicitly + -- cancelled and is in the process of stopping. Jobs that are cancelling + -- may only transition to \`JOB_STATE_CANCELLED\` or \`JOB_STATE_FAILED\`. + | JobStateQueued + -- ^ @JOB_STATE_QUEUED@ + -- \`JOB_STATE_QUEUED\` indicates that the job has been created but is + -- being delayed until launch. Jobs that are queued may only transition to + -- \`JOB_STATE_PENDING\` or \`JOB_STATE_CANCELLED\`. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable JobCurrentState + +instance FromHttpApiData JobCurrentState where + parseQueryParam = \case + "JOB_STATE_UNKNOWN" -> Right JobStateUnknown + "JOB_STATE_STOPPED" -> Right JobStateStopped + "JOB_STATE_RUNNING" -> Right JobStateRunning + "JOB_STATE_DONE" -> Right JobStateDone + "JOB_STATE_FAILED" -> Right JobStateFailed + "JOB_STATE_CANCELLED" -> Right JobStateCancelled + "JOB_STATE_UPDATED" -> Right JobStateUpdated + "JOB_STATE_DRAINING" -> Right JobStateDraining + "JOB_STATE_DRAINED" -> Right JobStateDrained + "JOB_STATE_PENDING" -> Right JobStatePending + "JOB_STATE_CANCELLING" -> Right JobStateCancelling + "JOB_STATE_QUEUED" -> Right JobStateQueued + x -> Left ("Unable to parse JobCurrentState from: " <> x) + +instance ToHttpApiData JobCurrentState where + toQueryParam = \case + JobStateUnknown -> "JOB_STATE_UNKNOWN" + JobStateStopped -> "JOB_STATE_STOPPED" + JobStateRunning -> "JOB_STATE_RUNNING" + JobStateDone -> "JOB_STATE_DONE" + JobStateFailed -> "JOB_STATE_FAILED" + JobStateCancelled -> "JOB_STATE_CANCELLED" + JobStateUpdated -> "JOB_STATE_UPDATED" + JobStateDraining -> "JOB_STATE_DRAINING" + JobStateDrained -> "JOB_STATE_DRAINED" + JobStatePending -> "JOB_STATE_PENDING" + JobStateCancelling -> "JOB_STATE_CANCELLING" + JobStateQueued -> "JOB_STATE_QUEUED" + +instance FromJSON JobCurrentState where + parseJSON = parseJSONText "JobCurrentState" + +instance ToJSON JobCurrentState where + toJSON = toJSONText + +-- | System defined Units, see above enum. +data CounterMetadataStandardUnits + = Bytes + -- ^ @BYTES@ + -- Counter returns a value in bytes. + | BytesPerSec + -- ^ @BYTES_PER_SEC@ + -- Counter returns a value in bytes per second. + | Milliseconds + -- ^ @MILLISECONDS@ + -- Counter returns a value in milliseconds. + | Microseconds + -- ^ @MICROSECONDS@ + -- Counter returns a value in microseconds. + | Nanoseconds + -- ^ @NANOSECONDS@ + -- Counter returns a value in nanoseconds. + | TimestampMsec + -- ^ @TIMESTAMP_MSEC@ + -- Counter returns a timestamp in milliseconds. + | TimestampUsec + -- ^ @TIMESTAMP_USEC@ + -- Counter returns a timestamp in microseconds. + | TimestampNsec + -- ^ @TIMESTAMP_NSEC@ + -- Counter returns a timestamp in nanoseconds. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable CounterMetadataStandardUnits + +instance FromHttpApiData CounterMetadataStandardUnits where + parseQueryParam = \case + "BYTES" -> Right Bytes + "BYTES_PER_SEC" -> Right BytesPerSec + "MILLISECONDS" -> Right Milliseconds + "MICROSECONDS" -> Right Microseconds + "NANOSECONDS" -> Right Nanoseconds + "TIMESTAMP_MSEC" -> Right TimestampMsec + "TIMESTAMP_USEC" -> Right TimestampUsec + "TIMESTAMP_NSEC" -> Right TimestampNsec + x -> Left ("Unable to parse CounterMetadataStandardUnits from: " <> x) + +instance ToHttpApiData CounterMetadataStandardUnits where + toQueryParam = \case + Bytes -> "BYTES" + BytesPerSec -> "BYTES_PER_SEC" + Milliseconds -> "MILLISECONDS" + Microseconds -> "MICROSECONDS" + Nanoseconds -> "NANOSECONDS" + TimestampMsec -> "TIMESTAMP_MSEC" + TimestampUsec -> "TIMESTAMP_USEC" + TimestampNsec -> "TIMESTAMP_NSEC" + +instance FromJSON CounterMetadataStandardUnits where + parseJSON = parseJSONText "CounterMetadataStandardUnits" + +instance ToJSON CounterMetadataStandardUnits where + toJSON = toJSONText + +-- | The type of autoscaling event to report. +data AutoscalingEventEventType + = TypeUnknown + -- ^ @TYPE_UNKNOWN@ + -- Default type for the enum. Value should never be returned. + | TargetNumWorkersChanged + -- ^ @TARGET_NUM_WORKERS_CHANGED@ + -- The TARGET_NUM_WORKERS_CHANGED type should be used when the target + -- worker pool size has changed at the start of an actuation. An event + -- should always be specified as TARGET_NUM_WORKERS_CHANGED if it reflects + -- a change in the target_num_workers. + | CurrentNumWorkersChanged + -- ^ @CURRENT_NUM_WORKERS_CHANGED@ + -- The CURRENT_NUM_WORKERS_CHANGED type should be used when actual worker + -- pool size has been changed, but the target_num_workers has not changed. + | ActuationFailure + -- ^ @ACTUATION_FAILURE@ + -- The ACTUATION_FAILURE type should be used when we want to report an + -- error to the user indicating why the current number of workers in the + -- pool could not be changed. Displayed in the current status and history + -- widgets. + | NoChange + -- ^ @NO_CHANGE@ + -- Used when we want to report to the user a reason why we are not + -- currently adjusting the number of workers. Should specify both + -- target_num_workers, current_num_workers and a decision_message. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable AutoscalingEventEventType + +instance FromHttpApiData AutoscalingEventEventType where + parseQueryParam = \case + "TYPE_UNKNOWN" -> Right TypeUnknown + "TARGET_NUM_WORKERS_CHANGED" -> Right TargetNumWorkersChanged + "CURRENT_NUM_WORKERS_CHANGED" -> Right CurrentNumWorkersChanged + "ACTUATION_FAILURE" -> Right ActuationFailure + "NO_CHANGE" -> Right NoChange + x -> Left ("Unable to parse AutoscalingEventEventType from: " <> x) + +instance ToHttpApiData AutoscalingEventEventType where + toQueryParam = \case + TypeUnknown -> "TYPE_UNKNOWN" + TargetNumWorkersChanged -> "TARGET_NUM_WORKERS_CHANGED" + CurrentNumWorkersChanged -> "CURRENT_NUM_WORKERS_CHANGED" + ActuationFailure -> "ACTUATION_FAILURE" + NoChange -> "NO_CHANGE" + +instance FromJSON AutoscalingEventEventType where + parseJSON = parseJSONText "AutoscalingEventEventType" + +instance ToJSON AutoscalingEventEventType where + toJSON = toJSONText + +-- | What source to base the produced source on (if any). +data DerivedSourceDerivationMode + = DSDMSourceDerivationModeUnknown + -- ^ @SOURCE_DERIVATION_MODE_UNKNOWN@ + -- The source derivation is unknown, or unspecified. + | DSDMSourceDerivationModeIndependent + -- ^ @SOURCE_DERIVATION_MODE_INDEPENDENT@ + -- Produce a completely independent Source with no base. + | DSDMSourceDerivationModeChildOfCurrent + -- ^ @SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT@ + -- Produce a Source based on the Source being split. + | DSDMSourceDerivationModeSiblingOfCurrent + -- ^ @SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT@ + -- Produce a Source based on the base of the Source being split. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable DerivedSourceDerivationMode + +instance FromHttpApiData DerivedSourceDerivationMode where + parseQueryParam = \case + "SOURCE_DERIVATION_MODE_UNKNOWN" -> Right DSDMSourceDerivationModeUnknown + "SOURCE_DERIVATION_MODE_INDEPENDENT" -> Right DSDMSourceDerivationModeIndependent + "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" -> Right DSDMSourceDerivationModeChildOfCurrent + "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" -> Right DSDMSourceDerivationModeSiblingOfCurrent + x -> Left ("Unable to parse DerivedSourceDerivationMode from: " <> x) + +instance ToHttpApiData DerivedSourceDerivationMode where + toQueryParam = \case + DSDMSourceDerivationModeUnknown -> "SOURCE_DERIVATION_MODE_UNKNOWN" + DSDMSourceDerivationModeIndependent -> "SOURCE_DERIVATION_MODE_INDEPENDENT" + DSDMSourceDerivationModeChildOfCurrent -> "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" + DSDMSourceDerivationModeSiblingOfCurrent -> "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" + +instance FromJSON DerivedSourceDerivationMode where + parseJSON = parseJSONText "DerivedSourceDerivationMode" + +instance ToJSON DerivedSourceDerivationMode where + toJSON = toJSONText + +-- | Type of tranform this stage is executing. +data ExecutionStageSummaryKind + = ESSKUnknownKind + -- ^ @UNKNOWN_KIND@ + -- Unrecognized transform type. + | ESSKParDoKind + -- ^ @PAR_DO_KIND@ + -- ParDo transform. + | ESSKGroupByKeyKind + -- ^ @GROUP_BY_KEY_KIND@ + -- Group By Key transform. + | ESSKFlattenKind + -- ^ @FLATTEN_KIND@ + -- Flatten transform. + | ESSKReadKind + -- ^ @READ_KIND@ + -- Read transform. + | ESSKWriteKind + -- ^ @WRITE_KIND@ + -- Write transform. + | ESSKConstantKind + -- ^ @CONSTANT_KIND@ + -- Constructs from a constant value, such as with Create.of. + | ESSKSingletonKind + -- ^ @SINGLETON_KIND@ + -- Creates a Singleton view of a collection. + | ESSKShuffleKind + -- ^ @SHUFFLE_KIND@ + -- Opening or closing a shuffle session, often as part of a GroupByKey. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable ExecutionStageSummaryKind + +instance FromHttpApiData ExecutionStageSummaryKind where + parseQueryParam = \case + "UNKNOWN_KIND" -> Right ESSKUnknownKind + "PAR_DO_KIND" -> Right ESSKParDoKind + "GROUP_BY_KEY_KIND" -> Right ESSKGroupByKeyKind + "FLATTEN_KIND" -> Right ESSKFlattenKind + "READ_KIND" -> Right ESSKReadKind + "WRITE_KIND" -> Right ESSKWriteKind + "CONSTANT_KIND" -> Right ESSKConstantKind + "SINGLETON_KIND" -> Right ESSKSingletonKind + "SHUFFLE_KIND" -> Right ESSKShuffleKind + x -> Left ("Unable to parse ExecutionStageSummaryKind from: " <> x) + +instance ToHttpApiData ExecutionStageSummaryKind where + toQueryParam = \case + ESSKUnknownKind -> "UNKNOWN_KIND" + ESSKParDoKind -> "PAR_DO_KIND" + ESSKGroupByKeyKind -> "GROUP_BY_KEY_KIND" + ESSKFlattenKind -> "FLATTEN_KIND" + ESSKReadKind -> "READ_KIND" + ESSKWriteKind -> "WRITE_KIND" + ESSKConstantKind -> "CONSTANT_KIND" + ESSKSingletonKind -> "SINGLETON_KIND" + ESSKShuffleKind -> "SHUFFLE_KIND" + +instance FromJSON ExecutionStageSummaryKind where + parseJSON = parseJSONText "ExecutionStageSummaryKind" + +instance ToJSON ExecutionStageSummaryKind where + toJSON = toJSONText + +-- | V1 error format. +data Xgafv + = X1 + -- ^ @1@ + -- v1 error format + | X2 + -- ^ @2@ + -- v2 error format + 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 + +-- | The job\'s requested state. \`UpdateJob\` may be used to switch between +-- the \`JOB_STATE_STOPPED\` and \`JOB_STATE_RUNNING\` states, by setting +-- requested_state. \`UpdateJob\` may also be used to directly set a job\'s +-- requested state to \`JOB_STATE_CANCELLED\` or \`JOB_STATE_DONE\`, +-- irrevocably terminating the job if it has not already reached a terminal +-- state. +data JobRequestedState + = JRSJobStateUnknown + -- ^ @JOB_STATE_UNKNOWN@ + -- The job\'s run state isn\'t specified. + | JRSJobStateStopped + -- ^ @JOB_STATE_STOPPED@ + -- \`JOB_STATE_STOPPED\` indicates that the job has not yet started to run. + | JRSJobStateRunning + -- ^ @JOB_STATE_RUNNING@ + -- \`JOB_STATE_RUNNING\` indicates that the job is currently running. + | JRSJobStateDone + -- ^ @JOB_STATE_DONE@ + -- \`JOB_STATE_DONE\` indicates that the job has successfully completed. + -- This is a terminal job state. This state may be set by the Cloud + -- Dataflow service, as a transition from \`JOB_STATE_RUNNING\`. It may + -- also be set via a Cloud Dataflow \`UpdateJob\` call, if the job has not + -- yet reached a terminal state. + | JRSJobStateFailed + -- ^ @JOB_STATE_FAILED@ + -- \`JOB_STATE_FAILED\` indicates that the job has failed. This is a + -- terminal job state. This state may only be set by the Cloud Dataflow + -- service, and only as a transition from \`JOB_STATE_RUNNING\`. + | JRSJobStateCancelled + -- ^ @JOB_STATE_CANCELLED@ + -- \`JOB_STATE_CANCELLED\` indicates that the job has been explicitly + -- cancelled. This is a terminal job state. This state may only be set via + -- a Cloud Dataflow \`UpdateJob\` call, and only if the job has not yet + -- reached another terminal state. + | JRSJobStateUpdated + -- ^ @JOB_STATE_UPDATED@ + -- \`JOB_STATE_UPDATED\` indicates that the job was successfully updated, + -- meaning that this job was stopped and another job was started, + -- inheriting state from this one. This is a terminal job state. This state + -- may only be set by the Cloud Dataflow service, and only as a transition + -- from \`JOB_STATE_RUNNING\`. + | JRSJobStateDraining + -- ^ @JOB_STATE_DRAINING@ + -- \`JOB_STATE_DRAINING\` indicates that the job is in the process of + -- draining. A draining job has stopped pulling from its input sources and + -- is processing any data that remains in-flight. This state may be set via + -- a Cloud Dataflow \`UpdateJob\` call, but only as a transition from + -- \`JOB_STATE_RUNNING\`. Jobs that are draining may only transition to + -- \`JOB_STATE_DRAINED\`, \`JOB_STATE_CANCELLED\`, or \`JOB_STATE_FAILED\`. + | JRSJobStateDrained + -- ^ @JOB_STATE_DRAINED@ + -- \`JOB_STATE_DRAINED\` indicates that the job has been drained. A drained + -- job terminated by stopping pulling from its input sources and processing + -- any data that remained in-flight when draining was requested. This state + -- is a terminal state, may only be set by the Cloud Dataflow service, and + -- only as a transition from \`JOB_STATE_DRAINING\`. + | JRSJobStatePending + -- ^ @JOB_STATE_PENDING@ + -- \`JOB_STATE_PENDING\` indicates that the job has been created but is not + -- yet running. Jobs that are pending may only transition to + -- \`JOB_STATE_RUNNING\`, or \`JOB_STATE_FAILED\`. + | JRSJobStateCancelling + -- ^ @JOB_STATE_CANCELLING@ + -- \`JOB_STATE_CANCELLING\` indicates that the job has been explicitly + -- cancelled and is in the process of stopping. Jobs that are cancelling + -- may only transition to \`JOB_STATE_CANCELLED\` or \`JOB_STATE_FAILED\`. + | JRSJobStateQueued + -- ^ @JOB_STATE_QUEUED@ + -- \`JOB_STATE_QUEUED\` indicates that the job has been created but is + -- being delayed until launch. Jobs that are queued may only transition to + -- \`JOB_STATE_PENDING\` or \`JOB_STATE_CANCELLED\`. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable JobRequestedState + +instance FromHttpApiData JobRequestedState where + parseQueryParam = \case + "JOB_STATE_UNKNOWN" -> Right JRSJobStateUnknown + "JOB_STATE_STOPPED" -> Right JRSJobStateStopped + "JOB_STATE_RUNNING" -> Right JRSJobStateRunning + "JOB_STATE_DONE" -> Right JRSJobStateDone + "JOB_STATE_FAILED" -> Right JRSJobStateFailed + "JOB_STATE_CANCELLED" -> Right JRSJobStateCancelled + "JOB_STATE_UPDATED" -> Right JRSJobStateUpdated + "JOB_STATE_DRAINING" -> Right JRSJobStateDraining + "JOB_STATE_DRAINED" -> Right JRSJobStateDrained + "JOB_STATE_PENDING" -> Right JRSJobStatePending + "JOB_STATE_CANCELLING" -> Right JRSJobStateCancelling + "JOB_STATE_QUEUED" -> Right JRSJobStateQueued + x -> Left ("Unable to parse JobRequestedState from: " <> x) + +instance ToHttpApiData JobRequestedState where + toQueryParam = \case + JRSJobStateUnknown -> "JOB_STATE_UNKNOWN" + JRSJobStateStopped -> "JOB_STATE_STOPPED" + JRSJobStateRunning -> "JOB_STATE_RUNNING" + JRSJobStateDone -> "JOB_STATE_DONE" + JRSJobStateFailed -> "JOB_STATE_FAILED" + JRSJobStateCancelled -> "JOB_STATE_CANCELLED" + JRSJobStateUpdated -> "JOB_STATE_UPDATED" + JRSJobStateDraining -> "JOB_STATE_DRAINING" + JRSJobStateDrained -> "JOB_STATE_DRAINED" + JRSJobStatePending -> "JOB_STATE_PENDING" + JRSJobStateCancelling -> "JOB_STATE_CANCELLING" + JRSJobStateQueued -> "JOB_STATE_QUEUED" + +instance FromJSON JobRequestedState where + parseJSON = parseJSONText "JobRequestedState" + +instance ToJSON JobRequestedState where + toJSON = toJSONText + +-- | The event being reported. +data WorkerLifecycleEventEvent + = UnknownEvent + -- ^ @UNKNOWN_EVENT@ + -- Invalid event. + | OSStart + -- ^ @OS_START@ + -- The time the VM started. + | ContainerStart + -- ^ @CONTAINER_START@ + -- Our container code starts running. Multiple containers could be + -- distinguished with WorkerMessage.labels if desired. + | NetworkUp + -- ^ @NETWORK_UP@ + -- The worker has a functional external network connection. + | StagingFilesDownloadStart + -- ^ @STAGING_FILES_DOWNLOAD_START@ + -- Started downloading staging files. + | StagingFilesDownloadFinish + -- ^ @STAGING_FILES_DOWNLOAD_FINISH@ + -- Finished downloading all staging files. + | SdkInstallStart + -- ^ @SDK_INSTALL_START@ + -- For applicable SDKs, started installation of SDK and worker packages. + | SdkInstallFinish + -- ^ @SDK_INSTALL_FINISH@ + -- Finished installing SDK. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable WorkerLifecycleEventEvent + +instance FromHttpApiData WorkerLifecycleEventEvent where + parseQueryParam = \case + "UNKNOWN_EVENT" -> Right UnknownEvent + "OS_START" -> Right OSStart + "CONTAINER_START" -> Right ContainerStart + "NETWORK_UP" -> Right NetworkUp + "STAGING_FILES_DOWNLOAD_START" -> Right StagingFilesDownloadStart + "STAGING_FILES_DOWNLOAD_FINISH" -> Right StagingFilesDownloadFinish + "SDK_INSTALL_START" -> Right SdkInstallStart + "SDK_INSTALL_FINISH" -> Right SdkInstallFinish + x -> Left ("Unable to parse WorkerLifecycleEventEvent from: " <> x) + +instance ToHttpApiData WorkerLifecycleEventEvent where + toQueryParam = \case + UnknownEvent -> "UNKNOWN_EVENT" + OSStart -> "OS_START" + ContainerStart -> "CONTAINER_START" + NetworkUp -> "NETWORK_UP" + StagingFilesDownloadStart -> "STAGING_FILES_DOWNLOAD_START" + StagingFilesDownloadFinish -> "STAGING_FILES_DOWNLOAD_FINISH" + SdkInstallStart -> "SDK_INSTALL_START" + SdkInstallFinish -> "SDK_INSTALL_FINISH" + +instance FromJSON WorkerLifecycleEventEvent where + parseJSON = parseJSONText "WorkerLifecycleEventEvent" + +instance ToJSON WorkerLifecycleEventEvent where + toJSON = toJSONText + +-- | Executions stage states allow the same set of values as JobState. +data ExecutionStageStateExecutionStageState + = ESSESSJobStateUnknown + -- ^ @JOB_STATE_UNKNOWN@ + -- The job\'s run state isn\'t specified. + | ESSESSJobStateStopped + -- ^ @JOB_STATE_STOPPED@ + -- \`JOB_STATE_STOPPED\` indicates that the job has not yet started to run. + | ESSESSJobStateRunning + -- ^ @JOB_STATE_RUNNING@ + -- \`JOB_STATE_RUNNING\` indicates that the job is currently running. + | ESSESSJobStateDone + -- ^ @JOB_STATE_DONE@ + -- \`JOB_STATE_DONE\` indicates that the job has successfully completed. + -- This is a terminal job state. This state may be set by the Cloud + -- Dataflow service, as a transition from \`JOB_STATE_RUNNING\`. It may + -- also be set via a Cloud Dataflow \`UpdateJob\` call, if the job has not + -- yet reached a terminal state. + | ESSESSJobStateFailed + -- ^ @JOB_STATE_FAILED@ + -- \`JOB_STATE_FAILED\` indicates that the job has failed. This is a + -- terminal job state. This state may only be set by the Cloud Dataflow + -- service, and only as a transition from \`JOB_STATE_RUNNING\`. + | ESSESSJobStateCancelled + -- ^ @JOB_STATE_CANCELLED@ + -- \`JOB_STATE_CANCELLED\` indicates that the job has been explicitly + -- cancelled. This is a terminal job state. This state may only be set via + -- a Cloud Dataflow \`UpdateJob\` call, and only if the job has not yet + -- reached another terminal state. + | ESSESSJobStateUpdated + -- ^ @JOB_STATE_UPDATED@ + -- \`JOB_STATE_UPDATED\` indicates that the job was successfully updated, + -- meaning that this job was stopped and another job was started, + -- inheriting state from this one. This is a terminal job state. This state + -- may only be set by the Cloud Dataflow service, and only as a transition + -- from \`JOB_STATE_RUNNING\`. + | ESSESSJobStateDraining + -- ^ @JOB_STATE_DRAINING@ + -- \`JOB_STATE_DRAINING\` indicates that the job is in the process of + -- draining. A draining job has stopped pulling from its input sources and + -- is processing any data that remains in-flight. This state may be set via + -- a Cloud Dataflow \`UpdateJob\` call, but only as a transition from + -- \`JOB_STATE_RUNNING\`. Jobs that are draining may only transition to + -- \`JOB_STATE_DRAINED\`, \`JOB_STATE_CANCELLED\`, or \`JOB_STATE_FAILED\`. + | ESSESSJobStateDrained + -- ^ @JOB_STATE_DRAINED@ + -- \`JOB_STATE_DRAINED\` indicates that the job has been drained. A drained + -- job terminated by stopping pulling from its input sources and processing + -- any data that remained in-flight when draining was requested. This state + -- is a terminal state, may only be set by the Cloud Dataflow service, and + -- only as a transition from \`JOB_STATE_DRAINING\`. + | ESSESSJobStatePending + -- ^ @JOB_STATE_PENDING@ + -- \`JOB_STATE_PENDING\` indicates that the job has been created but is not + -- yet running. Jobs that are pending may only transition to + -- \`JOB_STATE_RUNNING\`, or \`JOB_STATE_FAILED\`. + | ESSESSJobStateCancelling + -- ^ @JOB_STATE_CANCELLING@ + -- \`JOB_STATE_CANCELLING\` indicates that the job has been explicitly + -- cancelled and is in the process of stopping. Jobs that are cancelling + -- may only transition to \`JOB_STATE_CANCELLED\` or \`JOB_STATE_FAILED\`. + | ESSESSJobStateQueued + -- ^ @JOB_STATE_QUEUED@ + -- \`JOB_STATE_QUEUED\` indicates that the job has been created but is + -- being delayed until launch. Jobs that are queued may only transition to + -- \`JOB_STATE_PENDING\` or \`JOB_STATE_CANCELLED\`. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable ExecutionStageStateExecutionStageState + +instance FromHttpApiData ExecutionStageStateExecutionStageState where + parseQueryParam = \case + "JOB_STATE_UNKNOWN" -> Right ESSESSJobStateUnknown + "JOB_STATE_STOPPED" -> Right ESSESSJobStateStopped + "JOB_STATE_RUNNING" -> Right ESSESSJobStateRunning + "JOB_STATE_DONE" -> Right ESSESSJobStateDone + "JOB_STATE_FAILED" -> Right ESSESSJobStateFailed + "JOB_STATE_CANCELLED" -> Right ESSESSJobStateCancelled + "JOB_STATE_UPDATED" -> Right ESSESSJobStateUpdated + "JOB_STATE_DRAINING" -> Right ESSESSJobStateDraining + "JOB_STATE_DRAINED" -> Right ESSESSJobStateDrained + "JOB_STATE_PENDING" -> Right ESSESSJobStatePending + "JOB_STATE_CANCELLING" -> Right ESSESSJobStateCancelling + "JOB_STATE_QUEUED" -> Right ESSESSJobStateQueued + x -> Left ("Unable to parse ExecutionStageStateExecutionStageState from: " <> x) + +instance ToHttpApiData ExecutionStageStateExecutionStageState where + toQueryParam = \case + ESSESSJobStateUnknown -> "JOB_STATE_UNKNOWN" + ESSESSJobStateStopped -> "JOB_STATE_STOPPED" + ESSESSJobStateRunning -> "JOB_STATE_RUNNING" + ESSESSJobStateDone -> "JOB_STATE_DONE" + ESSESSJobStateFailed -> "JOB_STATE_FAILED" + ESSESSJobStateCancelled -> "JOB_STATE_CANCELLED" + ESSESSJobStateUpdated -> "JOB_STATE_UPDATED" + ESSESSJobStateDraining -> "JOB_STATE_DRAINING" + ESSESSJobStateDrained -> "JOB_STATE_DRAINED" + ESSESSJobStatePending -> "JOB_STATE_PENDING" + ESSESSJobStateCancelling -> "JOB_STATE_CANCELLING" + ESSESSJobStateQueued -> "JOB_STATE_QUEUED" + +instance FromJSON ExecutionStageStateExecutionStageState where + parseJSON = parseJSONText "ExecutionStageStateExecutionStageState" + +instance ToJSON ExecutionStageStateExecutionStageState where + toJSON = toJSONText + +-- | Configuration for VM IPs. +data WorkerPoolIPConfiguration + = WorkerIPUnspecified + -- ^ @WORKER_IP_UNSPECIFIED@ + -- The configuration is unknown, or unspecified. + | WorkerIPPublic + -- ^ @WORKER_IP_PUBLIC@ + -- Workers should have public IP addresses. + | WorkerIPPrivate + -- ^ @WORKER_IP_PRIVATE@ + -- Workers should have private IP addresses. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable WorkerPoolIPConfiguration + +instance FromHttpApiData WorkerPoolIPConfiguration where + parseQueryParam = \case + "WORKER_IP_UNSPECIFIED" -> Right WorkerIPUnspecified + "WORKER_IP_PUBLIC" -> Right WorkerIPPublic + "WORKER_IP_PRIVATE" -> Right WorkerIPPrivate + x -> Left ("Unable to parse WorkerPoolIPConfiguration from: " <> x) + +instance ToHttpApiData WorkerPoolIPConfiguration where + toQueryParam = \case + WorkerIPUnspecified -> "WORKER_IP_UNSPECIFIED" + WorkerIPPublic -> "WORKER_IP_PUBLIC" + WorkerIPPrivate -> "WORKER_IP_PRIVATE" + +instance FromJSON WorkerPoolIPConfiguration where + parseJSON = parseJSONText "WorkerPoolIPConfiguration" + +instance ToJSON WorkerPoolIPConfiguration where + toJSON = toJSONText + +-- | One of the standard Origins defined above. +data CounterStructuredNameOrigin + = System + -- ^ @SYSTEM@ + -- Counter was created by the Dataflow system. + | User + -- ^ @USER@ + -- Counter was created by the user. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable CounterStructuredNameOrigin + +instance FromHttpApiData CounterStructuredNameOrigin where + parseQueryParam = \case + "SYSTEM" -> Right System + "USER" -> Right User + x -> Left ("Unable to parse CounterStructuredNameOrigin from: " <> x) + +instance ToHttpApiData CounterStructuredNameOrigin where + toQueryParam = \case + System -> "SYSTEM" + User -> "USER" + +instance FromJSON CounterStructuredNameOrigin where + parseJSON = parseJSONText "CounterStructuredNameOrigin" + +instance ToJSON CounterStructuredNameOrigin where + toJSON = toJSONText + +-- | A type of streaming computation task. +data StreamingComputationTaskTaskType + = StreamingComputationTaskUnknown + -- ^ @STREAMING_COMPUTATION_TASK_UNKNOWN@ + -- The streaming computation task is unknown, or unspecified. + | StreamingComputationTaskStop + -- ^ @STREAMING_COMPUTATION_TASK_STOP@ + -- Stop processing specified streaming computation range(s). + | StreamingComputationTaskStart + -- ^ @STREAMING_COMPUTATION_TASK_START@ + -- Start processing specified streaming computation range(s). + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable StreamingComputationTaskTaskType + +instance FromHttpApiData StreamingComputationTaskTaskType where + parseQueryParam = \case + "STREAMING_COMPUTATION_TASK_UNKNOWN" -> Right StreamingComputationTaskUnknown + "STREAMING_COMPUTATION_TASK_STOP" -> Right StreamingComputationTaskStop + "STREAMING_COMPUTATION_TASK_START" -> Right StreamingComputationTaskStart + x -> Left ("Unable to parse StreamingComputationTaskTaskType from: " <> x) + +instance ToHttpApiData StreamingComputationTaskTaskType where + toQueryParam = \case + StreamingComputationTaskUnknown -> "STREAMING_COMPUTATION_TASK_UNKNOWN" + StreamingComputationTaskStop -> "STREAMING_COMPUTATION_TASK_STOP" + StreamingComputationTaskStart -> "STREAMING_COMPUTATION_TASK_START" + +instance FromJSON StreamingComputationTaskTaskType where + parseJSON = parseJSONText "StreamingComputationTaskTaskType" + +instance ToJSON StreamingComputationTaskTaskType where + toJSON = toJSONText + +-- | The support status for this SDK version. +data SdkVersionSdkSupportStatus + = Unknown + -- ^ @UNKNOWN@ + -- Cloud Dataflow is unaware of this version. + | Supported + -- ^ @SUPPORTED@ + -- This is a known version of an SDK, and is supported. + | Stale + -- ^ @STALE@ + -- A newer version of the SDK family exists, and an update is recommended. + | Deprecated + -- ^ @DEPRECATED@ + -- This version of the SDK is deprecated and will eventually be no longer + -- supported. + | Unsupported + -- ^ @UNSUPPORTED@ + -- Support for this SDK version has ended and it should no longer be used. + deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) + +instance Hashable SdkVersionSdkSupportStatus + +instance FromHttpApiData SdkVersionSdkSupportStatus where + parseQueryParam = \case + "UNKNOWN" -> Right Unknown + "SUPPORTED" -> Right Supported + "STALE" -> Right Stale + "DEPRECATED" -> Right Deprecated + "UNSUPPORTED" -> Right Unsupported + x -> Left ("Unable to parse SdkVersionSdkSupportStatus from: " <> x) + +instance ToHttpApiData SdkVersionSdkSupportStatus where + toQueryParam = \case + Unknown -> "UNKNOWN" + Supported -> "SUPPORTED" + Stale -> "STALE" + Deprecated -> "DEPRECATED" + Unsupported -> "UNSUPPORTED" + +instance FromJSON SdkVersionSdkSupportStatus where + parseJSON = parseJSONText "SdkVersionSdkSupportStatus" + +instance ToJSON SdkVersionSdkSupportStatus where + toJSON = toJSONText diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Aggregated.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Aggregated.hs new file mode 100644 index 0000000..ea2d06e --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Aggregated.hs @@ -0,0 +1,215 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.Aggregated +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- List the jobs of a project across all regions. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.aggregated@. +module Network.Google.Resource.Dataflow.Projects.Jobs.Aggregated + ( + -- * REST Resource + ProjectsJobsAggregatedResource + + -- * Creating a Request + , projectsJobsAggregated + , ProjectsJobsAggregated + + -- * Request Lenses + , pjaXgafv + , pjaUploadProtocol + , pjaLocation + , pjaAccessToken + , pjaUploadType + , pjaView + , pjaFilter + , pjaPageToken + , pjaProjectId + , pjaPageSize + , pjaCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.jobs.aggregated@ method which the +-- 'ProjectsJobsAggregated' request conforms to. +type ProjectsJobsAggregatedResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs:aggregated" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "location" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "view" Text :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" (Textual Int32) :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] ListJobsResponse + +-- | List the jobs of a project across all regions. +-- +-- /See:/ 'projectsJobsAggregated' smart constructor. +data ProjectsJobsAggregated = ProjectsJobsAggregated' + { _pjaXgafv :: !(Maybe Xgafv) + , _pjaUploadProtocol :: !(Maybe Text) + , _pjaLocation :: !(Maybe Text) + , _pjaAccessToken :: !(Maybe Text) + , _pjaUploadType :: !(Maybe Text) + , _pjaView :: !(Maybe Text) + , _pjaFilter :: !(Maybe Text) + , _pjaPageToken :: !(Maybe Text) + , _pjaProjectId :: !Text + , _pjaPageSize :: !(Maybe (Textual Int32)) + , _pjaCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsAggregated' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjaXgafv' +-- +-- * 'pjaUploadProtocol' +-- +-- * 'pjaLocation' +-- +-- * 'pjaAccessToken' +-- +-- * 'pjaUploadType' +-- +-- * 'pjaView' +-- +-- * 'pjaFilter' +-- +-- * 'pjaPageToken' +-- +-- * 'pjaProjectId' +-- +-- * 'pjaPageSize' +-- +-- * 'pjaCallback' +projectsJobsAggregated + :: Text -- ^ 'pjaProjectId' + -> ProjectsJobsAggregated +projectsJobsAggregated pPjaProjectId_ = + ProjectsJobsAggregated' + { _pjaXgafv = Nothing + , _pjaUploadProtocol = Nothing + , _pjaLocation = Nothing + , _pjaAccessToken = Nothing + , _pjaUploadType = Nothing + , _pjaView = Nothing + , _pjaFilter = Nothing + , _pjaPageToken = Nothing + , _pjaProjectId = pPjaProjectId_ + , _pjaPageSize = Nothing + , _pjaCallback = Nothing + } + +-- | V1 error format. +pjaXgafv :: Lens' ProjectsJobsAggregated (Maybe Xgafv) +pjaXgafv = lens _pjaXgafv (\ s a -> s{_pjaXgafv = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjaUploadProtocol :: Lens' ProjectsJobsAggregated (Maybe Text) +pjaUploadProtocol + = lens _pjaUploadProtocol + (\ s a -> s{_pjaUploadProtocol = a}) + +-- | The location that contains this job. +pjaLocation :: Lens' ProjectsJobsAggregated (Maybe Text) +pjaLocation + = lens _pjaLocation (\ s a -> s{_pjaLocation = a}) + +-- | OAuth access token. +pjaAccessToken :: Lens' ProjectsJobsAggregated (Maybe Text) +pjaAccessToken + = lens _pjaAccessToken + (\ s a -> s{_pjaAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjaUploadType :: Lens' ProjectsJobsAggregated (Maybe Text) +pjaUploadType + = lens _pjaUploadType + (\ s a -> s{_pjaUploadType = a}) + +-- | Level of information requested in response. Default is +-- \`JOB_VIEW_SUMMARY\`. +pjaView :: Lens' ProjectsJobsAggregated (Maybe Text) +pjaView = lens _pjaView (\ s a -> s{_pjaView = a}) + +-- | The kind of filter to use. +pjaFilter :: Lens' ProjectsJobsAggregated (Maybe Text) +pjaFilter + = lens _pjaFilter (\ s a -> s{_pjaFilter = a}) + +-- | Set this to the \'next_page_token\' field of a previous response to +-- request additional results in a long list. +pjaPageToken :: Lens' ProjectsJobsAggregated (Maybe Text) +pjaPageToken + = lens _pjaPageToken (\ s a -> s{_pjaPageToken = a}) + +-- | The project which owns the jobs. +pjaProjectId :: Lens' ProjectsJobsAggregated Text +pjaProjectId + = lens _pjaProjectId (\ s a -> s{_pjaProjectId = a}) + +-- | If there are many jobs, limit response to at most this many. The actual +-- number of jobs returned will be the lesser of max_responses and an +-- unspecified server-defined limit. +pjaPageSize :: Lens' ProjectsJobsAggregated (Maybe Int32) +pjaPageSize + = lens _pjaPageSize (\ s a -> s{_pjaPageSize = a}) . + mapping _Coerce + +-- | JSONP +pjaCallback :: Lens' ProjectsJobsAggregated (Maybe Text) +pjaCallback + = lens _pjaCallback (\ s a -> s{_pjaCallback = a}) + +instance GoogleRequest ProjectsJobsAggregated where + type Rs ProjectsJobsAggregated = ListJobsResponse + type Scopes ProjectsJobsAggregated = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsJobsAggregated'{..} + = go _pjaProjectId _pjaXgafv _pjaUploadProtocol + _pjaLocation + _pjaAccessToken + _pjaUploadType + _pjaView + _pjaFilter + _pjaPageToken + _pjaPageSize + _pjaCallback + (Just AltJSON) + dataflowService + where go + = buildClient + (Proxy :: Proxy ProjectsJobsAggregatedResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Create.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Create.hs index 6869eb3..97c884d 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Create.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Create.hs @@ -22,7 +22,7 @@ -- -- Creates a Cloud Dataflow job. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.create@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.create@. module Network.Google.Resource.Dataflow.Projects.Jobs.Create ( -- * REST Resource @@ -36,11 +36,9 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.Create , pjcXgafv , pjcUploadProtocol , pjcLocation - , pjcPp , pjcAccessToken , pjcUploadType , pjcPayload - , pjcBearerToken , pjcView , pjcProjectId , pjcReplaceJobId @@ -57,31 +55,27 @@ type ProjectsJobsCreateResource = "projects" :> Capture "projectId" Text :> "jobs" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "location" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "view" Text :> - QueryParam "replaceJobId" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] Job :> Post '[JSON] Job + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "view" Text :> + QueryParam "replaceJobId" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] Job :> Post '[JSON] Job -- | Creates a Cloud Dataflow job. -- -- /See:/ 'projectsJobsCreate' smart constructor. data ProjectsJobsCreate = ProjectsJobsCreate' - { _pjcXgafv :: !(Maybe Text) + { _pjcXgafv :: !(Maybe Xgafv) , _pjcUploadProtocol :: !(Maybe Text) , _pjcLocation :: !(Maybe Text) - , _pjcPp :: !Bool , _pjcAccessToken :: !(Maybe Text) , _pjcUploadType :: !(Maybe Text) , _pjcPayload :: !Job - , _pjcBearerToken :: !(Maybe Text) , _pjcView :: !(Maybe Text) , _pjcProjectId :: !Text , _pjcReplaceJobId :: !(Maybe Text) @@ -98,16 +92,12 @@ data ProjectsJobsCreate = ProjectsJobsCreate' -- -- * 'pjcLocation' -- --- * 'pjcPp' --- -- * 'pjcAccessToken' -- -- * 'pjcUploadType' -- -- * 'pjcPayload' -- --- * 'pjcBearerToken' --- -- * 'pjcView' -- -- * 'pjcProjectId' @@ -124,11 +114,9 @@ projectsJobsCreate pPjcPayload_ pPjcProjectId_ = { _pjcXgafv = Nothing , _pjcUploadProtocol = Nothing , _pjcLocation = Nothing - , _pjcPp = True , _pjcAccessToken = Nothing , _pjcUploadType = Nothing , _pjcPayload = pPjcPayload_ - , _pjcBearerToken = Nothing , _pjcView = Nothing , _pjcProjectId = pPjcProjectId_ , _pjcReplaceJobId = Nothing @@ -136,7 +124,7 @@ projectsJobsCreate pPjcPayload_ pPjcProjectId_ = } -- | V1 error format. -pjcXgafv :: Lens' ProjectsJobsCreate (Maybe Text) +pjcXgafv :: Lens' ProjectsJobsCreate (Maybe Xgafv) pjcXgafv = lens _pjcXgafv (\ s a -> s{_pjcXgafv = a}) -- | Upload protocol for media (e.g. \"raw\", \"multipart\"). @@ -150,10 +138,6 @@ pjcLocation :: Lens' ProjectsJobsCreate (Maybe Text) pjcLocation = lens _pjcLocation (\ s a -> s{_pjcLocation = a}) --- | Pretty-print response. -pjcPp :: Lens' ProjectsJobsCreate Bool -pjcPp = lens _pjcPp (\ s a -> s{_pjcPp = a}) - -- | OAuth access token. pjcAccessToken :: Lens' ProjectsJobsCreate (Maybe Text) pjcAccessToken @@ -171,12 +155,6 @@ pjcPayload :: Lens' ProjectsJobsCreate Job pjcPayload = lens _pjcPayload (\ s a -> s{_pjcPayload = a}) --- | OAuth bearer token. -pjcBearerToken :: Lens' ProjectsJobsCreate (Maybe Text) -pjcBearerToken - = lens _pjcBearerToken - (\ s a -> s{_pjcBearerToken = a}) - -- | The level of information requested in response. pjcView :: Lens' ProjectsJobsCreate (Maybe Text) pjcView = lens _pjcView (\ s a -> s{_pjcView = a}) @@ -201,14 +179,14 @@ instance GoogleRequest ProjectsJobsCreate where type Rs ProjectsJobsCreate = Job type Scopes ProjectsJobsCreate = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsCreate'{..} = go _pjcProjectId _pjcXgafv _pjcUploadProtocol _pjcLocation - (Just _pjcPp) _pjcAccessToken _pjcUploadType - _pjcBearerToken _pjcView _pjcReplaceJobId _pjcCallback diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/GetConfig.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/GetConfig.hs index 61dd537..d7eee23 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/GetConfig.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/GetConfig.hs @@ -22,7 +22,7 @@ -- -- Get encoded debug configuration for component. Not cacheable. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.debug.getConfig@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.debug.getConfig@. module Network.Google.Resource.Dataflow.Projects.Jobs.Debug.GetConfig ( -- * REST Resource @@ -36,11 +36,9 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.Debug.GetConfig , pjdgcXgafv , pjdgcJobId , pjdgcUploadProtocol - , pjdgcPp , pjdgcAccessToken , pjdgcUploadType , pjdgcPayload - , pjdgcBearerToken , pjdgcProjectId , pjdgcCallback ) where @@ -58,29 +56,25 @@ type ProjectsJobsDebugGetConfigResource = Capture "jobId" Text :> "debug" :> "getConfig" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] GetDebugConfigRequest :> - Post '[JSON] GetDebugConfigResponse + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] GetDebugConfigRequest :> + Post '[JSON] GetDebugConfigResponse -- | Get encoded debug configuration for component. Not cacheable. -- -- /See:/ 'projectsJobsDebugGetConfig' smart constructor. data ProjectsJobsDebugGetConfig = ProjectsJobsDebugGetConfig' - { _pjdgcXgafv :: !(Maybe Text) + { _pjdgcXgafv :: !(Maybe Xgafv) , _pjdgcJobId :: !Text , _pjdgcUploadProtocol :: !(Maybe Text) - , _pjdgcPp :: !Bool , _pjdgcAccessToken :: !(Maybe Text) , _pjdgcUploadType :: !(Maybe Text) , _pjdgcPayload :: !GetDebugConfigRequest - , _pjdgcBearerToken :: !(Maybe Text) , _pjdgcProjectId :: !Text , _pjdgcCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -95,16 +89,12 @@ data ProjectsJobsDebugGetConfig = ProjectsJobsDebugGetConfig' -- -- * 'pjdgcUploadProtocol' -- --- * 'pjdgcPp' --- -- * 'pjdgcAccessToken' -- -- * 'pjdgcUploadType' -- -- * 'pjdgcPayload' -- --- * 'pjdgcBearerToken' --- -- * 'pjdgcProjectId' -- -- * 'pjdgcCallback' @@ -118,17 +108,15 @@ projectsJobsDebugGetConfig pPjdgcJobId_ pPjdgcPayload_ pPjdgcProjectId_ = { _pjdgcXgafv = Nothing , _pjdgcJobId = pPjdgcJobId_ , _pjdgcUploadProtocol = Nothing - , _pjdgcPp = True , _pjdgcAccessToken = Nothing , _pjdgcUploadType = Nothing , _pjdgcPayload = pPjdgcPayload_ - , _pjdgcBearerToken = Nothing , _pjdgcProjectId = pPjdgcProjectId_ , _pjdgcCallback = Nothing } -- | V1 error format. -pjdgcXgafv :: Lens' ProjectsJobsDebugGetConfig (Maybe Text) +pjdgcXgafv :: Lens' ProjectsJobsDebugGetConfig (Maybe Xgafv) pjdgcXgafv = lens _pjdgcXgafv (\ s a -> s{_pjdgcXgafv = a}) @@ -143,10 +131,6 @@ pjdgcUploadProtocol = lens _pjdgcUploadProtocol (\ s a -> s{_pjdgcUploadProtocol = a}) --- | Pretty-print response. -pjdgcPp :: Lens' ProjectsJobsDebugGetConfig Bool -pjdgcPp = lens _pjdgcPp (\ s a -> s{_pjdgcPp = a}) - -- | OAuth access token. pjdgcAccessToken :: Lens' ProjectsJobsDebugGetConfig (Maybe Text) pjdgcAccessToken @@ -164,12 +148,6 @@ pjdgcPayload :: Lens' ProjectsJobsDebugGetConfig GetDebugConfigRequest pjdgcPayload = lens _pjdgcPayload (\ s a -> s{_pjdgcPayload = a}) --- | OAuth bearer token. -pjdgcBearerToken :: Lens' ProjectsJobsDebugGetConfig (Maybe Text) -pjdgcBearerToken - = lens _pjdgcBearerToken - (\ s a -> s{_pjdgcBearerToken = a}) - -- | The project id. pjdgcProjectId :: Lens' ProjectsJobsDebugGetConfig Text pjdgcProjectId @@ -188,14 +166,14 @@ instance GoogleRequest ProjectsJobsDebugGetConfig GetDebugConfigResponse type Scopes ProjectsJobsDebugGetConfig = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsDebugGetConfig'{..} = go _pjdgcProjectId _pjdgcJobId _pjdgcXgafv _pjdgcUploadProtocol - (Just _pjdgcPp) _pjdgcAccessToken _pjdgcUploadType - _pjdgcBearerToken _pjdgcCallback (Just AltJSON) _pjdgcPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/SendCapture.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/SendCapture.hs index ddc7a89..f7d2405 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/SendCapture.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/SendCapture.hs @@ -22,7 +22,7 @@ -- -- Send encoded debug capture data for component. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.debug.sendCapture@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.debug.sendCapture@. module Network.Google.Resource.Dataflow.Projects.Jobs.Debug.SendCapture ( -- * REST Resource @@ -36,11 +36,9 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.Debug.SendCapture , pjdscXgafv , pjdscJobId , pjdscUploadProtocol - , pjdscPp , pjdscAccessToken , pjdscUploadType , pjdscPayload - , pjdscBearerToken , pjdscProjectId , pjdscCallback ) where @@ -58,29 +56,25 @@ type ProjectsJobsDebugSendCaptureResource = Capture "jobId" Text :> "debug" :> "sendCapture" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] SendDebugCaptureRequest :> - Post '[JSON] SendDebugCaptureResponse + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] SendDebugCaptureRequest :> + Post '[JSON] SendDebugCaptureResponse -- | Send encoded debug capture data for component. -- -- /See:/ 'projectsJobsDebugSendCapture' smart constructor. data ProjectsJobsDebugSendCapture = ProjectsJobsDebugSendCapture' - { _pjdscXgafv :: !(Maybe Text) + { _pjdscXgafv :: !(Maybe Xgafv) , _pjdscJobId :: !Text , _pjdscUploadProtocol :: !(Maybe Text) - , _pjdscPp :: !Bool , _pjdscAccessToken :: !(Maybe Text) , _pjdscUploadType :: !(Maybe Text) , _pjdscPayload :: !SendDebugCaptureRequest - , _pjdscBearerToken :: !(Maybe Text) , _pjdscProjectId :: !Text , _pjdscCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -95,16 +89,12 @@ data ProjectsJobsDebugSendCapture = ProjectsJobsDebugSendCapture' -- -- * 'pjdscUploadProtocol' -- --- * 'pjdscPp' --- -- * 'pjdscAccessToken' -- -- * 'pjdscUploadType' -- -- * 'pjdscPayload' -- --- * 'pjdscBearerToken' --- -- * 'pjdscProjectId' -- -- * 'pjdscCallback' @@ -118,17 +108,15 @@ projectsJobsDebugSendCapture pPjdscJobId_ pPjdscPayload_ pPjdscProjectId_ = { _pjdscXgafv = Nothing , _pjdscJobId = pPjdscJobId_ , _pjdscUploadProtocol = Nothing - , _pjdscPp = True , _pjdscAccessToken = Nothing , _pjdscUploadType = Nothing , _pjdscPayload = pPjdscPayload_ - , _pjdscBearerToken = Nothing , _pjdscProjectId = pPjdscProjectId_ , _pjdscCallback = Nothing } -- | V1 error format. -pjdscXgafv :: Lens' ProjectsJobsDebugSendCapture (Maybe Text) +pjdscXgafv :: Lens' ProjectsJobsDebugSendCapture (Maybe Xgafv) pjdscXgafv = lens _pjdscXgafv (\ s a -> s{_pjdscXgafv = a}) @@ -143,10 +131,6 @@ pjdscUploadProtocol = lens _pjdscUploadProtocol (\ s a -> s{_pjdscUploadProtocol = a}) --- | Pretty-print response. -pjdscPp :: Lens' ProjectsJobsDebugSendCapture Bool -pjdscPp = lens _pjdscPp (\ s a -> s{_pjdscPp = a}) - -- | OAuth access token. pjdscAccessToken :: Lens' ProjectsJobsDebugSendCapture (Maybe Text) pjdscAccessToken @@ -164,12 +148,6 @@ pjdscPayload :: Lens' ProjectsJobsDebugSendCapture SendDebugCaptureRequest pjdscPayload = lens _pjdscPayload (\ s a -> s{_pjdscPayload = a}) --- | OAuth bearer token. -pjdscBearerToken :: Lens' ProjectsJobsDebugSendCapture (Maybe Text) -pjdscBearerToken - = lens _pjdscBearerToken - (\ s a -> s{_pjdscBearerToken = a}) - -- | The project id. pjdscProjectId :: Lens' ProjectsJobsDebugSendCapture Text pjdscProjectId @@ -188,14 +166,14 @@ instance GoogleRequest ProjectsJobsDebugSendCapture SendDebugCaptureResponse type Scopes ProjectsJobsDebugSendCapture = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsDebugSendCapture'{..} = go _pjdscProjectId _pjdscJobId _pjdscXgafv _pjdscUploadProtocol - (Just _pjdscPp) _pjdscAccessToken _pjdscUploadType - _pjdscBearerToken _pjdscCallback (Just AltJSON) _pjdscPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Get.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Get.hs index 1cb3cf5..2ed39cc 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Get.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Get.hs @@ -22,7 +22,7 @@ -- -- Gets the state of the specified Cloud Dataflow job. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.get@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.get@. module Network.Google.Resource.Dataflow.Projects.Jobs.Get ( -- * REST Resource @@ -37,10 +37,8 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.Get , pjgJobId , pjgUploadProtocol , pjgLocation - , pjgPp , pjgAccessToken , pjgUploadType - , pjgBearerToken , pjgView , pjgProjectId , pjgCallback @@ -57,29 +55,25 @@ type ProjectsJobsGetResource = Capture "projectId" Text :> "jobs" :> Capture "jobId" Text :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "location" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "view" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> Get '[JSON] Job + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "view" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> Get '[JSON] Job -- | Gets the state of the specified Cloud Dataflow job. -- -- /See:/ 'projectsJobsGet' smart constructor. data ProjectsJobsGet = ProjectsJobsGet' - { _pjgXgafv :: !(Maybe Text) + { _pjgXgafv :: !(Maybe Xgafv) , _pjgJobId :: !Text , _pjgUploadProtocol :: !(Maybe Text) , _pjgLocation :: !(Maybe Text) - , _pjgPp :: !Bool , _pjgAccessToken :: !(Maybe Text) , _pjgUploadType :: !(Maybe Text) - , _pjgBearerToken :: !(Maybe Text) , _pjgView :: !(Maybe Text) , _pjgProjectId :: !Text , _pjgCallback :: !(Maybe Text) @@ -97,14 +91,10 @@ data ProjectsJobsGet = ProjectsJobsGet' -- -- * 'pjgLocation' -- --- * 'pjgPp' --- -- * 'pjgAccessToken' -- -- * 'pjgUploadType' -- --- * 'pjgBearerToken' --- -- * 'pjgView' -- -- * 'pjgProjectId' @@ -120,17 +110,15 @@ projectsJobsGet pPjgJobId_ pPjgProjectId_ = , _pjgJobId = pPjgJobId_ , _pjgUploadProtocol = Nothing , _pjgLocation = Nothing - , _pjgPp = True , _pjgAccessToken = Nothing , _pjgUploadType = Nothing - , _pjgBearerToken = Nothing , _pjgView = Nothing , _pjgProjectId = pPjgProjectId_ , _pjgCallback = Nothing } -- | V1 error format. -pjgXgafv :: Lens' ProjectsJobsGet (Maybe Text) +pjgXgafv :: Lens' ProjectsJobsGet (Maybe Xgafv) pjgXgafv = lens _pjgXgafv (\ s a -> s{_pjgXgafv = a}) -- | The job ID. @@ -148,10 +136,6 @@ pjgLocation :: Lens' ProjectsJobsGet (Maybe Text) pjgLocation = lens _pjgLocation (\ s a -> s{_pjgLocation = a}) --- | Pretty-print response. -pjgPp :: Lens' ProjectsJobsGet Bool -pjgPp = lens _pjgPp (\ s a -> s{_pjgPp = a}) - -- | OAuth access token. pjgAccessToken :: Lens' ProjectsJobsGet (Maybe Text) pjgAccessToken @@ -164,12 +148,6 @@ pjgUploadType = lens _pjgUploadType (\ s a -> s{_pjgUploadType = a}) --- | OAuth bearer token. -pjgBearerToken :: Lens' ProjectsJobsGet (Maybe Text) -pjgBearerToken - = lens _pjgBearerToken - (\ s a -> s{_pjgBearerToken = a}) - -- | The level of information requested in response. pjgView :: Lens' ProjectsJobsGet (Maybe Text) pjgView = lens _pjgView (\ s a -> s{_pjgView = a}) @@ -188,15 +166,15 @@ instance GoogleRequest ProjectsJobsGet where type Rs ProjectsJobsGet = Job type Scopes ProjectsJobsGet = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsGet'{..} = go _pjgProjectId _pjgJobId _pjgXgafv _pjgUploadProtocol _pjgLocation - (Just _pjgPp) _pjgAccessToken _pjgUploadType - _pjgBearerToken _pjgView _pjgCallback (Just AltJSON) diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/GetMetrics.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/GetMetrics.hs index fdcafec..54d7e9a 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/GetMetrics.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/GetMetrics.hs @@ -22,7 +22,7 @@ -- -- Request the job status. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.getMetrics@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.getMetrics@. module Network.Google.Resource.Dataflow.Projects.Jobs.GetMetrics ( -- * REST Resource @@ -38,10 +38,8 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.GetMetrics , pjgmUploadProtocol , pjgmLocation , pjgmStartTime - , pjgmPp , pjgmAccessToken , pjgmUploadType - , pjgmBearerToken , pjgmProjectId , pjgmCallback ) where @@ -58,31 +56,27 @@ type ProjectsJobsGetMetricsResource = "jobs" :> Capture "jobId" Text :> "metrics" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "location" Text :> - QueryParam "startTime" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - Get '[JSON] JobMetrics + QueryParam "startTime" DateTime' :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] JobMetrics -- | Request the job status. -- -- /See:/ 'projectsJobsGetMetrics' smart constructor. data ProjectsJobsGetMetrics = ProjectsJobsGetMetrics' - { _pjgmXgafv :: !(Maybe Text) + { _pjgmXgafv :: !(Maybe Xgafv) , _pjgmJobId :: !Text , _pjgmUploadProtocol :: !(Maybe Text) , _pjgmLocation :: !(Maybe Text) - , _pjgmStartTime :: !(Maybe Text) - , _pjgmPp :: !Bool + , _pjgmStartTime :: !(Maybe DateTime') , _pjgmAccessToken :: !(Maybe Text) , _pjgmUploadType :: !(Maybe Text) - , _pjgmBearerToken :: !(Maybe Text) , _pjgmProjectId :: !Text , _pjgmCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -101,14 +95,10 @@ data ProjectsJobsGetMetrics = ProjectsJobsGetMetrics' -- -- * 'pjgmStartTime' -- --- * 'pjgmPp' --- -- * 'pjgmAccessToken' -- -- * 'pjgmUploadType' -- --- * 'pjgmBearerToken' --- -- * 'pjgmProjectId' -- -- * 'pjgmCallback' @@ -123,16 +113,14 @@ projectsJobsGetMetrics pPjgmJobId_ pPjgmProjectId_ = , _pjgmUploadProtocol = Nothing , _pjgmLocation = Nothing , _pjgmStartTime = Nothing - , _pjgmPp = True , _pjgmAccessToken = Nothing , _pjgmUploadType = Nothing - , _pjgmBearerToken = Nothing , _pjgmProjectId = pPjgmProjectId_ , _pjgmCallback = Nothing } -- | V1 error format. -pjgmXgafv :: Lens' ProjectsJobsGetMetrics (Maybe Text) +pjgmXgafv :: Lens' ProjectsJobsGetMetrics (Maybe Xgafv) pjgmXgafv = lens _pjgmXgafv (\ s a -> s{_pjgmXgafv = a}) @@ -154,14 +142,11 @@ pjgmLocation -- | Return only metric data that has changed since this time. Default is to -- return all information about all metrics for the job. -pjgmStartTime :: Lens' ProjectsJobsGetMetrics (Maybe Text) +pjgmStartTime :: Lens' ProjectsJobsGetMetrics (Maybe UTCTime) pjgmStartTime = lens _pjgmStartTime (\ s a -> s{_pjgmStartTime = a}) - --- | Pretty-print response. -pjgmPp :: Lens' ProjectsJobsGetMetrics Bool -pjgmPp = lens _pjgmPp (\ s a -> s{_pjgmPp = a}) + . mapping _DateTime -- | OAuth access token. pjgmAccessToken :: Lens' ProjectsJobsGetMetrics (Maybe Text) @@ -175,12 +160,6 @@ pjgmUploadType = lens _pjgmUploadType (\ s a -> s{_pjgmUploadType = a}) --- | OAuth bearer token. -pjgmBearerToken :: Lens' ProjectsJobsGetMetrics (Maybe Text) -pjgmBearerToken - = lens _pjgmBearerToken - (\ s a -> s{_pjgmBearerToken = a}) - -- | A project id. pjgmProjectId :: Lens' ProjectsJobsGetMetrics Text pjgmProjectId @@ -196,16 +175,16 @@ instance GoogleRequest ProjectsJobsGetMetrics where type Rs ProjectsJobsGetMetrics = JobMetrics type Scopes ProjectsJobsGetMetrics = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsGetMetrics'{..} = go _pjgmProjectId _pjgmJobId _pjgmXgafv _pjgmUploadProtocol _pjgmLocation _pjgmStartTime - (Just _pjgmPp) _pjgmAccessToken _pjgmUploadType - _pjgmBearerToken _pjgmCallback (Just AltJSON) dataflowService diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/List.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/List.hs index 177f2bc..9f07fb8 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/List.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/List.hs @@ -20,9 +20,9 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- --- List the jobs of a project. +-- List the jobs of a project in a given region. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.list@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.list@. module Network.Google.Resource.Dataflow.Projects.Jobs.List ( -- * REST Resource @@ -36,10 +36,8 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.List , pjlXgafv , pjlUploadProtocol , pjlLocation - , pjlPp , pjlAccessToken , pjlUploadType - , pjlBearerToken , pjlView , pjlFilter , pjlPageToken @@ -58,32 +56,28 @@ type ProjectsJobsListResource = "projects" :> Capture "projectId" Text :> "jobs" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "location" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "view" Text :> - QueryParam "filter" Text :> - QueryParam "pageToken" Text :> - QueryParam "pageSize" (Textual Int32) :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - Get '[JSON] ListJobsResponse - --- | List the jobs of a project. + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "view" Text :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" (Textual Int32) :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] ListJobsResponse + +-- | List the jobs of a project in a given region. -- -- /See:/ 'projectsJobsList' smart constructor. data ProjectsJobsList = ProjectsJobsList' - { _pjlXgafv :: !(Maybe Text) + { _pjlXgafv :: !(Maybe Xgafv) , _pjlUploadProtocol :: !(Maybe Text) , _pjlLocation :: !(Maybe Text) - , _pjlPp :: !Bool , _pjlAccessToken :: !(Maybe Text) , _pjlUploadType :: !(Maybe Text) - , _pjlBearerToken :: !(Maybe Text) , _pjlView :: !(Maybe Text) , _pjlFilter :: !(Maybe Text) , _pjlPageToken :: !(Maybe Text) @@ -102,14 +96,10 @@ data ProjectsJobsList = ProjectsJobsList' -- -- * 'pjlLocation' -- --- * 'pjlPp' --- -- * 'pjlAccessToken' -- -- * 'pjlUploadType' -- --- * 'pjlBearerToken' --- -- * 'pjlView' -- -- * 'pjlFilter' @@ -129,10 +119,8 @@ projectsJobsList pPjlProjectId_ = { _pjlXgafv = Nothing , _pjlUploadProtocol = Nothing , _pjlLocation = Nothing - , _pjlPp = True , _pjlAccessToken = Nothing , _pjlUploadType = Nothing - , _pjlBearerToken = Nothing , _pjlView = Nothing , _pjlFilter = Nothing , _pjlPageToken = Nothing @@ -142,7 +130,7 @@ projectsJobsList pPjlProjectId_ = } -- | V1 error format. -pjlXgafv :: Lens' ProjectsJobsList (Maybe Text) +pjlXgafv :: Lens' ProjectsJobsList (Maybe Xgafv) pjlXgafv = lens _pjlXgafv (\ s a -> s{_pjlXgafv = a}) -- | Upload protocol for media (e.g. \"raw\", \"multipart\"). @@ -156,10 +144,6 @@ pjlLocation :: Lens' ProjectsJobsList (Maybe Text) pjlLocation = lens _pjlLocation (\ s a -> s{_pjlLocation = a}) --- | Pretty-print response. -pjlPp :: Lens' ProjectsJobsList Bool -pjlPp = lens _pjlPp (\ s a -> s{_pjlPp = a}) - -- | OAuth access token. pjlAccessToken :: Lens' ProjectsJobsList (Maybe Text) pjlAccessToken @@ -172,12 +156,6 @@ pjlUploadType = lens _pjlUploadType (\ s a -> s{_pjlUploadType = a}) --- | OAuth bearer token. -pjlBearerToken :: Lens' ProjectsJobsList (Maybe Text) -pjlBearerToken - = lens _pjlBearerToken - (\ s a -> s{_pjlBearerToken = a}) - -- | Level of information requested in response. Default is -- \`JOB_VIEW_SUMMARY\`. pjlView :: Lens' ProjectsJobsList (Maybe Text) @@ -216,14 +194,14 @@ instance GoogleRequest ProjectsJobsList where type Rs ProjectsJobsList = ListJobsResponse type Scopes ProjectsJobsList = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsList'{..} = go _pjlProjectId _pjlXgafv _pjlUploadProtocol _pjlLocation - (Just _pjlPp) _pjlAccessToken _pjlUploadType - _pjlBearerToken _pjlView _pjlFilter _pjlPageToken diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs index 846ed05..af5d54a 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs @@ -22,7 +22,7 @@ -- -- Request the job status. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.messages.list@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.messages.list@. module Network.Google.Resource.Dataflow.Projects.Jobs.Messages.List ( -- * REST Resource @@ -38,10 +38,8 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.Messages.List , pjmlUploadProtocol , pjmlLocation , pjmlStartTime - , pjmlPp , pjmlAccessToken , pjmlUploadType - , pjmlBearerToken , pjmlEndTime , pjmlMinimumImportance , pjmlPageToken @@ -62,36 +60,32 @@ type ProjectsJobsMessagesListResource = "jobs" :> Capture "jobId" Text :> "messages" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "location" Text :> - QueryParam "startTime" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "endTime" Text :> - QueryParam "minimumImportance" Text :> - QueryParam "pageToken" Text :> - QueryParam "pageSize" (Textual Int32) :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - Get '[JSON] ListJobMessagesResponse + QueryParam "startTime" DateTime' :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "endTime" DateTime' :> + QueryParam "minimumImportance" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" (Textual Int32) :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] ListJobMessagesResponse -- | Request the job status. -- -- /See:/ 'projectsJobsMessagesList' smart constructor. data ProjectsJobsMessagesList = ProjectsJobsMessagesList' - { _pjmlXgafv :: !(Maybe Text) + { _pjmlXgafv :: !(Maybe Xgafv) , _pjmlJobId :: !Text , _pjmlUploadProtocol :: !(Maybe Text) , _pjmlLocation :: !(Maybe Text) - , _pjmlStartTime :: !(Maybe Text) - , _pjmlPp :: !Bool + , _pjmlStartTime :: !(Maybe DateTime') , _pjmlAccessToken :: !(Maybe Text) , _pjmlUploadType :: !(Maybe Text) - , _pjmlBearerToken :: !(Maybe Text) - , _pjmlEndTime :: !(Maybe Text) + , _pjmlEndTime :: !(Maybe DateTime') , _pjmlMinimumImportance :: !(Maybe Text) , _pjmlPageToken :: !(Maybe Text) , _pjmlProjectId :: !Text @@ -113,14 +107,10 @@ data ProjectsJobsMessagesList = ProjectsJobsMessagesList' -- -- * 'pjmlStartTime' -- --- * 'pjmlPp' --- -- * 'pjmlAccessToken' -- -- * 'pjmlUploadType' -- --- * 'pjmlBearerToken' --- -- * 'pjmlEndTime' -- -- * 'pjmlMinimumImportance' @@ -143,10 +133,8 @@ projectsJobsMessagesList pPjmlJobId_ pPjmlProjectId_ = , _pjmlUploadProtocol = Nothing , _pjmlLocation = Nothing , _pjmlStartTime = Nothing - , _pjmlPp = True , _pjmlAccessToken = Nothing , _pjmlUploadType = Nothing - , _pjmlBearerToken = Nothing , _pjmlEndTime = Nothing , _pjmlMinimumImportance = Nothing , _pjmlPageToken = Nothing @@ -156,7 +144,7 @@ projectsJobsMessagesList pPjmlJobId_ pPjmlProjectId_ = } -- | V1 error format. -pjmlXgafv :: Lens' ProjectsJobsMessagesList (Maybe Text) +pjmlXgafv :: Lens' ProjectsJobsMessagesList (Maybe Xgafv) pjmlXgafv = lens _pjmlXgafv (\ s a -> s{_pjmlXgafv = a}) @@ -178,14 +166,11 @@ pjmlLocation -- | If specified, return only messages with timestamps >= start_time. The -- default is the job creation time (i.e. beginning of messages). -pjmlStartTime :: Lens' ProjectsJobsMessagesList (Maybe Text) +pjmlStartTime :: Lens' ProjectsJobsMessagesList (Maybe UTCTime) pjmlStartTime = lens _pjmlStartTime (\ s a -> s{_pjmlStartTime = a}) - --- | Pretty-print response. -pjmlPp :: Lens' ProjectsJobsMessagesList Bool -pjmlPp = lens _pjmlPp (\ s a -> s{_pjmlPp = a}) + . mapping _DateTime -- | OAuth access token. pjmlAccessToken :: Lens' ProjectsJobsMessagesList (Maybe Text) @@ -199,17 +184,12 @@ pjmlUploadType = lens _pjmlUploadType (\ s a -> s{_pjmlUploadType = a}) --- | OAuth bearer token. -pjmlBearerToken :: Lens' ProjectsJobsMessagesList (Maybe Text) -pjmlBearerToken - = lens _pjmlBearerToken - (\ s a -> s{_pjmlBearerToken = a}) - -- | Return only messages with timestamps \< end_time. The default is now -- (i.e. return up to the latest messages available). -pjmlEndTime :: Lens' ProjectsJobsMessagesList (Maybe Text) +pjmlEndTime :: Lens' ProjectsJobsMessagesList (Maybe UTCTime) pjmlEndTime - = lens _pjmlEndTime (\ s a -> s{_pjmlEndTime = a}) + = lens _pjmlEndTime (\ s a -> s{_pjmlEndTime = a}) . + mapping _DateTime -- | Filter to only get messages with importance >= level pjmlMinimumImportance :: Lens' ProjectsJobsMessagesList (Maybe Text) @@ -248,16 +228,16 @@ instance GoogleRequest ProjectsJobsMessagesList where ListJobMessagesResponse type Scopes ProjectsJobsMessagesList = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsMessagesList'{..} = go _pjmlProjectId _pjmlJobId _pjmlXgafv _pjmlUploadProtocol _pjmlLocation _pjmlStartTime - (Just _pjmlPp) _pjmlAccessToken _pjmlUploadType - _pjmlBearerToken _pjmlEndTime _pjmlMinimumImportance _pjmlPageToken diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Snapshot.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Snapshot.hs new file mode 100644 index 0000000..f24cdea --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Snapshot.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.Snapshot +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Snapshot the state of a streaming job. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.snapshot@. +module Network.Google.Resource.Dataflow.Projects.Jobs.Snapshot + ( + -- * REST Resource + ProjectsJobsSnapshotResource + + -- * Creating a Request + , projectsJobsSnapshot + , ProjectsJobsSnapshot + + -- * Request Lenses + , pjsXgafv + , pjsJobId + , pjsUploadProtocol + , pjsAccessToken + , pjsUploadType + , pjsPayload + , pjsProjectId + , pjsCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.jobs.snapshot@ method which the +-- 'ProjectsJobsSnapshot' request conforms to. +type ProjectsJobsSnapshotResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> + CaptureMode "jobId" "snapshot" Text :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] SnapshotJobRequest :> + Post '[JSON] Snapshot + +-- | Snapshot the state of a streaming job. +-- +-- /See:/ 'projectsJobsSnapshot' smart constructor. +data ProjectsJobsSnapshot = ProjectsJobsSnapshot' + { _pjsXgafv :: !(Maybe Xgafv) + , _pjsJobId :: !Text + , _pjsUploadProtocol :: !(Maybe Text) + , _pjsAccessToken :: !(Maybe Text) + , _pjsUploadType :: !(Maybe Text) + , _pjsPayload :: !SnapshotJobRequest + , _pjsProjectId :: !Text + , _pjsCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsSnapshot' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjsXgafv' +-- +-- * 'pjsJobId' +-- +-- * 'pjsUploadProtocol' +-- +-- * 'pjsAccessToken' +-- +-- * 'pjsUploadType' +-- +-- * 'pjsPayload' +-- +-- * 'pjsProjectId' +-- +-- * 'pjsCallback' +projectsJobsSnapshot + :: Text -- ^ 'pjsJobId' + -> SnapshotJobRequest -- ^ 'pjsPayload' + -> Text -- ^ 'pjsProjectId' + -> ProjectsJobsSnapshot +projectsJobsSnapshot pPjsJobId_ pPjsPayload_ pPjsProjectId_ = + ProjectsJobsSnapshot' + { _pjsXgafv = Nothing + , _pjsJobId = pPjsJobId_ + , _pjsUploadProtocol = Nothing + , _pjsAccessToken = Nothing + , _pjsUploadType = Nothing + , _pjsPayload = pPjsPayload_ + , _pjsProjectId = pPjsProjectId_ + , _pjsCallback = Nothing + } + +-- | V1 error format. +pjsXgafv :: Lens' ProjectsJobsSnapshot (Maybe Xgafv) +pjsXgafv = lens _pjsXgafv (\ s a -> s{_pjsXgafv = a}) + +-- | The job to be snapshotted. +pjsJobId :: Lens' ProjectsJobsSnapshot Text +pjsJobId = lens _pjsJobId (\ s a -> s{_pjsJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjsUploadProtocol :: Lens' ProjectsJobsSnapshot (Maybe Text) +pjsUploadProtocol + = lens _pjsUploadProtocol + (\ s a -> s{_pjsUploadProtocol = a}) + +-- | OAuth access token. +pjsAccessToken :: Lens' ProjectsJobsSnapshot (Maybe Text) +pjsAccessToken + = lens _pjsAccessToken + (\ s a -> s{_pjsAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjsUploadType :: Lens' ProjectsJobsSnapshot (Maybe Text) +pjsUploadType + = lens _pjsUploadType + (\ s a -> s{_pjsUploadType = a}) + +-- | Multipart request metadata. +pjsPayload :: Lens' ProjectsJobsSnapshot SnapshotJobRequest +pjsPayload + = lens _pjsPayload (\ s a -> s{_pjsPayload = a}) + +-- | The project which owns the job to be snapshotted. +pjsProjectId :: Lens' ProjectsJobsSnapshot Text +pjsProjectId + = lens _pjsProjectId (\ s a -> s{_pjsProjectId = a}) + +-- | JSONP +pjsCallback :: Lens' ProjectsJobsSnapshot (Maybe Text) +pjsCallback + = lens _pjsCallback (\ s a -> s{_pjsCallback = a}) + +instance GoogleRequest ProjectsJobsSnapshot where + type Rs ProjectsJobsSnapshot = Snapshot + type Scopes ProjectsJobsSnapshot = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsJobsSnapshot'{..} + = go _pjsProjectId _pjsJobId _pjsXgafv + _pjsUploadProtocol + _pjsAccessToken + _pjsUploadType + _pjsCallback + (Just AltJSON) + _pjsPayload + dataflowService + where go + = buildClient + (Proxy :: Proxy ProjectsJobsSnapshotResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs index 35b079e..a9efd4a 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs @@ -22,7 +22,7 @@ -- -- Updates the state of an existing Cloud Dataflow job. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.update@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.update@. module Network.Google.Resource.Dataflow.Projects.Jobs.Update ( -- * REST Resource @@ -37,11 +37,9 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.Update , pjuJobId , pjuUploadProtocol , pjuLocation - , pjuPp , pjuAccessToken , pjuUploadType , pjuPayload - , pjuBearerToken , pjuProjectId , pjuCallback ) where @@ -57,30 +55,26 @@ type ProjectsJobsUpdateResource = Capture "projectId" Text :> "jobs" :> Capture "jobId" Text :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "location" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] Job :> Put '[JSON] Job + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] Job :> Put '[JSON] Job -- | Updates the state of an existing Cloud Dataflow job. -- -- /See:/ 'projectsJobsUpdate' smart constructor. data ProjectsJobsUpdate = ProjectsJobsUpdate' - { _pjuXgafv :: !(Maybe Text) + { _pjuXgafv :: !(Maybe Xgafv) , _pjuJobId :: !Text , _pjuUploadProtocol :: !(Maybe Text) , _pjuLocation :: !(Maybe Text) - , _pjuPp :: !Bool , _pjuAccessToken :: !(Maybe Text) , _pjuUploadType :: !(Maybe Text) , _pjuPayload :: !Job - , _pjuBearerToken :: !(Maybe Text) , _pjuProjectId :: !Text , _pjuCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -97,16 +91,12 @@ data ProjectsJobsUpdate = ProjectsJobsUpdate' -- -- * 'pjuLocation' -- --- * 'pjuPp' --- -- * 'pjuAccessToken' -- -- * 'pjuUploadType' -- -- * 'pjuPayload' -- --- * 'pjuBearerToken' --- -- * 'pjuProjectId' -- -- * 'pjuCallback' @@ -121,17 +111,15 @@ projectsJobsUpdate pPjuJobId_ pPjuPayload_ pPjuProjectId_ = , _pjuJobId = pPjuJobId_ , _pjuUploadProtocol = Nothing , _pjuLocation = Nothing - , _pjuPp = True , _pjuAccessToken = Nothing , _pjuUploadType = Nothing , _pjuPayload = pPjuPayload_ - , _pjuBearerToken = Nothing , _pjuProjectId = pPjuProjectId_ , _pjuCallback = Nothing } -- | V1 error format. -pjuXgafv :: Lens' ProjectsJobsUpdate (Maybe Text) +pjuXgafv :: Lens' ProjectsJobsUpdate (Maybe Xgafv) pjuXgafv = lens _pjuXgafv (\ s a -> s{_pjuXgafv = a}) -- | The job ID. @@ -149,10 +137,6 @@ pjuLocation :: Lens' ProjectsJobsUpdate (Maybe Text) pjuLocation = lens _pjuLocation (\ s a -> s{_pjuLocation = a}) --- | Pretty-print response. -pjuPp :: Lens' ProjectsJobsUpdate Bool -pjuPp = lens _pjuPp (\ s a -> s{_pjuPp = a}) - -- | OAuth access token. pjuAccessToken :: Lens' ProjectsJobsUpdate (Maybe Text) pjuAccessToken @@ -170,12 +154,6 @@ pjuPayload :: Lens' ProjectsJobsUpdate Job pjuPayload = lens _pjuPayload (\ s a -> s{_pjuPayload = a}) --- | OAuth bearer token. -pjuBearerToken :: Lens' ProjectsJobsUpdate (Maybe Text) -pjuBearerToken - = lens _pjuBearerToken - (\ s a -> s{_pjuBearerToken = a}) - -- | The ID of the Cloud Platform project that the job belongs to. pjuProjectId :: Lens' ProjectsJobsUpdate Text pjuProjectId @@ -190,15 +168,15 @@ instance GoogleRequest ProjectsJobsUpdate where type Rs ProjectsJobsUpdate = Job type Scopes ProjectsJobsUpdate = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsUpdate'{..} = go _pjuProjectId _pjuJobId _pjuXgafv _pjuUploadProtocol _pjuLocation - (Just _pjuPp) _pjuAccessToken _pjuUploadType - _pjuBearerToken _pjuCallback (Just AltJSON) _pjuPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/Lease.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/Lease.hs index bfec2f1..a7912b8 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/Lease.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/Lease.hs @@ -22,7 +22,7 @@ -- -- Leases a dataflow WorkItem to run. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.workItems.lease@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.workItems.lease@. module Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.Lease ( -- * REST Resource @@ -36,11 +36,9 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.Lease , pjwilXgafv , pjwilJobId , pjwilUploadProtocol - , pjwilPp , pjwilAccessToken , pjwilUploadType , pjwilPayload - , pjwilBearerToken , pjwilProjectId , pjwilCallback ) where @@ -57,29 +55,25 @@ type ProjectsJobsWorkItemsLeaseResource = "jobs" :> Capture "jobId" Text :> "workItems:lease" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] LeaseWorkItemRequest :> - Post '[JSON] LeaseWorkItemResponse + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] LeaseWorkItemRequest :> + Post '[JSON] LeaseWorkItemResponse -- | Leases a dataflow WorkItem to run. -- -- /See:/ 'projectsJobsWorkItemsLease' smart constructor. data ProjectsJobsWorkItemsLease = ProjectsJobsWorkItemsLease' - { _pjwilXgafv :: !(Maybe Text) + { _pjwilXgafv :: !(Maybe Xgafv) , _pjwilJobId :: !Text , _pjwilUploadProtocol :: !(Maybe Text) - , _pjwilPp :: !Bool , _pjwilAccessToken :: !(Maybe Text) , _pjwilUploadType :: !(Maybe Text) , _pjwilPayload :: !LeaseWorkItemRequest - , _pjwilBearerToken :: !(Maybe Text) , _pjwilProjectId :: !Text , _pjwilCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -94,16 +88,12 @@ data ProjectsJobsWorkItemsLease = ProjectsJobsWorkItemsLease' -- -- * 'pjwilUploadProtocol' -- --- * 'pjwilPp' --- -- * 'pjwilAccessToken' -- -- * 'pjwilUploadType' -- -- * 'pjwilPayload' -- --- * 'pjwilBearerToken' --- -- * 'pjwilProjectId' -- -- * 'pjwilCallback' @@ -117,17 +107,15 @@ projectsJobsWorkItemsLease pPjwilJobId_ pPjwilPayload_ pPjwilProjectId_ = { _pjwilXgafv = Nothing , _pjwilJobId = pPjwilJobId_ , _pjwilUploadProtocol = Nothing - , _pjwilPp = True , _pjwilAccessToken = Nothing , _pjwilUploadType = Nothing , _pjwilPayload = pPjwilPayload_ - , _pjwilBearerToken = Nothing , _pjwilProjectId = pPjwilProjectId_ , _pjwilCallback = Nothing } -- | V1 error format. -pjwilXgafv :: Lens' ProjectsJobsWorkItemsLease (Maybe Text) +pjwilXgafv :: Lens' ProjectsJobsWorkItemsLease (Maybe Xgafv) pjwilXgafv = lens _pjwilXgafv (\ s a -> s{_pjwilXgafv = a}) @@ -142,10 +130,6 @@ pjwilUploadProtocol = lens _pjwilUploadProtocol (\ s a -> s{_pjwilUploadProtocol = a}) --- | Pretty-print response. -pjwilPp :: Lens' ProjectsJobsWorkItemsLease Bool -pjwilPp = lens _pjwilPp (\ s a -> s{_pjwilPp = a}) - -- | OAuth access token. pjwilAccessToken :: Lens' ProjectsJobsWorkItemsLease (Maybe Text) pjwilAccessToken @@ -163,12 +147,6 @@ pjwilPayload :: Lens' ProjectsJobsWorkItemsLease LeaseWorkItemRequest pjwilPayload = lens _pjwilPayload (\ s a -> s{_pjwilPayload = a}) --- | OAuth bearer token. -pjwilBearerToken :: Lens' ProjectsJobsWorkItemsLease (Maybe Text) -pjwilBearerToken - = lens _pjwilBearerToken - (\ s a -> s{_pjwilBearerToken = a}) - -- | Identifies the project this worker belongs to. pjwilProjectId :: Lens' ProjectsJobsWorkItemsLease Text pjwilProjectId @@ -187,14 +165,14 @@ instance GoogleRequest ProjectsJobsWorkItemsLease LeaseWorkItemResponse type Scopes ProjectsJobsWorkItemsLease = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsWorkItemsLease'{..} = go _pjwilProjectId _pjwilJobId _pjwilXgafv _pjwilUploadProtocol - (Just _pjwilPp) _pjwilAccessToken _pjwilUploadType - _pjwilBearerToken _pjwilCallback (Just AltJSON) _pjwilPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs index 4db7ff5..b642873 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs @@ -22,7 +22,7 @@ -- -- Reports the status of dataflow WorkItems leased by a worker. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.jobs.workItems.reportStatus@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.jobs.workItems.reportStatus@. module Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.ReportStatus ( -- * REST Resource @@ -36,11 +36,9 @@ module Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.ReportStatus , pjwirsXgafv , pjwirsJobId , pjwirsUploadProtocol - , pjwirsPp , pjwirsAccessToken , pjwirsUploadType , pjwirsPayload - , pjwirsBearerToken , pjwirsProjectId , pjwirsCallback ) where @@ -57,29 +55,25 @@ type ProjectsJobsWorkItemsReportStatusResource = "jobs" :> Capture "jobId" Text :> "workItems:reportStatus" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] ReportWorkItemStatusRequest :> - Post '[JSON] ReportWorkItemStatusResponse + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] ReportWorkItemStatusRequest :> + Post '[JSON] ReportWorkItemStatusResponse -- | Reports the status of dataflow WorkItems leased by a worker. -- -- /See:/ 'projectsJobsWorkItemsReportStatus' smart constructor. data ProjectsJobsWorkItemsReportStatus = ProjectsJobsWorkItemsReportStatus' - { _pjwirsXgafv :: !(Maybe Text) + { _pjwirsXgafv :: !(Maybe Xgafv) , _pjwirsJobId :: !Text , _pjwirsUploadProtocol :: !(Maybe Text) - , _pjwirsPp :: !Bool , _pjwirsAccessToken :: !(Maybe Text) , _pjwirsUploadType :: !(Maybe Text) , _pjwirsPayload :: !ReportWorkItemStatusRequest - , _pjwirsBearerToken :: !(Maybe Text) , _pjwirsProjectId :: !Text , _pjwirsCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -94,16 +88,12 @@ data ProjectsJobsWorkItemsReportStatus = ProjectsJobsWorkItemsReportStatus' -- -- * 'pjwirsUploadProtocol' -- --- * 'pjwirsPp' --- -- * 'pjwirsAccessToken' -- -- * 'pjwirsUploadType' -- -- * 'pjwirsPayload' -- --- * 'pjwirsBearerToken' --- -- * 'pjwirsProjectId' -- -- * 'pjwirsCallback' @@ -117,17 +107,15 @@ projectsJobsWorkItemsReportStatus pPjwirsJobId_ pPjwirsPayload_ pPjwirsProjectId { _pjwirsXgafv = Nothing , _pjwirsJobId = pPjwirsJobId_ , _pjwirsUploadProtocol = Nothing - , _pjwirsPp = True , _pjwirsAccessToken = Nothing , _pjwirsUploadType = Nothing , _pjwirsPayload = pPjwirsPayload_ - , _pjwirsBearerToken = Nothing , _pjwirsProjectId = pPjwirsProjectId_ , _pjwirsCallback = Nothing } -- | V1 error format. -pjwirsXgafv :: Lens' ProjectsJobsWorkItemsReportStatus (Maybe Text) +pjwirsXgafv :: Lens' ProjectsJobsWorkItemsReportStatus (Maybe Xgafv) pjwirsXgafv = lens _pjwirsXgafv (\ s a -> s{_pjwirsXgafv = a}) @@ -142,10 +130,6 @@ pjwirsUploadProtocol = lens _pjwirsUploadProtocol (\ s a -> s{_pjwirsUploadProtocol = a}) --- | Pretty-print response. -pjwirsPp :: Lens' ProjectsJobsWorkItemsReportStatus Bool -pjwirsPp = lens _pjwirsPp (\ s a -> s{_pjwirsPp = a}) - -- | OAuth access token. pjwirsAccessToken :: Lens' ProjectsJobsWorkItemsReportStatus (Maybe Text) pjwirsAccessToken @@ -164,12 +148,6 @@ pjwirsPayload = lens _pjwirsPayload (\ s a -> s{_pjwirsPayload = a}) --- | OAuth bearer token. -pjwirsBearerToken :: Lens' ProjectsJobsWorkItemsReportStatus (Maybe Text) -pjwirsBearerToken - = lens _pjwirsBearerToken - (\ s a -> s{_pjwirsBearerToken = a}) - -- | The project which owns the WorkItem\'s job. pjwirsProjectId :: Lens' ProjectsJobsWorkItemsReportStatus Text pjwirsProjectId @@ -188,14 +166,14 @@ instance GoogleRequest ReportWorkItemStatusResponse type Scopes ProjectsJobsWorkItemsReportStatus = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsJobsWorkItemsReportStatus'{..} = go _pjwirsProjectId _pjwirsJobId _pjwirsXgafv _pjwirsUploadProtocol - (Just _pjwirsPp) _pjwirsAccessToken _pjwirsUploadType - _pjwirsBearerToken _pjwirsCallback (Just AltJSON) _pjwirsPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Create.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Create.hs index 394d65b..def1b41 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Create.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Create.hs @@ -22,7 +22,7 @@ -- -- Creates a Cloud Dataflow job. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.locations.jobs.create@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.create@. module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Create ( -- * REST Resource @@ -36,11 +36,9 @@ module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Create , pljcXgafv , pljcUploadProtocol , pljcLocation - , pljcPp , pljcAccessToken , pljcUploadType , pljcPayload - , pljcBearerToken , pljcView , pljcProjectId , pljcReplaceJobId @@ -59,30 +57,26 @@ type ProjectsLocationsJobsCreateResource = "locations" :> Capture "location" Text :> "jobs" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "view" Text :> - QueryParam "replaceJobId" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] Job :> Post '[JSON] Job + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "view" Text :> + QueryParam "replaceJobId" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] Job :> Post '[JSON] Job -- | Creates a Cloud Dataflow job. -- -- /See:/ 'projectsLocationsJobsCreate' smart constructor. data ProjectsLocationsJobsCreate = ProjectsLocationsJobsCreate' - { _pljcXgafv :: !(Maybe Text) + { _pljcXgafv :: !(Maybe Xgafv) , _pljcUploadProtocol :: !(Maybe Text) , _pljcLocation :: !Text - , _pljcPp :: !Bool , _pljcAccessToken :: !(Maybe Text) , _pljcUploadType :: !(Maybe Text) , _pljcPayload :: !Job - , _pljcBearerToken :: !(Maybe Text) , _pljcView :: !(Maybe Text) , _pljcProjectId :: !Text , _pljcReplaceJobId :: !(Maybe Text) @@ -99,16 +93,12 @@ data ProjectsLocationsJobsCreate = ProjectsLocationsJobsCreate' -- -- * 'pljcLocation' -- --- * 'pljcPp' --- -- * 'pljcAccessToken' -- -- * 'pljcUploadType' -- -- * 'pljcPayload' -- --- * 'pljcBearerToken' --- -- * 'pljcView' -- -- * 'pljcProjectId' @@ -126,11 +116,9 @@ projectsLocationsJobsCreate pPljcLocation_ pPljcPayload_ pPljcProjectId_ = { _pljcXgafv = Nothing , _pljcUploadProtocol = Nothing , _pljcLocation = pPljcLocation_ - , _pljcPp = True , _pljcAccessToken = Nothing , _pljcUploadType = Nothing , _pljcPayload = pPljcPayload_ - , _pljcBearerToken = Nothing , _pljcView = Nothing , _pljcProjectId = pPljcProjectId_ , _pljcReplaceJobId = Nothing @@ -138,7 +126,7 @@ projectsLocationsJobsCreate pPljcLocation_ pPljcPayload_ pPljcProjectId_ = } -- | V1 error format. -pljcXgafv :: Lens' ProjectsLocationsJobsCreate (Maybe Text) +pljcXgafv :: Lens' ProjectsLocationsJobsCreate (Maybe Xgafv) pljcXgafv = lens _pljcXgafv (\ s a -> s{_pljcXgafv = a}) @@ -153,10 +141,6 @@ pljcLocation :: Lens' ProjectsLocationsJobsCreate Text pljcLocation = lens _pljcLocation (\ s a -> s{_pljcLocation = a}) --- | Pretty-print response. -pljcPp :: Lens' ProjectsLocationsJobsCreate Bool -pljcPp = lens _pljcPp (\ s a -> s{_pljcPp = a}) - -- | OAuth access token. pljcAccessToken :: Lens' ProjectsLocationsJobsCreate (Maybe Text) pljcAccessToken @@ -174,12 +158,6 @@ pljcPayload :: Lens' ProjectsLocationsJobsCreate Job pljcPayload = lens _pljcPayload (\ s a -> s{_pljcPayload = a}) --- | OAuth bearer token. -pljcBearerToken :: Lens' ProjectsLocationsJobsCreate (Maybe Text) -pljcBearerToken - = lens _pljcBearerToken - (\ s a -> s{_pljcBearerToken = a}) - -- | The level of information requested in response. pljcView :: Lens' ProjectsLocationsJobsCreate (Maybe Text) pljcView = lens _pljcView (\ s a -> s{_pljcView = a}) @@ -206,14 +184,14 @@ instance GoogleRequest ProjectsLocationsJobsCreate type Rs ProjectsLocationsJobsCreate = Job type Scopes ProjectsLocationsJobsCreate = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsLocationsJobsCreate'{..} = go _pljcProjectId _pljcLocation _pljcXgafv _pljcUploadProtocol - (Just _pljcPp) _pljcAccessToken _pljcUploadType - _pljcBearerToken _pljcView _pljcReplaceJobId _pljcCallback diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Debug/GetConfig.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Debug/GetConfig.hs new file mode 100644 index 0000000..dc417f8 --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Debug/GetConfig.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.GetConfig +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Get encoded debug configuration for component. Not cacheable. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.debug.getConfig@. +module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.GetConfig + ( + -- * REST Resource + ProjectsLocationsJobsDebugGetConfigResource + + -- * Creating a Request + , projectsLocationsJobsDebugGetConfig + , ProjectsLocationsJobsDebugGetConfig + + -- * Request Lenses + , pljdgcXgafv + , pljdgcJobId + , pljdgcUploadProtocol + , pljdgcLocation + , pljdgcAccessToken + , pljdgcUploadType + , pljdgcPayload + , pljdgcProjectId + , pljdgcCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.locations.jobs.debug.getConfig@ method which the +-- 'ProjectsLocationsJobsDebugGetConfig' request conforms to. +type ProjectsLocationsJobsDebugGetConfigResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "locations" :> + Capture "location" Text :> + "jobs" :> + Capture "jobId" Text :> + "debug" :> + "getConfig" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] GetDebugConfigRequest :> + Post '[JSON] GetDebugConfigResponse + +-- | Get encoded debug configuration for component. Not cacheable. +-- +-- /See:/ 'projectsLocationsJobsDebugGetConfig' smart constructor. +data ProjectsLocationsJobsDebugGetConfig = ProjectsLocationsJobsDebugGetConfig' + { _pljdgcXgafv :: !(Maybe Xgafv) + , _pljdgcJobId :: !Text + , _pljdgcUploadProtocol :: !(Maybe Text) + , _pljdgcLocation :: !Text + , _pljdgcAccessToken :: !(Maybe Text) + , _pljdgcUploadType :: !(Maybe Text) + , _pljdgcPayload :: !GetDebugConfigRequest + , _pljdgcProjectId :: !Text + , _pljdgcCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLocationsJobsDebugGetConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pljdgcXgafv' +-- +-- * 'pljdgcJobId' +-- +-- * 'pljdgcUploadProtocol' +-- +-- * 'pljdgcLocation' +-- +-- * 'pljdgcAccessToken' +-- +-- * 'pljdgcUploadType' +-- +-- * 'pljdgcPayload' +-- +-- * 'pljdgcProjectId' +-- +-- * 'pljdgcCallback' +projectsLocationsJobsDebugGetConfig + :: Text -- ^ 'pljdgcJobId' + -> Text -- ^ 'pljdgcLocation' + -> GetDebugConfigRequest -- ^ 'pljdgcPayload' + -> Text -- ^ 'pljdgcProjectId' + -> ProjectsLocationsJobsDebugGetConfig +projectsLocationsJobsDebugGetConfig pPljdgcJobId_ pPljdgcLocation_ pPljdgcPayload_ pPljdgcProjectId_ = + ProjectsLocationsJobsDebugGetConfig' + { _pljdgcXgafv = Nothing + , _pljdgcJobId = pPljdgcJobId_ + , _pljdgcUploadProtocol = Nothing + , _pljdgcLocation = pPljdgcLocation_ + , _pljdgcAccessToken = Nothing + , _pljdgcUploadType = Nothing + , _pljdgcPayload = pPljdgcPayload_ + , _pljdgcProjectId = pPljdgcProjectId_ + , _pljdgcCallback = Nothing + } + +-- | V1 error format. +pljdgcXgafv :: Lens' ProjectsLocationsJobsDebugGetConfig (Maybe Xgafv) +pljdgcXgafv + = lens _pljdgcXgafv (\ s a -> s{_pljdgcXgafv = a}) + +-- | The job id. +pljdgcJobId :: Lens' ProjectsLocationsJobsDebugGetConfig Text +pljdgcJobId + = lens _pljdgcJobId (\ s a -> s{_pljdgcJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pljdgcUploadProtocol :: Lens' ProjectsLocationsJobsDebugGetConfig (Maybe Text) +pljdgcUploadProtocol + = lens _pljdgcUploadProtocol + (\ s a -> s{_pljdgcUploadProtocol = a}) + +-- | The location which contains the job specified by job_id. +pljdgcLocation :: Lens' ProjectsLocationsJobsDebugGetConfig Text +pljdgcLocation + = lens _pljdgcLocation + (\ s a -> s{_pljdgcLocation = a}) + +-- | OAuth access token. +pljdgcAccessToken :: Lens' ProjectsLocationsJobsDebugGetConfig (Maybe Text) +pljdgcAccessToken + = lens _pljdgcAccessToken + (\ s a -> s{_pljdgcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pljdgcUploadType :: Lens' ProjectsLocationsJobsDebugGetConfig (Maybe Text) +pljdgcUploadType + = lens _pljdgcUploadType + (\ s a -> s{_pljdgcUploadType = a}) + +-- | Multipart request metadata. +pljdgcPayload :: Lens' ProjectsLocationsJobsDebugGetConfig GetDebugConfigRequest +pljdgcPayload + = lens _pljdgcPayload + (\ s a -> s{_pljdgcPayload = a}) + +-- | The project id. +pljdgcProjectId :: Lens' ProjectsLocationsJobsDebugGetConfig Text +pljdgcProjectId + = lens _pljdgcProjectId + (\ s a -> s{_pljdgcProjectId = a}) + +-- | JSONP +pljdgcCallback :: Lens' ProjectsLocationsJobsDebugGetConfig (Maybe Text) +pljdgcCallback + = lens _pljdgcCallback + (\ s a -> s{_pljdgcCallback = a}) + +instance GoogleRequest + ProjectsLocationsJobsDebugGetConfig where + type Rs ProjectsLocationsJobsDebugGetConfig = + GetDebugConfigResponse + type Scopes ProjectsLocationsJobsDebugGetConfig = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient + ProjectsLocationsJobsDebugGetConfig'{..} + = go _pljdgcProjectId _pljdgcLocation _pljdgcJobId + _pljdgcXgafv + _pljdgcUploadProtocol + _pljdgcAccessToken + _pljdgcUploadType + _pljdgcCallback + (Just AltJSON) + _pljdgcPayload + dataflowService + where go + = buildClient + (Proxy :: + Proxy ProjectsLocationsJobsDebugGetConfigResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Debug/SendCapture.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Debug/SendCapture.hs new file mode 100644 index 0000000..87cace3 --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Debug/SendCapture.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.SendCapture +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Send encoded debug capture data for component. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.debug.sendCapture@. +module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.SendCapture + ( + -- * REST Resource + ProjectsLocationsJobsDebugSendCaptureResource + + -- * Creating a Request + , projectsLocationsJobsDebugSendCapture + , ProjectsLocationsJobsDebugSendCapture + + -- * Request Lenses + , pljdscXgafv + , pljdscJobId + , pljdscUploadProtocol + , pljdscLocation + , pljdscAccessToken + , pljdscUploadType + , pljdscPayload + , pljdscProjectId + , pljdscCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.locations.jobs.debug.sendCapture@ method which the +-- 'ProjectsLocationsJobsDebugSendCapture' request conforms to. +type ProjectsLocationsJobsDebugSendCaptureResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "locations" :> + Capture "location" Text :> + "jobs" :> + Capture "jobId" Text :> + "debug" :> + "sendCapture" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] SendDebugCaptureRequest :> + Post '[JSON] SendDebugCaptureResponse + +-- | Send encoded debug capture data for component. +-- +-- /See:/ 'projectsLocationsJobsDebugSendCapture' smart constructor. +data ProjectsLocationsJobsDebugSendCapture = ProjectsLocationsJobsDebugSendCapture' + { _pljdscXgafv :: !(Maybe Xgafv) + , _pljdscJobId :: !Text + , _pljdscUploadProtocol :: !(Maybe Text) + , _pljdscLocation :: !Text + , _pljdscAccessToken :: !(Maybe Text) + , _pljdscUploadType :: !(Maybe Text) + , _pljdscPayload :: !SendDebugCaptureRequest + , _pljdscProjectId :: !Text + , _pljdscCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLocationsJobsDebugSendCapture' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pljdscXgafv' +-- +-- * 'pljdscJobId' +-- +-- * 'pljdscUploadProtocol' +-- +-- * 'pljdscLocation' +-- +-- * 'pljdscAccessToken' +-- +-- * 'pljdscUploadType' +-- +-- * 'pljdscPayload' +-- +-- * 'pljdscProjectId' +-- +-- * 'pljdscCallback' +projectsLocationsJobsDebugSendCapture + :: Text -- ^ 'pljdscJobId' + -> Text -- ^ 'pljdscLocation' + -> SendDebugCaptureRequest -- ^ 'pljdscPayload' + -> Text -- ^ 'pljdscProjectId' + -> ProjectsLocationsJobsDebugSendCapture +projectsLocationsJobsDebugSendCapture pPljdscJobId_ pPljdscLocation_ pPljdscPayload_ pPljdscProjectId_ = + ProjectsLocationsJobsDebugSendCapture' + { _pljdscXgafv = Nothing + , _pljdscJobId = pPljdscJobId_ + , _pljdscUploadProtocol = Nothing + , _pljdscLocation = pPljdscLocation_ + , _pljdscAccessToken = Nothing + , _pljdscUploadType = Nothing + , _pljdscPayload = pPljdscPayload_ + , _pljdscProjectId = pPljdscProjectId_ + , _pljdscCallback = Nothing + } + +-- | V1 error format. +pljdscXgafv :: Lens' ProjectsLocationsJobsDebugSendCapture (Maybe Xgafv) +pljdscXgafv + = lens _pljdscXgafv (\ s a -> s{_pljdscXgafv = a}) + +-- | The job id. +pljdscJobId :: Lens' ProjectsLocationsJobsDebugSendCapture Text +pljdscJobId + = lens _pljdscJobId (\ s a -> s{_pljdscJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pljdscUploadProtocol :: Lens' ProjectsLocationsJobsDebugSendCapture (Maybe Text) +pljdscUploadProtocol + = lens _pljdscUploadProtocol + (\ s a -> s{_pljdscUploadProtocol = a}) + +-- | The location which contains the job specified by job_id. +pljdscLocation :: Lens' ProjectsLocationsJobsDebugSendCapture Text +pljdscLocation + = lens _pljdscLocation + (\ s a -> s{_pljdscLocation = a}) + +-- | OAuth access token. +pljdscAccessToken :: Lens' ProjectsLocationsJobsDebugSendCapture (Maybe Text) +pljdscAccessToken + = lens _pljdscAccessToken + (\ s a -> s{_pljdscAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pljdscUploadType :: Lens' ProjectsLocationsJobsDebugSendCapture (Maybe Text) +pljdscUploadType + = lens _pljdscUploadType + (\ s a -> s{_pljdscUploadType = a}) + +-- | Multipart request metadata. +pljdscPayload :: Lens' ProjectsLocationsJobsDebugSendCapture SendDebugCaptureRequest +pljdscPayload + = lens _pljdscPayload + (\ s a -> s{_pljdscPayload = a}) + +-- | The project id. +pljdscProjectId :: Lens' ProjectsLocationsJobsDebugSendCapture Text +pljdscProjectId + = lens _pljdscProjectId + (\ s a -> s{_pljdscProjectId = a}) + +-- | JSONP +pljdscCallback :: Lens' ProjectsLocationsJobsDebugSendCapture (Maybe Text) +pljdscCallback + = lens _pljdscCallback + (\ s a -> s{_pljdscCallback = a}) + +instance GoogleRequest + ProjectsLocationsJobsDebugSendCapture where + type Rs ProjectsLocationsJobsDebugSendCapture = + SendDebugCaptureResponse + type Scopes ProjectsLocationsJobsDebugSendCapture = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient + ProjectsLocationsJobsDebugSendCapture'{..} + = go _pljdscProjectId _pljdscLocation _pljdscJobId + _pljdscXgafv + _pljdscUploadProtocol + _pljdscAccessToken + _pljdscUploadType + _pljdscCallback + (Just AltJSON) + _pljdscPayload + dataflowService + where go + = buildClient + (Proxy :: + Proxy ProjectsLocationsJobsDebugSendCaptureResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Get.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Get.hs index ba2272d..d7b8a1f 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Get.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Get.hs @@ -22,7 +22,7 @@ -- -- Gets the state of the specified Cloud Dataflow job. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.locations.jobs.get@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.get@. module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Get ( -- * REST Resource @@ -37,10 +37,8 @@ module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Get , pljgJobId , pljgUploadProtocol , pljgLocation - , pljgPp , pljgAccessToken , pljgUploadType - , pljgBearerToken , pljgView , pljgProjectId , pljgCallback @@ -59,28 +57,24 @@ type ProjectsLocationsJobsGetResource = Capture "location" Text :> "jobs" :> Capture "jobId" Text :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "view" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> Get '[JSON] Job + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "view" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> Get '[JSON] Job -- | Gets the state of the specified Cloud Dataflow job. -- -- /See:/ 'projectsLocationsJobsGet' smart constructor. data ProjectsLocationsJobsGet = ProjectsLocationsJobsGet' - { _pljgXgafv :: !(Maybe Text) + { _pljgXgafv :: !(Maybe Xgafv) , _pljgJobId :: !Text , _pljgUploadProtocol :: !(Maybe Text) , _pljgLocation :: !Text - , _pljgPp :: !Bool , _pljgAccessToken :: !(Maybe Text) , _pljgUploadType :: !(Maybe Text) - , _pljgBearerToken :: !(Maybe Text) , _pljgView :: !(Maybe Text) , _pljgProjectId :: !Text , _pljgCallback :: !(Maybe Text) @@ -98,14 +92,10 @@ data ProjectsLocationsJobsGet = ProjectsLocationsJobsGet' -- -- * 'pljgLocation' -- --- * 'pljgPp' --- -- * 'pljgAccessToken' -- -- * 'pljgUploadType' -- --- * 'pljgBearerToken' --- -- * 'pljgView' -- -- * 'pljgProjectId' @@ -122,17 +112,15 @@ projectsLocationsJobsGet pPljgJobId_ pPljgLocation_ pPljgProjectId_ = , _pljgJobId = pPljgJobId_ , _pljgUploadProtocol = Nothing , _pljgLocation = pPljgLocation_ - , _pljgPp = True , _pljgAccessToken = Nothing , _pljgUploadType = Nothing - , _pljgBearerToken = Nothing , _pljgView = Nothing , _pljgProjectId = pPljgProjectId_ , _pljgCallback = Nothing } -- | V1 error format. -pljgXgafv :: Lens' ProjectsLocationsJobsGet (Maybe Text) +pljgXgafv :: Lens' ProjectsLocationsJobsGet (Maybe Xgafv) pljgXgafv = lens _pljgXgafv (\ s a -> s{_pljgXgafv = a}) @@ -152,10 +140,6 @@ pljgLocation :: Lens' ProjectsLocationsJobsGet Text pljgLocation = lens _pljgLocation (\ s a -> s{_pljgLocation = a}) --- | Pretty-print response. -pljgPp :: Lens' ProjectsLocationsJobsGet Bool -pljgPp = lens _pljgPp (\ s a -> s{_pljgPp = a}) - -- | OAuth access token. pljgAccessToken :: Lens' ProjectsLocationsJobsGet (Maybe Text) pljgAccessToken @@ -168,12 +152,6 @@ pljgUploadType = lens _pljgUploadType (\ s a -> s{_pljgUploadType = a}) --- | OAuth bearer token. -pljgBearerToken :: Lens' ProjectsLocationsJobsGet (Maybe Text) -pljgBearerToken - = lens _pljgBearerToken - (\ s a -> s{_pljgBearerToken = a}) - -- | The level of information requested in response. pljgView :: Lens' ProjectsLocationsJobsGet (Maybe Text) pljgView = lens _pljgView (\ s a -> s{_pljgView = a}) @@ -193,15 +171,15 @@ instance GoogleRequest ProjectsLocationsJobsGet where type Rs ProjectsLocationsJobsGet = Job type Scopes ProjectsLocationsJobsGet = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsLocationsJobsGet'{..} = go _pljgProjectId _pljgLocation _pljgJobId _pljgXgafv _pljgUploadProtocol - (Just _pljgPp) _pljgAccessToken _pljgUploadType - _pljgBearerToken _pljgView _pljgCallback (Just AltJSON) diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/GetMetrics.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/GetMetrics.hs index 267b047..b7c91e9 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/GetMetrics.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/GetMetrics.hs @@ -22,7 +22,7 @@ -- -- Request the job status. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.locations.jobs.getMetrics@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.getMetrics@. module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.GetMetrics ( -- * REST Resource @@ -38,10 +38,8 @@ module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.GetMetrics , pljgmUploadProtocol , pljgmLocation , pljgmStartTime - , pljgmPp , pljgmAccessToken , pljgmUploadType - , pljgmBearerToken , pljgmProjectId , pljgmCallback ) where @@ -60,30 +58,26 @@ type ProjectsLocationsJobsGetMetricsResource = "jobs" :> Capture "jobId" Text :> "metrics" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "startTime" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - Get '[JSON] JobMetrics + QueryParam "startTime" DateTime' :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] JobMetrics -- | Request the job status. -- -- /See:/ 'projectsLocationsJobsGetMetrics' smart constructor. data ProjectsLocationsJobsGetMetrics = ProjectsLocationsJobsGetMetrics' - { _pljgmXgafv :: !(Maybe Text) + { _pljgmXgafv :: !(Maybe Xgafv) , _pljgmJobId :: !Text , _pljgmUploadProtocol :: !(Maybe Text) , _pljgmLocation :: !Text - , _pljgmStartTime :: !(Maybe Text) - , _pljgmPp :: !Bool + , _pljgmStartTime :: !(Maybe DateTime') , _pljgmAccessToken :: !(Maybe Text) , _pljgmUploadType :: !(Maybe Text) - , _pljgmBearerToken :: !(Maybe Text) , _pljgmProjectId :: !Text , _pljgmCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -102,14 +96,10 @@ data ProjectsLocationsJobsGetMetrics = ProjectsLocationsJobsGetMetrics' -- -- * 'pljgmStartTime' -- --- * 'pljgmPp' --- -- * 'pljgmAccessToken' -- -- * 'pljgmUploadType' -- --- * 'pljgmBearerToken' --- -- * 'pljgmProjectId' -- -- * 'pljgmCallback' @@ -125,16 +115,14 @@ projectsLocationsJobsGetMetrics pPljgmJobId_ pPljgmLocation_ pPljgmProjectId_ = , _pljgmUploadProtocol = Nothing , _pljgmLocation = pPljgmLocation_ , _pljgmStartTime = Nothing - , _pljgmPp = True , _pljgmAccessToken = Nothing , _pljgmUploadType = Nothing - , _pljgmBearerToken = Nothing , _pljgmProjectId = pPljgmProjectId_ , _pljgmCallback = Nothing } -- | V1 error format. -pljgmXgafv :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Text) +pljgmXgafv :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Xgafv) pljgmXgafv = lens _pljgmXgafv (\ s a -> s{_pljgmXgafv = a}) @@ -157,14 +145,11 @@ pljgmLocation -- | Return only metric data that has changed since this time. Default is to -- return all information about all metrics for the job. -pljgmStartTime :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Text) +pljgmStartTime :: Lens' ProjectsLocationsJobsGetMetrics (Maybe UTCTime) pljgmStartTime = lens _pljgmStartTime (\ s a -> s{_pljgmStartTime = a}) - --- | Pretty-print response. -pljgmPp :: Lens' ProjectsLocationsJobsGetMetrics Bool -pljgmPp = lens _pljgmPp (\ s a -> s{_pljgmPp = a}) + . mapping _DateTime -- | OAuth access token. pljgmAccessToken :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Text) @@ -178,12 +163,6 @@ pljgmUploadType = lens _pljgmUploadType (\ s a -> s{_pljgmUploadType = a}) --- | OAuth bearer token. -pljgmBearerToken :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Text) -pljgmBearerToken - = lens _pljgmBearerToken - (\ s a -> s{_pljgmBearerToken = a}) - -- | A project id. pljgmProjectId :: Lens' ProjectsLocationsJobsGetMetrics Text pljgmProjectId @@ -201,16 +180,16 @@ instance GoogleRequest type Rs ProjectsLocationsJobsGetMetrics = JobMetrics type Scopes ProjectsLocationsJobsGetMetrics = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsLocationsJobsGetMetrics'{..} = go _pljgmProjectId _pljgmLocation _pljgmJobId _pljgmXgafv _pljgmUploadProtocol _pljgmStartTime - (Just _pljgmPp) _pljgmAccessToken _pljgmUploadType - _pljgmBearerToken _pljgmCallback (Just AltJSON) dataflowService diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/List.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/List.hs index 0170c29..5e75988 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/List.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/List.hs @@ -20,9 +20,9 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- --- List the jobs of a project. +-- List the jobs of a project in a given region. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.locations.jobs.list@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.list@. module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.List ( -- * REST Resource @@ -36,10 +36,8 @@ module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.List , pljlXgafv , pljlUploadProtocol , pljlLocation - , pljlPp , pljlAccessToken , pljlUploadType - , pljlBearerToken , pljlView , pljlFilter , pljlPageToken @@ -60,31 +58,27 @@ type ProjectsLocationsJobsListResource = "locations" :> Capture "location" Text :> "jobs" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "view" Text :> - QueryParam "filter" Text :> - QueryParam "pageToken" Text :> - QueryParam "pageSize" (Textual Int32) :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - Get '[JSON] ListJobsResponse - --- | List the jobs of a project. + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "view" Text :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" (Textual Int32) :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] ListJobsResponse + +-- | List the jobs of a project in a given region. -- -- /See:/ 'projectsLocationsJobsList' smart constructor. data ProjectsLocationsJobsList = ProjectsLocationsJobsList' - { _pljlXgafv :: !(Maybe Text) + { _pljlXgafv :: !(Maybe Xgafv) , _pljlUploadProtocol :: !(Maybe Text) , _pljlLocation :: !Text - , _pljlPp :: !Bool , _pljlAccessToken :: !(Maybe Text) , _pljlUploadType :: !(Maybe Text) - , _pljlBearerToken :: !(Maybe Text) , _pljlView :: !(Maybe Text) , _pljlFilter :: !(Maybe Text) , _pljlPageToken :: !(Maybe Text) @@ -103,14 +97,10 @@ data ProjectsLocationsJobsList = ProjectsLocationsJobsList' -- -- * 'pljlLocation' -- --- * 'pljlPp' --- -- * 'pljlAccessToken' -- -- * 'pljlUploadType' -- --- * 'pljlBearerToken' --- -- * 'pljlView' -- -- * 'pljlFilter' @@ -131,10 +121,8 @@ projectsLocationsJobsList pPljlLocation_ pPljlProjectId_ = { _pljlXgafv = Nothing , _pljlUploadProtocol = Nothing , _pljlLocation = pPljlLocation_ - , _pljlPp = True , _pljlAccessToken = Nothing , _pljlUploadType = Nothing - , _pljlBearerToken = Nothing , _pljlView = Nothing , _pljlFilter = Nothing , _pljlPageToken = Nothing @@ -144,7 +132,7 @@ projectsLocationsJobsList pPljlLocation_ pPljlProjectId_ = } -- | V1 error format. -pljlXgafv :: Lens' ProjectsLocationsJobsList (Maybe Text) +pljlXgafv :: Lens' ProjectsLocationsJobsList (Maybe Xgafv) pljlXgafv = lens _pljlXgafv (\ s a -> s{_pljlXgafv = a}) @@ -159,10 +147,6 @@ pljlLocation :: Lens' ProjectsLocationsJobsList Text pljlLocation = lens _pljlLocation (\ s a -> s{_pljlLocation = a}) --- | Pretty-print response. -pljlPp :: Lens' ProjectsLocationsJobsList Bool -pljlPp = lens _pljlPp (\ s a -> s{_pljlPp = a}) - -- | OAuth access token. pljlAccessToken :: Lens' ProjectsLocationsJobsList (Maybe Text) pljlAccessToken @@ -175,12 +159,6 @@ pljlUploadType = lens _pljlUploadType (\ s a -> s{_pljlUploadType = a}) --- | OAuth bearer token. -pljlBearerToken :: Lens' ProjectsLocationsJobsList (Maybe Text) -pljlBearerToken - = lens _pljlBearerToken - (\ s a -> s{_pljlBearerToken = a}) - -- | Level of information requested in response. Default is -- \`JOB_VIEW_SUMMARY\`. pljlView :: Lens' ProjectsLocationsJobsList (Maybe Text) @@ -222,14 +200,14 @@ instance GoogleRequest ProjectsLocationsJobsList type Rs ProjectsLocationsJobsList = ListJobsResponse type Scopes ProjectsLocationsJobsList = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsLocationsJobsList'{..} = go _pljlProjectId _pljlLocation _pljlXgafv _pljlUploadProtocol - (Just _pljlPp) _pljlAccessToken _pljlUploadType - _pljlBearerToken _pljlView _pljlFilter _pljlPageToken diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Messages/List.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Messages/List.hs index a644156..fbb699e 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Messages/List.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Messages/List.hs @@ -22,7 +22,7 @@ -- -- Request the job status. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.locations.jobs.messages.list@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.messages.list@. module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Messages.List ( -- * REST Resource @@ -38,10 +38,8 @@ module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Messages.List , pljmlUploadProtocol , pljmlLocation , pljmlStartTime - , pljmlPp , pljmlAccessToken , pljmlUploadType - , pljmlBearerToken , pljmlEndTime , pljmlMinimumImportance , pljmlPageToken @@ -64,37 +62,31 @@ type ProjectsLocationsJobsMessagesListResource = "jobs" :> Capture "jobId" Text :> "messages" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "startTime" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "endTime" Text :> - QueryParam "minimumImportance" Text :> - QueryParam "pageToken" Text :> - QueryParam "pageSize" (Textual Int32) - :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - Get '[JSON] - ListJobMessagesResponse + QueryParam "startTime" DateTime' :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "endTime" DateTime' :> + QueryParam "minimumImportance" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" (Textual Int32) :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] ListJobMessagesResponse -- | Request the job status. -- -- /See:/ 'projectsLocationsJobsMessagesList' smart constructor. data ProjectsLocationsJobsMessagesList = ProjectsLocationsJobsMessagesList' - { _pljmlXgafv :: !(Maybe Text) + { _pljmlXgafv :: !(Maybe Xgafv) , _pljmlJobId :: !Text , _pljmlUploadProtocol :: !(Maybe Text) , _pljmlLocation :: !Text - , _pljmlStartTime :: !(Maybe Text) - , _pljmlPp :: !Bool + , _pljmlStartTime :: !(Maybe DateTime') , _pljmlAccessToken :: !(Maybe Text) , _pljmlUploadType :: !(Maybe Text) - , _pljmlBearerToken :: !(Maybe Text) - , _pljmlEndTime :: !(Maybe Text) + , _pljmlEndTime :: !(Maybe DateTime') , _pljmlMinimumImportance :: !(Maybe Text) , _pljmlPageToken :: !(Maybe Text) , _pljmlProjectId :: !Text @@ -116,14 +108,10 @@ data ProjectsLocationsJobsMessagesList = ProjectsLocationsJobsMessagesList' -- -- * 'pljmlStartTime' -- --- * 'pljmlPp' --- -- * 'pljmlAccessToken' -- -- * 'pljmlUploadType' -- --- * 'pljmlBearerToken' --- -- * 'pljmlEndTime' -- -- * 'pljmlMinimumImportance' @@ -147,10 +135,8 @@ projectsLocationsJobsMessagesList pPljmlJobId_ pPljmlLocation_ pPljmlProjectId_ , _pljmlUploadProtocol = Nothing , _pljmlLocation = pPljmlLocation_ , _pljmlStartTime = Nothing - , _pljmlPp = True , _pljmlAccessToken = Nothing , _pljmlUploadType = Nothing - , _pljmlBearerToken = Nothing , _pljmlEndTime = Nothing , _pljmlMinimumImportance = Nothing , _pljmlPageToken = Nothing @@ -160,7 +146,7 @@ projectsLocationsJobsMessagesList pPljmlJobId_ pPljmlLocation_ pPljmlProjectId_ } -- | V1 error format. -pljmlXgafv :: Lens' ProjectsLocationsJobsMessagesList (Maybe Text) +pljmlXgafv :: Lens' ProjectsLocationsJobsMessagesList (Maybe Xgafv) pljmlXgafv = lens _pljmlXgafv (\ s a -> s{_pljmlXgafv = a}) @@ -183,14 +169,11 @@ pljmlLocation -- | If specified, return only messages with timestamps >= start_time. The -- default is the job creation time (i.e. beginning of messages). -pljmlStartTime :: Lens' ProjectsLocationsJobsMessagesList (Maybe Text) +pljmlStartTime :: Lens' ProjectsLocationsJobsMessagesList (Maybe UTCTime) pljmlStartTime = lens _pljmlStartTime (\ s a -> s{_pljmlStartTime = a}) - --- | Pretty-print response. -pljmlPp :: Lens' ProjectsLocationsJobsMessagesList Bool -pljmlPp = lens _pljmlPp (\ s a -> s{_pljmlPp = a}) + . mapping _DateTime -- | OAuth access token. pljmlAccessToken :: Lens' ProjectsLocationsJobsMessagesList (Maybe Text) @@ -204,17 +187,12 @@ pljmlUploadType = lens _pljmlUploadType (\ s a -> s{_pljmlUploadType = a}) --- | OAuth bearer token. -pljmlBearerToken :: Lens' ProjectsLocationsJobsMessagesList (Maybe Text) -pljmlBearerToken - = lens _pljmlBearerToken - (\ s a -> s{_pljmlBearerToken = a}) - -- | Return only messages with timestamps \< end_time. The default is now -- (i.e. return up to the latest messages available). -pljmlEndTime :: Lens' ProjectsLocationsJobsMessagesList (Maybe Text) +pljmlEndTime :: Lens' ProjectsLocationsJobsMessagesList (Maybe UTCTime) pljmlEndTime = lens _pljmlEndTime (\ s a -> s{_pljmlEndTime = a}) + . mapping _DateTime -- | Filter to only get messages with importance >= level pljmlMinimumImportance :: Lens' ProjectsLocationsJobsMessagesList (Maybe Text) @@ -256,16 +234,16 @@ instance GoogleRequest ListJobMessagesResponse type Scopes ProjectsLocationsJobsMessagesList = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsLocationsJobsMessagesList'{..} = go _pljmlProjectId _pljmlLocation _pljmlJobId _pljmlXgafv _pljmlUploadProtocol _pljmlStartTime - (Just _pljmlPp) _pljmlAccessToken _pljmlUploadType - _pljmlBearerToken _pljmlEndTime _pljmlMinimumImportance _pljmlPageToken diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Snapshot.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Snapshot.hs new file mode 100644 index 0000000..4866158 --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Snapshot.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Snapshot +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Snapshot the state of a streaming job. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.snapshot@. +module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Snapshot + ( + -- * REST Resource + ProjectsLocationsJobsSnapshotResource + + -- * Creating a Request + , projectsLocationsJobsSnapshot + , ProjectsLocationsJobsSnapshot + + -- * Request Lenses + , pljsXgafv + , pljsJobId + , pljsUploadProtocol + , pljsLocation + , pljsAccessToken + , pljsUploadType + , pljsPayload + , pljsProjectId + , pljsCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.locations.jobs.snapshot@ method which the +-- 'ProjectsLocationsJobsSnapshot' request conforms to. +type ProjectsLocationsJobsSnapshotResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "locations" :> + Capture "location" Text :> + "jobs" :> + CaptureMode "jobId" "snapshot" Text :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] SnapshotJobRequest :> + Post '[JSON] Snapshot + +-- | Snapshot the state of a streaming job. +-- +-- /See:/ 'projectsLocationsJobsSnapshot' smart constructor. +data ProjectsLocationsJobsSnapshot = ProjectsLocationsJobsSnapshot' + { _pljsXgafv :: !(Maybe Xgafv) + , _pljsJobId :: !Text + , _pljsUploadProtocol :: !(Maybe Text) + , _pljsLocation :: !Text + , _pljsAccessToken :: !(Maybe Text) + , _pljsUploadType :: !(Maybe Text) + , _pljsPayload :: !SnapshotJobRequest + , _pljsProjectId :: !Text + , _pljsCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLocationsJobsSnapshot' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pljsXgafv' +-- +-- * 'pljsJobId' +-- +-- * 'pljsUploadProtocol' +-- +-- * 'pljsLocation' +-- +-- * 'pljsAccessToken' +-- +-- * 'pljsUploadType' +-- +-- * 'pljsPayload' +-- +-- * 'pljsProjectId' +-- +-- * 'pljsCallback' +projectsLocationsJobsSnapshot + :: Text -- ^ 'pljsJobId' + -> Text -- ^ 'pljsLocation' + -> SnapshotJobRequest -- ^ 'pljsPayload' + -> Text -- ^ 'pljsProjectId' + -> ProjectsLocationsJobsSnapshot +projectsLocationsJobsSnapshot pPljsJobId_ pPljsLocation_ pPljsPayload_ pPljsProjectId_ = + ProjectsLocationsJobsSnapshot' + { _pljsXgafv = Nothing + , _pljsJobId = pPljsJobId_ + , _pljsUploadProtocol = Nothing + , _pljsLocation = pPljsLocation_ + , _pljsAccessToken = Nothing + , _pljsUploadType = Nothing + , _pljsPayload = pPljsPayload_ + , _pljsProjectId = pPljsProjectId_ + , _pljsCallback = Nothing + } + +-- | V1 error format. +pljsXgafv :: Lens' ProjectsLocationsJobsSnapshot (Maybe Xgafv) +pljsXgafv + = lens _pljsXgafv (\ s a -> s{_pljsXgafv = a}) + +-- | The job to be snapshotted. +pljsJobId :: Lens' ProjectsLocationsJobsSnapshot Text +pljsJobId + = lens _pljsJobId (\ s a -> s{_pljsJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pljsUploadProtocol :: Lens' ProjectsLocationsJobsSnapshot (Maybe Text) +pljsUploadProtocol + = lens _pljsUploadProtocol + (\ s a -> s{_pljsUploadProtocol = a}) + +-- | The location that contains this job. +pljsLocation :: Lens' ProjectsLocationsJobsSnapshot Text +pljsLocation + = lens _pljsLocation (\ s a -> s{_pljsLocation = a}) + +-- | OAuth access token. +pljsAccessToken :: Lens' ProjectsLocationsJobsSnapshot (Maybe Text) +pljsAccessToken + = lens _pljsAccessToken + (\ s a -> s{_pljsAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pljsUploadType :: Lens' ProjectsLocationsJobsSnapshot (Maybe Text) +pljsUploadType + = lens _pljsUploadType + (\ s a -> s{_pljsUploadType = a}) + +-- | Multipart request metadata. +pljsPayload :: Lens' ProjectsLocationsJobsSnapshot SnapshotJobRequest +pljsPayload + = lens _pljsPayload (\ s a -> s{_pljsPayload = a}) + +-- | The project which owns the job to be snapshotted. +pljsProjectId :: Lens' ProjectsLocationsJobsSnapshot Text +pljsProjectId + = lens _pljsProjectId + (\ s a -> s{_pljsProjectId = a}) + +-- | JSONP +pljsCallback :: Lens' ProjectsLocationsJobsSnapshot (Maybe Text) +pljsCallback + = lens _pljsCallback (\ s a -> s{_pljsCallback = a}) + +instance GoogleRequest ProjectsLocationsJobsSnapshot + where + type Rs ProjectsLocationsJobsSnapshot = Snapshot + type Scopes ProjectsLocationsJobsSnapshot = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsLocationsJobsSnapshot'{..} + = go _pljsProjectId _pljsLocation _pljsJobId + _pljsXgafv + _pljsUploadProtocol + _pljsAccessToken + _pljsUploadType + _pljsCallback + (Just AltJSON) + _pljsPayload + dataflowService + where go + = buildClient + (Proxy :: + Proxy ProjectsLocationsJobsSnapshotResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Update.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Update.hs index a25479c..f78b12a 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Update.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Update.hs @@ -22,7 +22,7 @@ -- -- Updates the state of an existing Cloud Dataflow job. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.locations.jobs.update@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.update@. module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Update ( -- * REST Resource @@ -37,11 +37,9 @@ module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Update , pljuJobId , pljuUploadProtocol , pljuLocation - , pljuPp , pljuAccessToken , pljuUploadType , pljuPayload - , pljuBearerToken , pljuProjectId , pljuCallback ) where @@ -59,29 +57,25 @@ type ProjectsLocationsJobsUpdateResource = Capture "location" Text :> "jobs" :> Capture "jobId" Text :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] Job :> Put '[JSON] Job + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] Job :> Put '[JSON] Job -- | Updates the state of an existing Cloud Dataflow job. -- -- /See:/ 'projectsLocationsJobsUpdate' smart constructor. data ProjectsLocationsJobsUpdate = ProjectsLocationsJobsUpdate' - { _pljuXgafv :: !(Maybe Text) + { _pljuXgafv :: !(Maybe Xgafv) , _pljuJobId :: !Text , _pljuUploadProtocol :: !(Maybe Text) , _pljuLocation :: !Text - , _pljuPp :: !Bool , _pljuAccessToken :: !(Maybe Text) , _pljuUploadType :: !(Maybe Text) , _pljuPayload :: !Job - , _pljuBearerToken :: !(Maybe Text) , _pljuProjectId :: !Text , _pljuCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -98,16 +92,12 @@ data ProjectsLocationsJobsUpdate = ProjectsLocationsJobsUpdate' -- -- * 'pljuLocation' -- --- * 'pljuPp' --- -- * 'pljuAccessToken' -- -- * 'pljuUploadType' -- -- * 'pljuPayload' -- --- * 'pljuBearerToken' --- -- * 'pljuProjectId' -- -- * 'pljuCallback' @@ -123,17 +113,15 @@ projectsLocationsJobsUpdate pPljuJobId_ pPljuLocation_ pPljuPayload_ pPljuProjec , _pljuJobId = pPljuJobId_ , _pljuUploadProtocol = Nothing , _pljuLocation = pPljuLocation_ - , _pljuPp = True , _pljuAccessToken = Nothing , _pljuUploadType = Nothing , _pljuPayload = pPljuPayload_ - , _pljuBearerToken = Nothing , _pljuProjectId = pPljuProjectId_ , _pljuCallback = Nothing } -- | V1 error format. -pljuXgafv :: Lens' ProjectsLocationsJobsUpdate (Maybe Text) +pljuXgafv :: Lens' ProjectsLocationsJobsUpdate (Maybe Xgafv) pljuXgafv = lens _pljuXgafv (\ s a -> s{_pljuXgafv = a}) @@ -153,10 +141,6 @@ pljuLocation :: Lens' ProjectsLocationsJobsUpdate Text pljuLocation = lens _pljuLocation (\ s a -> s{_pljuLocation = a}) --- | Pretty-print response. -pljuPp :: Lens' ProjectsLocationsJobsUpdate Bool -pljuPp = lens _pljuPp (\ s a -> s{_pljuPp = a}) - -- | OAuth access token. pljuAccessToken :: Lens' ProjectsLocationsJobsUpdate (Maybe Text) pljuAccessToken @@ -174,12 +158,6 @@ pljuPayload :: Lens' ProjectsLocationsJobsUpdate Job pljuPayload = lens _pljuPayload (\ s a -> s{_pljuPayload = a}) --- | OAuth bearer token. -pljuBearerToken :: Lens' ProjectsLocationsJobsUpdate (Maybe Text) -pljuBearerToken - = lens _pljuBearerToken - (\ s a -> s{_pljuBearerToken = a}) - -- | The ID of the Cloud Platform project that the job belongs to. pljuProjectId :: Lens' ProjectsLocationsJobsUpdate Text pljuProjectId @@ -196,15 +174,15 @@ instance GoogleRequest ProjectsLocationsJobsUpdate type Rs ProjectsLocationsJobsUpdate = Job type Scopes ProjectsLocationsJobsUpdate = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsLocationsJobsUpdate'{..} = go _pljuProjectId _pljuLocation _pljuJobId _pljuXgafv _pljuUploadProtocol - (Just _pljuPp) _pljuAccessToken _pljuUploadType - _pljuBearerToken _pljuCallback (Just AltJSON) _pljuPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/Lease.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/Lease.hs index 914d414..649f2f4 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/Lease.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/Lease.hs @@ -22,7 +22,7 @@ -- -- Leases a dataflow WorkItem to run. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.locations.jobs.workItems.lease@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.workItems.lease@. module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.Lease ( -- * REST Resource @@ -37,11 +37,9 @@ module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.Lease , pljwilJobId , pljwilUploadProtocol , pljwilLocation - , pljwilPp , pljwilAccessToken , pljwilUploadType , pljwilPayload - , pljwilBearerToken , pljwilProjectId , pljwilCallback ) where @@ -60,30 +58,26 @@ type ProjectsLocationsJobsWorkItemsLeaseResource = "jobs" :> Capture "jobId" Text :> "workItems:lease" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] LeaseWorkItemRequest :> - Post '[JSON] LeaseWorkItemResponse + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] LeaseWorkItemRequest :> + Post '[JSON] LeaseWorkItemResponse -- | Leases a dataflow WorkItem to run. -- -- /See:/ 'projectsLocationsJobsWorkItemsLease' smart constructor. data ProjectsLocationsJobsWorkItemsLease = ProjectsLocationsJobsWorkItemsLease' - { _pljwilXgafv :: !(Maybe Text) + { _pljwilXgafv :: !(Maybe Xgafv) , _pljwilJobId :: !Text , _pljwilUploadProtocol :: !(Maybe Text) , _pljwilLocation :: !Text - , _pljwilPp :: !Bool , _pljwilAccessToken :: !(Maybe Text) , _pljwilUploadType :: !(Maybe Text) , _pljwilPayload :: !LeaseWorkItemRequest - , _pljwilBearerToken :: !(Maybe Text) , _pljwilProjectId :: !Text , _pljwilCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -100,16 +94,12 @@ data ProjectsLocationsJobsWorkItemsLease = ProjectsLocationsJobsWorkItemsLease' -- -- * 'pljwilLocation' -- --- * 'pljwilPp' --- -- * 'pljwilAccessToken' -- -- * 'pljwilUploadType' -- -- * 'pljwilPayload' -- --- * 'pljwilBearerToken' --- -- * 'pljwilProjectId' -- -- * 'pljwilCallback' @@ -125,17 +115,15 @@ projectsLocationsJobsWorkItemsLease pPljwilJobId_ pPljwilLocation_ pPljwilPayloa , _pljwilJobId = pPljwilJobId_ , _pljwilUploadProtocol = Nothing , _pljwilLocation = pPljwilLocation_ - , _pljwilPp = True , _pljwilAccessToken = Nothing , _pljwilUploadType = Nothing , _pljwilPayload = pPljwilPayload_ - , _pljwilBearerToken = Nothing , _pljwilProjectId = pPljwilProjectId_ , _pljwilCallback = Nothing } -- | V1 error format. -pljwilXgafv :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Text) +pljwilXgafv :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Xgafv) pljwilXgafv = lens _pljwilXgafv (\ s a -> s{_pljwilXgafv = a}) @@ -156,10 +144,6 @@ pljwilLocation = lens _pljwilLocation (\ s a -> s{_pljwilLocation = a}) --- | Pretty-print response. -pljwilPp :: Lens' ProjectsLocationsJobsWorkItemsLease Bool -pljwilPp = lens _pljwilPp (\ s a -> s{_pljwilPp = a}) - -- | OAuth access token. pljwilAccessToken :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Text) pljwilAccessToken @@ -178,12 +162,6 @@ pljwilPayload = lens _pljwilPayload (\ s a -> s{_pljwilPayload = a}) --- | OAuth bearer token. -pljwilBearerToken :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Text) -pljwilBearerToken - = lens _pljwilBearerToken - (\ s a -> s{_pljwilBearerToken = a}) - -- | Identifies the project this worker belongs to. pljwilProjectId :: Lens' ProjectsLocationsJobsWorkItemsLease Text pljwilProjectId @@ -202,16 +180,16 @@ instance GoogleRequest LeaseWorkItemResponse type Scopes ProjectsLocationsJobsWorkItemsLease = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsLocationsJobsWorkItemsLease'{..} = go _pljwilProjectId _pljwilLocation _pljwilJobId _pljwilXgafv _pljwilUploadProtocol - (Just _pljwilPp) _pljwilAccessToken _pljwilUploadType - _pljwilBearerToken _pljwilCallback (Just AltJSON) _pljwilPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/ReportStatus.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/ReportStatus.hs index 46cb706..f4d4e20 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/ReportStatus.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/ReportStatus.hs @@ -22,7 +22,7 @@ -- -- Reports the status of dataflow WorkItems leased by a worker. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.locations.jobs.workItems.reportStatus@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.jobs.workItems.reportStatus@. module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.ReportStatus ( -- * REST Resource @@ -37,11 +37,9 @@ module Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.Report , pljwirsJobId , pljwirsUploadProtocol , pljwirsLocation - , pljwirsPp , pljwirsAccessToken , pljwirsUploadType , pljwirsPayload - , pljwirsBearerToken , pljwirsProjectId , pljwirsCallback ) where @@ -61,31 +59,26 @@ type ProjectsLocationsJobsWorkItemsReportStatusResource "jobs" :> Capture "jobId" Text :> "workItems:reportStatus" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] ReportWorkItemStatusRequest - :> - Post '[JSON] ReportWorkItemStatusResponse + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] ReportWorkItemStatusRequest :> + Post '[JSON] ReportWorkItemStatusResponse -- | Reports the status of dataflow WorkItems leased by a worker. -- -- /See:/ 'projectsLocationsJobsWorkItemsReportStatus' smart constructor. data ProjectsLocationsJobsWorkItemsReportStatus = ProjectsLocationsJobsWorkItemsReportStatus' - { _pljwirsXgafv :: !(Maybe Text) + { _pljwirsXgafv :: !(Maybe Xgafv) , _pljwirsJobId :: !Text , _pljwirsUploadProtocol :: !(Maybe Text) , _pljwirsLocation :: !Text - , _pljwirsPp :: !Bool , _pljwirsAccessToken :: !(Maybe Text) , _pljwirsUploadType :: !(Maybe Text) , _pljwirsPayload :: !ReportWorkItemStatusRequest - , _pljwirsBearerToken :: !(Maybe Text) , _pljwirsProjectId :: !Text , _pljwirsCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -102,16 +95,12 @@ data ProjectsLocationsJobsWorkItemsReportStatus = ProjectsLocationsJobsWorkItems -- -- * 'pljwirsLocation' -- --- * 'pljwirsPp' --- -- * 'pljwirsAccessToken' -- -- * 'pljwirsUploadType' -- -- * 'pljwirsPayload' -- --- * 'pljwirsBearerToken' --- -- * 'pljwirsProjectId' -- -- * 'pljwirsCallback' @@ -127,17 +116,15 @@ projectsLocationsJobsWorkItemsReportStatus pPljwirsJobId_ pPljwirsLocation_ pPlj , _pljwirsJobId = pPljwirsJobId_ , _pljwirsUploadProtocol = Nothing , _pljwirsLocation = pPljwirsLocation_ - , _pljwirsPp = True , _pljwirsAccessToken = Nothing , _pljwirsUploadType = Nothing , _pljwirsPayload = pPljwirsPayload_ - , _pljwirsBearerToken = Nothing , _pljwirsProjectId = pPljwirsProjectId_ , _pljwirsCallback = Nothing } -- | V1 error format. -pljwirsXgafv :: Lens' ProjectsLocationsJobsWorkItemsReportStatus (Maybe Text) +pljwirsXgafv :: Lens' ProjectsLocationsJobsWorkItemsReportStatus (Maybe Xgafv) pljwirsXgafv = lens _pljwirsXgafv (\ s a -> s{_pljwirsXgafv = a}) @@ -158,11 +145,6 @@ pljwirsLocation = lens _pljwirsLocation (\ s a -> s{_pljwirsLocation = a}) --- | Pretty-print response. -pljwirsPp :: Lens' ProjectsLocationsJobsWorkItemsReportStatus Bool -pljwirsPp - = lens _pljwirsPp (\ s a -> s{_pljwirsPp = a}) - -- | OAuth access token. pljwirsAccessToken :: Lens' ProjectsLocationsJobsWorkItemsReportStatus (Maybe Text) pljwirsAccessToken @@ -181,12 +163,6 @@ pljwirsPayload = lens _pljwirsPayload (\ s a -> s{_pljwirsPayload = a}) --- | OAuth bearer token. -pljwirsBearerToken :: Lens' ProjectsLocationsJobsWorkItemsReportStatus (Maybe Text) -pljwirsBearerToken - = lens _pljwirsBearerToken - (\ s a -> s{_pljwirsBearerToken = a}) - -- | The project which owns the WorkItem\'s job. pljwirsProjectId :: Lens' ProjectsLocationsJobsWorkItemsReportStatus Text pljwirsProjectId @@ -207,16 +183,16 @@ instance GoogleRequest ProjectsLocationsJobsWorkItemsReportStatus = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsLocationsJobsWorkItemsReportStatus'{..} = go _pljwirsProjectId _pljwirsLocation _pljwirsJobId _pljwirsXgafv _pljwirsUploadProtocol - (Just _pljwirsPp) _pljwirsAccessToken _pljwirsUploadType - _pljwirsBearerToken _pljwirsCallback (Just AltJSON) _pljwirsPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Create.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Create.hs new file mode 100644 index 0000000..af512ac --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Create.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Locations.Templates.Create +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Creates a Cloud Dataflow job from a template. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.templates.create@. +module Network.Google.Resource.Dataflow.Projects.Locations.Templates.Create + ( + -- * REST Resource + ProjectsLocationsTemplatesCreateResource + + -- * Creating a Request + , projectsLocationsTemplatesCreate + , ProjectsLocationsTemplatesCreate + + -- * Request Lenses + , pltcXgafv + , pltcUploadProtocol + , pltcLocation + , pltcAccessToken + , pltcUploadType + , pltcPayload + , pltcProjectId + , pltcCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.locations.templates.create@ method which the +-- 'ProjectsLocationsTemplatesCreate' request conforms to. +type ProjectsLocationsTemplatesCreateResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "locations" :> + Capture "location" Text :> + "templates" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] CreateJobFromTemplateRequest :> + Post '[JSON] Job + +-- | Creates a Cloud Dataflow job from a template. +-- +-- /See:/ 'projectsLocationsTemplatesCreate' smart constructor. +data ProjectsLocationsTemplatesCreate = ProjectsLocationsTemplatesCreate' + { _pltcXgafv :: !(Maybe Xgafv) + , _pltcUploadProtocol :: !(Maybe Text) + , _pltcLocation :: !Text + , _pltcAccessToken :: !(Maybe Text) + , _pltcUploadType :: !(Maybe Text) + , _pltcPayload :: !CreateJobFromTemplateRequest + , _pltcProjectId :: !Text + , _pltcCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLocationsTemplatesCreate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pltcXgafv' +-- +-- * 'pltcUploadProtocol' +-- +-- * 'pltcLocation' +-- +-- * 'pltcAccessToken' +-- +-- * 'pltcUploadType' +-- +-- * 'pltcPayload' +-- +-- * 'pltcProjectId' +-- +-- * 'pltcCallback' +projectsLocationsTemplatesCreate + :: Text -- ^ 'pltcLocation' + -> CreateJobFromTemplateRequest -- ^ 'pltcPayload' + -> Text -- ^ 'pltcProjectId' + -> ProjectsLocationsTemplatesCreate +projectsLocationsTemplatesCreate pPltcLocation_ pPltcPayload_ pPltcProjectId_ = + ProjectsLocationsTemplatesCreate' + { _pltcXgafv = Nothing + , _pltcUploadProtocol = Nothing + , _pltcLocation = pPltcLocation_ + , _pltcAccessToken = Nothing + , _pltcUploadType = Nothing + , _pltcPayload = pPltcPayload_ + , _pltcProjectId = pPltcProjectId_ + , _pltcCallback = Nothing + } + +-- | V1 error format. +pltcXgafv :: Lens' ProjectsLocationsTemplatesCreate (Maybe Xgafv) +pltcXgafv + = lens _pltcXgafv (\ s a -> s{_pltcXgafv = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pltcUploadProtocol :: Lens' ProjectsLocationsTemplatesCreate (Maybe Text) +pltcUploadProtocol + = lens _pltcUploadProtocol + (\ s a -> s{_pltcUploadProtocol = a}) + +-- | The location to which to direct the request. +pltcLocation :: Lens' ProjectsLocationsTemplatesCreate Text +pltcLocation + = lens _pltcLocation (\ s a -> s{_pltcLocation = a}) + +-- | OAuth access token. +pltcAccessToken :: Lens' ProjectsLocationsTemplatesCreate (Maybe Text) +pltcAccessToken + = lens _pltcAccessToken + (\ s a -> s{_pltcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pltcUploadType :: Lens' ProjectsLocationsTemplatesCreate (Maybe Text) +pltcUploadType + = lens _pltcUploadType + (\ s a -> s{_pltcUploadType = a}) + +-- | Multipart request metadata. +pltcPayload :: Lens' ProjectsLocationsTemplatesCreate CreateJobFromTemplateRequest +pltcPayload + = lens _pltcPayload (\ s a -> s{_pltcPayload = a}) + +-- | Required. The ID of the Cloud Platform project that the job belongs to. +pltcProjectId :: Lens' ProjectsLocationsTemplatesCreate Text +pltcProjectId + = lens _pltcProjectId + (\ s a -> s{_pltcProjectId = a}) + +-- | JSONP +pltcCallback :: Lens' ProjectsLocationsTemplatesCreate (Maybe Text) +pltcCallback + = lens _pltcCallback (\ s a -> s{_pltcCallback = a}) + +instance GoogleRequest + ProjectsLocationsTemplatesCreate where + type Rs ProjectsLocationsTemplatesCreate = Job + type Scopes ProjectsLocationsTemplatesCreate = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsLocationsTemplatesCreate'{..} + = go _pltcProjectId _pltcLocation _pltcXgafv + _pltcUploadProtocol + _pltcAccessToken + _pltcUploadType + _pltcCallback + (Just AltJSON) + _pltcPayload + dataflowService + where go + = buildClient + (Proxy :: + Proxy ProjectsLocationsTemplatesCreateResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Get.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Get.hs new file mode 100644 index 0000000..620da0f --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Get.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Locations.Templates.Get +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Get the template associated with a template. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.templates.get@. +module Network.Google.Resource.Dataflow.Projects.Locations.Templates.Get + ( + -- * REST Resource + ProjectsLocationsTemplatesGetResource + + -- * Creating a Request + , projectsLocationsTemplatesGet + , ProjectsLocationsTemplatesGet + + -- * Request Lenses + , pltgXgafv + , pltgUploadProtocol + , pltgLocation + , pltgAccessToken + , pltgUploadType + , pltgGcsPath + , pltgView + , pltgProjectId + , pltgCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.locations.templates.get@ method which the +-- 'ProjectsLocationsTemplatesGet' request conforms to. +type ProjectsLocationsTemplatesGetResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "locations" :> + Capture "location" Text :> + "templates:get" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "gcsPath" Text :> + QueryParam "view" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] GetTemplateResponse + +-- | Get the template associated with a template. +-- +-- /See:/ 'projectsLocationsTemplatesGet' smart constructor. +data ProjectsLocationsTemplatesGet = ProjectsLocationsTemplatesGet' + { _pltgXgafv :: !(Maybe Xgafv) + , _pltgUploadProtocol :: !(Maybe Text) + , _pltgLocation :: !Text + , _pltgAccessToken :: !(Maybe Text) + , _pltgUploadType :: !(Maybe Text) + , _pltgGcsPath :: !(Maybe Text) + , _pltgView :: !(Maybe Text) + , _pltgProjectId :: !Text + , _pltgCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLocationsTemplatesGet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pltgXgafv' +-- +-- * 'pltgUploadProtocol' +-- +-- * 'pltgLocation' +-- +-- * 'pltgAccessToken' +-- +-- * 'pltgUploadType' +-- +-- * 'pltgGcsPath' +-- +-- * 'pltgView' +-- +-- * 'pltgProjectId' +-- +-- * 'pltgCallback' +projectsLocationsTemplatesGet + :: Text -- ^ 'pltgLocation' + -> Text -- ^ 'pltgProjectId' + -> ProjectsLocationsTemplatesGet +projectsLocationsTemplatesGet pPltgLocation_ pPltgProjectId_ = + ProjectsLocationsTemplatesGet' + { _pltgXgafv = Nothing + , _pltgUploadProtocol = Nothing + , _pltgLocation = pPltgLocation_ + , _pltgAccessToken = Nothing + , _pltgUploadType = Nothing + , _pltgGcsPath = Nothing + , _pltgView = Nothing + , _pltgProjectId = pPltgProjectId_ + , _pltgCallback = Nothing + } + +-- | V1 error format. +pltgXgafv :: Lens' ProjectsLocationsTemplatesGet (Maybe Xgafv) +pltgXgafv + = lens _pltgXgafv (\ s a -> s{_pltgXgafv = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pltgUploadProtocol :: Lens' ProjectsLocationsTemplatesGet (Maybe Text) +pltgUploadProtocol + = lens _pltgUploadProtocol + (\ s a -> s{_pltgUploadProtocol = a}) + +-- | The location to which to direct the request. +pltgLocation :: Lens' ProjectsLocationsTemplatesGet Text +pltgLocation + = lens _pltgLocation (\ s a -> s{_pltgLocation = a}) + +-- | OAuth access token. +pltgAccessToken :: Lens' ProjectsLocationsTemplatesGet (Maybe Text) +pltgAccessToken + = lens _pltgAccessToken + (\ s a -> s{_pltgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pltgUploadType :: Lens' ProjectsLocationsTemplatesGet (Maybe Text) +pltgUploadType + = lens _pltgUploadType + (\ s a -> s{_pltgUploadType = a}) + +-- | Required. A Cloud Storage path to the template from which to create the +-- job. Must be valid Cloud Storage URL, beginning with \'gs:\/\/\'. +pltgGcsPath :: Lens' ProjectsLocationsTemplatesGet (Maybe Text) +pltgGcsPath + = lens _pltgGcsPath (\ s a -> s{_pltgGcsPath = a}) + +-- | The view to retrieve. Defaults to METADATA_ONLY. +pltgView :: Lens' ProjectsLocationsTemplatesGet (Maybe Text) +pltgView = lens _pltgView (\ s a -> s{_pltgView = a}) + +-- | Required. The ID of the Cloud Platform project that the job belongs to. +pltgProjectId :: Lens' ProjectsLocationsTemplatesGet Text +pltgProjectId + = lens _pltgProjectId + (\ s a -> s{_pltgProjectId = a}) + +-- | JSONP +pltgCallback :: Lens' ProjectsLocationsTemplatesGet (Maybe Text) +pltgCallback + = lens _pltgCallback (\ s a -> s{_pltgCallback = a}) + +instance GoogleRequest ProjectsLocationsTemplatesGet + where + type Rs ProjectsLocationsTemplatesGet = + GetTemplateResponse + type Scopes ProjectsLocationsTemplatesGet = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsLocationsTemplatesGet'{..} + = go _pltgProjectId _pltgLocation _pltgXgafv + _pltgUploadProtocol + _pltgAccessToken + _pltgUploadType + _pltgGcsPath + _pltgView + _pltgCallback + (Just AltJSON) + dataflowService + where go + = buildClient + (Proxy :: + Proxy ProjectsLocationsTemplatesGetResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Launch.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Launch.hs new file mode 100644 index 0000000..4958cc6 --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Launch.hs @@ -0,0 +1,238 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Locations.Templates.Launch +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Launch a template. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.templates.launch@. +module Network.Google.Resource.Dataflow.Projects.Locations.Templates.Launch + ( + -- * REST Resource + ProjectsLocationsTemplatesLaunchResource + + -- * Creating a Request + , projectsLocationsTemplatesLaunch + , ProjectsLocationsTemplatesLaunch + + -- * Request Lenses + , pltlXgafv + , pltlValidateOnly + , pltlUploadProtocol + , pltlLocation + , pltlAccessToken + , pltlUploadType + , pltlPayload + , pltlDynamicTemplateStagingLocation + , pltlGcsPath + , pltlProjectId + , pltlCallback + , pltlDynamicTemplateGcsPath + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.locations.templates.launch@ method which the +-- 'ProjectsLocationsTemplatesLaunch' request conforms to. +type ProjectsLocationsTemplatesLaunchResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "locations" :> + Capture "location" Text :> + "templates:launch" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "validateOnly" Bool :> + QueryParam "upload_protocol" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "dynamicTemplate.stagingLocation" Text :> + QueryParam "gcsPath" Text :> + QueryParam "callback" Text :> + QueryParam "dynamicTemplate.gcsPath" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] LaunchTemplateParameters :> + Post '[JSON] LaunchTemplateResponse + +-- | Launch a template. +-- +-- /See:/ 'projectsLocationsTemplatesLaunch' smart constructor. +data ProjectsLocationsTemplatesLaunch = ProjectsLocationsTemplatesLaunch' + { _pltlXgafv :: !(Maybe Xgafv) + , _pltlValidateOnly :: !(Maybe Bool) + , _pltlUploadProtocol :: !(Maybe Text) + , _pltlLocation :: !Text + , _pltlAccessToken :: !(Maybe Text) + , _pltlUploadType :: !(Maybe Text) + , _pltlPayload :: !LaunchTemplateParameters + , _pltlDynamicTemplateStagingLocation :: !(Maybe Text) + , _pltlGcsPath :: !(Maybe Text) + , _pltlProjectId :: !Text + , _pltlCallback :: !(Maybe Text) + , _pltlDynamicTemplateGcsPath :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLocationsTemplatesLaunch' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pltlXgafv' +-- +-- * 'pltlValidateOnly' +-- +-- * 'pltlUploadProtocol' +-- +-- * 'pltlLocation' +-- +-- * 'pltlAccessToken' +-- +-- * 'pltlUploadType' +-- +-- * 'pltlPayload' +-- +-- * 'pltlDynamicTemplateStagingLocation' +-- +-- * 'pltlGcsPath' +-- +-- * 'pltlProjectId' +-- +-- * 'pltlCallback' +-- +-- * 'pltlDynamicTemplateGcsPath' +projectsLocationsTemplatesLaunch + :: Text -- ^ 'pltlLocation' + -> LaunchTemplateParameters -- ^ 'pltlPayload' + -> Text -- ^ 'pltlProjectId' + -> ProjectsLocationsTemplatesLaunch +projectsLocationsTemplatesLaunch pPltlLocation_ pPltlPayload_ pPltlProjectId_ = + ProjectsLocationsTemplatesLaunch' + { _pltlXgafv = Nothing + , _pltlValidateOnly = Nothing + , _pltlUploadProtocol = Nothing + , _pltlLocation = pPltlLocation_ + , _pltlAccessToken = Nothing + , _pltlUploadType = Nothing + , _pltlPayload = pPltlPayload_ + , _pltlDynamicTemplateStagingLocation = Nothing + , _pltlGcsPath = Nothing + , _pltlProjectId = pPltlProjectId_ + , _pltlCallback = Nothing + , _pltlDynamicTemplateGcsPath = Nothing + } + +-- | V1 error format. +pltlXgafv :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Xgafv) +pltlXgafv + = lens _pltlXgafv (\ s a -> s{_pltlXgafv = a}) + +-- | If true, the request is validated but not actually executed. Defaults to +-- false. +pltlValidateOnly :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Bool) +pltlValidateOnly + = lens _pltlValidateOnly + (\ s a -> s{_pltlValidateOnly = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pltlUploadProtocol :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Text) +pltlUploadProtocol + = lens _pltlUploadProtocol + (\ s a -> s{_pltlUploadProtocol = a}) + +-- | The location to which to direct the request. +pltlLocation :: Lens' ProjectsLocationsTemplatesLaunch Text +pltlLocation + = lens _pltlLocation (\ s a -> s{_pltlLocation = a}) + +-- | OAuth access token. +pltlAccessToken :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Text) +pltlAccessToken + = lens _pltlAccessToken + (\ s a -> s{_pltlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pltlUploadType :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Text) +pltlUploadType + = lens _pltlUploadType + (\ s a -> s{_pltlUploadType = a}) + +-- | Multipart request metadata. +pltlPayload :: Lens' ProjectsLocationsTemplatesLaunch LaunchTemplateParameters +pltlPayload + = lens _pltlPayload (\ s a -> s{_pltlPayload = a}) + +-- | Cloud Storage path for staging dependencies. Must be a valid Cloud +-- Storage URL, beginning with \`gs:\/\/\`. +pltlDynamicTemplateStagingLocation :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Text) +pltlDynamicTemplateStagingLocation + = lens _pltlDynamicTemplateStagingLocation + (\ s a -> s{_pltlDynamicTemplateStagingLocation = a}) + +-- | A Cloud Storage path to the template from which to create the job. Must +-- be valid Cloud Storage URL, beginning with \'gs:\/\/\'. +pltlGcsPath :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Text) +pltlGcsPath + = lens _pltlGcsPath (\ s a -> s{_pltlGcsPath = a}) + +-- | Required. The ID of the Cloud Platform project that the job belongs to. +pltlProjectId :: Lens' ProjectsLocationsTemplatesLaunch Text +pltlProjectId + = lens _pltlProjectId + (\ s a -> s{_pltlProjectId = a}) + +-- | JSONP +pltlCallback :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Text) +pltlCallback + = lens _pltlCallback (\ s a -> s{_pltlCallback = a}) + +-- | Path to dynamic template spec file on GCS. The file must be a Json +-- serialized DynamicTemplateFieSpec object. +pltlDynamicTemplateGcsPath :: Lens' ProjectsLocationsTemplatesLaunch (Maybe Text) +pltlDynamicTemplateGcsPath + = lens _pltlDynamicTemplateGcsPath + (\ s a -> s{_pltlDynamicTemplateGcsPath = a}) + +instance GoogleRequest + ProjectsLocationsTemplatesLaunch where + type Rs ProjectsLocationsTemplatesLaunch = + LaunchTemplateResponse + type Scopes ProjectsLocationsTemplatesLaunch = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsLocationsTemplatesLaunch'{..} + = go _pltlProjectId _pltlLocation _pltlXgafv + _pltlValidateOnly + _pltlUploadProtocol + _pltlAccessToken + _pltlUploadType + _pltlDynamicTemplateStagingLocation + _pltlGcsPath + _pltlCallback + _pltlDynamicTemplateGcsPath + (Just AltJSON) + _pltlPayload + dataflowService + where go + = buildClient + (Proxy :: + Proxy ProjectsLocationsTemplatesLaunchResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Locations/WorkerMessages.hs b/gen/Network/Google/Resource/Dataflow/Projects/Locations/WorkerMessages.hs new file mode 100644 index 0000000..c6fc1ba --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Locations/WorkerMessages.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Locations.WorkerMessages +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Send a worker_message to the service. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.locations.workerMessages@. +module Network.Google.Resource.Dataflow.Projects.Locations.WorkerMessages + ( + -- * REST Resource + ProjectsLocationsWorkerMessagesResource + + -- * Creating a Request + , projectsLocationsWorkerMessages + , ProjectsLocationsWorkerMessages + + -- * Request Lenses + , plwmXgafv + , plwmUploadProtocol + , plwmLocation + , plwmAccessToken + , plwmUploadType + , plwmPayload + , plwmProjectId + , plwmCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.locations.workerMessages@ method which the +-- 'ProjectsLocationsWorkerMessages' request conforms to. +type ProjectsLocationsWorkerMessagesResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "locations" :> + Capture "location" Text :> + "WorkerMessages" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] SendWorkerMessagesRequest :> + Post '[JSON] SendWorkerMessagesResponse + +-- | Send a worker_message to the service. +-- +-- /See:/ 'projectsLocationsWorkerMessages' smart constructor. +data ProjectsLocationsWorkerMessages = ProjectsLocationsWorkerMessages' + { _plwmXgafv :: !(Maybe Xgafv) + , _plwmUploadProtocol :: !(Maybe Text) + , _plwmLocation :: !Text + , _plwmAccessToken :: !(Maybe Text) + , _plwmUploadType :: !(Maybe Text) + , _plwmPayload :: !SendWorkerMessagesRequest + , _plwmProjectId :: !Text + , _plwmCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLocationsWorkerMessages' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plwmXgafv' +-- +-- * 'plwmUploadProtocol' +-- +-- * 'plwmLocation' +-- +-- * 'plwmAccessToken' +-- +-- * 'plwmUploadType' +-- +-- * 'plwmPayload' +-- +-- * 'plwmProjectId' +-- +-- * 'plwmCallback' +projectsLocationsWorkerMessages + :: Text -- ^ 'plwmLocation' + -> SendWorkerMessagesRequest -- ^ 'plwmPayload' + -> Text -- ^ 'plwmProjectId' + -> ProjectsLocationsWorkerMessages +projectsLocationsWorkerMessages pPlwmLocation_ pPlwmPayload_ pPlwmProjectId_ = + ProjectsLocationsWorkerMessages' + { _plwmXgafv = Nothing + , _plwmUploadProtocol = Nothing + , _plwmLocation = pPlwmLocation_ + , _plwmAccessToken = Nothing + , _plwmUploadType = Nothing + , _plwmPayload = pPlwmPayload_ + , _plwmProjectId = pPlwmProjectId_ + , _plwmCallback = Nothing + } + +-- | V1 error format. +plwmXgafv :: Lens' ProjectsLocationsWorkerMessages (Maybe Xgafv) +plwmXgafv + = lens _plwmXgafv (\ s a -> s{_plwmXgafv = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plwmUploadProtocol :: Lens' ProjectsLocationsWorkerMessages (Maybe Text) +plwmUploadProtocol + = lens _plwmUploadProtocol + (\ s a -> s{_plwmUploadProtocol = a}) + +-- | The location which contains the job +plwmLocation :: Lens' ProjectsLocationsWorkerMessages Text +plwmLocation + = lens _plwmLocation (\ s a -> s{_plwmLocation = a}) + +-- | OAuth access token. +plwmAccessToken :: Lens' ProjectsLocationsWorkerMessages (Maybe Text) +plwmAccessToken + = lens _plwmAccessToken + (\ s a -> s{_plwmAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plwmUploadType :: Lens' ProjectsLocationsWorkerMessages (Maybe Text) +plwmUploadType + = lens _plwmUploadType + (\ s a -> s{_plwmUploadType = a}) + +-- | Multipart request metadata. +plwmPayload :: Lens' ProjectsLocationsWorkerMessages SendWorkerMessagesRequest +plwmPayload + = lens _plwmPayload (\ s a -> s{_plwmPayload = a}) + +-- | The project to send the WorkerMessages to. +plwmProjectId :: Lens' ProjectsLocationsWorkerMessages Text +plwmProjectId + = lens _plwmProjectId + (\ s a -> s{_plwmProjectId = a}) + +-- | JSONP +plwmCallback :: Lens' ProjectsLocationsWorkerMessages (Maybe Text) +plwmCallback + = lens _plwmCallback (\ s a -> s{_plwmCallback = a}) + +instance GoogleRequest + ProjectsLocationsWorkerMessages where + type Rs ProjectsLocationsWorkerMessages = + SendWorkerMessagesResponse + type Scopes ProjectsLocationsWorkerMessages = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsLocationsWorkerMessages'{..} + = go _plwmProjectId _plwmLocation _plwmXgafv + _plwmUploadProtocol + _plwmAccessToken + _plwmUploadType + _plwmCallback + (Just AltJSON) + _plwmPayload + dataflowService + where go + = buildClient + (Proxy :: + Proxy ProjectsLocationsWorkerMessagesResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Templates/Create.hs b/gen/Network/Google/Resource/Dataflow/Projects/Templates/Create.hs index f27a070..f0309c9 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/Templates/Create.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/Templates/Create.hs @@ -22,7 +22,7 @@ -- -- Creates a Cloud Dataflow job from a template. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.templates.create@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.templates.create@. module Network.Google.Resource.Dataflow.Projects.Templates.Create ( -- * REST Resource @@ -35,11 +35,9 @@ module Network.Google.Resource.Dataflow.Projects.Templates.Create -- * Request Lenses , ptcXgafv , ptcUploadProtocol - , ptcPp , ptcAccessToken , ptcUploadType , ptcPayload - , ptcBearerToken , ptcProjectId , ptcCallback ) where @@ -54,28 +52,24 @@ type ProjectsTemplatesCreateResource = "projects" :> Capture "projectId" Text :> "templates" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] CreateJobFromTemplateRequest :> - Post '[JSON] Job + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] CreateJobFromTemplateRequest :> + Post '[JSON] Job -- | Creates a Cloud Dataflow job from a template. -- -- /See:/ 'projectsTemplatesCreate' smart constructor. data ProjectsTemplatesCreate = ProjectsTemplatesCreate' - { _ptcXgafv :: !(Maybe Text) + { _ptcXgafv :: !(Maybe Xgafv) , _ptcUploadProtocol :: !(Maybe Text) - , _ptcPp :: !Bool , _ptcAccessToken :: !(Maybe Text) , _ptcUploadType :: !(Maybe Text) , _ptcPayload :: !CreateJobFromTemplateRequest - , _ptcBearerToken :: !(Maybe Text) , _ptcProjectId :: !Text , _ptcCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -88,16 +82,12 @@ data ProjectsTemplatesCreate = ProjectsTemplatesCreate' -- -- * 'ptcUploadProtocol' -- --- * 'ptcPp' --- -- * 'ptcAccessToken' -- -- * 'ptcUploadType' -- -- * 'ptcPayload' -- --- * 'ptcBearerToken' --- -- * 'ptcProjectId' -- -- * 'ptcCallback' @@ -109,17 +99,15 @@ projectsTemplatesCreate pPtcPayload_ pPtcProjectId_ = ProjectsTemplatesCreate' { _ptcXgafv = Nothing , _ptcUploadProtocol = Nothing - , _ptcPp = True , _ptcAccessToken = Nothing , _ptcUploadType = Nothing , _ptcPayload = pPtcPayload_ - , _ptcBearerToken = Nothing , _ptcProjectId = pPtcProjectId_ , _ptcCallback = Nothing } -- | V1 error format. -ptcXgafv :: Lens' ProjectsTemplatesCreate (Maybe Text) +ptcXgafv :: Lens' ProjectsTemplatesCreate (Maybe Xgafv) ptcXgafv = lens _ptcXgafv (\ s a -> s{_ptcXgafv = a}) -- | Upload protocol for media (e.g. \"raw\", \"multipart\"). @@ -128,10 +116,6 @@ ptcUploadProtocol = lens _ptcUploadProtocol (\ s a -> s{_ptcUploadProtocol = a}) --- | Pretty-print response. -ptcPp :: Lens' ProjectsTemplatesCreate Bool -ptcPp = lens _ptcPp (\ s a -> s{_ptcPp = a}) - -- | OAuth access token. ptcAccessToken :: Lens' ProjectsTemplatesCreate (Maybe Text) ptcAccessToken @@ -149,12 +133,6 @@ ptcPayload :: Lens' ProjectsTemplatesCreate CreateJobFromTemplateRequest ptcPayload = lens _ptcPayload (\ s a -> s{_ptcPayload = a}) --- | OAuth bearer token. -ptcBearerToken :: Lens' ProjectsTemplatesCreate (Maybe Text) -ptcBearerToken - = lens _ptcBearerToken - (\ s a -> s{_ptcBearerToken = a}) - -- | Required. The ID of the Cloud Platform project that the job belongs to. ptcProjectId :: Lens' ProjectsTemplatesCreate Text ptcProjectId @@ -169,13 +147,13 @@ instance GoogleRequest ProjectsTemplatesCreate where type Rs ProjectsTemplatesCreate = Job type Scopes ProjectsTemplatesCreate = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsTemplatesCreate'{..} = go _ptcProjectId _ptcXgafv _ptcUploadProtocol - (Just _ptcPp) _ptcAccessToken _ptcUploadType - _ptcBearerToken _ptcCallback (Just AltJSON) _ptcPayload diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Templates/Get.hs b/gen/Network/Google/Resource/Dataflow/Projects/Templates/Get.hs new file mode 100644 index 0000000..071ce1b --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Templates/Get.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Templates.Get +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Get the template associated with a template. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.templates.get@. +module Network.Google.Resource.Dataflow.Projects.Templates.Get + ( + -- * REST Resource + ProjectsTemplatesGetResource + + -- * Creating a Request + , projectsTemplatesGet + , ProjectsTemplatesGet + + -- * Request Lenses + , ptgXgafv + , ptgUploadProtocol + , ptgLocation + , ptgAccessToken + , ptgUploadType + , ptgGcsPath + , ptgView + , ptgProjectId + , ptgCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.templates.get@ method which the +-- 'ProjectsTemplatesGet' request conforms to. +type ProjectsTemplatesGetResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "templates:get" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "location" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "gcsPath" Text :> + QueryParam "view" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] GetTemplateResponse + +-- | Get the template associated with a template. +-- +-- /See:/ 'projectsTemplatesGet' smart constructor. +data ProjectsTemplatesGet = ProjectsTemplatesGet' + { _ptgXgafv :: !(Maybe Xgafv) + , _ptgUploadProtocol :: !(Maybe Text) + , _ptgLocation :: !(Maybe Text) + , _ptgAccessToken :: !(Maybe Text) + , _ptgUploadType :: !(Maybe Text) + , _ptgGcsPath :: !(Maybe Text) + , _ptgView :: !(Maybe Text) + , _ptgProjectId :: !Text + , _ptgCallback :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTemplatesGet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptgXgafv' +-- +-- * 'ptgUploadProtocol' +-- +-- * 'ptgLocation' +-- +-- * 'ptgAccessToken' +-- +-- * 'ptgUploadType' +-- +-- * 'ptgGcsPath' +-- +-- * 'ptgView' +-- +-- * 'ptgProjectId' +-- +-- * 'ptgCallback' +projectsTemplatesGet + :: Text -- ^ 'ptgProjectId' + -> ProjectsTemplatesGet +projectsTemplatesGet pPtgProjectId_ = + ProjectsTemplatesGet' + { _ptgXgafv = Nothing + , _ptgUploadProtocol = Nothing + , _ptgLocation = Nothing + , _ptgAccessToken = Nothing + , _ptgUploadType = Nothing + , _ptgGcsPath = Nothing + , _ptgView = Nothing + , _ptgProjectId = pPtgProjectId_ + , _ptgCallback = Nothing + } + +-- | V1 error format. +ptgXgafv :: Lens' ProjectsTemplatesGet (Maybe Xgafv) +ptgXgafv = lens _ptgXgafv (\ s a -> s{_ptgXgafv = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptgUploadProtocol :: Lens' ProjectsTemplatesGet (Maybe Text) +ptgUploadProtocol + = lens _ptgUploadProtocol + (\ s a -> s{_ptgUploadProtocol = a}) + +-- | The location to which to direct the request. +ptgLocation :: Lens' ProjectsTemplatesGet (Maybe Text) +ptgLocation + = lens _ptgLocation (\ s a -> s{_ptgLocation = a}) + +-- | OAuth access token. +ptgAccessToken :: Lens' ProjectsTemplatesGet (Maybe Text) +ptgAccessToken + = lens _ptgAccessToken + (\ s a -> s{_ptgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptgUploadType :: Lens' ProjectsTemplatesGet (Maybe Text) +ptgUploadType + = lens _ptgUploadType + (\ s a -> s{_ptgUploadType = a}) + +-- | Required. A Cloud Storage path to the template from which to create the +-- job. Must be valid Cloud Storage URL, beginning with \'gs:\/\/\'. +ptgGcsPath :: Lens' ProjectsTemplatesGet (Maybe Text) +ptgGcsPath + = lens _ptgGcsPath (\ s a -> s{_ptgGcsPath = a}) + +-- | The view to retrieve. Defaults to METADATA_ONLY. +ptgView :: Lens' ProjectsTemplatesGet (Maybe Text) +ptgView = lens _ptgView (\ s a -> s{_ptgView = a}) + +-- | Required. The ID of the Cloud Platform project that the job belongs to. +ptgProjectId :: Lens' ProjectsTemplatesGet Text +ptgProjectId + = lens _ptgProjectId (\ s a -> s{_ptgProjectId = a}) + +-- | JSONP +ptgCallback :: Lens' ProjectsTemplatesGet (Maybe Text) +ptgCallback + = lens _ptgCallback (\ s a -> s{_ptgCallback = a}) + +instance GoogleRequest ProjectsTemplatesGet where + type Rs ProjectsTemplatesGet = GetTemplateResponse + type Scopes ProjectsTemplatesGet = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsTemplatesGet'{..} + = go _ptgProjectId _ptgXgafv _ptgUploadProtocol + _ptgLocation + _ptgAccessToken + _ptgUploadType + _ptgGcsPath + _ptgView + _ptgCallback + (Just AltJSON) + dataflowService + where go + = buildClient + (Proxy :: Proxy ProjectsTemplatesGetResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Templates/Launch.hs b/gen/Network/Google/Resource/Dataflow/Projects/Templates/Launch.hs new file mode 100644 index 0000000..f0e6dcc --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Templates/Launch.hs @@ -0,0 +1,232 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Templates.Launch +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Launch a template. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.templates.launch@. +module Network.Google.Resource.Dataflow.Projects.Templates.Launch + ( + -- * REST Resource + ProjectsTemplatesLaunchResource + + -- * Creating a Request + , projectsTemplatesLaunch + , ProjectsTemplatesLaunch + + -- * Request Lenses + , ptlXgafv + , ptlValidateOnly + , ptlUploadProtocol + , ptlLocation + , ptlAccessToken + , ptlUploadType + , ptlPayload + , ptlDynamicTemplateStagingLocation + , ptlGcsPath + , ptlProjectId + , ptlCallback + , ptlDynamicTemplateGcsPath + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.templates.launch@ method which the +-- 'ProjectsTemplatesLaunch' request conforms to. +type ProjectsTemplatesLaunchResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "templates:launch" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "validateOnly" Bool :> + QueryParam "upload_protocol" Text :> + QueryParam "location" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "dynamicTemplate.stagingLocation" Text :> + QueryParam "gcsPath" Text :> + QueryParam "callback" Text :> + QueryParam "dynamicTemplate.gcsPath" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] LaunchTemplateParameters :> + Post '[JSON] LaunchTemplateResponse + +-- | Launch a template. +-- +-- /See:/ 'projectsTemplatesLaunch' smart constructor. +data ProjectsTemplatesLaunch = ProjectsTemplatesLaunch' + { _ptlXgafv :: !(Maybe Xgafv) + , _ptlValidateOnly :: !(Maybe Bool) + , _ptlUploadProtocol :: !(Maybe Text) + , _ptlLocation :: !(Maybe Text) + , _ptlAccessToken :: !(Maybe Text) + , _ptlUploadType :: !(Maybe Text) + , _ptlPayload :: !LaunchTemplateParameters + , _ptlDynamicTemplateStagingLocation :: !(Maybe Text) + , _ptlGcsPath :: !(Maybe Text) + , _ptlProjectId :: !Text + , _ptlCallback :: !(Maybe Text) + , _ptlDynamicTemplateGcsPath :: !(Maybe Text) + } deriving (Eq,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTemplatesLaunch' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptlXgafv' +-- +-- * 'ptlValidateOnly' +-- +-- * 'ptlUploadProtocol' +-- +-- * 'ptlLocation' +-- +-- * 'ptlAccessToken' +-- +-- * 'ptlUploadType' +-- +-- * 'ptlPayload' +-- +-- * 'ptlDynamicTemplateStagingLocation' +-- +-- * 'ptlGcsPath' +-- +-- * 'ptlProjectId' +-- +-- * 'ptlCallback' +-- +-- * 'ptlDynamicTemplateGcsPath' +projectsTemplatesLaunch + :: LaunchTemplateParameters -- ^ 'ptlPayload' + -> Text -- ^ 'ptlProjectId' + -> ProjectsTemplatesLaunch +projectsTemplatesLaunch pPtlPayload_ pPtlProjectId_ = + ProjectsTemplatesLaunch' + { _ptlXgafv = Nothing + , _ptlValidateOnly = Nothing + , _ptlUploadProtocol = Nothing + , _ptlLocation = Nothing + , _ptlAccessToken = Nothing + , _ptlUploadType = Nothing + , _ptlPayload = pPtlPayload_ + , _ptlDynamicTemplateStagingLocation = Nothing + , _ptlGcsPath = Nothing + , _ptlProjectId = pPtlProjectId_ + , _ptlCallback = Nothing + , _ptlDynamicTemplateGcsPath = Nothing + } + +-- | V1 error format. +ptlXgafv :: Lens' ProjectsTemplatesLaunch (Maybe Xgafv) +ptlXgafv = lens _ptlXgafv (\ s a -> s{_ptlXgafv = a}) + +-- | If true, the request is validated but not actually executed. Defaults to +-- false. +ptlValidateOnly :: Lens' ProjectsTemplatesLaunch (Maybe Bool) +ptlValidateOnly + = lens _ptlValidateOnly + (\ s a -> s{_ptlValidateOnly = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptlUploadProtocol :: Lens' ProjectsTemplatesLaunch (Maybe Text) +ptlUploadProtocol + = lens _ptlUploadProtocol + (\ s a -> s{_ptlUploadProtocol = a}) + +-- | The location to which to direct the request. +ptlLocation :: Lens' ProjectsTemplatesLaunch (Maybe Text) +ptlLocation + = lens _ptlLocation (\ s a -> s{_ptlLocation = a}) + +-- | OAuth access token. +ptlAccessToken :: Lens' ProjectsTemplatesLaunch (Maybe Text) +ptlAccessToken + = lens _ptlAccessToken + (\ s a -> s{_ptlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptlUploadType :: Lens' ProjectsTemplatesLaunch (Maybe Text) +ptlUploadType + = lens _ptlUploadType + (\ s a -> s{_ptlUploadType = a}) + +-- | Multipart request metadata. +ptlPayload :: Lens' ProjectsTemplatesLaunch LaunchTemplateParameters +ptlPayload + = lens _ptlPayload (\ s a -> s{_ptlPayload = a}) + +-- | Cloud Storage path for staging dependencies. Must be a valid Cloud +-- Storage URL, beginning with \`gs:\/\/\`. +ptlDynamicTemplateStagingLocation :: Lens' ProjectsTemplatesLaunch (Maybe Text) +ptlDynamicTemplateStagingLocation + = lens _ptlDynamicTemplateStagingLocation + (\ s a -> s{_ptlDynamicTemplateStagingLocation = a}) + +-- | A Cloud Storage path to the template from which to create the job. Must +-- be valid Cloud Storage URL, beginning with \'gs:\/\/\'. +ptlGcsPath :: Lens' ProjectsTemplatesLaunch (Maybe Text) +ptlGcsPath + = lens _ptlGcsPath (\ s a -> s{_ptlGcsPath = a}) + +-- | Required. The ID of the Cloud Platform project that the job belongs to. +ptlProjectId :: Lens' ProjectsTemplatesLaunch Text +ptlProjectId + = lens _ptlProjectId (\ s a -> s{_ptlProjectId = a}) + +-- | JSONP +ptlCallback :: Lens' ProjectsTemplatesLaunch (Maybe Text) +ptlCallback + = lens _ptlCallback (\ s a -> s{_ptlCallback = a}) + +-- | Path to dynamic template spec file on GCS. The file must be a Json +-- serialized DynamicTemplateFieSpec object. +ptlDynamicTemplateGcsPath :: Lens' ProjectsTemplatesLaunch (Maybe Text) +ptlDynamicTemplateGcsPath + = lens _ptlDynamicTemplateGcsPath + (\ s a -> s{_ptlDynamicTemplateGcsPath = a}) + +instance GoogleRequest ProjectsTemplatesLaunch where + type Rs ProjectsTemplatesLaunch = + LaunchTemplateResponse + type Scopes ProjectsTemplatesLaunch = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsTemplatesLaunch'{..} + = go _ptlProjectId _ptlXgafv _ptlValidateOnly + _ptlUploadProtocol + _ptlLocation + _ptlAccessToken + _ptlUploadType + _ptlDynamicTemplateStagingLocation + _ptlGcsPath + _ptlCallback + _ptlDynamicTemplateGcsPath + (Just AltJSON) + _ptlPayload + dataflowService + where go + = buildClient + (Proxy :: Proxy ProjectsTemplatesLaunchResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/WorkerMessages.hs b/gen/Network/Google/Resource/Dataflow/Projects/WorkerMessages.hs index 337a181..f60dac2 100644 --- a/gen/Network/Google/Resource/Dataflow/Projects/WorkerMessages.hs +++ b/gen/Network/Google/Resource/Dataflow/Projects/WorkerMessages.hs @@ -22,7 +22,7 @@ -- -- Send a worker_message to the service. -- --- /See:/ <https://cloud.google.com/dataflow Google Dataflow API Reference> for @dataflow.projects.workerMessages@. +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.workerMessages@. module Network.Google.Resource.Dataflow.Projects.WorkerMessages ( -- * REST Resource @@ -35,11 +35,9 @@ module Network.Google.Resource.Dataflow.Projects.WorkerMessages -- * Request Lenses , pwmXgafv , pwmUploadProtocol - , pwmPp , pwmAccessToken , pwmUploadType , pwmPayload - , pwmBearerToken , pwmProjectId , pwmCallback ) where @@ -54,28 +52,24 @@ type ProjectsWorkerMessagesResource = "projects" :> Capture "projectId" Text :> "WorkerMessages" :> - QueryParam "$.xgafv" Text :> + QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> - QueryParam "pp" Bool :> - QueryParam "access_token" Text :> - QueryParam "uploadType" Text :> - QueryParam "bearer_token" Text :> - QueryParam "callback" Text :> - QueryParam "alt" AltJSON :> - ReqBody '[JSON] SendWorkerMessagesRequest :> - Post '[JSON] SendWorkerMessagesResponse + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + ReqBody '[JSON] SendWorkerMessagesRequest :> + Post '[JSON] SendWorkerMessagesResponse -- | Send a worker_message to the service. -- -- /See:/ 'projectsWorkerMessages' smart constructor. data ProjectsWorkerMessages = ProjectsWorkerMessages' - { _pwmXgafv :: !(Maybe Text) + { _pwmXgafv :: !(Maybe Xgafv) , _pwmUploadProtocol :: !(Maybe Text) - , _pwmPp :: !Bool , _pwmAccessToken :: !(Maybe Text) , _pwmUploadType :: !(Maybe Text) , _pwmPayload :: !SendWorkerMessagesRequest - , _pwmBearerToken :: !(Maybe Text) , _pwmProjectId :: !Text , _pwmCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) @@ -88,16 +82,12 @@ data ProjectsWorkerMessages = ProjectsWorkerMessages' -- -- * 'pwmUploadProtocol' -- --- * 'pwmPp' --- -- * 'pwmAccessToken' -- -- * 'pwmUploadType' -- -- * 'pwmPayload' -- --- * 'pwmBearerToken' --- -- * 'pwmProjectId' -- -- * 'pwmCallback' @@ -109,17 +99,15 @@ projectsWorkerMessages pPwmPayload_ pPwmProjectId_ = ProjectsWorkerMessages' { _pwmXgafv = Nothing , _pwmUploadProtocol = Nothing - , _pwmPp = True , _pwmAccessToken = Nothing , _pwmUploadType = Nothing , _pwmPayload = pPwmPayload_ - , _pwmBearerToken = Nothing , _pwmProjectId = pPwmProjectId_ , _pwmCallback = Nothing } -- | V1 error format. -pwmXgafv :: Lens' ProjectsWorkerMessages (Maybe Text) +pwmXgafv :: Lens' ProjectsWorkerMessages (Maybe Xgafv) pwmXgafv = lens _pwmXgafv (\ s a -> s{_pwmXgafv = a}) -- | Upload protocol for media (e.g. \"raw\", \"multipart\"). @@ -128,10 +116,6 @@ pwmUploadProtocol = lens _pwmUploadProtocol (\ s a -> s{_pwmUploadProtocol = a}) --- | Pretty-print response. -pwmPp :: Lens' ProjectsWorkerMessages Bool -pwmPp = lens _pwmPp (\ s a -> s{_pwmPp = a}) - -- | OAuth access token. pwmAccessToken :: Lens' ProjectsWorkerMessages (Maybe Text) pwmAccessToken @@ -149,12 +133,6 @@ pwmPayload :: Lens' ProjectsWorkerMessages SendWorkerMessagesRequest pwmPayload = lens _pwmPayload (\ s a -> s{_pwmPayload = a}) --- | OAuth bearer token. -pwmBearerToken :: Lens' ProjectsWorkerMessages (Maybe Text) -pwmBearerToken - = lens _pwmBearerToken - (\ s a -> s{_pwmBearerToken = a}) - -- | The project to send the WorkerMessages to. pwmProjectId :: Lens' ProjectsWorkerMessages Text pwmProjectId @@ -170,13 +148,13 @@ instance GoogleRequest ProjectsWorkerMessages where SendWorkerMessagesResponse type Scopes ProjectsWorkerMessages = '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email"] requestClient ProjectsWorkerMessages'{..} = go _pwmProjectId _pwmXgafv _pwmUploadProtocol - (Just _pwmPp) _pwmAccessToken _pwmUploadType - _pwmBearerToken _pwmCallback (Just AltJSON) _pwmPayload diff --git a/gogol-dataflow.cabal b/gogol-dataflow.cabal index a227778..4f78992 100644 --- a/gogol-dataflow.cabal +++ b/gogol-dataflow.cabal @@ -1,5 +1,5 @@ name: gogol-dataflow -version: 0.3.0 +version: 0.4.0 synopsis: Google Dataflow SDK. homepage: https://github.com/brendanhay/gogol bug-reports: https://github.com/brendanhay/gogol/issues @@ -35,6 +35,7 @@ library exposed-modules: Network.Google.Dataflow , Network.Google.Dataflow.Types + , Network.Google.Resource.Dataflow.Projects.Jobs.Aggregated , Network.Google.Resource.Dataflow.Projects.Jobs.Create , Network.Google.Resource.Dataflow.Projects.Jobs.Debug.GetConfig , Network.Google.Resource.Dataflow.Projects.Jobs.Debug.SendCapture @@ -42,18 +43,28 @@ library , Network.Google.Resource.Dataflow.Projects.Jobs.GetMetrics , Network.Google.Resource.Dataflow.Projects.Jobs.List , Network.Google.Resource.Dataflow.Projects.Jobs.Messages.List + , Network.Google.Resource.Dataflow.Projects.Jobs.Snapshot , Network.Google.Resource.Dataflow.Projects.Jobs.Update , Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.Lease , Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.ReportStatus , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Create + , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.GetConfig + , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Debug.SendCapture , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Get , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.GetMetrics , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.List , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Messages.List + , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Snapshot , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.Update , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.Lease , Network.Google.Resource.Dataflow.Projects.Locations.Jobs.WorkItems.ReportStatus + , Network.Google.Resource.Dataflow.Projects.Locations.Templates.Create + , Network.Google.Resource.Dataflow.Projects.Locations.Templates.Get + , Network.Google.Resource.Dataflow.Projects.Locations.Templates.Launch + , Network.Google.Resource.Dataflow.Projects.Locations.WorkerMessages , Network.Google.Resource.Dataflow.Projects.Templates.Create + , Network.Google.Resource.Dataflow.Projects.Templates.Get + , Network.Google.Resource.Dataflow.Projects.Templates.Launch , Network.Google.Resource.Dataflow.Projects.WorkerMessages other-modules: @@ -61,5 +72,5 @@ library , Network.Google.Dataflow.Types.Sum build-depends: - gogol-core == 0.3.0.* + gogol-core == 0.4.0.* , base >= 4.7 && < 5 |