{
  "description": "DataflowFlexTemplateJob is the Schema for the DataflowFlexTemplateJob API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "DataflowFlexTemplateJobSpec defines the desired state of DataflowFlexTemplateJob",
      "properties": {
        "additionalExperiments": {
          "description": "Additional experiment flags for the job.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "autoscalingAlgorithm": {
          "description": "The algorithm to use for autoscaling",
          "type": "string"
        },
        "containerSpecGcsPath": {
          "description": "Cloud Storage path to a file with json serialized ContainerSpec as content.",
          "type": "string"
        },
        "enableStreamingEngine": {
          "description": "Whether to enable Streaming Engine for the job.",
          "type": "boolean"
        },
        "ipConfiguration": {
          "description": "Configuration for VM IPs.",
          "type": "string"
        },
        "kmsKeyNameRef": {
          "description": "The Cloud KMS key for the job.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "A reference to an externally managed KMSCryptoKey. Should be in the format `projects/[kms_project_id]/locations/[region]/keyRings/[key_ring_id]/cryptoKeys/[key]`.",
              "type": "string"
            },
            "name": {
              "description": "The `name` of a `KMSCryptoKey` resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The `namespace` of a `KMSCryptoKey` resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "launcherMachineType": {
          "description": "The machine type to use for launching the job. The default is n1-standard-1.",
          "type": "string"
        },
        "machineType": {
          "description": "The machine type to use for the job. Defaults to the value from the template if not specified.",
          "type": "string"
        },
        "maxWorkers": {
          "description": "The maximum number of Google Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000.",
          "format": "int32",
          "type": "integer"
        },
        "networkRef": {
          "description": "Network to which VMs will be assigned.  If empty or unspecified, the service will use the network \"default\".",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "The value of an externally managed ComputeNetwork resource. Should be in the format \"https://www.googleapis.com/compute/{{version}}/projects/{{projectId}}/global/networks/{{networkId}}\" or \"projects/{{projectId}}/global/networks/{{networkId}}\"",
              "type": "string"
            },
            "name": {
              "description": "The name of a ComputeNetwork resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The namespace of a ComputeNetwork resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "numWorkers": {
          "description": "The initial number of Google Compute Engine instances for the job.",
          "format": "int32",
          "type": "integer"
        },
        "parameters": {
          "description": "The parameters for FlexTemplate. Ex. {\"num_workers\":\"5\"}",
          "type": "object",
          "x-kubernetes-preserve-unknown-fields": true
        },
        "region": {
          "description": "Immutable. The region in which the created job should run.",
          "type": "string"
        },
        "sdkContainerImage": {
          "description": "Docker registry location of container image to use for the 'worker harness. Default is the container for the version of the SDK. Note this field is only valid for portable pipelines.",
          "type": "string"
        },
        "serviceAccountEmailRef": {
          "description": "The email address of the service account to run the job as.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "The `email` field of an `IAMServiceAccount` resource.",
              "type": "string"
            },
            "name": {
              "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
              "type": "string"
            },
            "namespace": {
              "description": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "stagingLocation": {
          "description": "The Cloud Storage path for staging local files. Must be a valid Cloud Storage URL, beginning with `gs://`.",
          "type": "string"
        },
        "subnetworkRef": {
          "description": "Subnetwork to which VMs will be assigned, if desired. You can specify a subnetwork using either a complete URL or an abbreviated path. Expected to be of the form \"https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK\" or \"regions/REGION/subnetworks/SUBNETWORK\". If the subnetwork is located in a Shared VPC network, you must use the complete URL.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "The ComputeSubnetwork selflink of form \"projects/{{project}}/regions/{{region}}/subnetworks/{{name}}\", when not managed by Config Connector.",
              "type": "string"
            },
            "name": {
              "description": "The `name` field of a `ComputeSubnetwork` resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The `namespace` field of a `ComputeSubnetwork` resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "tempLocation": {
          "description": "The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with `gs://`.",
          "type": "string"
        },
        "transformNameMapping": {
          "description": "Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job. Only applicable when updating a pipeline.",
          "type": "object",
          "x-kubernetes-preserve-unknown-fields": true
        }
      },
      "required": [
        "containerSpecGcsPath"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "DataflowFlexTemplateJobStatus defines the config connector machine state of DataflowFlexTemplateJob",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of the object's current state.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about last transition.",
                "type": "string"
              },
              "reason": {
                "description": "Unique, one-word, CamelCase reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status is the status of the condition. Can be True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the condition.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "jobId": {
          "type": "string"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.",
          "format": "int64",
          "type": "integer"
        },
        "state": {
          "description": "The current state of the job.\n\n Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise\n specified.\n\n A job in the `JOB_STATE_RUNNING` state may asynchronously enter a\n terminal state. After a job has reached a terminal state, no\n further state updates may be made.\n\n This field may be mutated by the Cloud Dataflow service;\n callers cannot mutate it.",
          "type": "string"
        },
        "type": {
          "description": "The type of Cloud Dataflow job.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
