All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.cloudscheduler.kotlin.JobArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudscheduler.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudscheduler.JobArgs.builder
import com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobAppEngineHttpTargetArgs
import com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobAppEngineHttpTargetArgsBuilder
import com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobHttpTargetArgs
import com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobHttpTargetArgsBuilder
import com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobPubsubTargetArgs
import com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobPubsubTargetArgsBuilder
import com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobRetryConfigArgs
import com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobRetryConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *  /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /*
 * A scheduled job that can publish a PubSub message or an HTTP request
 * every X interval of time, using a crontab format string.
 * To get more information about Job, see:
 * * [API documentation](https://cloud.google.com/scheduler/docs/reference/rest/)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/scheduler/)
 * ## Example Usage
 * ### Scheduler Job Pubsub
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as std from "@pulumi/std";
 * const topic = new gcp.pubsub.Topic("topic", {name: "job-topic"});
 * const job = new gcp.cloudscheduler.Job("job", {
 *     name: "test-job",
 *     description: "test job",
 *     schedule: "*/2 * * * *",
 *     pubsubTarget: {
 *         topicName: topic.id,
 *         data: std.base64encode({
 *             input: "test",
 *         }).then(invoke => invoke.result),
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * import pulumi_std as std
 * topic = gcp.pubsub.Topic("topic", name="job-topic")
 * job = gcp.cloudscheduler.Job("job",
 *     name="test-job",
 *     description="test job",
 *     schedule="*/2 * * * *",
 *     pubsub_target={
 *         "topic_name": topic.id,
 *         "data": std.base64encode(input="test").result,
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var topic = new Gcp.PubSub.Topic("topic", new()
 *     {
 *         Name = "job-topic",
 *     });
 *     var job = new Gcp.CloudScheduler.Job("job", new()
 *     {
 *         Name = "test-job",
 *         Description = "test job",
 *         Schedule = "*/2 * * * *",
 *         PubsubTarget = new Gcp.CloudScheduler.Inputs.JobPubsubTargetArgs
 *         {
 *             TopicName = topic.Id,
 *             Data = Std.Base64encode.Invoke(new()
 *             {
 *                 Input = "test",
 *             }).Apply(invoke => invoke.Result),
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudscheduler"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/pubsub"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		topic, err := pubsub.NewTopic(ctx, "topic", &pubsub.TopicArgs{
 * 			Name: pulumi.String("job-topic"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
 * 			Input: "test",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudscheduler.NewJob(ctx, "job", &cloudscheduler.JobArgs{
 * 			Name:        pulumi.String("test-job"),
 * 			Description: pulumi.String("test job"),
 * 			Schedule:    pulumi.String("*/2 * * * *"),
 * 			PubsubTarget: &cloudscheduler.JobPubsubTargetArgs{
 * 				TopicName: topic.ID(),
 * 				Data:      pulumi.String(invokeBase64encode.Result),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.pubsub.Topic;
 * import com.pulumi.gcp.pubsub.TopicArgs;
 * import com.pulumi.gcp.cloudscheduler.Job;
 * import com.pulumi.gcp.cloudscheduler.JobArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobPubsubTargetArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var topic = new Topic("topic", TopicArgs.builder()
 *             .name("job-topic")
 *             .build());
 *         var job = new Job("job", JobArgs.builder()
 *             .name("test-job")
 *             .description("test job")
 *             .schedule("*/2 * * * *")
 *             .pubsubTarget(JobPubsubTargetArgs.builder()
 *                 .topicName(topic.id())
 *                 .data(StdFunctions.base64encode(Base64encodeArgs.builder()
 *                     .input("test")
 *                     .build()).result())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   topic:
 *     type: gcp:pubsub:Topic
 *     properties:
 *       name: job-topic
 *   job:
 *     type: gcp:cloudscheduler:Job
 *     properties:
 *       name: test-job
 *       description: test job
 *       schedule: '*/2 * * * *'
 *       pubsubTarget:
 *         topicName: ${topic.id}
 *         data:
 *           fn::invoke:
 *             Function: std:base64encode
 *             Arguments:
 *               input: test
 *             Return: result
 * ```
 * 
 * ### Scheduler Job Http
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as std from "@pulumi/std";
 * const job = new gcp.cloudscheduler.Job("job", {
 *     name: "test-job",
 *     description: "test http job",
 *     schedule: "*/8 * * * *",
 *     timeZone: "America/New_York",
 *     attemptDeadline: "320s",
 *     retryConfig: {
 *         retryCount: 1,
 *     },
 *     httpTarget: {
 *         httpMethod: "POST",
 *         uri: "https://example.com/",
 *         body: std.base64encode({
 *             input: "{\"foo\":\"bar\"}",
 *         }).then(invoke => invoke.result),
 *         headers: {
 *             "Content-Type": "application/json",
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * import pulumi_std as std
 * job = gcp.cloudscheduler.Job("job",
 *     name="test-job",
 *     description="test http job",
 *     schedule="*/8 * * * *",
 *     time_zone="America/New_York",
 *     attempt_deadline="320s",
 *     retry_config={
 *         "retry_count": 1,
 *     },
 *     http_target={
 *         "http_method": "POST",
 *         "uri": "https://example.com/",
 *         "body": std.base64encode(input="{\"foo\":\"bar\"}").result,
 *         "headers": {
 *             "content__type": "application/json",
 *         },
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var job = new Gcp.CloudScheduler.Job("job", new()
 *     {
 *         Name = "test-job",
 *         Description = "test http job",
 *         Schedule = "*/8 * * * *",
 *         TimeZone = "America/New_York",
 *         AttemptDeadline = "320s",
 *         RetryConfig = new Gcp.CloudScheduler.Inputs.JobRetryConfigArgs
 *         {
 *             RetryCount = 1,
 *         },
 *         HttpTarget = new Gcp.CloudScheduler.Inputs.JobHttpTargetArgs
 *         {
 *             HttpMethod = "POST",
 *             Uri = "https://example.com/",
 *             Body = Std.Base64encode.Invoke(new()
 *             {
 *                 Input = "{\"foo\":\"bar\"}",
 *             }).Apply(invoke => invoke.Result),
 *             Headers =
 *             {
 *                 { "Content-Type", "application/json" },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudscheduler"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
 * 			Input: "{\"foo\":\"bar\"}",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudscheduler.NewJob(ctx, "job", &cloudscheduler.JobArgs{
 * 			Name:            pulumi.String("test-job"),
 * 			Description:     pulumi.String("test http job"),
 * 			Schedule:        pulumi.String("*/8 * * * *"),
 * 			TimeZone:        pulumi.String("America/New_York"),
 * 			AttemptDeadline: pulumi.String("320s"),
 * 			RetryConfig: &cloudscheduler.JobRetryConfigArgs{
 * 				RetryCount: pulumi.Int(1),
 * 			},
 * 			HttpTarget: &cloudscheduler.JobHttpTargetArgs{
 * 				HttpMethod: pulumi.String("POST"),
 * 				Uri:        pulumi.String("https://example.com/"),
 * 				Body:       pulumi.String(invokeBase64encode.Result),
 * 				Headers: pulumi.StringMap{
 * 					"Content-Type": pulumi.String("application/json"),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.cloudscheduler.Job;
 * import com.pulumi.gcp.cloudscheduler.JobArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobRetryConfigArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobHttpTargetArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var job = new Job("job", JobArgs.builder()
 *             .name("test-job")
 *             .description("test http job")
 *             .schedule("*/8 * * * *")
 *             .timeZone("America/New_York")
 *             .attemptDeadline("320s")
 *             .retryConfig(JobRetryConfigArgs.builder()
 *                 .retryCount(1)
 *                 .build())
 *             .httpTarget(JobHttpTargetArgs.builder()
 *                 .httpMethod("POST")
 *                 .uri("https://example.com/")
 *                 .body(StdFunctions.base64encode(Base64encodeArgs.builder()
 *                     .input("{\"foo\":\"bar\"}")
 *                     .build()).result())
 *                 .headers(Map.of("Content-Type", "application/json"))
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   job:
 *     type: gcp:cloudscheduler:Job
 *     properties:
 *       name: test-job
 *       description: test http job
 *       schedule: '*/8 * * * *'
 *       timeZone: America/New_York
 *       attemptDeadline: 320s
 *       retryConfig:
 *         retryCount: 1
 *       httpTarget:
 *         httpMethod: POST
 *         uri: https://example.com/
 *         body:
 *           fn::invoke:
 *             Function: std:base64encode
 *             Arguments:
 *               input: '{"foo":"bar"}'
 *             Return: result
 *         headers:
 *           Content-Type: application/json
 * ```
 * 
 * ### Scheduler Job Paused
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as std from "@pulumi/std";
 * const job = new gcp.cloudscheduler.Job("job", {
 *     paused: true,
 *     name: "test-job",
 *     description: "test http job with updated fields",
 *     schedule: "*/8 * * * *",
 *     timeZone: "America/New_York",
 *     attemptDeadline: "320s",
 *     retryConfig: {
 *         retryCount: 1,
 *     },
 *     httpTarget: {
 *         httpMethod: "POST",
 *         uri: "https://example.com/ping",
 *         body: std.base64encode({
 *             input: "{\"foo\":\"bar\"}",
 *         }).then(invoke => invoke.result),
 *         headers: {
 *             "Content-Type": "application/json",
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * import pulumi_std as std
 * job = gcp.cloudscheduler.Job("job",
 *     paused=True,
 *     name="test-job",
 *     description="test http job with updated fields",
 *     schedule="*/8 * * * *",
 *     time_zone="America/New_York",
 *     attempt_deadline="320s",
 *     retry_config={
 *         "retry_count": 1,
 *     },
 *     http_target={
 *         "http_method": "POST",
 *         "uri": "https://example.com/ping",
 *         "body": std.base64encode(input="{\"foo\":\"bar\"}").result,
 *         "headers": {
 *             "content__type": "application/json",
 *         },
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var job = new Gcp.CloudScheduler.Job("job", new()
 *     {
 *         Paused = true,
 *         Name = "test-job",
 *         Description = "test http job with updated fields",
 *         Schedule = "*/8 * * * *",
 *         TimeZone = "America/New_York",
 *         AttemptDeadline = "320s",
 *         RetryConfig = new Gcp.CloudScheduler.Inputs.JobRetryConfigArgs
 *         {
 *             RetryCount = 1,
 *         },
 *         HttpTarget = new Gcp.CloudScheduler.Inputs.JobHttpTargetArgs
 *         {
 *             HttpMethod = "POST",
 *             Uri = "https://example.com/ping",
 *             Body = Std.Base64encode.Invoke(new()
 *             {
 *                 Input = "{\"foo\":\"bar\"}",
 *             }).Apply(invoke => invoke.Result),
 *             Headers =
 *             {
 *                 { "Content-Type", "application/json" },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudscheduler"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
 * 			Input: "{\"foo\":\"bar\"}",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudscheduler.NewJob(ctx, "job", &cloudscheduler.JobArgs{
 * 			Paused:          pulumi.Bool(true),
 * 			Name:            pulumi.String("test-job"),
 * 			Description:     pulumi.String("test http job with updated fields"),
 * 			Schedule:        pulumi.String("*/8 * * * *"),
 * 			TimeZone:        pulumi.String("America/New_York"),
 * 			AttemptDeadline: pulumi.String("320s"),
 * 			RetryConfig: &cloudscheduler.JobRetryConfigArgs{
 * 				RetryCount: pulumi.Int(1),
 * 			},
 * 			HttpTarget: &cloudscheduler.JobHttpTargetArgs{
 * 				HttpMethod: pulumi.String("POST"),
 * 				Uri:        pulumi.String("https://example.com/ping"),
 * 				Body:       pulumi.String(invokeBase64encode.Result),
 * 				Headers: pulumi.StringMap{
 * 					"Content-Type": pulumi.String("application/json"),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.cloudscheduler.Job;
 * import com.pulumi.gcp.cloudscheduler.JobArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobRetryConfigArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobHttpTargetArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var job = new Job("job", JobArgs.builder()
 *             .paused(true)
 *             .name("test-job")
 *             .description("test http job with updated fields")
 *             .schedule("*/8 * * * *")
 *             .timeZone("America/New_York")
 *             .attemptDeadline("320s")
 *             .retryConfig(JobRetryConfigArgs.builder()
 *                 .retryCount(1)
 *                 .build())
 *             .httpTarget(JobHttpTargetArgs.builder()
 *                 .httpMethod("POST")
 *                 .uri("https://example.com/ping")
 *                 .body(StdFunctions.base64encode(Base64encodeArgs.builder()
 *                     .input("{\"foo\":\"bar\"}")
 *                     .build()).result())
 *                 .headers(Map.of("Content-Type", "application/json"))
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   job:
 *     type: gcp:cloudscheduler:Job
 *     properties:
 *       paused: true
 *       name: test-job
 *       description: test http job with updated fields
 *       schedule: '*/8 * * * *'
 *       timeZone: America/New_York
 *       attemptDeadline: 320s
 *       retryConfig:
 *         retryCount: 1
 *       httpTarget:
 *         httpMethod: POST
 *         uri: https://example.com/ping
 *         body:
 *           fn::invoke:
 *             Function: std:base64encode
 *             Arguments:
 *               input: '{"foo":"bar"}'
 *             Return: result
 *         headers:
 *           Content-Type: application/json
 * ```
 * 
 * ### Scheduler Job App Engine
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const job = new gcp.cloudscheduler.Job("job", {
 *     name: "test-job",
 *     schedule: "*/4 * * * *",
 *     description: "test app engine job",
 *     timeZone: "Europe/London",
 *     attemptDeadline: "320s",
 *     retryConfig: {
 *         minBackoffDuration: "1s",
 *         maxRetryDuration: "10s",
 *         maxDoublings: 2,
 *         retryCount: 3,
 *     },
 *     appEngineHttpTarget: {
 *         httpMethod: "POST",
 *         appEngineRouting: {
 *             service: "web",
 *             version: "prod",
 *             instance: "my-instance-001",
 *         },
 *         relativeUri: "/ping",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * job = gcp.cloudscheduler.Job("job",
 *     name="test-job",
 *     schedule="*/4 * * * *",
 *     description="test app engine job",
 *     time_zone="Europe/London",
 *     attempt_deadline="320s",
 *     retry_config={
 *         "min_backoff_duration": "1s",
 *         "max_retry_duration": "10s",
 *         "max_doublings": 2,
 *         "retry_count": 3,
 *     },
 *     app_engine_http_target={
 *         "http_method": "POST",
 *         "app_engine_routing": {
 *             "service": "web",
 *             "version": "prod",
 *             "instance": "my-instance-001",
 *         },
 *         "relative_uri": "/ping",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var job = new Gcp.CloudScheduler.Job("job", new()
 *     {
 *         Name = "test-job",
 *         Schedule = "*/4 * * * *",
 *         Description = "test app engine job",
 *         TimeZone = "Europe/London",
 *         AttemptDeadline = "320s",
 *         RetryConfig = new Gcp.CloudScheduler.Inputs.JobRetryConfigArgs
 *         {
 *             MinBackoffDuration = "1s",
 *             MaxRetryDuration = "10s",
 *             MaxDoublings = 2,
 *             RetryCount = 3,
 *         },
 *         AppEngineHttpTarget = new Gcp.CloudScheduler.Inputs.JobAppEngineHttpTargetArgs
 *         {
 *             HttpMethod = "POST",
 *             AppEngineRouting = new Gcp.CloudScheduler.Inputs.JobAppEngineHttpTargetAppEngineRoutingArgs
 *             {
 *                 Service = "web",
 *                 Version = "prod",
 *                 Instance = "my-instance-001",
 *             },
 *             RelativeUri = "/ping",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudscheduler"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudscheduler.NewJob(ctx, "job", &cloudscheduler.JobArgs{
 * 			Name:            pulumi.String("test-job"),
 * 			Schedule:        pulumi.String("*/4 * * * *"),
 * 			Description:     pulumi.String("test app engine job"),
 * 			TimeZone:        pulumi.String("Europe/London"),
 * 			AttemptDeadline: pulumi.String("320s"),
 * 			RetryConfig: &cloudscheduler.JobRetryConfigArgs{
 * 				MinBackoffDuration: pulumi.String("1s"),
 * 				MaxRetryDuration:   pulumi.String("10s"),
 * 				MaxDoublings:       pulumi.Int(2),
 * 				RetryCount:         pulumi.Int(3),
 * 			},
 * 			AppEngineHttpTarget: &cloudscheduler.JobAppEngineHttpTargetArgs{
 * 				HttpMethod: pulumi.String("POST"),
 * 				AppEngineRouting: &cloudscheduler.JobAppEngineHttpTargetAppEngineRoutingArgs{
 * 					Service:  pulumi.String("web"),
 * 					Version:  pulumi.String("prod"),
 * 					Instance: pulumi.String("my-instance-001"),
 * 				},
 * 				RelativeUri: pulumi.String("/ping"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.cloudscheduler.Job;
 * import com.pulumi.gcp.cloudscheduler.JobArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobRetryConfigArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobAppEngineHttpTargetArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobAppEngineHttpTargetAppEngineRoutingArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var job = new Job("job", JobArgs.builder()
 *             .name("test-job")
 *             .schedule("*/4 * * * *")
 *             .description("test app engine job")
 *             .timeZone("Europe/London")
 *             .attemptDeadline("320s")
 *             .retryConfig(JobRetryConfigArgs.builder()
 *                 .minBackoffDuration("1s")
 *                 .maxRetryDuration("10s")
 *                 .maxDoublings(2)
 *                 .retryCount(3)
 *                 .build())
 *             .appEngineHttpTarget(JobAppEngineHttpTargetArgs.builder()
 *                 .httpMethod("POST")
 *                 .appEngineRouting(JobAppEngineHttpTargetAppEngineRoutingArgs.builder()
 *                     .service("web")
 *                     .version("prod")
 *                     .instance("my-instance-001")
 *                     .build())
 *                 .relativeUri("/ping")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   job:
 *     type: gcp:cloudscheduler:Job
 *     properties:
 *       name: test-job
 *       schedule: '*/4 * * * *'
 *       description: test app engine job
 *       timeZone: Europe/London
 *       attemptDeadline: 320s
 *       retryConfig:
 *         minBackoffDuration: 1s
 *         maxRetryDuration: 10s
 *         maxDoublings: 2
 *         retryCount: 3
 *       appEngineHttpTarget:
 *         httpMethod: POST
 *         appEngineRouting:
 *           service: web
 *           version: prod
 *           instance: my-instance-001
 *         relativeUri: /ping
 * ```
 * 
 * ### Scheduler Job Oauth
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const default = gcp.compute.getDefaultServiceAccount({});
 * const job = new gcp.cloudscheduler.Job("job", {
 *     name: "test-job",
 *     description: "test http job",
 *     schedule: "*/8 * * * *",
 *     timeZone: "America/New_York",
 *     attemptDeadline: "320s",
 *     httpTarget: {
 *         httpMethod: "GET",
 *         uri: "https://cloudscheduler.googleapis.com/v1/projects/my-project-name/locations/us-west1/jobs",
 *         oauthToken: {
 *             serviceAccountEmail: _default.then(_default => _default.email),
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.compute.get_default_service_account()
 * job = gcp.cloudscheduler.Job("job",
 *     name="test-job",
 *     description="test http job",
 *     schedule="*/8 * * * *",
 *     time_zone="America/New_York",
 *     attempt_deadline="320s",
 *     http_target={
 *         "http_method": "GET",
 *         "uri": "https://cloudscheduler.googleapis.com/v1/projects/my-project-name/locations/us-west1/jobs",
 *         "oauth_token": {
 *             "service_account_email": default.email,
 *         },
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = Gcp.Compute.GetDefaultServiceAccount.Invoke();
 *     var job = new Gcp.CloudScheduler.Job("job", new()
 *     {
 *         Name = "test-job",
 *         Description = "test http job",
 *         Schedule = "*/8 * * * *",
 *         TimeZone = "America/New_York",
 *         AttemptDeadline = "320s",
 *         HttpTarget = new Gcp.CloudScheduler.Inputs.JobHttpTargetArgs
 *         {
 *             HttpMethod = "GET",
 *             Uri = "https://cloudscheduler.googleapis.com/v1/projects/my-project-name/locations/us-west1/jobs",
 *             OauthToken = new Gcp.CloudScheduler.Inputs.JobHttpTargetOauthTokenArgs
 *             {
 *                 ServiceAccountEmail = @default.Apply(@default => @default.Apply(getDefaultServiceAccountResult => getDefaultServiceAccountResult.Email)),
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudscheduler"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_default, err := compute.GetDefaultServiceAccount(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudscheduler.NewJob(ctx, "job", &cloudscheduler.JobArgs{
 * 			Name:            pulumi.String("test-job"),
 * 			Description:     pulumi.String("test http job"),
 * 			Schedule:        pulumi.String("*/8 * * * *"),
 * 			TimeZone:        pulumi.String("America/New_York"),
 * 			AttemptDeadline: pulumi.String("320s"),
 * 			HttpTarget: &cloudscheduler.JobHttpTargetArgs{
 * 				HttpMethod: pulumi.String("GET"),
 * 				Uri:        pulumi.String("https://cloudscheduler.googleapis.com/v1/projects/my-project-name/locations/us-west1/jobs"),
 * 				OauthToken: &cloudscheduler.JobHttpTargetOauthTokenArgs{
 * 					ServiceAccountEmail: pulumi.String(_default.Email),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.ComputeFunctions;
 * import com.pulumi.gcp.compute.inputs.GetDefaultServiceAccountArgs;
 * import com.pulumi.gcp.cloudscheduler.Job;
 * import com.pulumi.gcp.cloudscheduler.JobArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobHttpTargetArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobHttpTargetOauthTokenArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         final var default = ComputeFunctions.getDefaultServiceAccount();
 *         var job = new Job("job", JobArgs.builder()
 *             .name("test-job")
 *             .description("test http job")
 *             .schedule("*/8 * * * *")
 *             .timeZone("America/New_York")
 *             .attemptDeadline("320s")
 *             .httpTarget(JobHttpTargetArgs.builder()
 *                 .httpMethod("GET")
 *                 .uri("https://cloudscheduler.googleapis.com/v1/projects/my-project-name/locations/us-west1/jobs")
 *                 .oauthToken(JobHttpTargetOauthTokenArgs.builder()
 *                     .serviceAccountEmail(default_.email())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   job:
 *     type: gcp:cloudscheduler:Job
 *     properties:
 *       name: test-job
 *       description: test http job
 *       schedule: '*/8 * * * *'
 *       timeZone: America/New_York
 *       attemptDeadline: 320s
 *       httpTarget:
 *         httpMethod: GET
 *         uri: https://cloudscheduler.googleapis.com/v1/projects/my-project-name/locations/us-west1/jobs
 *         oauthToken:
 *           serviceAccountEmail: ${default.email}
 * variables:
 *   default:
 *     fn::invoke:
 *       Function: gcp:compute:getDefaultServiceAccount
 *       Arguments: {}
 * ```
 * 
 * ### Scheduler Job Oidc
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const default = gcp.compute.getDefaultServiceAccount({});
 * const job = new gcp.cloudscheduler.Job("job", {
 *     name: "test-job",
 *     description: "test http job",
 *     schedule: "*/8 * * * *",
 *     timeZone: "America/New_York",
 *     attemptDeadline: "320s",
 *     httpTarget: {
 *         httpMethod: "GET",
 *         uri: "https://example.com/ping",
 *         oidcToken: {
 *             serviceAccountEmail: _default.then(_default => _default.email),
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.compute.get_default_service_account()
 * job = gcp.cloudscheduler.Job("job",
 *     name="test-job",
 *     description="test http job",
 *     schedule="*/8 * * * *",
 *     time_zone="America/New_York",
 *     attempt_deadline="320s",
 *     http_target={
 *         "http_method": "GET",
 *         "uri": "https://example.com/ping",
 *         "oidc_token": {
 *             "service_account_email": default.email,
 *         },
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = Gcp.Compute.GetDefaultServiceAccount.Invoke();
 *     var job = new Gcp.CloudScheduler.Job("job", new()
 *     {
 *         Name = "test-job",
 *         Description = "test http job",
 *         Schedule = "*/8 * * * *",
 *         TimeZone = "America/New_York",
 *         AttemptDeadline = "320s",
 *         HttpTarget = new Gcp.CloudScheduler.Inputs.JobHttpTargetArgs
 *         {
 *             HttpMethod = "GET",
 *             Uri = "https://example.com/ping",
 *             OidcToken = new Gcp.CloudScheduler.Inputs.JobHttpTargetOidcTokenArgs
 *             {
 *                 ServiceAccountEmail = @default.Apply(@default => @default.Apply(getDefaultServiceAccountResult => getDefaultServiceAccountResult.Email)),
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudscheduler"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_default, err := compute.GetDefaultServiceAccount(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudscheduler.NewJob(ctx, "job", &cloudscheduler.JobArgs{
 * 			Name:            pulumi.String("test-job"),
 * 			Description:     pulumi.String("test http job"),
 * 			Schedule:        pulumi.String("*/8 * * * *"),
 * 			TimeZone:        pulumi.String("America/New_York"),
 * 			AttemptDeadline: pulumi.String("320s"),
 * 			HttpTarget: &cloudscheduler.JobHttpTargetArgs{
 * 				HttpMethod: pulumi.String("GET"),
 * 				Uri:        pulumi.String("https://example.com/ping"),
 * 				OidcToken: &cloudscheduler.JobHttpTargetOidcTokenArgs{
 * 					ServiceAccountEmail: pulumi.String(_default.Email),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.ComputeFunctions;
 * import com.pulumi.gcp.compute.inputs.GetDefaultServiceAccountArgs;
 * import com.pulumi.gcp.cloudscheduler.Job;
 * import com.pulumi.gcp.cloudscheduler.JobArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobHttpTargetArgs;
 * import com.pulumi.gcp.cloudscheduler.inputs.JobHttpTargetOidcTokenArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         final var default = ComputeFunctions.getDefaultServiceAccount();
 *         var job = new Job("job", JobArgs.builder()
 *             .name("test-job")
 *             .description("test http job")
 *             .schedule("*/8 * * * *")
 *             .timeZone("America/New_York")
 *             .attemptDeadline("320s")
 *             .httpTarget(JobHttpTargetArgs.builder()
 *                 .httpMethod("GET")
 *                 .uri("https://example.com/ping")
 *                 .oidcToken(JobHttpTargetOidcTokenArgs.builder()
 *                     .serviceAccountEmail(default_.email())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   job:
 *     type: gcp:cloudscheduler:Job
 *     properties:
 *       name: test-job
 *       description: test http job
 *       schedule: '*/8 * * * *'
 *       timeZone: America/New_York
 *       attemptDeadline: 320s
 *       httpTarget:
 *         httpMethod: GET
 *         uri: https://example.com/ping
 *         oidcToken:
 *           serviceAccountEmail: ${default.email}
 * variables:
 *   default:
 *     fn::invoke:
 *       Function: gcp:compute:getDefaultServiceAccount
 *       Arguments: {}
 * ```
 * 
 * ## Import
 * Job can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{region}}/jobs/{{name}}`
 * * `{{project}}/{{region}}/{{name}}`
 * * `{{region}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, Job can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:cloudscheduler/job:Job default projects/{{project}}/locations/{{region}}/jobs/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:cloudscheduler/job:Job default {{project}}/{{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:cloudscheduler/job:Job default {{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:cloudscheduler/job:Job default {{name}}
 * ```
 * @property appEngineHttpTarget App Engine HTTP target.
 * If the job providers a App Engine HTTP target the cron will
 * send a request to the service instance
 * Structure is documented below.
 * @property attemptDeadline The deadline for job attempts. If the request handler does not respond by this deadline then the request is
 * cancelled and the attempt is marked as a DEADLINE_EXCEEDED failure. The failed attempt can be viewed in
 * execution logs. Cloud Scheduler will retry the job according to the RetryConfig.
 * The allowed duration for this deadline is:
 * * For HTTP targets, between 15 seconds and 30 minutes.
 * * For App Engine HTTP targets, between 15 seconds and 24 hours.
 * * **Note**: For PubSub targets, this field is ignored - setting it will introduce an unresolvable diff.
 * A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s"
 * @property description A human-readable description for the job.
 * This string must not contain more than 500 characters.
 * @property httpTarget HTTP target.
 * If the job providers a http_target the cron will
 * send a request to the targeted url
 * Structure is documented below.
 * @property name The name of the job.
 * - - -
 * @property paused Sets the job to a paused state. Jobs default to being enabled when this property is not set.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property pubsubTarget Pub/Sub target
 * If the job providers a Pub/Sub target the cron will publish
 * a message to the provided topic
 * Structure is documented below.
 * @property region Region where the scheduler job resides. If it is not provided, this provider will use the provider default.
 * @property retryConfig By default, if a job does not complete successfully,
 * meaning that an acknowledgement is not received from the handler,
 * then it will be retried with exponential backoff according to the settings
 * Structure is documented below.
 * @property schedule Describes the schedule on which the job will be executed.
 * @property timeZone Specifies the time zone to be used in interpreting schedule.
 * The value of this field must be a time zone name from the tz database.
 */
public data class JobArgs(
    public val appEngineHttpTarget: Output? = null,
    public val attemptDeadline: Output? = null,
    public val description: Output? = null,
    public val httpTarget: Output? = null,
    public val name: Output? = null,
    public val paused: Output? = null,
    public val project: Output? = null,
    public val pubsubTarget: Output? = null,
    public val region: Output? = null,
    public val retryConfig: Output? = null,
    public val schedule: Output? = null,
    public val timeZone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudscheduler.JobArgs =
        com.pulumi.gcp.cloudscheduler.JobArgs.builder()
            .appEngineHttpTarget(
                appEngineHttpTarget?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .attemptDeadline(attemptDeadline?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .httpTarget(httpTarget?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .paused(paused?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .pubsubTarget(pubsubTarget?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .region(region?.applyValue({ args0 -> args0 }))
            .retryConfig(retryConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .schedule(schedule?.applyValue({ args0 -> args0 }))
            .timeZone(timeZone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [JobArgs].
 */
@PulumiTagMarker
public class JobArgsBuilder internal constructor() {
    private var appEngineHttpTarget: Output? = null

    private var attemptDeadline: Output? = null

    private var description: Output? = null

    private var httpTarget: Output? = null

    private var name: Output? = null

    private var paused: Output? = null

    private var project: Output? = null

    private var pubsubTarget: Output? = null

    private var region: Output? = null

    private var retryConfig: Output? = null

    private var schedule: Output? = null

    private var timeZone: Output? = null

    /**
     * @param value App Engine HTTP target.
     * If the job providers a App Engine HTTP target the cron will
     * send a request to the service instance
     * Structure is documented below.
     */
    @JvmName("wodannxysudyojhv")
    public suspend fun appEngineHttpTarget(`value`: Output) {
        this.appEngineHttpTarget = value
    }

    /**
     * @param value The deadline for job attempts. If the request handler does not respond by this deadline then the request is
     * cancelled and the attempt is marked as a DEADLINE_EXCEEDED failure. The failed attempt can be viewed in
     * execution logs. Cloud Scheduler will retry the job according to the RetryConfig.
     * The allowed duration for this deadline is:
     * * For HTTP targets, between 15 seconds and 30 minutes.
     * * For App Engine HTTP targets, between 15 seconds and 24 hours.
     * * **Note**: For PubSub targets, this field is ignored - setting it will introduce an unresolvable diff.
     * A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s"
     */
    @JvmName("ssklyddppebjrdrj")
    public suspend fun attemptDeadline(`value`: Output) {
        this.attemptDeadline = value
    }

    /**
     * @param value A human-readable description for the job.
     * This string must not contain more than 500 characters.
     */
    @JvmName("ldrdanlvicrqftrg")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value HTTP target.
     * If the job providers a http_target the cron will
     * send a request to the targeted url
     * Structure is documented below.
     */
    @JvmName("rsvmpmqjfgqbdilh")
    public suspend fun httpTarget(`value`: Output) {
        this.httpTarget = value
    }

    /**
     * @param value The name of the job.
     * - - -
     */
    @JvmName("ajhtjpbhuptfqhxn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Sets the job to a paused state. Jobs default to being enabled when this property is not set.
     */
    @JvmName("uqsvfiuwtyaokcof")
    public suspend fun paused(`value`: Output) {
        this.paused = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("yupyswwqxignnpft")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Pub/Sub target
     * If the job providers a Pub/Sub target the cron will publish
     * a message to the provided topic
     * Structure is documented below.
     */
    @JvmName("uxojtrjyitblrahv")
    public suspend fun pubsubTarget(`value`: Output) {
        this.pubsubTarget = value
    }

    /**
     * @param value Region where the scheduler job resides. If it is not provided, this provider will use the provider default.
     */
    @JvmName("xtwhkwllkvpyryow")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value By default, if a job does not complete successfully,
     * meaning that an acknowledgement is not received from the handler,
     * then it will be retried with exponential backoff according to the settings
     * Structure is documented below.
     */
    @JvmName("vntkdojycsdjbsdb")
    public suspend fun retryConfig(`value`: Output) {
        this.retryConfig = value
    }

    /**
     * @param value Describes the schedule on which the job will be executed.
     */
    @JvmName("bqipxbcheejmksfn")
    public suspend fun schedule(`value`: Output) {
        this.schedule = value
    }

    /**
     * @param value Specifies the time zone to be used in interpreting schedule.
     * The value of this field must be a time zone name from the tz database.
     */
    @JvmName("oqwrfgowxhnimlbn")
    public suspend fun timeZone(`value`: Output) {
        this.timeZone = value
    }

    /**
     * @param value App Engine HTTP target.
     * If the job providers a App Engine HTTP target the cron will
     * send a request to the service instance
     * Structure is documented below.
     */
    @JvmName("dvwyxvkflplbdwqe")
    public suspend fun appEngineHttpTarget(`value`: JobAppEngineHttpTargetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appEngineHttpTarget = mapped
    }

    /**
     * @param argument App Engine HTTP target.
     * If the job providers a App Engine HTTP target the cron will
     * send a request to the service instance
     * Structure is documented below.
     */
    @JvmName("ujdsyerekuharfrv")
    public suspend fun appEngineHttpTarget(argument: suspend JobAppEngineHttpTargetArgsBuilder.() -> Unit) {
        val toBeMapped = JobAppEngineHttpTargetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.appEngineHttpTarget = mapped
    }

    /**
     * @param value The deadline for job attempts. If the request handler does not respond by this deadline then the request is
     * cancelled and the attempt is marked as a DEADLINE_EXCEEDED failure. The failed attempt can be viewed in
     * execution logs. Cloud Scheduler will retry the job according to the RetryConfig.
     * The allowed duration for this deadline is:
     * * For HTTP targets, between 15 seconds and 30 minutes.
     * * For App Engine HTTP targets, between 15 seconds and 24 hours.
     * * **Note**: For PubSub targets, this field is ignored - setting it will introduce an unresolvable diff.
     * A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s"
     */
    @JvmName("njrwagopqsvhiaav")
    public suspend fun attemptDeadline(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attemptDeadline = mapped
    }

    /**
     * @param value A human-readable description for the job.
     * This string must not contain more than 500 characters.
     */
    @JvmName("esbnbunwpujordsv")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value HTTP target.
     * If the job providers a http_target the cron will
     * send a request to the targeted url
     * Structure is documented below.
     */
    @JvmName("gbocqaifvffnkhyx")
    public suspend fun httpTarget(`value`: JobHttpTargetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpTarget = mapped
    }

    /**
     * @param argument HTTP target.
     * If the job providers a http_target the cron will
     * send a request to the targeted url
     * Structure is documented below.
     */
    @JvmName("umvnqowvsudpoohu")
    public suspend fun httpTarget(argument: suspend JobHttpTargetArgsBuilder.() -> Unit) {
        val toBeMapped = JobHttpTargetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.httpTarget = mapped
    }

    /**
     * @param value The name of the job.
     * - - -
     */
    @JvmName("cfpgdnimoghfnrpp")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Sets the job to a paused state. Jobs default to being enabled when this property is not set.
     */
    @JvmName("hptpkrsurvcpvjcu")
    public suspend fun paused(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.paused = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("nowojsjoainleutb")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Pub/Sub target
     * If the job providers a Pub/Sub target the cron will publish
     * a message to the provided topic
     * Structure is documented below.
     */
    @JvmName("iruwvyjkqwembcln")
    public suspend fun pubsubTarget(`value`: JobPubsubTargetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pubsubTarget = mapped
    }

    /**
     * @param argument Pub/Sub target
     * If the job providers a Pub/Sub target the cron will publish
     * a message to the provided topic
     * Structure is documented below.
     */
    @JvmName("yjqarhfpfycqguuj")
    public suspend fun pubsubTarget(argument: suspend JobPubsubTargetArgsBuilder.() -> Unit) {
        val toBeMapped = JobPubsubTargetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.pubsubTarget = mapped
    }

    /**
     * @param value Region where the scheduler job resides. If it is not provided, this provider will use the provider default.
     */
    @JvmName("xoplqvldmqmahisf")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value By default, if a job does not complete successfully,
     * meaning that an acknowledgement is not received from the handler,
     * then it will be retried with exponential backoff according to the settings
     * Structure is documented below.
     */
    @JvmName("xqfaqdvcrvkhnoaj")
    public suspend fun retryConfig(`value`: JobRetryConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retryConfig = mapped
    }

    /**
     * @param argument By default, if a job does not complete successfully,
     * meaning that an acknowledgement is not received from the handler,
     * then it will be retried with exponential backoff according to the settings
     * Structure is documented below.
     */
    @JvmName("nojgsupwfmrnxebg")
    public suspend fun retryConfig(argument: suspend JobRetryConfigArgsBuilder.() -> Unit) {
        val toBeMapped = JobRetryConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.retryConfig = mapped
    }

    /**
     * @param value Describes the schedule on which the job will be executed.
     */
    @JvmName("aoycmykqrmxnesxf")
    public suspend fun schedule(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedule = mapped
    }

    /**
     * @param value Specifies the time zone to be used in interpreting schedule.
     * The value of this field must be a time zone name from the tz database.
     */
    @JvmName("xqhexakslfxxpjfh")
    public suspend fun timeZone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeZone = mapped
    }

    internal fun build(): JobArgs = JobArgs(
        appEngineHttpTarget = appEngineHttpTarget,
        attemptDeadline = attemptDeadline,
        description = description,
        httpTarget = httpTarget,
        name = name,
        paused = paused,
        project = project,
        pubsubTarget = pubsubTarget,
        region = region,
        retryConfig = retryConfig,
        schedule = schedule,
        timeZone = timeZone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy